Connect WS2812 LED Ring to an ATTiny85
Using an ATTiny85 with a WS2812 LED Ring
Arduinos are wonderful and easy to work with and available in various sizes, depending on your computing requirements. The ATTiny85 based controller features six input/output connections with a clock running at 16MHz. Memory onboard includes 8k of Flash memory with 512 bytes of RAM.
The capabilities of the ATTiny85 allows for interfacing possibilities with many types of sensors, controlling different types of loads and even the options of driving addressable LEDs like WS2811, WS2812 NeoPixel display.
ATTiny85 to LED Ring Connection
- The Power and Ground solder pads on each ring are connected to each other to provide power to each of the rings.
- Run a single wire from each Vcc pad on each ring and attach it back to the ATTiny85
- Follow the same process for the GND connection on each ring.
- The Signal lead should also include a series resistor to protect the processor from stray voltages coming back on the signal pin. We recommend a 470-ohm, one-quarter watt resistor for the series protection resistor. The connection process for the signal lead is:
- From the P1 pin on the ATTiny85, connect to one side of the 470-ohm resistor
- The other lead of the 470-ohm connects to the DI (Data In) solder pad of the first ring
- To attach to the next ring, a connection is established from the DO (Data Out) pin and connected to the DI pin on the next ring
- The DO to DI jumper is applied to each ring (from the 24-LED board to the 16-LED board, from the 16-LED board to the 12-LED board, from the 12-LED board to the 8-LED board and finally from the 8-LED board to the 1-LED board).
ATtiny85 Software Sketch for NeoPIXEL Ring Set
When you have completed connecting your ATtiny85 to the NeoPIXEL ring set, you require software for your ATTiny85. The software sketch is programmed into your ATtiny85 using the Arduino software.
The software sketch is a demonstration displaying some of the possibilities and effects possible. The code can be modified to select only the variations you need or you can expand upon the sample provided.
Code Download: ATTiny85-Ring-Demo.zip (updated 2019-10-17)
Why A Series Protection Resistor?
We have recommended a resistor on the DI lead from the ATtiny85 to the first LED ring. There were several people inquiring why it was there. This is a good question as all the prototype systems we built did not include the series resistor.
The best explanation we have for the resistor is if you supply power separately to the LED Rings and another supply to the ATtiny85. This would be very common if you have larger strings of LEDs, which would require more current to operate. With the series resistor, this would limit the possibilities of current flow between the two separate power supplies. If you are only going to use a single power input to the circuit, the 470-ohm resistor would be optional and not required to operate.