RGB Controller for lighting on vehicle

Hello all, I just wanted to see if there were a couple people out there that could help me out on a project and lead me in the right direction with parts and programming if needed. Basically I want to make a LED tailgate bar from a strip of 5050 SMD LEDs , not the addressable version tho. I was planning on running 2 strips, one for each half of the truck and tied to hat corresponding tail light. I was wanting to run an arduino un r3, but I was pointed towards the ruggeduino board. I have no experience with arduino, but I really want to learn. I would like the lights to be dimish red for parking light input, bright red for brake light input, amber for turn signals, and white for reverse lights if there are enough circuits. So I was thinking of taking the signal from the truck to the analog input side of arduino and output the digital side. I am not really sure where to start with this, so any and all help is appreciated.

Thanks Kenji

Thank you

I'm doing a similar thing myself, reading a signal from an RC receiver, and using that to control some RGB lights for my hex-copter. The thing is, for simplicity of wiring, and of programming, I'm using the addressable lights. Trust me, it's easier. So, why don't you want to use those?

What kind of programming experience do you have? Have you done the basic Arduino examples yet? You're gonna want to do some of those before you dive into this.

And yes, for an RC truck, you're gonna need some vibration damping, and big heavy Arduino is not what you want. I would use a micro and mount it on a vibration damper. It's still not gonna be super durable, but nothing on RC trucks ever is, right?

Thanks for the response, my project is more geared towards my full size truck, but could be similar. I had a couple of rolls of the analog RGB laying around and theta why I wanted to try and go with that, plus it can cut down on the cost of the project if I can get this to work and end up making more.

I don't have much coding experience, but definitely something I want to learn. One of the guys I work with codes a lot, but more to to VB scripts and such that we use for work. I am going to grab up an arduino and start playing around with it, but I want to get an idea of what I am getting into with this.

Funny though this might be, but there is absolutely no reason that an Arduino would be involved with this - that I or most others can see, anyway.

The RGB strips run from 12V and have a negative ground. Essentially, you just connect the reds (through a diode) to the stop lamp circuit, and through another diode (in each case, anode to the supply side) to the “parking” light circuit with a resistor in series - you have to figure out the resistor value by trial, but I’m guessing about 20 ohms, five watts. To get “yellow” for the turn indicators, you connect both reds and greens, again through diodes, and for the reverse, red, green and blue through diodes.

That comes to seven diodes and a resistor for each side. Diodes should be pretty ordinary power diodes, at least rated at 1 amp - or greater if the strips happen to exceed this when you measure them.

Well Paul, if you take that idea to it's natural conclusion, there isn't much reason to use RGB LEDs either. Just use single-colors and hook them to the right wires and you're done.

Maybe the OP could explain why he might need a single light in a single position to change its color?

Paul__B: Funny though this might be, but there is absolutely no reason that an Arduino would be involved with this - that I or most others can see, anyway.

Huh? You read the part about dimming the red strip for tail light, bright for brake? That's simply done with PWM and a single red strip (you try finding a dim red LED strip these days!)

He was also looking to have bright/dim. So three transistors to sink current from each color, PWM on each to control fading. 12V from the existing signals thru voltage divider to read when they are on, make the lights dim red for parking lights, bright red for brakes, blink amber for turn indicator, all 3 colors on for reverse, etc. I suggested he post here to get some connection to existing light system ideas, etc.

Truthfully a diode and resistor setup would be very nice and easy to do, would I be able to use an extra resistor to dim the brightness of the red for parking lights ?

I was thinking that an arduino was going to be the best way to go to get everything in one go.

All of the feedback is great though, all the help is really appreciated.

Arduino and 6 resistors+transistors are all you need to control the lights.
Diode/resistor will not do the dimming, PWM control of the transistor will.

So something like this, add more inputs for Parking Lights vs Brakes, Reverse, whatever.

Use 9,10,11, the other 3 PWM outputs, to control the LED strip on the other side.

CrossRoads: Diode/resistor will not do the dimming, PWM control of the transistor will.

I beg to differ. He wants to dim the red lights, not fade them. Of course a series resistor will dim them. What do you suppose is already on the LED strips limiting the current to each LED?

kbadger3: Truthfully a diode and resistor setup would be very nice and easy to do, would I be able to use an extra resistor to dim the brightness of the red for parking lights ?

That is exactly what I proposed - not an "extra" resistor, but a resistor. Since the LED strips already operate from a nominal 12V (but this should be verified), it is reasonable to connect them directly (through a diode) to the relevant lighting wiring where you want full brightness. Actually, the car's voltage is more like 13 volts and the current the LED strips draw is quite sensitive to the voltage, so a diode in series to reduce the voltage to more like 12V is a good idea in itself.

To reduce the brightness of (let's avoid the word "dim" :D) the red LEDs for "parking" light service, you need a resistor in series with the feed (through the diode) from that circuit. It needs to be rated at about 5 watts just for safety, possibly only 2W, depending on just how much LED strip you are going to use. I have suggested 20 ohms, but you really need to experiment with it. Since it is probably going to be convenient to connect each of the left and right strips to the corresponding existing light assembly, you would of course, need a resistor for each just as you use separate diodes for the strip on each side.

analogWrite(ledPin, 255); will be full on, analogWrite(ledPin, 127); will be half on. No fading, and control based on other inputs.

What will control switching in series resistor for dimming, and out for full bright, and turning a side on/off for blinkers? uC is ideal for this with just a transistor needed for the higher voltage range.

Ok I see what you’re saying now. I think that makes sense, it’s just like the amplifier example circuits for running a DC motor, using your PWM signal to control a larger current. Sounds totally simple now… what was the question? :slight_smile:

CrossRoads:
What will control switching in series resistor for dimming, and out for full bright, and turning a side on/off for blinkers?

It’s a car (or in fact, a truck). It has wires for each of these circuits.

Ok so I did a little messing around with this tonight.

As Paul stated this is possible to work just using voltage from the corresponding wires and a resistor for parking lights.

I just feel that the colors are off though, red works and looks fine, but the mixed colors do not come out quite right. I have a strip of yellow or amber in 5050, but with just pos and neg leads into the strip, with my RGB strip the color is not even close to the amber only strip. Using a controller could maybe get better colors out of the strip, I am not sure.

What are your thoughts ?

kbadger3: I have a strip of yellow or amber in 5050, but with just pos and neg leads into the strip, with my RGB strip the color is not even close to the amber only strip. Using a controller could maybe get better colors out of the strip, I am not sure.

What are your thoughts ?

Of course, this will always be a concern using colour mixing with a RGB strip. Again, a controller would not necessarily get better colours out of the strip. You probably have too much green, so try resistors in series with the diode that is feeding the green - start with, say five ohms.

Now you need to use the diodes in series when you test this, and the voltage to match the vehicle. The colour will change as the supply voltage changes because of the different characteristics of the different colour LEDs, but this would also be the case - but to a different degree - if you were to use PWM to adjust the colours. And you do not have leeway to use any simple form of voltage regulator (you would need a special 12V switchmode "buck/boost" regulator to do so).

I went through my whole batch of resistors, but nothing would match the color of what I wanted, I may need to do a combination of them to make it work. I have a strip of 5050 in amber or yellow that I was trying to match and will attach a picture.

I know the RGB Strip will not be as bright, but if I can get close to this color I would be happy.