Pages: 1 [2] 3 4   Go Down
Author Topic: Controlling/Strobing 60 LED'S  (Read 4566 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have this MOSFET I got from radioshack yesterday, http://www.radioshack.com/product/index.jsp?productId=2062618  Will that work? So essentially the MOSFET acts like a relay, when receiving 5V from arduino output pin, It sends 5V from my secondary power source to the LED's?
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6614
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Unfortunately, that's not a logic level mosfet and really needs 10v gate drive to function. Look for a logic level mosfet instead. I usually use type STP40NF10L but there are plenty of others.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How do you tell if it's Logic Level if it doesn't say it on the website. Having trouble finding one on RadioShack.com or Frys.com
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6614
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

To tell if it's logic level, you need to look at the datasheet. Logic level mosfets have a maximum gate threshold voltage of around 2.5 volts, instead of 4 volts for the one you have. Also look for Rds(on) to be quoted at Vgs=5v instead of Vgs=10v.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

RadioShack's site only shows they have 1 mosfet, but it seems they have quite a few NPN Transistors is there a specific one of those I could use?
« Last Edit: September 23, 2011, 03:39:37 pm by Silent » Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6614
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That depends on the amount of current you want to switch, which in turn depends on how many strings of those LEDs in parallel you want to drive. The TIP120 will switch several amps of current, although a mosfet is better for high currents because it has a lower voltage drop and therefore runs cooler.

That mosfet you have may work up to about 1A, with 5v gate drive from the Arduino.
« Last Edit: September 23, 2011, 03:42:19 pm by dc42 » Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm getting a bit confused. Would it be better to wire them in parallel or each LED separate with its own resistor like in the schematic? Not sure what the best way to go about wiring up these 2 sets of 6 LED's to make a total of 12 LED's being able to control each set of 6 LED's.
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6614
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can wire several LEDs in series to form a string if you have enough voltage to drive them. If you connect LEDs in parallel or strings of LEDs in parallel, then each LED or string needs its own series resistor.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I ended up getting two TIP120's, I couldn't find the right MOSFET, not sure if they didn't have it or if I just wasn't looking for the right thing. What would be the best way to use the TIP120, right now with the setup I have in the schematic?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's my updated schematic using the LED's in a series of 3:

Using 56ohm resistors (closest I found to 60ohms: 12V - (3.4V+3.4V+3.4V) = 1.8V,  1.8V / 0.030 A = 60 ohms) for each series of LED's.
Emitters from TIP120's connected to 12V ground and arduino ground pin
Each Collector from TIP120's connected to Ground from each set of the 2 series of LED's
Base from TIP120's connected to a 150ohm resistor running to the arduino Output pins D7 & D8

Does this seem correct?

« Last Edit: September 23, 2011, 10:38:54 pm by Silent » Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6614
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You have the TIP120s wired incorrectly. Each one should be wired as follows:

- Emitter to ground

- Base to the Arduino pin through a resistor. You don't need a resistor as low as 150 ohms (that was for driving a mosfet), I would choose 1K, which should be good for driving up to 1A of LEDs (in your schematic you are only drive 2 strings i.e. 60mA)

- Collector to the LED strings

Your resistor calculation should be based on a battery voltage of 13.5v if the battery will be on charge, however the TIP120 will drop 1v or so, so your calculation isn't far off. I suggest you design for 25mA rather than run the LEDs right at their maximum rating of 30mA continuous.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay, lets see if I got it right this time. Also, with the 12(13.5) volt design, you said to design it at 13.5V. If the car shuts off and only has 12 Volts will it effect anything? I'm starting to lean towards just the 5 volt design, seems like it could be the better option.

5 Volt Design:



12(13.5) Volt Design:



Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6614
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You have the transistors labelled incorrectly. The terminal with the arrow is the emitter, and the one at right angles to the bar is the base - that is why the schematic looks wrong.

If you turn the engine off and the battery drops to 12v, the current though the LEDs will drop. If we assume that the leds drop 3.2v each and the TIP120 drops 1v, than at 13.5v the voltage across the 130 ohm resistor is (13.5 - 3 * 3.2 - 1) = 2.9v. So by ohms' law, the current is about 22mA. if the battery voltage drops to 12.0, there will be 1.4 volts across the resistor, so the current about halves to 11mA. You would get less of a drop in current if you use just 2 LEDs per string and a larger resistor, but there will still be a drop.

The problem with the 5v version is that the TIP120 has quite a large (and not very predictable) voltage drop - up to about 2v at high currents, rather less at the currents you are using at present (perhaps 0.9v). So it may be difficult to get enough voltage to the LEDs. A mosfet is a more practical solution for 5v.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there any way I get an adapter that would regulate it to 12V, so it's consistent whether the engine is on or off? I'd like it to be almost the same brightness if the engine is on or off.

As for the mosfet do you know of a specific one that radioshack carries? I found this one on sparkfun http://www.sparkfun.com/products/10213 that may be what i'm looking for.
So for the 5V schematic all I would need to do is swap the transistor with the mosfet and everything else is correct?
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6614
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there any way I get an adapter that would regulate it to 12V, so it's consistent whether the engine is on or off? I'd like it to be almost the same brightness if the engine is on or off.

Not easily, but you could regulate it to around 9v or 10v.

As for the mosfet do you know of a specific one that radioshack carries? I found this one on sparkfun http://www.sparkfun.com/products/10213 that may be what i'm looking for.
So for the 5V schematic all I would need to do is swap the transistor with the mosfet and everything else is correct?

Yes, that mosfet is logic level. Use a 150 ohm resistor between the Arduino pin and the gate, not 1K as for the transistor.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Pages: 1 [2] 3 4   Go Up
Jump to: