Basic info about a LED PWM "dimmer" circuit at ~3amps

Greetings all,

I am working on what (I hope at least) I think will be a pretty basic setup. But, since I am pretty new to Arduinos (about a month) I wanted to ask a question about this specific project. Basically I want to be able to PWM a large number of LEDs and I'm not sure how it interacts with the Arduino chip.

My ultimate project goal is to program an ATtiny85 to read a Pot and then set the LED level accordingly. I am predicting the project could use up to 100 LEDs which draw about 33mA each at 5v (resistors are alrady embedded in these LED Lamps). So, since it is possible to have all the lights on at the same time, doesn't that mean that I'd need way more Amperage (100x33mA = 3300mA = 3.3Amps) than the Arduino can handle?

I eventually want to move the ATTiny85 onto its own PCB and then use a PoT for the "dimming" (via PWM). So what I'm asking here is what kind of technology do I need to research to allow more amperage into my project? I bough a cheap 5v 4a wall wart style PSU from ebay that I was planning on using to power the project. So do I need to use something like a transistor to allow the higher amperage to draw off the 5v on the PCB (from the wall wart) and avoid the ATtiny85?

I guess I'm asking what will I need to prepare for to turn what is one of the most basic beginner-level tutorials (PWM LED dimming with a PoT) to work at a much higher draw from the LEDs.

My completely inexperienced thought process was that I would need some kind of 5v voltage regulator capable of handling like 4Amps (since I imagine the $4 wall-wart PSu from ebay is not regulated), some caps to smooth that, a PoT, the ATtiny85, the LEDs and something (transistor? relay? MOSFET?) that can handle controlling these LEDs other than the ATTiny85?

Am I on the right track here?

Thanks!

ironspider:
So do I need to use something like a transistor to allow the higher amperage to draw off the 5v on the PCB (from the wall wart) and avoid the ATtiny85?

Sounds right to me. Depending how well behaved the wall wart is you may not need to regulate its output.

In case you're interested, I would have thought you could achieve the same PWM result using a 555 timer plus a couple of external components, but I don't anything wrong with the approach you're taking if you prefer to use a microcontroller.

Hi, Maybe look at the Arduino Power control page on the ArduinoInfo.Info WIKI:

http://arduino-info.wikispaces.com/ArduinoPower
scroll down a ways to here:
http://arduino-info.wikispaces.com/ArduinoPower#DC

and you will see an example of controlling/dimming multiple Amps of lights (could be LEDs). Example code there too.

ironspider:
My completely inexperienced thought process was that I would need some kind of 5v voltage regulator capable of handling like 4Amps (since I imagine the $4 wall-wart PSu from ebay is not regulated)...

FWIW, nowadays you can safely assume that all power supplies are "regulated".

Chagrin:
FWIW, nowadays you can safely assume that all power supplies are "regulated".

Maybe it's a valid assumption where you are, but it's not an assumption I'd want to make.

ironspider LEDs are so popular now that there is a wide variety of LED drivers to choose from. The easiest way to drive a bunch of LEDs is to get a driver with a PWM input, for example there are several models of BuckPuck and Meanwell drivers that have it. You just connect a PWM pin on the Arduino to the driver and dust off your hands.

Usually when driving a bunch of LEDs, you want to run at a higher voltage so you can run long strings of series-wired LEDs. 12V (for 3 LEDs per string) or 24V (for 6 LEDs per string) are popular choices. Generally you'll need one LED driver per string, because (except in rare circumstances) you should NOT wire LEDs in parallel.

What's your application? If your purpose is illumination rather than display of information, consider power LEDs. You can get the same amount of light from three power LEDs as you can from 100 little ones. The power LEDs will be cheaper to begin with (per lumen) and also easier to hook up (a single 12V supply, a single driver, and a dozen connections instead of 200+). Power LEDs also generally have more/better choices of color temperature. Only downside is power LEDs will require cooling via heatsink or fan.

""for example there are several models of BuckPuck and Meanwell drivers that have it. You just connect a PWM pin on the Arduino to the driver and dust off your hands.""

this is exactly what I want to do for a similar basic project. do i need to connect the arduino ground to the negative in on the meanwell or buckpuck? or do i really only need to connect the one PWM pin out the the Dim in?

thanks

dylantoymaker:
this is exactly what I want to do for a similar basic project. do i need to connect the arduino ground to the negative in on the meanwell or buckpuck?

In most circumstances, yes, you need to have all of your various components all connected to the same DC ground.

By the way I just discovered a neat thing about (some of) the BuckPucks. You can feed them whatever voltage you want for your LEDs (12 to 24V, typically), and get a nice 20mA 5VDC out on a "Ref" pin that can run your Arduino* -- no need for a second power supply. Convenient!

  • I'm not entirely sure how many mA an actual Arduino Uno/Deci etc draws by the time you add the various other components on the board... it may be too much. But 20mA is plenty for a bare Atmega328.

Instead of a wallwart, I would go for something like a Meanwell power supply ( say their RS-25-24 ) set to 25v output ( at 1.1 amps ) the output is adjustable from about 22 to 27 volts I recall .

They are pretty cheap here in South Africa, and I see they have distributors in the US and UK.

You can wire up your 100 LEDs in 5 series strings of 20 in parallel ( if you say they all have resistors built in for 5 volts, you wont need other resistors )

Have a power mosfet to ground the cathodes for the pwm.

You can feed a 5v regulator from the 24v ( a 7805 will take 35v ) and it will run at about 1/2 watt to drive an arduino.

These PSUs are stable driving pwm LEDs , I PWM 5 amps to LED displays with no problem, and if you do make a short circuit, the trip just hiccups until you remove the short.

ironspider:
My completely inexperienced thought process was that I would need some kind of 5v voltage regulator capable of handling like 4Amps (since I imagine the $4 wall-wart PSu from ebay is not regulated), some caps to smooth that, a PoT, the ATtiny85, the LEDs and something (transistor? relay? MOSFET?) that can handle controlling these LEDs other than the ATTiny85?

Am I on the right track here?

Yes. The 5V power supply for the LEDs does not need to be well-regulated, but if it isn't then you should use a separate power supply for the Arduino. Use a logic-level mosfet to switch the LEDs from the attiny. There are lots of suitable mosfets, such as IRLU8726PBF.

most dimmable buckpucks can be pwm'd with out a filter.At least mine do, 3021-d-e-700ma. the problem i have is i want to use a 12v rf pwm dimmer, when the pucks need 0-5v, backwards mind you (5v full off, 0v full on). that means up is down and down is up on the pwm dimmer rf remote.

I had a rough build working using a 12v dimmer to trim the voltage with a 1k pot on the output to kick out 0-5v (well not exactly, as its pwm not analog 0-5), but powering the dimmer from a sepic (to keep a constant voltage when the led's drop the voltage, since they are both wired to the same 1.25a 12v ac/d transformer), seems kind of sketchy as its putting alot of current into that control pin potentially, compared to the measley 40ma it needs. It works, but both the driver and pwm dimmer must have sepics to prevent voltage drops that screw with the driver and dimmer. Ideally schottkys as well, if you need more current and have to wire up parallel sepics.

The cool thing about those sepics though, is you can power them off pretty much any dc source, batteries, ac/dc transformers, hell even solar panels.

I think the next thing im going to try w/ this idea, is taking the 5v ref pin from the buckpuck, take the groung from the main sepic, and use one of these 3.5-10v > 12v boost converters, to try and run the dimmer off that. Then a pot to trim the voltage, or alternatiely, wire up some mosfets to switch the 5v+ ref pin, and the control wire for the buckpuck open closed via pwm to dim the driver.

If either of those last two ideas work, then its as simple as analog write (well pwm, but it still works)to digital pwm output on my arduino. Thn i can use 1 rf dimmer for multiple high power smd led's using an arduino to write several pwm outputs from that analog input of 0-5v from the pwm dimmer. Or just buy more dimmers, as they're under $10 ea on ebay.

BTW, can anyone recommend a mosfet that is fully on @ 12v? i' like to just use something like that ont the output of the 12v pwm dimmer, to pwm switch the 5v 40ma 5v out on the buckpuck. I have bunch of irf46zn's laying around, but from what i read on its data sheet, its gate voltage is fully on at 4v. I need something that will be fully on at 12v.

can anyone recommend a mosfet that is fully on @ 12v?

Very difficult to find a mosfet that is not (yet) fully on at 12v - most of them are fully on at 10v and some even earlier.

The 4v fully-on mosfet definitely is fully on at 12v.

If you only want the mosfet to come on with roughly 12 volts supplied to the gate, you could have a simple voltage divider with a 10k from the 12volts coming in, and a 4k7 from the gate to ground.
It wont be particularly accurate though....

hmm. Perhaps i can just salvage the rf reciever from the dimmer, and see what the logic output pins on that particular board do when it recieves a signal from the remote. If its powered by 5v, mabey it could be as simple as just using that, but i don't understand what ask modulaton is or how it could be applied to dim the buckpuck. Something tells me its not as simple as a ttl 0-5v output between the rxd and ground, but i may be mistaken. I really need to spend more time reading all those power electronic ebooks i downloaded ;).

Heres the rf reciever in question-

Any thoughts as to if this could be somehow used with a buckpuck and its 5v ref, and control pins?

Sorry, couldn't find a datasheet through google, but theres a good deal of info on the alibia link.

If its as simple as connecting the ground pin to the buckpuck's input ground, 5v ref to the vcc (rf unit draws 5ma @5v), and the buckpuck control to the rxd (possibly the buckpuck led ground as well) then that would be fantastic.