Go Down

Topic: Basic Transistor with Arduino. Is this accurate? (Read 11963 times) previous topic - next topic

Bittsen

I want to control things with transistors instead of relays.
Is this an accurate example of a basic transistor setup to control a 5A-12V device?


Caltoa

No :smiley-roll:

Do you want to use a normal transistor, a darlington transistor or a mosfet ?
Do you have one ? which type ?

In the picture is a mosfet, but if that is a n-channel mosfet, the source should be connected to ground.

For protection you can add a resistor of 100 ohm (100 ohm to 10k) from pin 4 to the gate.
You could also add a fly-back diode over the load.

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Bittsen

I have a ton of IRF9540N P-channel mosfets at my disposal.

My diagram shows the transistor from the back side because I drew it before I labeled the outputs. I know the difference in the pinouts so that won't be a mistake as long as the question is to the label of the pinouts and not the actual placement.


Grumpy_Mike

If that device is a p-channel FET then no it will not work.
You have to get the gate up to 12V to turn it off and it is connected to an arduino pin which will only get up to 5V.

Yet again by not supplying all relevant information you have wasted the time of all those who have answered this thread so far.

CrossRoads

Ah - P-channel.
In that case you need an NPN in front of it, the Arduino can't supply 12V to the Gate to turn the P-channel off:
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Caltoa

The load seems to be 'things' or 'device'. So I would suggest to use a fly-back diode over the load.

CrossRoads

Original post was a light bulb tho.  Not sure you need a diode for an incandescent bulb.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

runaway_pancake


Yet again by not supplying all relevant information you have wasted the time of all those who have answered this thread so far.


If anything, they "wasted" their own time by anticipating the OP's deal.
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

Bittsen


Yet again by not supplying all relevant information you have wasted the time of all those who have answered this thread so far.


Hey Mike.
What would I have to do to get you to drink some prune juice?

I didn't supply "relevant information" because there isn't any information.
I said I had those transistors at my disposal. I didn't say I "Had" to use them.

As for the "device" I will be controlling, there isn't one yet. I am, at the very least, smart enough to know that I need to add a device (diode) to prevent back current (especially if powering a DC motor).

My purpose for posting the original question was to clarify if the basic theory was correct.

Now I would like to know if anyone has suggestions for a transistor that can handle a decent sized load at 12V but triggered with 5V from an arduino. I know some will suggest a relay. The potential speed of the switch may be faster than a mechanical relay can handle.

Or should I start a new thread for that?

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Bittsen

#11
Mar 09, 2014, 07:40 am Last Edit: Mar 09, 2014, 08:59 am by Bittsen Reason: 1
Probably nothing but I would like to stay as simple as possible.

I am attempting to assimilate knowledge and have been looking at some Darlington transistors. I'm in the infancy of my research on transistors. I know their basic function but not the specifics.

Am I accurate in seeing that a large darlington NPN would operate similarly to adding a NPN to the IRF9540N?

Caltoa

#12
Mar 09, 2014, 11:01 am Last Edit: Mar 09, 2014, 11:04 am by Caltoa Reason: 1
A darlington has two transistors inside, that is why it the collector does not get close to 0V, but stays at about 1V.
So with a 1A load, you dissipate 1W of power, and you need a heatsink.

The NPN transistor with the IRF9540N is a good and simple solution. You have to trust us on this.

If you are going to buy new parts, buy a 'logic level' n-channel mosfet. That is the most simple way.
https://www.sparkfun.com/products/10213
All the extra components you need are a protection resistor from Arduino to gate, perhaps a fly-back diode over the load, and maybe 100k resistor from gate to ground for a pre-defined state during startup.

Bittsen


A darlington has two transistors inside, that is why it the collector does not get close to 0V, but stays at about 1V.
So with a 1A load, you dissipate 1W of power, and you need a heatsink.

The NPN transistor with the IRF9540N is a good and simple solution. You have to trust us on this.

If you are going to buy new parts, buy a 'logic level' n-channel mosfet. That is the most simple way.
https://www.sparkfun.com/products/10213
All the extra components you need are a protection resistor from Arduino to gate, perhaps a fly-back diode over the load, and maybe 100k resistor from gate to ground for a pre-defined state during startup.


Thanks for a good, easily understandable, reply.
A logic level mosfet sounds good.
I was reading about the darlington and the voltage loss it has.
No matter what I will add a heat sink to whatever I concoct. Heat sinks are cheap.
The flyback diode for my first idea might not be needed because I'm running LEDs but since I'm trying to put together a small "all-in-one" project the flyback diode might be a good addition. The Darlington was enticing because it has a built in flyback diode.
I came to the conclusion I should have a couple resistors to keep the transistor honest. Again, the Darlington was appealing because they are built in.

Of course I could accomplish the same thing by using some solid state relays but they are so expensive in comparison.
I know someone who insists they would be easy to "make" because of the way they function.

runaway_pancake

Whatever you do, DO NOT buy any Darlingtons
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

Go Up