Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Need a particular Transistor or device

Status
Not open for further replies.

april

Member
I have a need to place in a 12 Volt negative line a transistor or other device to switch a current at a steady 12 Volts 1 Amp
I would need a switch capable of say 2 Amps to be safe.
I can only supply 5 Volts maximum to the base and preferably 3.3 Volts but it must switch on hard.

So I am hopeless with transistors.
Can anyone suggest what I might try
 
Last edited:
How much current can your 3.3V pin source? Sink?

A 2N2222 with a 2n3904 ahead of it to make a Darlington would likely work.
 
Thanks Mike the 3.3V pin can source (or sink as well maybe) ? about 10 milliamps I suppose 20 if I run it at 5V -It will be from an ATtiny85 and look as I may I don't see it on the datasheet although I am sure it will be there somewhere
With the Darlington pair is the first tranny the 2N3904 which then feeds the 2N2222 ? or the other way around?

I found this on this page **broken link removed**

Driving Loads

The AVR port output drive is more or less symetrical. The output current is dependent on the supply voltage, and is as high as 20mA with a 5V supply, but drops to 6mA with a 1.8V supply. You can't drive the typical LED from a pin if the supply voltage is less than 3.3V, because there is not enough output voltage to exceed the LED's forward voltage at the current required to illuminate it. Since lower voltages are used for lower power consumption, it is likely you wouldn't want an LED on a 1.8V circuit, anyway.

If you want to drive anything with more than the 20mA available, you are going to have to use an external transistor to drive it. Also, if you are going to drive anything inductive, like a relay - even a little 5V relay - you are going to want to use a transistor, too. The AVR cannot handle the kickback from the coil, and the diode protection may fail. The transistor may have to be bipolar because larger MOSFETs require more voltage to turn on than is available from lower power supply voltages. For instance, the IRF520 requires 4 volts to start conducting, and then it can't sink any current to speak of. The IRF7470 and other "logic level" MOSFETS have very thin gate insulation allowing for turn on voltages as low as 2 volts.

If you are driving an analog (PWM) device and need some power, the L165 power OP-Amp may be what you need. I have used them for servo motor controllers, with good results.
 
Last edited:
Would a relay be suitable? You could have a transistor to boost the current to the coil. Voltage drop across the contacts would be much lower than with a semiconductor, and you can switch plenty of current. Heat not an issue. On the other hand you have much slower switching time, a device that goes "click" and isn't suitable for rapid, repeated switching and generates a small magnetic field. If you do use one though, don't forget to connect a diode across the coil to catch the back emf.

Alternatively, and if you don't want to use Mike's darlington, you could consider a logic level mosfet of some kind.
 
Thanks - I'm trying to avoid the relay

That is interesting . I was looking at https://www.nteinc.com/Web_pgs/LL_MOSFET.html
The 2980 looked sufficient .
However once switched on it will stay on for 10 seconds and that might be repeated immediately so my thought turned to how long it would survive with that sort of a current , say 2 amps at 12 Volt passing through it ?

12V 2A ------,--------Load
....................|
...................Gate
...................3.3V
.................10mA

....The editor removes spaces thus the dots
 
Last edited:
You didn't specify how fast the driver needs to be. This one is will drive lamps and LEDs, but shouldn't be used for something that is needs to turn on frequently and fast, like you would need for PWM.

It has an extra logic inversion, so take care of that in code. It draws about 12mA when the load is off, so that might be a problem for battery powered equipment where the load should be low when the load is off.

The FET on-resistance determines and switching rate determines the power dissipation in the FET.
It works from a 3.3V port, and only requires a source current of ~5mA.
 
Thanks again Mike
I breadboarded this with alternate parts I had
BC547 and a BDX540 Mosfet. -100V 33A so I thought that safe

I had to change the drain and source about to make it work but work well it certainly did . I guess this is what you mean by extra logic inversion (Does that mean I have to take the pin low? Didn't understand that bit)
I checked the input pin with positive 3.3V @10mA and it came on hard - Excellent

The BDX540 datasheet I could not find but I found an IRF540 and wondered if they are the same.
The 2n3904 I noticed can be replaced with a PN100 multiuse tranny so that's why I used the BC547
Probably did wrong but had great fun!
 
Last edited:
Refer to the plots. Current flows in the load (Green trace) when the Port Pin is low (lt. Blue trace)
 
I'm a little confused, since the OP originally stated he had a 12V negative line he wanted to switch, and that would require a different circuit or a relay. :confused:
 
Last edited:
I a little confused, since the OP originally stated he had a 12V negative line he wanted to switch, and that would require a different circuit or a relay. :confused:
Sorry if I misled or confused you .
The load which is a light is cut into the negative supply line in series so the current must pass through it when switched on. The switch comes from an attiny85 pin which goes high to turn the light on. However that is no problem as MikeMl says as I will simply make the attiny pin go low. and that should work as per above . I just havn't tried that yet as swapping the Drain and Source leads let it operate with the pin going high.(As I said I don't know if that was the right way to do that or not but it works)

MikeMl your plots are a little advanced for my stage in learning but I think I see what you mean. When the pin port goes high (Vport)the current at R1 goes to none.When Vport pulses low the current goes to 2Amps until Vport goes high again. Yes I need it the other way around.
Are you able to alter that schematic to suit Mike? If not will it last OK with the source and drain swapped and a high pin turning it on ?
 
Last edited:
Just out of curiosity - the switch being in the negative rail makes me think of an old style car door switch. Is this by any chance some kind of automotive application?

Just having a look for your bdx540 - it looks as if it should be a bipolar transistor with that prefix. But we live and learn, as they say.

I find mosfet's confusing at the best of times, but looking at the datasheet for the irfz44n you'll notice there's an intrinsic diode between the source and the drain - due to this the circuit shouldn't work with source and drain reversed, as the diode will conduct and power will be applied to the load all the time - so this makes me really wonder what kind of transistor you actually have there!
 
Just after each statement
Just out of curiosity - the switch being in the negative rail makes me think of an old style car door switch. Is this by any chance some kind of automotive application? Well similar it runs a 12V light that turns on when the pinoutput goes positive.

Just having a look for your bdx540 - it looks as if it should be a bipolar transistor with that prefix. But we live and learn, as they say.You will still be about 95% beter informed than I am

I find mosfet's confusing at the best of times, but looking at the datasheet for the irfz44n you'll notice there's an intrinsic diode between the source and the drain - due to this the circuit shouldn't work with source and drain reversed, as the diode will conduct and power will be applied to the load all the time - so this makes me really wonder what kind of transistor you actually have there!I can't remember where I bought them . It was 15 years ago and I would like to use them up. It might have been Jaycar but they are not in their records now and at this point I havn't found a datasheet for them
 
Last edited:
Lets clear up the confusion about switching the load. Is the configuration like I showed it in the schematic I posted? Namely, one end of the load is connected to +12V, and the other end of the load is connected to the (drain) of the switch, and the other side of the switch (source) is connected to the same ground as both the 3.3V supply that runs the mcu and 12V supply?

In my schematic, the top lead of the N-Fet is the drain and the grounded lead is the source. Is that the way you have it connected? Most of those power N-Fets have the pin order GDS (l to r).

As I suggested, if you are writing the code for the mcu, you can compensate for the extra inversion in the driver by making the pin low when you want the lamp on. If you cannot change the code, then I can add one more transistor to make the driver non-inverting.

Another option is to power the mcu from 5V, and then buy some modern logic-level NFets like the ones you linked to. This would switch on the lamp when the port pin is high....
 
Last edited:
Sorry if I misled or confused you .
The load which is a light is cut into the negative supply line in series so the current must pass through it when switched on. .......................
It's still not clear. Is the voltage supply positive or negative?

Do you mean to say "switch the low (ground) side of a positive supply powered load"?
 
With my mentioned components the load is connected between the source and ground on your schematic Mike. A positive port pin turns it on
 
With my mentioned components the load is connected between the source and ground on your schematic Mike. A positive port pin turns it on
Have you measured the voltage across the load (lamp?) when it is turned on? I think you will find that there is only ~8V across the load. This is because the NFet is operating as a "source-follower" (look it up), and the source only pulls up to the drain voltage (12V) minus the Gate-to-Source voltage (4 to 5V). It is likely that the NFet is getting hot, because it is dropping 4V at 1A (4W) when on.

If you move the load between the drain and +12V, The load will have 12V-(few mV) across it. The NFet wont even get warm because its dissipation is (few mV)*1A = few mW. That will give back the extra inversion, however.

PS. Look at this, it should clarify what I am talking about. Note the current through R5 (Mike's), R7 (Your's) and R1 (non-inverting)
 
Last edited:
I have built the circuit suggested by Mike as per the pic below but with parts I have available BC547 transisters and IRF540 Mosfet. When connected the lamp is full on and I have 1.5 volts on the gate and about 10.5 V on the Drain. with 12 V supplied. That seems to be enough to turn the MOSFET on hard and the load is getting 1 amp.

The voltage across the load is 11.3 Volts when the supply is 12.3V so a 1 Volt drop on a 1 amp current.The MOSFET still gets pretty hot !

So no signal from the input pin at this point and a positive supplied to that pin has no effect.

I have used different parts from my stock and I wonder if someone could model this for me with the parts I have used. Perhaps I will have to buy alternatives.
This is my first attempt at a board so maybe I have a foulup?
 
Last edited:
(I haven't traced your PC layout)

When the load is turned on, what is the voltage at the gate of the NFet?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top