Introduction: Arduinoflake
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!
Attachments
Step 6: Schematics

Second Prize in the
Make it Glow Contest 2018
53 Comments
Question 4 years ago
If I put 820ohm instead of 860ohm resistor on touch ring, will it still work?
Answer 4 years 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.
Reply 1 year ago
I was taught different in electronic school about the current limiting resistor as follows (A current limiting resistor regulates and reduces the current in a circuit. This equation and calculator helps determine the value of the resistor to add to a light-emitting diode (LED) so that it can limit the current moving through the LED.) I was never taught by the engineer who taught the class about static electricity being prevented from damaging the LED. I was taught that was the job of the static wrist strap that the person weares when working with FET'S .
2 years ago
Hey i was looking at the 328p datasheet and it says the current per pin is 40mA and for the whole port its 30mA. Have you measured how much current you're drawing? What's the voltage across any of your current limiting resistors?
Question 3 years ago
The code has uploaded to my nano clone, but it seems to freeze after the fourth animation. Also, every second animation automatically changes after two seconds. Is there a reason for there two issues?
4 years 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!
Reply 4 years 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 :)
4 years 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 :)
Reply 4 years 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.
Reply 4 years 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.
Question 4 years 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.
Reply 4 years 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?
4 years 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.
Reply 4 years 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!
Reply 4 years 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?
Reply 4 years 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.
Reply 4 years 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 ;)
Reply 4 years 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.
4 years 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.
Reply 4 years 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!