Building a Mood-Light


I am pretty new to electronics, so please be patient with me. :)

I´d like to build a Mood-Light. The Mood-Light should have 3 programs, one where the color of the RGB LEDs can be adjusted, another one where the colors cycle through the colors of the Rainbow and a third program which imitates a candle.

My question is mostly regarding the first mode. I´d like to use 3 potentiometers for adjusting each of the colors individually. For that I want to use 3 7-Segment-Displays for each color to show the actual intensity of the color (from 0 to 255). I was planing to control 4 RGB LEDs, for the Mood-Light to be bright enough. That makes a total of 67 LEDs (or better 75 LEDs, since the RGB count as 3 LEDs), which in my calculation would use ca. 1500mA all together. First I thought of using 74HC595 Shift-Registers to control the 7-Segment-Display but now I am concerned about the power consumption.

The components I am having around so far are: 3 10k Potentiometers 9 Kingbright SA03-11GWA (common anode) and some RGB LEDs

Maybe someone can hint me to a source which explains how to calculate the power consumption and/or how I can handle this amount of LEDs with them being bright enough. Any other suggestions are also more than welcome. :)


For that I want to use 3 7-Segment-Displays for each color to show the actual intensity of the color (from 0 to 255).

A serial LCD could be controlled using 1 pin. Something to consider…

How about providing links to the hardware you are talking about?

In addition to PaulS's suggestion to use an LCD display, you could easily play around with one of these:

to test out your idea.

Thanks for your considerations so far.

I was thinking about an LCD already, because of it´s lesser power consumption and pin-use. Since I am new to this, I had the impression that it might be more complex than to use those 7-Segment-Displays. Now, after testing around with those 7-Segment-Displays I am not so sure about that complexity-thing anymore. :)

As for the Sparkfun product, that is really a nice idea, though I have to admit that I already have lots of RGB LEDs and would really like to use those. I already tested everything, controlling the LEDs with those potentiometers and everything else works fine. The programing, seems to be the easiest part ATM, the "luxury" to show the actual brightness of every color with some sort of display is the tough part for me, especially because of those MANY LEDs in the 7-Segment-Displays. I was already thinking about only using 2 Segments for each color, and use only 64 or 96 brightness levels instead of 256 (to use only 2 digits per color). There would still be enough colors but I would eliminate 24 LEDs (or 3 7-Segment-Displays). I am lacking the ability to calculate the power consumption and to find measures to work around this problem, since I am very inexperienced in electronics.

Sorry, that I forgot about the Datasheets. For the potentiometers I don´t have any, but they are just ordinary 10k potentiometers, for the LEDs and Kingbright 7-Segment-Displays I have the links attached now.

Kingbright Display (green, coomon anode): RGB LEDs:,6m.pdf

Thanks again for your help. -EinTyp

There is a way to multiplex 7 segments , so 4 digit display could be driven by arduino directly (look in playground) but you need 3 such display, and I'm afraid wouldn't be enough digital pins for all of them. Other way, google for "7 segment display driver" - special chips to simplify decoding binary-to-7segments. Current consumption you estimate right, It means you would need external power source also.

Hey Magician, you already helped me in the other thread before, thanks for your kind help.

I was afraid of another power source, since I have no idea how to integrate it. Right now I am using a 9V 2000mA DC power supply which is connected to the socket in the wall.

The 7-Segment-Display Driver ICs you mentioned, seem to be a good idea. I read that transistors can be used to raise the current. Would it be possible to use one 74HC595 Register for each 7-Segment-Display, which means that I would need to control 6 of them (when using 2 digits for each color) or 9 (for 3 digits per color). Maybe if I could daisy chain the 74HC595 Registers like 3 registers for each 2 digits (like 1 register connected to the arduino controlling 2 registers which are connected to the 7-Segment-Display) with the current raised by a transistor for each of them. Or is that thinking complete nonsense? How much current can Arduino output at all (I was calculating 16 Output-Pins with about 40mA each, which would make it about 640mA)?

Thanks for the help so far, I really appreciate your effort.


O'K , you have power supply, I thought you powering arduino by USB. It's good one, 2A more than enough. Yes, sure you can multiplex 7-segments, to increase the number of pins using a 74HC164 or the 74HC595. And you would need a transistor to drive each digit, 9 overall chips + transistors. Arduino can output 120 mA or so for one port.

Magician: Arduino can output 120 mA or so for one port.

According to the specs the Arduino can output a max of 40 mA on an I/O port - not 120 mA.

What came to my mind: to keep the setup simpler and less power consuming this could be an alternative: If you do not want to display the R G B color values all the time you could consider to only use 1x 3-digit display and only display the color value of the changing color - let the code determine that by monitoring your potis (of course this only makes sense if you do not want to change colors simultaneously).

Just my 2 cents...

I mean port, 8 pins. Don't remember where I read 120 mA, but anyway there is a limits per port(8 pins) as limit per chip (all pins) - 200 mA. I was answering to OP:

How much current can Arduino output at all (I was calculating 16 Output-Pins with about 40mA each, which would make it about 640mA)?

  • that he can't multiply 40x16 and get 640, because chip can't handle it. This is why external transistors necessary.

Thanks for all your effort in helping me. I had exams for University lately, thats why I am replying that late.

I have to put this project on ice until mid september or october, because I have all my final exams now. I guess I am going for an LCD, it seems to be a lot easier. Though I have to admit that I also like the idea with only 3 digits. Perhaps I should do some homework regarding those resistors, as I said I am quite new to electronics.

I really appreciate all your help so far. If you are still interested in this small and quite boring project, I gonna post some pictures when I am done with this little lamp. :)

Lots of thanks. -EinTyp

Since I really need something to look forward to after all those exams, I wanted to order the LCD so that I can start right away when I am done.

Do you think that those LCDs are good or do you see any problems I could encounter with them?


I had trouble using one of them, although other people seem to have no such problems. I got one of these:

A bit more expensive, but you can do graphics on it, too.

Thanks for your advice PaulS.

Have to consider the price difference though, I am on a small budget ATM. :(