The idea is to replace the 12V halogen overhead lights on my 40' boat with 12V LED replacements, keeping the ability to dim the lights with a rotary knob control.
I have access to the +/- wire lead to the 6 "zones" of lights in the back of the boat. The existing dimmer knobs are some rheostat/relay deal which use a common ground -- only the + output wire is lead to the junctions in the back of the boat. Running an additional dedicated Neg wire from each dimmer switch to the back of the boat is out of the question.
Hence, I'm thinking of reading a rheostat or rotary encoder value and sending that over RF to a receiver in the back of the boat. That receiver could then PWM the correct zone of lights.
I was hoping something like this already existed, but all I can find are hand-held, battery operated remote control LED dimmers with push buttons. I'd rather not have 6 little remotes with dead batteries controlling the lights.
Some notes:
Power source is 12V batteries (think 11V-15V)
Dimmers will be through-mounted with a long-shaft (mounting surface is about 1" thick)
The furthest range is about 35', through wood and fiberglass (hence IR is out)
Should have very minimal power drain (aside from the LED's themselves)
The LEDS are something like this [Link] and would be grouped like:
4 (0.52A)
7 (0.91A)
2 (0.26A)
2 (0.26A)
2 (0.26A)
2 (0.26A)
I have some basic experience with Arduino Uno, but nothing with RF or fixed, embedded designs.
Questions
Is it feasible/worthwhile to build this? Or is there an off-the-shelf solution already?
Is this a job for a rotary encoder or an analog rheostat?
Any suggestions for transmitters/receivers? XBee? nRF24L01+? HC-12? No Wifi onboard and I don't think Bluetooth would have the range.
What about converting the 12V? I've seen lots of posts about it but haven't really seen any solid consensus on a method.
~~It looks like the current draw for the LEDs would be too much for an Arduino PWM pin so I imagine some relays would be involved. Can you run a PWM output through a 12V relay? ~~ Edit: I was way off base here. Sounds like a MOSFET transistor is the right choice.
I appreciate any dialog and pardon my noob questions!
-Erik
Yes it's feasible to do this with Arduino. Worthwhile? Only you can say. No idea about available solutions.
Yes.
Nrf24l01+ or hc-12 might be suitable, yes. Or maybe the basic 433MHz transmitter receiver pairs. First thing you should do is get some of these and test the range and penetration through the boat.
Converting 12V to what? And why?
Yes, Arduino pins can only source about 20~30mA @5V. Connecting 12V to an Arduino pin will destroy it. You cannot use relays for pwm. You must use MOSFETs. Because of the wiring you described, you cannot use n-channel MOSFETs, you must use p-channel. Sorry, I can't recommend a model, but post a link before you buy and forum members can advise if they are suitable.
Are you sure this LEDs are dimmable? I see a circuit on the underside of the PCB with an inductor and a large cap. That circuit may not respond well to a pwm signal.
DrDiettrich:
I understand a common - line, so a npn or a n-channel MOSFET looks right to me.
Hmmm... I interpreted this paragraph a different way:
I have access to the +/- wire lead to the 6 "zones" of lights in the back of the boat. The existing dimmer knobs are some rheostat/relay deal which use a common ground -- only the + output wire is lead to the junctions in the back of the boat. Running an additional dedicated Neg wire from each dimmer switch to the back of the boat is out of the question.
@Erikj25 please clarify the wiring situation, ideally with a diagram. Its important for the choice of components.
PaulRB:
Are you sure this LEDs are dimmable? I see a circuit on the underside of the PCB with an inductor and a large cap. That circuit may not respond well to a pwm signal.
Yes, I have tested these LEDs with a PWM dimmer (Link) and they dim fine. I cannot use this particular dimmer as it would involve running an additional ground wire (two wires in, two wires out) plus the shaft is too short.
PaulRB: @Erikj25 please clarify the wiring situation, ideally with a diagram. Its important for the choice of components.
Yeah, sorry. Kind of confusing description. Attached is a quick block diagram of existing installation. The gray boxes I have access to. Most of the in-between wiring is quite hidden.
I have access to the +/- wires that run to each of the groups of LEDs. And at the dimmer locations, I have the +/- source wires. Currently, all the negative lines are I guess you would call "common" (a negative is a negative anywhere on the boat).
I'm thinking I could replace the existing dimmers with a rheostat & transmitter (using the 12v +/- source that's there). And mount receiver(s) near the light +/- bus bars, where I also have a 12v +/- source and also direct +/- wires to the groups of LEDs. Each group of LEDs would be solely connected to the PWM output and detached from the buses.
It is a bit of a hastle but many people will skip looking at your attachment because of the need of downloading it to their device and then opening it afterwards.
Perhaps I'm just tired, but things seem more confusing, not less.
Are you sure the -ve cables are connected? If so, why did they run multiple -ve cables? Perhaps it is to do with the current capacity of the cables. I suggest you check for continuity between the -ve cables. If they are not all connected after all, n-channel MOSFETs can be used.
PaulRB:
Perhaps I'm just tired, but things seem more confusing, not less.
Are you sure the -ve cables are connected? If so, why did they run multiple -ve cables? Perhaps it is to do with the current capacity of the cables. I suggest you check for continuity between the -ve cables. If they are not all connected after all, n-channel MOSFETs can be used.
Now I'm a little confused what *you *mean.
There are a lot of wires on this boat -- too many to physically track down. But I know that I have a nice access to all the junctions and bus bars for all the light "groups" on the boat, in once place. So I can detach a single pair of pos/neg wires and one section of lights turn off, while the remaining lights are on.
I'll do some research into MOSFETs and come back around when I have some idea what the heck I'm talking about.
Was the phrase "check for continuity" confusing? I meant that you should use a multimeter in continuity mode or resistance mode. Check pairs of the -ve cables from the lights to see if they are in fact connected somewhere behind the scenes, or not. If they are, then dimming the lights with pwm must be done with p-channel MOSFETs, fitted between +12V and the +ve cables. But if the -ve cables are not connected, then n-channel MOSFETs can be used between the -ve cables and 0V. Given the choice, n-channel MOSFETs are cheaper, more commonly available and easier to use compared to p-channel.
I think I get your drift. Individual -ve wires are run to the groups of existing bulbs and are all connected at a bus bar, which runs to the neg battery.
If I understand correct, I can use one n-channel MOSFET on each group of LED replacements along with a PWM output pin for each MOSFET. (of course, detaching the existing dimmer wires and such)
Your patience is much appreciated. This'll be an interesting experiment for me.
If you can separate the cables at the negative access point, simple low-side switches can be used. As a replacement for the existing dimmers instead high-side switches are required.
Your second diagram, being a real schematic, is much clearer. Looks like you can insert the MOSFET circuits at the negative "access point". At the positive "access point" you can connect the +12V directly to the cables to each group.
Suitable MOSFETs include irl540 or stp16nf06l. These are n-channel, but importantly also have logic-level gates. This simplifies the connection between the MOSFET and the Arduino pin: all you need is a couple of resistors. I suggest a 330R between the Arduino pwm pin and the MOSFET gate and a 10K pull-down resistor between the Arduino pin and 0V. The resistor values are not critical and can be small 1/4 Watt.
Post a link here before you buy the MOSFETs so we can check them for suitability. They should not be expensive, perhaps 50p~£1 each.
PaulRB:
Your second diagram, being a real schematic, is much clearer. Looks like you can insert the MOSFET circuits at the negative "access point". At the positive "access point" you can connect the +12V directly to the cables to each group.
Roger that!
Just for my understanding, what is driving the decision to use N-channel MOSFETS instead of P-channel?