Arduinoflake

by jiripraus in Circuits > Arduino

51505 Views, 372 Favorites, 0 Comments

Arduinoflake

PB292236.JPG

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!

Overview

Arduinoflake touch interaction

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.

​Tools

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

Construction

PB272175.JPG
PB272178.JPG
PB272179.JPG
PB272180.JPG
PB272181.JPG
PB272182.JPG
PC012267.JPG
PB292211.JPG
PC012265.JPG
PC012269.JPG

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.

Touch Sensor

PB292207.JPG
PB292249.JPG
PB292250.JPG

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...

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!


Downloads

Schematics

Schematic_Arduinoflake_Sheet-1_20181130203444.png