mood lamp - part 1 - overview

As promised here, the first content post on tinyLogic! Yay \o/

After some basic tests of my recently acquired Arduino Duemilanove and assorted components, I was ready to implement something more complex, and learn more of the basics along the way. I got a lot of interesting (and cheap) components from a german surplus online store, so I decided to incorporate the following components into the build:

  • linear slide potentiometer (some user interface that is not an on/off button)
  • RGB LED (blinking is fascinating, colorful blinking is even more so!)
  • 7-segment LED display(s) (I wanted some meaningful output)
  • transistors (digital switches, also fascinating)
  • Arduino (something to control, and therefore power!)

The software implementation was of no particular concern, with plenty of prior experience in C dialects, I would pick up any specifics of the Arduino framework and plain C along the way.

I decided to build a basic mood lamp. It uses a the single RGB LED as the light source (these things are pricey!). The slider is used to set the brightness level of the LED's individual colors, using the PWM feature of the Arduino (or rather Atmels ATmega328). Four 7-segment LED displays show the selected brightness and an indicator character for the currently selected color. And finally, 2 push buttons to switch through the colors and to save the value selected.

This is how it looks like, all assembled on my generously large breadboard:



Note that the RGB LED on the lower left ist hidden behind plastic tubing, acting as a diffuser. A similar shot with the whole thing running and the LED exposed is here. The Arduino is not pictured here (but here), it's above the top of the picture (where all the ribbon cables lead to).

Let's do a quick rundown over the components:
On the bottom right of the picture is the linear slide potentiometer. Above the slider are the 2 pushbuttons. Both the buttons and the slider are connected to the lower right ribbon cable, which connects to the Arduino's analog inputs (more on that later).

On the lower left is the RGB LED, hidden beneath an small white cap that diffuses and mixes the 3 distinct colors of the LED into one smooth color. It is connected via 3 resistors to one of the other two ribbon cables (each of these lead to one half of the Arduino's 14 digital input/output pins).

Pretty much in the middle of the circuit are the four 7-segment displays, surrounded by a network of jumper wires. The displays are connected to the topmost ribbon cable (digital I/O) and to the last components, the four transistors, which are connected to the same ribbon cable as the RGB LED (digital I/O).

Last but not least, on the very left of the breadboard, you can see a two wire cable. It its connected to the vertical power/ground rail of the breadboard, and to the +5V and Ground pins of the Arduino on the other end (not pictured). Power and ground are replicated to all the other power/ground rails from there.

That's it about the basic hardware implementation. More details to follow tomorrow in part 2.

Update:
Sorry, no update today due to work. But I uploaded a video from the device working. Its of really crappy quality, and the colors are way off, but you get the idea of how it's controlled. Hopefully, part 2 will be posted tomorrow.



Update:
Part 2 is available: mood lamp - part 2 - pin considerations

0 comments for this post

Post a Comment