Author Topic: Beginners Transistor Circuit  (Read 3131 times)

0 Members and 1 Guest are viewing this topic.

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Beginners Transistor Circuit
« Reply #25 on: February 02, 2021, 09:08:18 pm »
SO your LED lights up even when the switch is not pressed?

1. Normally the gate pulldown resistor need only be of some higher value like 10k or even higher. It is there to allow charge to drain off the mosfet Gate so that the mosfet will turn off cleanly, but 100 ohms is far too low. It will waste power whenever the switch is pressed. You want current going into the gate, not running away down the pulldown resistor. This should not affect your main problem though.

2. Other than that your circuit should be working as planned, I think, if the mosfet is good. Are you sure it isn't shorted internally?

3. (edit) If you are really planning on switching 30 amps with that mosfet... I notice that the datasheet gives the Absolute Maximum drain-source current as 32 amps and that these maximum current and minimum resistance values are taken at a Gate drive of 10 volts. That will be with an adequate heatsink.

4. (second edit) Another possibility that occurred to me.... do you perhaps have the pushbutton switch installed on the breadboard incorrectly? Try rotating it 90 degrees. IIRC both pins on one side of those switches are connected. So if the switch is inserted 90 degrees rotated from "correct", the two connected contacts will be making the circuit no matter whether the button is pressed or not.
« Last Edit: February 02, 2021, 09:22:03 pm by alsetalokin4017 »
The easiest person to fool is yourself. -- Richard Feynman
 

Offline wizard69

  • Super Contributor
  • ***
  • Posts: 1184
  • Country: us
Re: Beginners Transistor Circuit
« Reply #26 on: February 02, 2021, 09:26:42 pm »
Thanks again for your time.

So I've rebuilt the circuit (transistor1.jpg) and have outputted the values of each component.

I see how the 5k reduces the current to the base and how the 470 ohm protects the LED. What I'm not understanding is why do I lose so much V across c & e.

I expected the transistor to act like a normal switch on a 5v circuit. As it stands in a practical sense I don't have enough V to illuminate the LED (barely glimmers).

I know I've a lot of learning to do, being able to ask these sorts of questions really helps me.

Asking questions is key to learning.   It is at the root of science.   

I'm not sure what you are working from as far as learning goes but a good handbook / electronics text can do wonders.    In fact I'd suggest going through all the common transistor configurations one by one.   Don't be afraid to experiment with each configuration, do try to avoid blowing up your components though.   Even then there is value in what you learn when something goes wrong.

For example you can vary the base current a bit in your circuit to move the transistor in and out of the saturation region.   
 

Offline wizard69

  • Super Contributor
  • ***
  • Posts: 1184
  • Country: us
Re: Beginners Transistor Circuit
« Reply #27 on: February 02, 2021, 10:19:33 pm »
Thanks everyone for taking the time to respond, I've made those changes and replicated it on a breadboard. I'll drop those numbers out of the simulator again and get busy measuring and try to understand what all those values mean.

This might set off some people but if you are starting out in electronics drop the simulator.   Do the calculations manually which shouldn't be too bad for a simple switch.

Also you are suffering from one of the same problems I had when first starting out and that was thinking about things as idealized devices.   Almost any switch that you will work with will have a voltage drop across it, this includes mechanical switches.   That drop can vary from hardly measurable to very significant (in the context of a circuit it is in).    To put it another way, we don't live in a perfect world and the voltages calculated by your simulator are not un-normal.   What you will get in real life might vary a bit depending upon all sorts of factors.

Back in the day when I was in tech school, they recommended the purchase of a handbook.   One of them was "HANDBOOK FOR ELECTRONICS ENGINEERING TECHNICIANS" by Kaufman and Seidman.   Mine is copyright 1976 so a bit dated (maybe a lot dated), but the basics don't change.    Maybe more up to date people will have a line on a similar book as such a reference comes in very handy over a lifetime of working with electronics (who remembers all of this stuff).   I'm even less up to date on educational textbooks, that is texts designed to teach, but it never hurts to download the Navy's old NEETs program.

Obviously you will want to return to the simulator at some point but I really see hand cranking through a transistor design, at least the simple parts, as one of the better ways to learn what is going on.    This applies to a lot of things in electronics right for the beginning when looking as simple restive parallel and series circuits.   Walk through those equations and manually calculate a variety of series parallel circuits to get a feel for what is going on.      A simulator can certainly give you answers for all the voltages and currents in a resistive circuit but you should be able to derive them yourself and frankly in simple circuits it should become obvious just my looking what is happening.

So yeah I think it is a bad idea to go anywhere near a simulator until you have explored some of the basics with pencil and paper and a good calculator.     In the case of your original post if you had learned in this way current flow in the circuit would be pretty obvious even if you did not have the precise numbers delivered from calculation.   
 

Offline wizard69

  • Super Contributor
  • ***
  • Posts: 1184
  • Country: us
Re: Beginners Transistor Circuit
« Reply #28 on: February 02, 2021, 10:55:10 pm »
Its funny you say that, I'm working on a practical project which is based around a Basic Stamp microprocessor, i thought i was going to need relays in order to switch a 12v 30A circuit but someone mentioned MOSFETS and looking at the FQP30N06L it would appear to up to the job. So, I started playing around with one.
30 Amps is significant current and as such you have to have your circuit board design and everything else up to snuff.   For years I've worked in automation and the way this would be handled in industry is to buy an off the shelf model rated for the input and outputs.   Ideally something that snaps on a DIN rail.   As long as you are using common signalling voltages found in automation you will have a ready made device that you can count upon.    Often these are referred to as Solid State relays and if you get the right device will be optically isolated and have an integrated heat sink.   This can significantly cut down on the engineering required.

This is not a mass produced solution by any means but if you have less than 6 machines world wide to modify these sorts of modules become amazingly cheap.   You will not get the satisfaction of a optimal design that can be had implementing discreet devices so that can be a factor.   
Quote
The datasheet says Vgs(th) is between 1 and 2.5V and Rds(on) resistance 0.035ohm so I looked to calculate the resistor value 5V - 2.5 = 2.5V then 2.5/0.035=71.43 ohm. Again its probably my simple thinking at fault but I assumed that if I apply between 1-2.5V to the gate the Drain & Source connection would be made. The problem I'm finding is that even with the power connected but not switched on the connection between Drain & Source is made.

I don't understand how?

I've attached the schematic I was using and the breadboard implementation,

Make sure your FET is good.   

Still I'd be very concerned as to how you expect to get 30 amps onto and then off the board.
 

Offline Paul#1966Topic starter

  • Contributor
  • Posts: 10
  • Country: gb
Re: Beginners Transistor Circuit
« Reply #29 on: February 03, 2021, 09:22:30 am »
Quote
1. Normally the gate pulldown resistor need only be of some higher value like 10k or even higher. It is there to allow charge to drain off the mosfet Gate so that the mosfet will turn off cleanly, but 100 ohms is far too low. It will waste power whenever the switch is pressed. You want current going into the gate, not running away down the pulldown resistor. This should not affect your main problem though.

I replaced it with a 10k and it still behaves the same, I'm curious about the gate pull down resistor, was 5V - 2.5 = 2.5V then 2.5/0.035=71.43 ohm not the right way to calculate this?

Quote
2. Other than that your circuit should be working as planned, I think, if the mosfet is good. Are you sure it isn't shorted internally?

I think MOSFET is good:

Gate
no continuity between drain, source or heatsink

Drain
no continuity between gate or source but there is continuity with heatsink

Source
no continuity between drain, gate or heatsink but once tester connected to gate then there is continuity to drain and heatsink.

Quote
3. (edit) If you are really planning on switching 30 amps with that mosfet... I notice that the datasheet gives the Absolute Maximum drain-source current as 32 amps and that these maximum current and minimum resistance values are taken at a Gate drive of 10 volts. That will be with an adequate heatsink.

To be honest I'm not 100% sure of the 30 amps, it will basically switch a 12V DC circuit powered from leisure battery (clay pigeon trap), I'm a way of getting to that point and am not in a position to get a meter on the switch to check what amps I will be dealing with.

Quote
4. (second edit) Another possibility that occurred to me.... do you perhaps have the pushbutton switch installed on the breadboard incorrectly? Try rotating it 90 degrees. IIRC both pins on one side of those switches are connected. So if the switch is inserted 90 degrees rotated from "correct", the two connected contacts will be making the circuit no matter whether the button is pressed or not.

Thanks, as it happens the switch was orientated incorrectly (i swearI tested that several times LOL) but the switch doesn't appear to be playing any part in this. If I power up the breadboard the LED lights, if i pull the wire between switch and gate the LED stay lit.

I think I read somewhere about a capacitive nature of mosfets, is it there is a small current leaking to the gate which makes drain and source which persists after power is removed from the gate perhaps?
« Last Edit: February 03, 2021, 09:26:54 am by Paul#1966 »
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Beginners Transistor Circuit
« Reply #30 on: February 03, 2021, 08:36:47 pm »
I've built your circuit on my breadboard and it works perfectly as desired. (I don't have the same mosfet but any N-ch. mosfet should work in this circuit, and I am using my favorite IRF3205.) The only thing I can figure out is that your breadboard setup must be shorted at the point where the D and S leads connect to the mosfet. Please try simply removing the mosfet and see if the LED still comes on when you apply power.

Yes, to answer your question the mosfet gate can be charged by a simple finger touch sometimes and residual charge leaking onto the gate can turn the mosfet on. This is why the pulldown resistor is there, to bleed charge off the gate so it will turn off when desired. You might check your pulldown resistor for continuity -- it is barely possible that this resistor is open or not connecting properly and your gate is staying charged up even when power is cycled.
How to calculate this resistor? I just use the largest value that works. Someone up on the theory will no doubt tell us how to calculate it precisely depending on the mosfet's gate capacitance and the circuit's gate drive parameters. 

Note that this is _not_ the same as the LED current-limiting resistor. These mosfets we are using have essentially negligible on-state resistance in simple DC circuits like this. Just calculate the LED resistor as usual, considering the mosfet as a simple switch with essentially no resistance.
« Last Edit: February 03, 2021, 08:40:44 pm by alsetalokin4017 »
The easiest person to fool is yourself. -- Richard Feynman
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Beginners Transistor Circuit
« Reply #31 on: February 03, 2021, 08:53:15 pm »
Quote
was 5V - 2.5 = 2.5V then 2.5/0.035=71.43 ohm not the right way to calculate this?

I'm confused about this calculation. Are you trying to make a voltage divider to give less than the supply voltage to the gate?
Mosfets are generally designed to work as basic switches. When they are operated with low gate drive they can be in the "linear region" of operation where the Drain-Source resistance is linearly proportional to the gate drive. They produce more heat when operated this way as their internal resistance is higher than when operated with full gate drive.
If you want to experiment with different gate voltages in your present setup you can simply put a potentiometer in the circuit. One leg to positive rail, other leg to negative rail, wiper to the switch (instead of connecting switch directly to positive rail.) Leave the gate pulldown where it is, on the other side of the switch.

EDIT: I've been back to the post where you introduced this calculation and I can't figure out what you are trying to do.  The units of your equation don't even match. You have volts divided by ohms and an answer in ohms -- a unit discrepancy, for one thing.

Mosfets are different than bipolar junction transistors. BJTs require current flowing from Base to Emitter to enable greater current to flow from Collector to Emitter. Mosfets require no such current flow from Gate to Source, rather they require filling the gate "bucket" with charge to turn on and bleeding charge off by the same connection to turn off.

So if you want to supply some reduced voltage to the Gate for some reason, you could use a voltage divider (the potentiometer I mentioned above, or fixed resistors calculated as normal for voltage dividers). And for the output side, you can consider the Drain-Source path through the mosfet as having negligible resistance when Gate "bucket" is full of charge, and more and more resistance as there is less and less charge on the Gate. No gate charge, mosfet is "off" and no current flows between Drain and Source. Full gate charge, mosfet is "ON", fully conducting between Drain and Source.
« Last Edit: February 03, 2021, 09:09:13 pm by alsetalokin4017 »
The easiest person to fool is yourself. -- Richard Feynman
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Beginners Transistor Circuit
« Reply #32 on: February 03, 2021, 09:20:15 pm »
To calculate the LED current-limiting resistor you simply subtract the LED's forward voltage from the total supply voltage, and divide the result by the desired current through the LED. Example: 5Vsupply - 2.5 VLED = 2.5 V more to drop   and 2.5V / 0.020A = 125 Ohms for the LED current-limiting resistor -- of which the mosfet's Drain-Source junction in the On-state contributes ... what, 0.035 ohms? Fergeddaboudit.

Note the unit consistency: Volts divided by Amps equals Ohms.
The easiest person to fool is yourself. -- Richard Feynman
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Beginners Transistor Circuit
« Reply #33 on: February 03, 2021, 09:34:20 pm »
While I'm thinking about it -- for those TO220 cases and larger, they do put some stress on the breadboard sockets due to the width of the leads and will eventually cause loose connections in the breadboard. To lessen this problem you can carefully turn the mosfet's legs through 90 degrees with some needlenose pliers; this will present the narrow dimension of the legs to the slots in the breadboard and the breadboard will last longer.

The easiest person to fool is yourself. -- Richard Feynman
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Beginners Transistor Circuit
« Reply #34 on: February 04, 2021, 06:52:55 pm »
I just discovered something else about this circuit. If _both_ the breadboard power supply and the LED are "backwards", then the circuit behaves as you are finding. The LED stays lit as long as the mosfet is in place, no matter the state of the switch or pull down etc.

I realize you are using a breadboard power supply that has its output polarity clearly marked, and that your wiring on the breadboard is consistent with those markings. But.... check the power supply anyway to make sure it is putting out the right polarity as marked!  And that the LED is installed the right way round!

« Last Edit: February 04, 2021, 06:55:04 pm by alsetalokin4017 »
The easiest person to fool is yourself. -- Richard Feynman
 

Offline Paul#1966Topic starter

  • Contributor
  • Posts: 10
  • Country: gb
Re: Beginners Transistor Circuit
« Reply #35 on: February 06, 2021, 02:15:49 pm »
Thanks for taking the time, I know my questions and understanding are very basic but I am learning from it. The issue with my MOSFET was I hadn't a pull-down resistor on the gate and when it first powered on there was enough voltage present to saturate (is that the right word) the MOSFET and make the connection then of course once made without that pull-down the connection was set.
 

Offline Paul#1966Topic starter

  • Contributor
  • Posts: 10
  • Country: gb
Re: Beginners Transistor Circuit
« Reply #36 on: February 06, 2021, 02:21:22 pm »
I think the maths was sound V/I=R it was more the application of it that was badly flawed  ;D, I don't think I needed to be too fussy over the value of the resistor I was going to use as my pull-down. Anyway that issue was sorted out.
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Beginners Transistor Circuit
« Reply #37 on: February 06, 2021, 03:25:30 pm »
Thanks for taking the time, I know my questions and understanding are very basic but I am learning from it. The issue with my MOSFET was I hadn't a pull-down resistor on the gate and when it first powered on there was enough voltage present to saturate (is that the right word) the MOSFET and make the connection then of course once made without that pull-down the connection was set.

You are welcome of course... but I must point out that both your circuit schematic and your photo of the breadboard show your Gate pulldown resistor in the circuit. And as I confirmed by constructing it, it works fine, whether this resistor is 100R or 10k.  But now you are saying that you did not have the gate resistor installed. So we were talking about a different circuit than what you showed on schematic and breadboard. It's really hard to figure out what is going on if the schematic and photo posted aren't the actual circuit that is misbehaving.

Have you tried using the potentiometer as I suggested, to put the mosfet into the linear operation region where the pot setting controls the LED brightness? That experiment, coupled with a few current and voltage measurements with your DMM, will help you learn a lot about how mosfets work and how they can be used for all kinds of things in the home lab. It is also how you can determine the actual Gate threshold voltage for the mosfet you are using.
« Last Edit: February 06, 2021, 03:27:08 pm by alsetalokin4017 »
The easiest person to fool is yourself. -- Richard Feynman
 

Offline Paul#1966Topic starter

  • Contributor
  • Posts: 10
  • Country: gb
Re: Beginners Transistor Circuit
« Reply #38 on: February 07, 2021, 01:27:47 pm »
Quote
You are welcome of course... but I must point out that both your circuit schematic and your photo of the breadboard show your Gate pulldown resistor in the circuit. And as I confirmed by constructing it, it works fine, whether this resistor is 100R or 10k.  But now you are saying that you did not have the gate resistor installed. So we were talking about a different circuit than what you showed on schematic and breadboard. It's really hard to figure out what is going on if the schematic and photo posted aren't the actual circuit that is misbehaving.

The first attempt very definitely wasn't working for some reason, when I revisited it it worked fine, see attached (ignore Arduino). The only thing I can see differently was I replaced the original gate resistor (100ohm) with 220ohm. Would that have made a difference?

Quote
I've built your circuit on my breadboard and it works perfectly as desired. (I don't have the same mosfet but any N-ch. mosfet should work in this circuit, and I am using my favorite IRF3205.) The only thing I can figure out is that your breadboard setup must be shorted at the point where the D and S leads connect to the mosfet. Please try simply removing the mosfet and see if the LED still comes on when you apply power.

The mystery still continues as the pins tested fine with no shorts.

Quote
Have you tried using the potentiometer as I suggested, to put the MOSFET into the linear operation region where the pot setting controls the LED brightness? That experiment, coupled with a few current and voltage measurements with your DMM, will help you learn a lot about how MOSFET's work and how they can be used for all kinds of things in the home lab. It is also how you can determine the actual Gate threshold voltage for the MOSFET you are using.

Not tried the potentiometer yet, but I will, again thanks for your input.
« Last Edit: February 07, 2021, 01:47:09 pm by Paul#1966 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf