I'd like to create an Arduino based RFID-enabled RGB LED but its been a while since I've worked with electronics so I want to make sure I'm getting this right.
I plan on using a 3W RGB led from SparkFun and a ULN2003 Darlington transistor IC to drive it but I'm mostly confused about the power requirements. Can I run the 3W RGB LED on the same 5V power supply I run the Arduino on?
I've attached a basic schematic based on one I found someplace where someone used a 12V power supply for the RGB LED but I don't know if its right. Obviously it would be easier to have a common power supply, any help?
I don't know which 3W LED you bought from SparkFun - was it this one?:
If it was, then based on the specs, you probably could run it off a 5V source, but you will want one with the available amperage to handle it (a couple of 7805's paralleled and heat-sinked could do it).
BTW - don't run that LED without it bonded to a heatsink; you'll probably burn it out (kinda expensive).
The only thing I don't know is whether the ULN2003 can work off a 5V source - looking at the spec sheet, it seems like it could; try it and see, the only thing is, though is that the ULN2003 doesn't look like it could supply enough current to the LEDs - you might have to parallel two ULN2003 (or if it can, it is right at the edge of its capabilities, in which case I would suggest you heatsink the ULN as well).
The other possibility is to follow the suggested schematic, but run it all off a 12-14 volt power-supply, and use a 7805 and a 7812 to supply regulated power to the arduino and ULN/LEDs respectively (you might need to heat-sink these as well).
Yes you will need a separate power source for the LED. You have 40mA max available from a single Arduino pin. The schematic calls for a 12V power source on the IC so i'm not sure if you can go lower or not. But you can certainly apply only 5V too it ans see what happens. You won't damage it at only 5V.
That setup will work just fine. You can use the ULN2003 at a lower voltage with no problem. It just basically sinks the ground to the negative pole of your LED. It doesn't care if it is running on 12V or 3V. I have had them running on as little as 3V before and have one running on 5V right now.
May I suggest using the SoftwareSerial library to run your RFID reader though? It keeps the reader off of the hardware serial port so you don't have to remove any wires every time you update your program.
I am using it for both an RFID readers and a 4x20 LCD with a serial backpack and I can't see any problems with speed or anything else.
Well only if you reverse the connections of the LEDs, they are shown wired up backwards. The anodes should be to the positive and the cathodes to the negative.
Also the ULN2003 will get too hot sinking that amount of current.
Mike,
The drawing is wrong, but I think he got it from somewhere else.?.?
Sorry about the confusion. I didn't realize how much power the leds were to use. I haven't dealt with those leds before. I was more or less confirming that the idea of the ULN2003 worked with PWM to drive the leds. With high current leds, I would use individual transistors like a MOSFET. (sorry for the edit, was tired when I wrote this post.)
Another route would be to use a chip that is made for the purpose such as the A6280EA-T from Allegro Microsystems. They can be found at Digi-Key for $1.89. The Digi-Key # is 620-1256-ND.
The data sheet is here http://www.allegromicro.com/en/Products/Part_Numbers/6280/6280.pdf.
Another good thing about them is they are written to with the serial connection and can be daisy chained to add even more leds.
I haven't bought anything yet, I want to make sure the system will work before I spend the money.
@Photo-worx, so the bottom line is that the voltage doesn't matter so much as the current, I need a power supply that can supply enough current to the LEDs right? And if I used that Allegro chip you mentioned from DigiKey then I can use the PWM signal from my Arduino to modulate the LEDs?
Also what did you mean about having to remove wires each time I program if the RFID reader is connected to TX? I didn't know you had to do anything.
The Allegro chip is designed to run an RGB LED upto 150mA per channel. I was looking at the LED that was posted earlier and it says it has a max current draw of 350mA per channel. That would be a problem. :-/
The chips would still be an awesome way to control the LEDs, but you will still need to use transistors to handle the power that the LEDs take. You will also need to use a separate power supply for the LEDs with the amount of current they draw.
Another option is the MegaBright from macetech.comMacetech. It is a high power RGBLED module that uses the Allegro A6281 chip for it's tiny size. The good part is that with the MegaBright, you control it all the time just like if you were using regular LEDs. It is just like using the chip I showed you above with your own RGBLEDs except it is put together in a module for you.
I like it when there is an easier option. ;D
Any way you go, you will need to use an external power supply with any option you choose. I personally would use the MegaBrights as they are cheaper than the BlinkMs and they are easier than using a chip, 3 transistors, 3 resistors, and the RGBLED on a homemade board.
Awesome, the BlinkM and MegaBrite are just the solution I'm looking for, I definitely don't want to do more than I have to
Looks like there is a pretty big price difference between those two though, I'm looking to build a smallish desktop lamp, do you think either one would be bright enough to nicely light up a square lamp about the size of a shoebox?
I should add that I'm also including a module in this system that just has three slider pots so a user can adjust the individual light levels themselves, it looks like the BlinkM has built in support for this but it can't be hard to do with just the Arduino.
Edit: Looks like the BlinkM MaxM can handle 250mA per channel while the MegaBrite can handle only 100mA per channel; also the BlinkM MaxM has 15 LED cores for each 10mm LED casing, so that's gotta be good. Looks like it is worth the extra money.
If you want to build a lamp that the color mix changes by it's self and don't really want to do anything else with it, then the BlinkM MaxM is the right choice. They can be programmed and then unhooked from the Arduino to run on their own. It looks like you have to use a controller, like an Arduino, etc., to control more than one at a time if you want to manually very the color mix. If I am wrong, someone please let me know.
If you want to be able to have multiple modules that you are going to manually change the color mix with potentiometers then I would go for the MegaBright. You leave it hooked up to an Arduino and can control them individually or as a group.
*** You can do the same thing with the BlinkM MaxMs but you are paying for a controller built into each one but not using them to their capabilities. ***
The data sheets state the following:
BlinkM has 8000mcd of light per LED. That"s 24,000mcd total.
BlinkM MaxM has 445,000mcd of light total? Is this right? That would be almost 145,000mcd per LED. :o
MegaBright has ~35,000mcd per LED. That's 105,000mcd total. ;D
For the price, I would use the MegaBrights and control them via Arduino. 2 or 3 should be all you need for a shoebox.
The BlinkM MaxM and the MegaBrite actually have the same light power output. However, the MaxM uses 5-chip LEDs running at 100mA with a 40 degree spread, and the MegaBrite uses 5-chip LEDs running at 100mA with a 140 degree spread. So a MaxM will generate more of a bright spotlight effect and the MegaBrite will spread the same total amount of light over a large area. I do have a few MegaBrites that use the 40 degree LEDs, not sure if I want to go into production with them.
Neither the MaxM or MegaBrite will provide as much light as that 3W RGB LED running at 300mA. The Satellite module could, but you already have a 3W LED and starting from zero will cost more money.
Like I said I haven't bought anything, but I want to buy the best option.
This project is part of some research I am doing and the emphasis is actually on the RFID control (lamp will adjust its levels based on what the personal preference is accompanying the RFID tag). So I don't need the LED to be anything special, just bright and simple. It will always be connected to my Arduino.
But still if the 3W RGB LED is the best and brightest option then I should go for that, which brings me back to the questions at the beginning of this thread; how should I power said 3W RGB LED and I guess I should maybe use a ULN2803 instead of a ULN2003 to control it via Arduino?
If it is for a lamp, do you actually need an RGBLED? Would the project work with just a white LED that has the same brightness? The rfid cards could tell the controller how bright to make the lamp?
If you do need RGB, the Satalite modules at macetech Macetech would actually be a real good choice. They are real bright and there is a good example link on that page. You could use MOSFETs with the PWM outputs to drive them.
Anyway, MOSFETs are probably your best bet to handle the power. I have a stepper controller I built and the mosfets for that would give you way more than you need, but they only cost like 60 cents each.
You can find them here http://www.stepgenie.com/. They are the IPAK mosfets half way down the page. You just need to use one for each PWM channel you want to control.
I'd rather use RGB. I shouldn't have brought the RFID idea, it's unrelated to the functionality of the light. The software on the Arduino will look up a given tag in an array and then use that tag as a unique identifier in another array of RGB values; each tag allows will identify a person and each person will have their preference of light levels.
I would say use the Satalite modules with the MOSFETs. It would be the simplest solution for this project.
Have you chosen an RFID reader yet? I use the Parallax serial reader. It was probably a tad expensive, but only 4 wires and the antenna is part of the board. they sell it at parallax.com, but I got mine in a full kit with tags at Radio Shack.
Well I think I'll go with the 3W RGB LED from Sparkfun again, we're kind of back at the same point. And it is cheaper than the Satellite module.
I don't know anything about MOSFETs and don't really want to learn just yet (lol) so let's stick with the 3W RGB LED from Sparkfun. The question now is the power supply, if I use two different power supplies (battery for Arduino, wall wart for LED?) what should I go for? 12V @ 1A?
Also yeah I have already picked out the Parallax serial RFID reader, seems like a good option and code is readily available for Arduino.
The RFID reader can be powered right from the Arduino's 5V pin. If you are going to use it for more than a couple minutes at a time, I would use a 9V wall wart.
*** Look at goodwill or other (junk)thrift store. They usually have hundreds of old wall warts cheap. I buy them for .29 - .59 each in my little town. ***
power source + to resistors
resistors to LED Anodes +
LED Cathodes to MOSFETs Drain (D)
MOSFETs Source (S) to power source ground -
MOSFETs Gate (G) to PWM pin on the Arduino
Power source ground to Arduino ground
Your power source should probably be something like an old cell phone wall wart.? They are usually about 3.5 - 4.5 volts so you can easily reduce the voltage to what you need for the LEDs.
Thanks for the excellent response, I'm a bit more interested in using MOSFETs now, even though I don't have strong knowledge about them. They are basically some kind of transistor, right?
Unfortunately I don't know what kind of MOSFET to get and searching on sites like digikey or mouser is really confusing if you don't know what you're looking for, could you recommend a certain MOSFET for me to buy?
Great tip about the wall warts from thrift store, I heard about that once and forgot, will definitely check it out.