I'm currently building a soapbox together with my kids and we are adding some LEDs to it, some of them I'd like to control via an Arduino. I have the coding knowledge so the software side is not an issue. Where I struggle is the hardware side as I only have very basic electronics knowledge.
Power source is going to be a 4s Lithium Polymer battery (14.8V nominal, 16.8V when full) which I usually use in my RC aircraft. We've ordered a few of these LEDs here which according to spec accept 12-80V so we'll be able to directly power them, no Arduino needed on these.
The hard part are these COB LEDs: I would like to PWM drive them via an Arduino to make them flicker. As said above my electronics knowledge is not good enough to figure out on how to wire this. As far as I understand I most likely need a MOSFET (IRFZ44N?) for driving the LED. Apologies for not being able to come up with a circuit.
Thank you all in advance for your support on this!
And then you can google switching on/off power with an arduino and get more links than you could ever read telling you how to do this as its very basic. Or you can do it with zero effort, and buy a solid-state relay that takes a 3v on/off signal, hook it to a arduino pin and bob's your uncle.
Use FETs (field effect transistors) instead of relays to switch power, you can do PWM with FETs where relays would burn out.
Years ago I spent $10 on IRL44N's able to run many Amps... taking small risk on eBay and got 60 for that. With shipping I paid 14.5 cents each where to buy < 10 they were 80 to 90 cents each! Shop!
There are two versions of that item. One comes with a dimmer and remote control. The other is a bare COB LED with no electronics attached whatsoever.
If you have the kind with a dimmer, you may be able to hack into the dimmer circuit and connect that with your Arduino. However, with no knowledge of electronics, this will be challenging - although with some good photos of the dimmer circuit, it is conceivable that we can guide you through it. Alternatively, simply cut off the dimmer and add your own LED driver, which brings me to...
...in case of the latter (a bare COB LED), what you need is a LED driver that accepts a PWM dimming input. The common solution here is to look for a ready-made circuit that does this; surely, there are plenty of options available. The key parameter to look for is the output current. The LED you've selected appears to be a 4000mA/4A type; I'd err to the side of safety and not go above 2.5-3A. So find a LED driver that will output up to 3A (you don't have to run it at full brightness; you may be happy already with the light you get at e.g. 1A or 1.5A) and that accepts a PWM dimming input.
If you use a suitable LED driver with PWM dimming input, you don't need an additional MOSFET.
You can't run this LED and PWM dim it with just a single MOSFET.
The other thing you will absolutely need very very badly is a big heatsink for that COB LED, possibly with a fan to match. If you turn that thing on even at 50% of its nominal power without a heatsink, it'll burn out within a few seconds.
@rsmls thank you. I've ordered the version including the dimmer, so hacking into the circuit would be interesting. I have a scope if that will make things easier to analyze. I will post pictures of the dimmer PCB as soon as I have them, there still on the way. If we can't get that to work I'll look for the LED driver you've suggested. With regard to the heatsink, I'll mount them on a large metal plate as we need to add some weights to the soapbox anyway.
The pictures will be the most relevant in first instance. Having a scope is always nice of course. What I do in a case like this is trace the schematic of the circuit based on visual inspection of the PCB (both sides) and search for datasheets of any IC's on there. How well this works, depends on what can be inferred from the markings on the IC's and/or their context. It's often necessary to poke around with a continuity meter as well to figure out how traces run underneath IC's etc. Overall, with simple circuits like this dimmer, it's usually possible to figure out enough to decide if it's worthwhile trying to hack into it.
pwm is just turning it on/off...you also said 'flicker', which is going to be on/off at a very slow rate, so the first newbie blink sketch will work. I assume you picked this one because its round like a headlight. If you run it at a voltage at low power, it won't overheat nor need current regulation. Just like how blinky is done, give it a resistor to limit current. They sell led drivers that do all the details if you don't want to learn how.
@benimble Apologies if I wasn't clear enough, I've meant flickering at a high rate as I want to mimic an afterburner. I've already built Arduino PWM driven afterburner lights for my RC jets but those had the driver circuit included. As far as I understood I cannot do high rate switching with a relay?
@rsmls I hope the dimmer circuit will be simple enough and the ICs with markings that lead to a datasheet so hacking into the circuit will be possible
Ok, so bob's already your uncle. You can google solid state relay, for dc loads, it is just a mosfet really, bigclive tears down all kinds of electronics and reverse engineers their circuits, fun to watch, this is an ac load relay but you get the idea...https://www.youtube.com/watch?v=DxEhxjvifyY&t=410s
I wouldn't recommend it. You can switch most relays at something like 10Hz max, which may just be enough for your afterburning application, but I wouldn't recommend it, and certainly not if you're trying to switch a few amps of DC.
Note that even if you use a relay (or MOSFET), you still have the question of how to actually drive the LED itself. You can't use a simple series resistor, so you'll end up with some kind of buck converter. If you go that route anyway, might as well use that driver to also modulate the light source according to your needs.
@rsmls I still do not understand how I can limit current. Due to some other lights I have a buck converter providing 12V out of my 14.8-16.8V battery. If use something like this I could PWM the output to the LEDs. But how do I limit current?
I've had some sleep and memory sparks... more than just FETs,
with high power LEDs and laser leds you need a Constant Current Circuit, designs are available at not-high costs depending on how much current. Those COB LEDs should not be handled like the little ones that we wire up with a single limiting resistor to Arduino pins!
I have in a box from long ago, replacements for 12V "G4" bulbs that are disks with 12 regular leds packed on but they use 250mA, not whole amps of power!
I finally got modern led bulbs so bright... they use IIRC 9W power to shine 75W incandescent bulb bright only whiter. If you want Bright, see what a limited power inverter to make 120VAC and drive a couple 100W equivalent around 10W ea plus some margin cause the power supply that loafs lives much longer! All of that is off-the-shelf besides!
For reflectors.. look into desk lamps with conic shades!
Just wanted to update, since I have a pile of 12v 50w bare
'cob' light leds and testing one today. At 10.5v it will pull about 200ma, and is not hot at all, I can touch it no problem without a heatsink on it, and its bright enough to be blinding when you look at it directly. 10.5v *.2 amps is 2 watts. If a turn it up to 10.8v it does 500ma and starts to get hot to touch. Still not even close to even 25 watts.
One thought is to keep headlight always on a low power, and use a little led that you can pwm as you did before, to provide the flicker.