8x 3Wleds on ATTiny - simplest circuit

I'm overthinking or underthinking the project. I simply need to power 8x3w leds - these guys Amazon.com (UV 395nm / 400mA-500mA / DC 3V-3.2V / 3 Watt). I don't have a datasheet. I want to run it off a standard 5w battery bank. I'm wanting a UV charger to charge glow-in-the-dark stuff. I'd rather have them in parallel so one blowout doesn't kill them all.

I don't need them to be individually addressable, just a binary on/off (or perhaps PWM for cooling purposes). They go up to about 400ma, but I'd probably overheat the hell out of them above 120ma or so even with a heatsink, so that's likely my limit.

I want to use a small, cheap, ATTiny of some sort (ie less than 8 pins available for this), and keep parts to a minimum (ie the driving parts are in a pillbox type).

Arduino --> TLC5940, and just run them at the 120ma that each channel is rated for? I see different answers whether you can have all channels maxed at once on that chip, even with cooling.

Arduino --> TLC5940 --> darlington such as ULN2803A?

Arduino TTL to one mosfet and then to all LEDs?

Arduino TTL to 8 individual transisters?

Yes, I know I'll need resistors (1/2 watt?), and can use an ohm's law calculator. I'd like to minimize the resistors too, though (KISS, for both reliability and ease of soldering).

Thoughts, please?

Obsolete part, wastes power.

Most appropriate. Must be "logic level" FET.

8 * 3 = 24 << 5. That won't work! 5 W power source can provide 1 A at 5 V. You want to leave some headroom for the Arduino -> aim for about 100 mA per LED.

To limit current to 100 mA with 3 V forward drop of the LED and 5 V power supply you need (5 - 3)/0.1 = 20 Ohm resistor per LED. The resistor will dissipate 2 V * 100 mA = 200 mW so 1/2 W resistor is fine; the LED will dissipate 3 * 100 = 300 mW. The efficiency is about 60% - you cannot improve this much with a more complicated drive.

I would use single transistor for all LEDs, each LED with own 1/2 W 20 Ohm current limiting resistor (you can use 18 or 22 Ohm to get standard value; or two 10 Ohm 1/4 W).

1 Like

As the Amazon page implies, you usually need constant-current drivers for LEDs like these, a fixed value series resistor can't compensate for the change in forward voltage with temperature. If you want to run all 8 in parallel, you will need 8 constant current drivers.

Not quite sure why you want to use pwm, tlc5940 or even an Arduino!

If the LEDs are overheating, you need a bigger heatsink or a lower driver current. Using PWM is the same as using a lower driver current.

Why an attiny85 or need for something with only 8 pins, if you are considering using tlc5940 - after all, how many pins does that chip have?

With the quoted power source OP cannot afford to drive the LEDs with more than 10% of nominal power. That is not really bad - the LEDs will be cool even with no or a small heatsink. And a simple resistor is suitable way for current limiting.

It seems pointless using those LEDs. Maybe 16x or even 32x 5mm UV LEDs would be a better option?

That's a silly amount of UV power for this purpose if the room is in a somewhat normal house (i.e. this is not a stadium). Make sure you wear eye protection when that thing is on and don't look into the light source directly. Cataract isn't fun at all.

Expect a package like those to only allow for a dissipation of maybe 250-400mW max without a heat sink. That's being generous already. So that would be more like 40-50mA instead of 120mA or so.

Start by working out realistic requirements first; that'll be the biggest step towards really keeping it simple.

If it turns out you really do need ~20W of UV light output, I'd suggest getting one of those UV floodlights and switching that one on/off with a decently sized MOSFET. It'll be the simplest approach and probably not much more expensive than what you're doing now.

Thanks everyone. To clarify the project, it will be a small (10", circular) enclosure, into which I can slip frisbees (to charge glow in the dark). No more than about 5" thick so it can fit into a bag, so that rules out multiple floodlights - I can use either leds or led strips. Using a 5v battery bank is ideal, because the micros run off them, the lights are <5v each, and I need the project portable and like everyone else I have a ton of battery banks like that. Am I wrong that I don't need a silly-high-voltage if I run them parallel, rather than in series?

An arduino (or other micro, but I know arduinos) would let me have an occupancy sensor (a simple emitter/detector pulsed pair would work, and I've done beambreak work before), to turn the lights on/off only if there's something in the bag, and let me set timers.

I want it to be very bright, so that you can literally just do a dip/remove into the container. I probably don't need 8 lights, but that lets me place them around both faces to get even coverage, rather than spots. These lights are likely overkill, but I don't think normal 3mm/5mm ones will be bright enough, unless I use a crapton of them - for reference, if you just use a very bright UV flashlight, you need to press it right against the disc, and move it around to cover everything, before it's all lit up. It works but it's a pain. And I paid $10 for the pack of the big boys. I'll use some aluminum for heatsinks, but it's still an enclosed package so the duty cycle of the lights will never be more than like 10s on at a time, with variable off-time of between seconds to minutes.

Ok, simplest from here is just a single current limiting resistor per LED and a single MOSFET (e.g. AO3400 or similar) to switch all LEDs. Connect LEDs parallel (each with its own resistor). Connect MOSFET as low-level switch.
It's not the most efficient solution because you'll burn ~40% of the energy in the current limiters, but it's KISS for sure. Keep in mind you need to properly size the current limiter resistors because they'll have to dissipate quite a lot of power.

Alternatively get appropriate buck led driver IC's, but that means a bit more electrical engineering, making a PCB etc. Personally that's the route I'd choose but I don't mind working out a driver board and making a single PCB for it.

No, but it's inefficient to do it that way.

1 Like

Beautiful, thank you.

So, if I run R = (5V - 3.1 V) / 126ma = 15ohms [and]
P = I^2 * R = .126 * .126 * 15 = .238w

each resistor would have to dissipate close to a 1/4 watt, so say 1W resistors would be amply sufficient? (and I know I can tinker to get common resistor values, but this was the first round number I found in the ~120ma output range).

Yeah, 1W would be a good choice. You'll have to experiment with firting it all in the desired enclosure without everything heating up too much, but with very intermittent use, you can get away with a lot of short term abuse.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.