Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Driving high(er)-powered LEDs: MOSFET or Darlington array?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Driving high(er)-powered LEDs: MOSFET or Darlington array?

by nie1s on Thu May 15, 2008 8:48 am

I'm probably the umpteenth person to go and try to make their own moodlight, but I'm running into some problems trying to drive the LEDs I got.

I have 4 parallel lines of 3 LEDs (5060) plus a resistor in series, which work at 12V (common +), at 3x80=240mA (R+G+B). Since that wouldn't really work very well with the 5V my Boarduino outputs, I went and searched for a solution. Note that I pretty much know jack about electronics, so nothing holding me back there ;).

After some looking around I found out that a couple of MOSFETs would probably do the trick, and this site (warning: Dutch, but the schematic speaks for itself I guess) led me to try a couple of BS170 units.

However, it seems that this won't really work. Apart from the fact that I've apparently already killed 4 of them (or they were DOA, but frankly I don't think so), hooking up a couple of simple LEDs:
+5V-[resistor]-LED-MOSFET(D)
GND-MOSFET(S)
(Arduino PWM-pin)-MOSFET(G)
makes the LEDs light up faintly, and increasing the value of the PWM-signal makes them light up brighter, so there seems to be some leakage.

The same thing occurs when using the strip, then the green & blue light up pretty brightly, and the red one very faintly. Increasing the PWM-signal works, but if I can't shut off the colours completely, it's pretty useless.
The difference in intensity of the colours is probably explained by the specs of the LEDs:
min-max V:
Red: 1.8-2.0V, they have a 300Ohm resistor for 3 LEDs at 12V
Green/Blue: 2.8-3.4V, they have a 120Ohm resistor for 3 LEDs at 12V

After a bit of searching I found another solution: using Darlington Arrays (ULN2003).

Now, before I go out and get a few of those.. will this be a solution for my problem?
Or is there an easier (read: without having to place a new order) way to do this?

nie1s
 
Posts: 3
Joined: Mon Apr 07, 2008 9:15 am
Location: Google Lunar Base

by Volt Dropper on Fri May 16, 2008 9:50 pm

ok you're probably going to want an opto in this circuit.

here's a trick... google 'opto mosfet atmega' then clcik on "images" in google. You'll very quickly find many sample schematics. You can also do an image search on 'opto mosfet pic" or 'opto mosfet microcontroller' etc

There are a ton of sample circuits out there.

good luck

EDIT: You might also have very good luck with 'opto led mosfet pwm'
Volt Dropper
 
Posts: 30
Joined: Thu Apr 24, 2008 12:58 am

by nie1s on Sat May 17, 2008 11:35 am

Hi Volt Dropper,

Thanks for the tip on finding schematics :). I kind of decided to try the Darlington array first (an ULN2003A is 22 cents.. worth the try I guess), and that does the trick.
The LEDs are completely turned off when I send them an analogWrite(pin,0).

So, problem solved I guess. On to the next challenge: a graphical LCD :).

nie1s
 
Posts: 3
Joined: Mon Apr 07, 2008 9:15 am
Location: Google Lunar Base

by Volt Dropper on Sat May 17, 2008 10:16 pm

heh google image search ULN2003A
Volt Dropper
 
Posts: 30
Joined: Thu Apr 24, 2008 12:58 am

Please be positive and constructive with your questions and comments.