|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 138
Posts: 19067
I don't think you connected the grounds, Dave.
|
 |
« Reply #1 on: June 06, 2011, 05:51:14 am » |
Can i just attach 3 separate PWM channels to control each colour? No. Absolutely not. You need a proper driver, preferably a constant-current driver capable of 350mA. The ABSOLUTE maximum rating of an AVR output pin is about 1/10th this value.
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 24
Arduino rocks
|
 |
« Reply #2 on: June 20, 2011, 09:01:02 am » |
Any suggestions on making or where to get a driver? Thanks
|
|
|
|
|
Logged
|
|
|
|
|
Pakistan
Offline
Sr. Member
Karma: 5
Posts: 318
Arduino rocks
|
 |
« Reply #3 on: June 20, 2011, 09:57:53 am » |
why not make your own driver using 7805 IC and a MOSFET to control the RGB?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 199
|
 |
« Reply #4 on: June 20, 2011, 10:08:40 am » |
There are a few ways to do this, and your actual intended application can change what you do. I drive those exact LEDs with the CAT4109 driver from ON Semi. The catch? They're in a SOIC-16 package, so unless you are up for surface mount soldering, you're not going to be happy. It also only drives them at 175mA - that's fine by me, as they're still VERY bright, but you can parallel the outputs to get 350mA. How about a few TLC5940s with paralleled outputs? (sinks, really): http://focus.ti.com/lit/an/slva253/slva253.pdfJust want to use parts available at your local radio shack? It gets much tougher, as we're dealing with a common anode led with some pretty serious current requirements. If you have an application in mind, do share and it will help.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 138
Posts: 19067
I don't think you connected the grounds, Dave.
|
 |
« Reply #5 on: June 20, 2011, 10:14:57 am » |
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 24
Arduino rocks
|
 |
« Reply #6 on: June 20, 2011, 10:33:06 am » |
There are a few ways to do this, and your actual intended application can change what you do. I drive those exact LEDs with the CAT4109 driver from ON Semi. The catch? They're in a SOIC-16 package, so unless you are up for surface mount soldering, you're not going to be happy. It also only drives them at 175mA - that's fine by me, as they're still VERY bright, but you can parallel the outputs to get 350mA. How about a few TLC5940s with paralleled outputs? (sinks, really): http://focus.ti.com/lit/an/slva253/slva253.pdfJust want to use parts available at your local radio shack? It gets much tougher, as we're dealing with a common anode led with some pretty serious current requirements. If you have an application in mind, do share and it will help. i got one cheap online and wanted to drive it somehow. I had thought about putting it in one of my reptile houses just for light and change the colour etc.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 199
|
 |
« Reply #7 on: June 20, 2011, 11:03:53 am » |
Sadly, it turns out that driving common anode RGB HIGH POWER (the kicker) leds is not terribly easy. If I were to give you the FAST/CHEAP version that breaks so many best practices rules, it would be: 1x radio shack perfboard. 3x mosfets 3x 3904 transistors 3x 10ohm TWO WATT (these are not your average resistors
Use the arduino to switch the transistors. Use the transistors to switch the mosfets and use the resistors to limit the current.
This is a wildly inefficient way to do things, but it would work. Also: your resistors will burn you to death after a few minutes.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 24
Arduino rocks
|
 |
« Reply #8 on: June 20, 2011, 11:05:33 am » |
Thanks , sounds Dangerous lol
Better look at the safer option.
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 277
Posts: 25556
Solder is electric glue
|
 |
« Reply #9 on: June 20, 2011, 05:15:47 pm » |
Do not use reistors to limit the current in high power LEDs, the configuration is not stable enough. Use a constant current drive.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 199
|
 |
« Reply #10 on: June 20, 2011, 05:23:16 pm » |
Pointing back up at the top, those are two common, cheap constant current drivers that can be made to support your 350mA/channel LEDs. When I personally want to do it, and do it right, I use 3x CAT4101 constant current sinks (also ON SEMI). Those are rock solid, efficient and easily interfaced.
As Mike says, the resistor solution is.... not one. When I said the resistors will get hot, that's not the half of it.
Now, if you want to spend some MONEY on this, google RGB LED AMPLIFIER. There are units out there that will take 5v pwm out and amplify it to be between 350mA and 10A. Be sure you buy the right version... ~$25.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 199
|
 |
« Reply #12 on: June 21, 2011, 12:10:22 am » |
Andrew, would that work for a common anode LED? I am not sure the current sensing would work as expected.
|
|
|
|
|
Logged
|
|
|
|
|
Boston, MA
Offline
Jr. Member
Karma: 0
Posts: 83
|
 |
« Reply #13 on: June 21, 2011, 08:09:03 am » |
@bruce: Yes it works for common anode (+). Your thought is correct, but the sense is wrong; it does NOT in fact work for common cathode.
But you need to repeat it 3 times, one for each channel. This circuit is actually cut from a schematic that does that.
If you look on the right side you'll see header SV1. That is where the LED goes. On the right side + comes in (3 pins just in case you are using 3 separate LEDs), on the left side, you'd connect 2 more copies of the circuit. But you can buy quad channel opamps to make things smaller and easier to build. In fact you can see on the schematic the opamp specced as MCP604 which is actually a 4 channel op-amp...
I made this circuit because the drivers I could find for sale were all for a specific current, where this one is adjustable with a large range, from about 10mA to 2A with the pot on the left. Also, a lot of LED driver chips are actually buck/boost converters so that you can drive a higher voltage backlight from a 3.3v device, for example. This is unnecessarily complex and expensive (but more efficient) for my application, which is to drive a LOT of high power LEDs. It is easier for me to get a single power supply delivering 5v (for example) and use this driver to knock the voltage down to whatever each LED needs.
Cheers! Andrew
|
|
|
|
|
Logged
|
|
|
|
|
|