Arduinoflake

31,051

252

50

About: Software developer during day, hardware maker at night.

A freeform interactive snowflake animated by Arduino Nano. Using 17 independent PWM channels and touch sensor it can create awesome effects!

There is also a PCB version everybody can make!

Step 1: Overview

The snowflake consists of 30 LEDs grouped into 17 independent segments which can be controlled separately by Arduino Nano microcontroller. Each of the LED group can be dimmed with PWM to create some lovely animations.

Step 2: ​Tools

All you gonna need is soldering iron, solder, and pliers.

Step 3: Construction

First of all select some pattern. I choose a nice and simple snowflake crystal and print it to the size to fit Arduino Nano inside the hexagon - core of the crystal.

The support structure which also acts as a wiring is created from 0.8mm brass rods soldered together with tin. I've used 2m of the rod in total. Why freeform? Because I always wanted to try that and it's a test of your patience and skill.

First I created a core hexagon by bending a single rod and soldered the ends together. By adding another 6 rods to the tops of the hexagon the ground wiring is complete, all cathode leads of LEDs now need to be soldered to it to create a snowflake pattern. The tricky part was adding the SMD LEDs but I helped myself with a jig created from a cardboard and a double-sided tape.

Next, it was time to add the Arduino Nano microcontroller under the core structure leaving enough space in between to fit 3 layers of brass rod wirings which will connect microcontroller pins to all the LED anode leads. This required a tremendous amount of patience. Not only you need to avoid a short circuit between the wires but also add a current limiting resistor and make it look nice.

Leaf LEDs are connected separately each to the nearest Arduino's output pin. Branch LEDs are grouped by two and connected to PWM pins. Core LEDs are also grouped by two and connected to the rest of the pins. Arduino NANO has only 18 output pins (A6 and A7 are input only) and I need one pin for the touch sensor, that left me with only 17 pins so the two pairs of core LEDs are connected together to create a group of 4. I am using 220Ω resistors to limit the current flowing thru each pin to around 8mA. That means 240mA in total which is little high for ATmega328 chip but it works - safe maximum is said to be 200mA.

Step 4: Touch Sensor

To be able to interact with a snowflake I added another brass rod to create a capacitive touch sensor. I found a great library and tutorial by Paul Stoffregen. The touch sensor is used to interact with the arduinoflake - change animation, turn on/off, sparkle when touched, you name it...

Step 5: Code

Originally I thought I will be able to only dim the branch LEDs which are connected to hardware PWM pins. But luckily there exists an awesome software PWM library which allowed me to use all the pins as if they were hardware PWM. This setup created endless possibilities for animations! Check out the code attached below with some of the first animations.

If you like it please vote for it in Make it Glow Contest right under this article, thank you!


Step 6: Schematics

Make it Glow Contest 2018

Second Prize in the
Make it Glow Contest 2018

5 People Made This Project!

Recommendations

  • Faux-Real Contest

    Faux-Real Contest
  • PCB Contest

    PCB Contest
  • Comfort Food Challenge

    Comfort Food Challenge

50 Discussions

0
None
WilliamM25

22 days ago on Step 3

Beautiful work jiripraus, Congrats! I will make one for myself ;0)
Just one thing, the Arduino Nano uses the ATmega328P IC (the same as the Arduino Uno) that has 14 digital I/O pins (D0-D13) and 6 analog I/O pins (A0 to A5), those are 20 I/O pins in total.
Pins D0 and D1 (marked as RX0 and TX1 on the board), are used for Serial communication, therefore, if you don't use serial communication in your sketch (you don't, just delete the line Serial.begin (115200); because you don't need it), you can use one of them to connect separately the pair of LEDs that you had to join.
Thanks for sharing!

1 reply
0
None
jiriprausWilliamM25

Reply 9 days ago

Really nice build, man! Yes, you are right D0 and D1 are usable as well if you don't need serial debug, which I like to use :)

0
None
Visje1990

22 days ago

Awesome project! I'm trying to make one myself, but i am having trouble programming it.
When i try to verify or upload the code i get an error message saying:
"Arduino\libraries\ADCTouchSensor-master\src/ADCTouchSensor.h:46: error: 'ADCTOUCH_DEFAULT_DELAY' was not declared in this scope"
I have imported the right library.
Do you know how i can fix this?
Thanks :)

2 replies
0
None
WilliamM25Visje1990

Reply 20 days ago

Hi, it seems like something is wrong with the "ADCTouchSensor" library that you are using. You should try to install it again, the latest version is 0.0.9.

Imagen2.jpg
0
None
Visje1990WilliamM25

Reply 10 days ago

Thanks for your reply!
When i was looking for the library manager it apperently wasn't there.
Apperently i had a realy old version of Arduino IDE installed that, besides not having the library manager, somehow didn't work with the program.
After updating to a newer version it programmed just fine.

0
None
AlexP436

Question 18 days ago

If I put 820ohm instead of 860ohm resistor on touch ring, will it still work?

1 answer
1
None
jiriprausAlexP436

Answer 16 days ago

Sure, 860ohm resistor is a current limiting resistor to prevent Arduino pin from burning out from static electricity. I think anything between 200-1000 ohms is just fine.

The other 10M resistor configures the sensitivity of touch sensor, values from 1M to 22M should work.

0
None
SteveW248

Question 5 weeks ago

Awesome project!
I'm trying to 'plug and play' this code using a Teensy LC board, but am getting an error stating 'Error compiling to device Teensy LC' (see image). Seems to be somewhere after line 120. Any suggestions? The board is working fine with other code.

Capture.PNG
1 answer
0
None
jiriprausSteveW248

Reply 4 weeks ago

Hi, it's so obvious, how can I even write such code? :D Byte type can only stores values from 0-255. That means that -1 in array does not make sense, some compiler will allow it some not, change the type of array to int8_t, does it helped?

0
None
Wrrr 10-G

6 weeks ago

Haha, I noticed you sneaked in an SMD resistor on A0, for the 'sensor ring'. Did you do that to increase rigidity of the structure? I can imagine.. everything's so tiny, and so non-insulated :)
For the same purpose, I am considering using your 'original' 4-resistors-in-a-row in A0 to A3, and glueing them together to serve as a structural pillar.

5 replies
0
None
jiriprausWrrr 10-G

Reply 6 weeks ago

It is surprisingly rigid, I was very pleased with the result. I didn't have a 1M THT resistor at the moment so I used the SMD one, and it was a mistake! It looks nice but it broke several times, the pads on an SMD resistor are very easy to break. I actually replaced that with a THT resistor in later upgrade :) Let me see your build once done!

0
None
Wrrr 10-Gjiripraus

Reply 5 weeks ago

Hey Jiri, I uploaded 2 photos of my build last weekend, but something went wrong apparently. So once more...
As you can see, the structure only differs slightly from your design. See it as a tribute :)
Have you seen the new hackaday 'circuit sculpture' contest?

Yuleduino1.jpgYuleduino2.jpg
0
None
jiriprausWrrr 10-G

Reply 5 weeks ago

Hi, I am impressed! Really great job man, I love it! Seems like an exact copy of mine :)
How long does it take? Any major problems?
As for 'circuit sculpture' contest, yes I've submitted my Arduinoflake there.

0
None
Wrrr 10-Gjiripraus

Reply 5 weeks ago

I just saw Mohit Bhoite's tweets, and found your Christmas ball there..
Wow man, that's awesome and somewhat humbling... You guys...
I will be making something like he did with a 'breathing' led, made with discrete THT's.

Have you ever seen the educational work by Jie Qi? Her work is 2D but her Chibitronics website will give you more inspiration I'm sure.

This is the stuff that makes kids want to start soldering ;)

0
None
Wrrr 10-Gjiripraus

Reply 5 weeks ago

In spite of your hard work, it took me 8 hours!. Before that, I studied your '3D routing' and rearranged some brass lines in my drawings, trying to think of the design as consisting of 4 layers.
The 'iced' leds I had laying about look pretty good when lit.
I gave the 'Yuleduino' to my parents who are very pleased with it.

0
None
brmisawesome

6 weeks ago

Do you just leave power connected from a wallwort? I often see projects that are cool or interesting, but it's rare to immediately want to start making something. I've ordered brass and some more nanos, but copper is already being laid out for a first prototype.

1 reply
0
None
jiriprausbrmisawesome

Reply 5 weeks ago

Thank you! Yes, I did not have a battery pack when making these photos and also the wire and connector acted as a support. Let me know what you've made!

0
None
rhartinstruct

5 weeks ago on Step 6

Beautiful project. Thank you for the idea. I have nearly mine completed. 1 mm brass rod will fit the Nano I/O connections if you gently force it. Please note that the library for the touch sensor is at github.com/arpruss/ADCTouchSensor. The library mentioned in the text by Paul Stoffregen will not work without modification.

0
None
asegal0000

7 weeks ago

Is it really .8mm brass rods? That seems very thin.

1 reply
0
None
jiriprausasegal0000

Reply 6 weeks ago

It's the largest diameter that can fit into Arduino Nano holes. It very flexible but pretty strong once done intro such construction.