AtTiny85 Addressable LED Strip

by DBS123 in Circuits > Arduino

1209 Views, 3 Favorites, 0 Comments

AtTiny85 Addressable LED Strip

5E2F1013-1D9F-40DD-9C28-192E0A0F2B3A.jpeg

My goal was to make a desk lamp from LEDs.
I wanted it to be adjustable, so it could be used both at day and night.
In my first attempt, I used a simple LED strip, and big MOS-FETs to drive them at 12v.
This time I chose addressable LEDs which are powered by 5v.
This reduced the component count significantly and allows for much more customization, like transition effects.

Supplies

Parts:

Tools For construction:

  • Soldering iron and solder wire.
  • Drill and wood/plastic bits.
  • Hot glue gun.
  • A PC to program the microcontroller.

Drill a Hole for the Button.

FD709869-CB26-4AE3-BBB1-C9D428C1AAEE.jpeg
C4C9CAE4-34AA-4CBC-8C28-A6DB26D7155E.jpeg

I wanted the control to be almost seamless.
So I chose to use a capacitive touch button and installed it at the surface level.
To do so, I drilled a shallow hole at the shelf center with a 20mm drill and at its center used a 4mm drill to make a hole for the wires.

Solder Wires to the Button.

924A6D97-21E3-4EB0-906F-7CEE5E2F9A6F.jpeg
2B49DFD4-9161-4566-AB01-813A133C6614.jpeg

Solder 3 wires to the component side of the button, to keep the other side as smooth as possible.
Use colored wires and remember which color is soldered to each pin, It will not be possible to have a look later on.
This device is very sensitive to inverse polarity, so be very careful not to to switch the GND and VCC.

Assemble the Button

3F4F566F-BA6E-4306-91BB-9B43B3A0BC31.jpeg
8081E22D-5130-40A8-B1BF-4D940F840F1C.jpeg
2EEBEA61-88D1-42C2-B9B1-F4FFFA219844.jpeg
64831105-BD39-4933-9BD9-EB61CFA664B3.jpeg
9ECA97AF-4CAB-4D97-8E47-EDFEB8971585.jpeg
EA4178EC-9C1E-423D-A54E-0BBC4E46F6DC.jpeg

Thread the button wires through the hole.
Use the hot glue gun to fasten the button to its place by putting glue on the wood beneath the button.
Then cover the outer side with glue to make a smooth surface.
On the other side of the shelf use the hot glue to attach the wires to the corner of the shelf.
Cover the button with an adhesive label.

Solder and Assemble the Photoresistor

70892F3C-AFE2-44E3-8C6C-F15B123FB249.jpeg
238B32B7-01C0-4517-A9DA-B54FF7EC1E2E.jpeg
1D238ED3-C53C-4307-BB85-5F30AC8EBDEF.jpeg

Drill a hole for the photo-resistor.
Solder both pins to wires and cover with heat shrinking isolation.
Thread the wires through the hole and secure with hot glue.
I even glued a small transparent plastic circle on it, to give it a smooth finish.

Attach the Box and Glue the LED Strip

32B67336-D64E-427F-BA99-0D5AE3944556.jpeg
B97D6BF5-0196-49EC-9BDC-184B4D0E7F53.jpeg

Attach the box to the edge of the shelf.
I choose to attach the cover instead of the box itself, to simplify installation.
I glued the LED strip near the shelf edge.
It is supposed to be self adhesive, but in my case the adhesive preferred to remain on the tab and the LED strip remained glue free.
So I had to use fast glue instead.

Assemble the Power Connector

902FAC79-82EE-473E-B5FE-F1EC98C3B3EE.jpeg
C6E8E599-DA93-42EC-9015-728CDC5F2D88.jpeg

Solder 2 wires to the power connector, and cover the exposed parts with heat shrinking isolation.
Drill a hole near the box edge and attach the connector.

Solder Pins to the AtTiny85

03A56AEA-5F6D-4EA7-BD66-091434CFC336.jpeg
B7F6DD22-4C1F-4EB2-B5DE-A12DFE8FCB7A.jpeg
F5ED49EA-A1A2-43E9-86C1-F7D75F5004DF.jpeg
BC76FE00-E3CE-4C95-A51E-2992A2C2442C.jpeg

I soldered pins to the development board instead of soldering all the wires directly to it, in case I would like to reprogram it later.
I did not solder pin 3,4 since they are not used in this application, and are used to program the AtTiny85 with the USB boot loader.
I did solder pin 5 (reset) and Vin for mechanical stability despite not using them.

Assemble the PCB

Schematics.PNG
3403CD88-6EE4-4161-8F3A-00315FF5A9E0.jpeg
21E06480-E784-42A6-950E-DD056C6D07FB.jpeg
56F22106-A75A-412B-B13E-6DE43CE8067B.jpeg
16E144F1-BA6C-48F2-A386-032804086F43.jpeg

I’ve cut a 12x13 square of prototype PCB.
Drilled two holes for screws but eventually did not use them.
Marked the position of the headers.
Then soldered all the wires, headers and a single resistor.

Attach the AtTiny85

3BD14EEE-0A81-407B-9D8D-092DD35118FD.jpeg
3A7C576E-6DC3-41FF-A831-9A3EFB888042.jpeg

Program the AtTiny85 and attach it to the PCB.
Then place everything in the box and attach it to the cover which was already screwed to the shelf.

Done

Connect the power supply.
A short touch turns the LEDs on and off.
A continuous touch changes the LED light intensity.
The photo-resistor is used to distinguish day mode from night mode.
At night turning the light on starts at a low intensity warm light, during day turning it on will start at high intensity.