A glass desk light with LEDs controlled by an Arduino-based microcontroller, and a gyroscope sensor.
Bill of materials:
- an Arduino-based controller. This time I used a genuine Arduino MKR1000 kindly provided by Instructables and Digikey as a runner-up prize for the Arduino Contest 2016 :) I got mine for free, but this is roughly 35$.
- a gyroscope module. I used this one. Roughly 2$.
- LEDs. As many as your base lamp needs. Mine needed 30, and I had a spare meter of ws2813 (60 leds/m) LEDs. You can go with the cheaper ws2812b for a full meter and spend around 6$. Keep the ones you don't use safe, you'll need them at some point :)
- a base lamp. Any would do, I have used an hand made Italian glass lamp with a nice, frosted, diffusing glass. It's meant to be used as a glass lamp, but you can definitely adapt it to be a desk one too. I don't have a link for this, as the shop was a small local one. This costed around 50$ (40 euros) in Italy.
- some spare jumper cables.
- a mini breadboard like this, around 0.5$
- some spare "blue tack" or "white tack" or whatever other adhesive you find around.
- a power source. Thanks to the Arduino MKR1000, this can be either a USB power source (like a battery pack as showed in the video), or a power adaptor using the VIN pin (as showed in the picture), or even a 3.7v batter connected to the JST battery plug of the MKR1000 (I didn't have this option, so no pictures, sorry). Cost depends on solution but ranges from 5$ do 10$.
The "flashes" you see in the videos are due to loose breadboard connections. While I'm waiting for a new breadboard, you can avoid this by just making the connections without the breadboard. This boils down to finding a way to connect 3 power and 3 ground pins altogether. You could use a spare barrel jack adapter to achieve this, or solder all of them together.
I'll be posting a new video when I solve the problem.
Remove all the unnecessary content from the lamp. In my case this was: lamp holder, electric junction, some cables.
These LED strips come with a bi-adhesive tape on the back. Just cut the strip to match the 4 sides of the base of the lamp. Make sure you follow the little black arrows indicating the direction of the data bus. +5v and GND don't have a direction.
Once you have placed the LEDs on the 4 sides, you have to connect them.
First, make yourself a connector from the start of the first side (choose one side with easy access to the breadboard). Then you have to solder each end of a side with the beginning of the next side, except the last piece. Solder +5v with +5v, GND with GND, and DO with DI (Data Out with Data In).