RGB LED Strip Room Lighting Build – Part 2

Hey there everyone!

So in part one I dealt with getting the strip hooked up to the MOSFETs and getting it fading through the colour Spectrum!

Now that is great and all, but I want to do MUCH more than that. My original plan was to have a controller module with some potentiometers and buttons, so that’s exactly what it’s going to have. I decided to build it all up on vero-board because it’s easy to prototype on vero, but you can use whatever you like! The schematic will be down below.

So I first hooked up my slide potentiometers, with pin 1 going to power, pin 3 going to ground, and pin 2 feeding into one of the analog pins on the Arduino Pro Mini (from Sparkfun, you should check them out!), I used pins A1, A2, and A3 for this, but you can use whichever you like. I then hooked up my buttons, with one half of the button going to ground, and one half going into some of the digital I/O pins on the Arduino (yet another brilliant OSHW company). I used pins 2, 3, and 4. I connected them to ground because in the code I will enable something called the internal pull-up resistors for those pins.

Pull-up and pull-down resistors prevent electro-magnetic waves in the air from inducing current in the wires and tricking the micro-controller into thinking the button has been pushed. A pull-down resistor is a large resistor value (usually 10K) that connect the pin to ground, so when any current is induced it goes straight to ground. However when you push the switch all but a little (because of the high resistor value) goes into the micro and registers as a logic high. A pull-up resistor works much the same but reversed, the resistor always connects the pin to positive voltage registering as a logic high, until you push the switch and connect it to ground, thus giving it a logic low. Seen as the Arduino Pro Mini has internal pull-up resistors I am using these so as to minimise the amount of external components I need.

I finally soldered in the MOSFETs according to my circuit diagram, and then added some terminal blocks for the connections to power and some headers for the connections to the strip. I added these in to make sure I could take it out once I had finished it, so I could hack it later on and update code and such.

The audio connection I made by getting a simple 3.5mm Jack cable and cutting the ends off, I stripped the two wires at each end and put one to the input, and one to the output of one of my speakers. I then attached the output one to ground on the controller and the input one to the Arduino. It works okay but at some point I might put in a low pass filter to get just the bass track, which will be easier for the system to react to.

Check out the photos below!

Tom Cousins

P.s. If you don’t know Jeremy Blum (who just got a job at Google – well done!!), check out his blog, and his youtube. He was pretty much my inspiration for starting this, so I thought I’d give him a mention!

P.p.s I got the inspiration for this project from one of the projects Adafruit (a really great company doing some really cool stuff!!!) have done. Check that out if you want to!! The link is here.

RGB LED Strip Room Lighting Build – Part 1

Hey there everyone!

So I recently ordered some RGB LED strips from e-Bay (sorry the link is for e-Bay UK, I’m a UK guy so!) and I’m planning on turning these into a lighting system for my bedroom at home. In this post I’m going to take you through how far I’ve got so far and I’ll probably finish it in the next post.

So I ordered the LED strips first (the LED strips are 5050 SMD RGB LED’s and I got the 60LED/m type. I had to make sure they were common anode. This is very important), planning to test them with some N-Channel MOSFET’s I had hanging around and just a simple 12V DC adapter to power them. And control it from my arduino due. So once I first got them I hooked them up with the 12V power supply going into the power and the FET’s sinking the line from each colour.

I really should have checked the power output of the DC adapter because the 0.3A it could provide got used up quickly! It screamed at me and, as Dave Jones from the EEVBlog would say, released the ‘magic smoke’. Not a good start. After this I checked the consumption rate of the LED’s and was surprised to say the least that these things gobble up a huge 6A! So I needed an alternative really.

My next build thought took me to an ATX computer power supply, so I went down to my local computer store and tried to see if they had any old ones in the back (this is one of the best tips I can give you!! Ask for the old stuff, and you get it cheap!) unfortunately they didn’t. So I went to my friend and asked if he knew anyone who had one, well, turns out he had one. It’s an old Dell N220P-00 220W power supply. I had a little bit of trouble getting it to run as outlined in the previous blog post, but eventually I got it running. After a small hiccup with mains voltage from a capacitor!

So now I could test the strips fully, I started by simply hard wiring the red, the green, and the blue individually, then did white to see how it looked. I was really impressed, these things are BRIGHT for £15 (Around $23).

So now I hooked them up to a micro-controller, I took the 5V line, the 12V line and the Gnd out of the power supply and hooked it up with the 5V line going to the micro-controller, the ground line connecting to both the micro’s ground and the ground after the mosfets (see schematic for mosfets) and the 12V line going into the RGB strip common anode.

For the micro-controller I used a Sparkfun Arduino Pro Mini, I really like this chip because it is small, inexpensive, and easy to embed in projects! The only disadvantage is that you have to also buy an FTDI adapter for it, but this is just a tradeoff for it’s size!

I programmed the chip (code available on GitHub) with the test code I wrote, this code simply changes through the spectrum of colours slowly!

I then cut the strip in two (there are special sections along it where you can cut it) and rejoined it with wire so it would run as two parallel tracks, and used phone cable to extend the wire at the end. I used phone cable because it is 4 wire inside, perfect for RGB strips, and it can easily be attached with clips to walls. It is also white which means it doesn’t stand out too much. I finally mounted the two strips in my room where I wanted them and turned them on.

The results so far are brilliant! I really like them!

In part 2 I will build the controller for them, so they do more than just fade! (Hopefully I can get them reacting to the music from my speaker system)

Tom Cousins

Link to part 2 here.