Hello All!
I am using a PWM program(written by another avid arduino user...) to control 150 LEDs via arduino. The way it works is you run a media player on your computer, the program written by amblindoesnotdance takes signal from the internal mic on the PC and interprets it, then there's a little byte of code on the arduino that pulls the information from the program and interprets. I would like to drive 150 LEDs but the catch is I need 5v(or any voltage) at 4.5A because they're 30mA LEDs and it's 150 of them at ~3.8V. The program sends signals on a scale of 1-255 so effectively it's dimming the LED thus I cannot use a TRIAC or a MOSFET. Is it possible to plug a 5A 5V laptop brick into the arduino and just run them all or is that a major no no? The question, as you may be able to tell, is how can I get that much power into the circuit and still retain my dimming ability. Thanks!
yes, you can use mosfets. look up Pulse Width Modulation. and also, TRIACs are for controlling AC signals, i wouldn't recommend them for this kind of project.
to make it simpler, i would make one big grid out of little 8x8 grids. perhaps using i2c shift registers. it would give you greater flexibility.
and a word of warning, matrixes that big need to be refreshed really fast, consider using multiple arduinos.
Hey,
Thanks for your input...This unfortunately is not a matrix project...It's for mood lighting...these LEDs will line a room and bounce off a wall...(see - YouTube )...it was my understanding that a MOSFET was simple on/off based on a threshold value...therefore you would be unable to dim your LEDs since it's just an on and off signal being sent...Is my assumption wrong? Therefore, based on the fact that MOSFETs are on/off, I need to find a solution that allows for 5A at 5V(or any voltage) yet is dimmable...does that make sense?
Your initial post mentions PWM, but it doesn't appear that you understand what that means.
PWM (in the context of LED control) is a method of dimming using only on/off switching of a fixed voltage. The switching is undertaken faster than the eye perceives, and the adjustment of the brightness is achieved by varying the ratio of time spent "on" to time spent "off" (aka "duty cycle").
Arduino provides a few PWM outputs which can drive MOSFETS to provide dimming to LEDs.
Do these 150 LEDs need to be dimmed independently or can banks be at the same brightness. If the former then it is one hell of a project to take on when you don't know what you are doing.
Hey,
Crimony thank you for explaining PWM to me. I am not new to electronics or computers but have only owned this arduino for a week...needless to say I am a child in this area of controllers...I now understand how PWM works and am wondering is there a certain threshold value I should be looking for with my MOSFETs?
Grumpy Mike...Your words are strong...sheesh...umm, these are not going to be individually addressed...they will be 3 banks of 50(RGB) i was thinking about doing a second project later on that involves DMX in order to address them all...But that's wishful thinking
Here's the data sheets on my LEDs...RGB respectively
* Emitted Colour : RED
- Size (mm) : 5mm
- Lens Colour : Water Clear
- Peak Wave Length (nm) : 620~630
* Forward Voltage (V) : 1.8 ~ 2.2 - Reverse Current (uA) : <=30
- Luminous Intensity Typ Iv (mcd) : Average in 5000
- Life Rating : 100,000 Hours
- Viewing Angle : 20 ~ 25 Degree
- Absolute Maximum Ratings (Ta=25????C)
- Max Power Dissipation : 80mw
* Max Continuous Forward Current : 30mA - Max Peak Forward Current : 75mA
- Reverse Voltage : 5~6V
- Lead Soldering Temperature : 240????C (<5Sec)
- Operating Temperature Range : -25????C ~ +85????C
- Preservative Temperature Range : -30????C ~ +100????C
* Emitted Colour : Green
- Size (mm) : 5mm
- Lens Colour : Water Clear
- Peak Wave Length (nm) : 520~525
* Forward Voltage (V) : 3.2 ~ 3.8 - Reverse Current (uA) : <=30
- Luminous Intensity Typ Iv (mcd) : Average in 13000
- Life Rating : 100,000 Hours
- Viewing Angle : 20 ~ 25 Degree
- Absolute Maximum Ratings (Ta=25????C)
- Max Power Dissipation : 80mw
* Max Continuous Forward Current : 30mA - Max Peak Forward Current : 75mA
- Reverse Voltage : 5~6V
- Lead Soldering Temperature : 240????C (<5Sec)
- Operating Temperature Range : -25????C ~ +85????C
- Preservative Temperature Range : -30????C ~ +100????C
* Emitted Colour : blue
- Size (mm) : 5mm
- Lens Colour : Water Clear
- Peak Wave Length (nm) : 465 ~ 470
* Forward Voltage (V) : 3.2 ~ 3.8 - Reverse Current (uA) : <=30
- Luminous Intensity Typ Iv (mcd) : Average in 6000
- Life Rating : 100,000 Hours
- Viewing Angle : 20 ~ 25 Degree
- Absolute Maximum Ratings (Ta=25A?C)
- Max Power Dissipation : 80mw
* Max Continuous Forward Current : 30mA - Max Peak Forward Current : 75mA
- Reverse Voltage : 5~6V
- Lead Soldering Temperature : 240A?C (<5Sec)
- Operating Temperature Range : -25A?C ~ +85A?C
- Preservative Temperature Range : -30A?C ~ +100A?C
Your words are strong...sheesh...umm,
That's why I am called Grumpy
That sounds a lot better, Three banks can be driven by the PWM outputs and you can use one or more FETs to switch each bank.
Yes I agree DMX would be the better solution
Here is the intended setup in an nonelectrical diagram
This is the diagram explaining the wiring(partial electrical notation)...this is from where the MOSFET and the power supply meet forward to the rest of the circuit...the battery symbol really means a junction with the MOSFET and the supply
Question still standing, since i'm not entirely familiar with MOSFETs and how to use them, what type should i be looking for?
Thank you
Lol no worries mike...and in regards to the DMX...I built a 700 LED disco dance floor...controlled via DMX and an ETC Expression III in conjunction with some iColor flex SLX...Most of it was pre wired though so all i had to do was wire up the supply and build the thing...I'm curious though about the arduino's ability to do DMX 'cause there is online software for computers to replicate consoles and if you had the computer replicating a console...the arduino creating dmx...well needless to say the possibilities are endless...that's my next venture but for now this project should keep me occupied :-p
Each bank of 50 LEDs is going to pull 1.5A (30mA * 50 in parallel), at that current your 22 ohm resistor is going to drop 33V.
For the Red LED bank you need that resistor to drop 3 V (assume 5V supply and LEDs drop 2V nominal) - so it needs to be 2 ohm. Also at 1.5A that resistor will dissipate 4.5W - I'd go for a 10W wirewound, and it will get HOT.
For the Blue & Green banks the resistor only needs to drop 1.5V (as the LEDs drop 3.5V) so it needs to be 1 ohm. Again it will dissipate 2.25W so a 5W wirewound will suffice.
These calculations will have to be adjusted to account for the Vds of the FET in the on state (which I have assumed above to be 0V). This will further reduce the resistor values.
You might be better to use 1 resistor per LED or even 1 resistor per group of 5 or 10 LEDs, that will increase the value and reduce the power dissipation.
at that scale, you should really look into running the led's in series with a higher voltage power supply. it reduces the loss in the resistor. also, when you parallel them up like that, the led with the least resistance takes more current, burns out, then the next, then the next. its better to use led's in series than in parallel, unless you put a resistor on each one.
Yep you need a resistor on EACH LED you can't drive them like that they won't share current properly and as others have pointed out the value is wrong. The FET bit is to switch them. Connect all the +ve ends of the LEDs to +5V then through a resistor connect all the other ends to to drain of the FET with the source lead connected to the 0V. Then switch the gate with the Arduino PWM pin.
If you have a PSU that gives you 5V then I should stick to that rather than a series arrangement.
Hey all...good to know, i was under the assumption that the LEDs were ok in parallel but sounds like not...to do the LEDs in series i would need 190V (3.8Vx50 LEDs)at 1.5A, no?...that's kinda high...
150 resistors also adds another 2 soldering points to the project...I've got a computer PSU that i was going to use, and that puts out 5V at ~5A+(have to look at the actual spec to be sure)...Which is going to be better since i've got the 5V output...in series or in parallel with resistors?
parallel with resistors
Hey all,
Also, just to add more questions to this thread...anyone have any suggestions on how to mount this to the wall...I can't decide on how to keep the LEDs positioned properly yet be adjustable enough to take it down in about 6 months and move it...shrink wrap...wood...wire casing...any suggestions on flexible material that i would use to drill out holes for the LEDs or something i could cut into 3' sections and just fold up
Thanks!
Hey, ok question time again...
I'm not having too much luck finding 5V 1A MOSFETs...what's the catch?
What is the largest voltage/amperage I can INPUT into the arduino and what is the largest voltage/amperage I can pull out of it?(can't seem to find any numbers on the site...)
Thanks!
i wouldnt push the arduino's voltage regulator past 9 volts. it can handle it, but it generates a lot of heat. also, mosfets are usually rated at much higher voltage and amperages. you might need to look up ttl mosfet drivers (they bump up the voltage to switch the mosfets on and off faster).
so it would be something like power supply, ttl driver, then mosfet...how does the voltage get back down on the other side? resistors? I hooked up 9 LEDs and it seems to be doing ok...3.2V at 90mA(total)...
Does anyone think there's a better way to go about this setup than with a mosfet?
Thanks guys! i really appreciate it...i tested some today on the walls and they're lookin' good so i'm pretty stoked to see what they'll look like with all of them wired up
http://brunningsoftware.co.uk/FET.htm
pretty good description on what a mosfet is and what it does.
a mosfet driver just boosts the signal on your microcontroller in order to turn it on or off faster by sending a higher voltage for on, and shorting it out for off, because if you do it slowly, it acts like a variable resistor and starts to absorb the load and heat itself.