Arduino Forum

Using Arduino => General Electronics => Topic started by: crullier on Jan 25, 2015, 08:44 pm

Title: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Jan 25, 2015, 08:44 pm
Hello everyone,

I have some questions about interpreting the information found of a standards 2N222. I have received tons of help from some good people and understand the principle of how BJTs work.

The problem I am trying to solve is why a transistor seems to get hot when it its actuating an electromagnet rates at 1A IF such electromagnet stays on for more than 2-4 seconds.

Needless to say I have been doing much reading and watching videos in efforts to better understand what I am looking at when looking at the datasheet of a standard PNP 2N222 and I have some questions.

Let me start by saying that I bought this transistor at radio shack and I cannot find a data sheet for a 2N222. therefore I am using this as starting point or point of reference.

https://www.fairchildsemi.com/datasheets/PN/PN2222A.pdf


I know that there needs to be a current between the Base and Emitter to turn on the transistor (Hfe).
I also know that there is a current multiplier of across the collector and Emitter.

By questions are:

I am but confused with some information found the data sheet. (please correct me where I am wrong)

First under Absolute Max Rating. There is Vebo with a max of 6.0 v.  This tells me that the base should not be supplied with a voltage near or exceeding 5v. A High from an arduino through a resistor should be okay.

Now, when I look at the ON Characteristics, is shows:

a min. of 0.6v and a  ax of 1.2V in one instance and a max 2V with no min on the other. I find this confusing.
Does this take into account the 0.7v or in this case the 0.5v capacitance value?

(http://i10.photobucket.com/albums/a146/Profoxcg/On_characteristics_zps4brwgzqp.jpg) (http://s10.photobucket.com/user/Profoxcg/media/On_characteristics_zps4brwgzqp.jpg.html)


Last, how does one properly interpret the Current Gain conditions to achieve the multiplier on the chart?

(http://i10.photobucket.com/albums/a146/Profoxcg/Current%20Gain_zpslzrsnbda.jpg) (http://s10.photobucket.com/user/Profoxcg/media/Current%20Gain_zpslzrsnbda.jpg.html)


In essence I would like to to be able to identify how much current it takes to turn on a transistor, and how much voltage it needs to work. additionally I would like to know how much current can flow though it before it gets hot and breaks. All in efforts to asses and understand the cause of my problem.





Here is my circuit.

(http://i10.photobucket.com/albums/a146/Profoxcg/SOLENOID_zpsl5vwyskd.jpg) (http://s10.photobucket.com/user/Profoxcg/media/SOLENOID_zpsl5vwyskd.jpg.html)


based on this,  12v-0.6v / 1000 = I  11.4 mA. from base to emitter... that is all I know...

Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: KarolisL on Jan 25, 2015, 09:05 pm
Formula is not so simple:

Take a look at this:

http://kaizerpowerelectronics.dk/calculators/transistor-base-resistor-calculator/

and 1A when in short periods, stady state. I cant copy what is written above but it says that its good for switching currents up to 500mA
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: Grumpy_Mike on Jan 25, 2015, 09:10 pm
Quote
I would like to know how much current can flow though it before it gets hot and breaks.
Read
http://www.thebox.myzen.co.uk/Tutorial/Power.html (http://www.thebox.myzen.co.uk/Tutorial/Power.html)

and
http://www.thebox.myzen.co.uk/Tutorial/Power_Examples.html (http://www.thebox.myzen.co.uk/Tutorial/Power_Examples.html)

Quote
In essence I would like to to be able to identify how much current it takes to turn on a transistor
It depends on the gain or Hfe. This changes with the collector / emitter current.
So in order to answer your question you need to know what you want to switch. If the current is half an amp you will see from the data sheet the Hfe is 40. So you need to put one fortieth of half an amp to turn the transistor on. Which is 12.5mA.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: screwpilot on Jan 25, 2015, 09:48 pm
a 2n2222 especially a plastic cased one CANNOT drive a current of 1amp
transistors are intended to work with a max amperage well below it's max rating (like 200mA for a 2n2222)
you need a bigger transistor like a TIP122

there must be a chart that tells what's the hfe at various collector currents (it's basically a curve)
this means that there's some sort of feedback walking back (but you don't need to take into account this for your application)

the veb is the REVERSE max voltage that can be applied to the base in sespect to the emitter (this is a spec you don't need to take in account usually)

when you put a resistor on the base you are supplying a current not a voltage (we say :) ) the max v"BE" that is NOT a reverse voltage is max 1.2V but you will drive it at 0.7V for not destroying it (vBE vEB) this way the "base emitter" will work exactly like a diode
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: screwpilot on Jan 25, 2015, 10:08 pm
you also need a spike suppressor diode across the electromagnet (that points at +Vcc)
you need a good diode a fast\powerfull one, the simpler can be an 1n4007 (not 4004 or 4001)
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: MeSat on Jan 25, 2015, 11:46 pm
The data sheet states the 2N2222 will drive 1A.  What is the current needs for the electromagnet?  Measure the voltage across the collector and emitter and see how much voltage is across it.  If there is a voltage drop, it will heat the transistor more.

I do agree, you need to go with a larger transistor for steady state usage at 1A.

Gains are typical and they vary between transistors.  If your electromagnet doesn't have a current limit to 1A, you will be trying to put more current through the transistor.  Measure the current connected straight to the 12V supply to confirm the current drain.

Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: screwpilot on Jan 26, 2015, 03:04 am
i know that the metal cased 2n2222 can drive 800mA MAX
and again you MUST use a bigger transistor
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Jan 26, 2015, 03:30 am
Thank you for the responses.

Let me answer some of the questions presented:

Quote
Gains are typical and they vary between transistors.  If your electromagnet doesn't have a current limit to 1A, you will be trying to put more current through the transistor.  Measure the current connected straight to the 12V supply to confirm the current drain.
Do I did a quick measurement and I got the result below (0.80 and tapered down to 0.77) The electromagnet started to get warm but that was over 10 seconds or more and it would not happen under normal operations. As you can see the meter in the PSU is a little different than my multimeter but its pretty close. (need to get a better multimeter at some point?)

(http://i10.photobucket.com/albums/a146/Profoxcg/20150125_202322_zps7i6rzwb4.jpg) (http://s10.photobucket.com/user/Profoxcg/media/20150125_202322_zps7i6rzwb4.jpg.html)


@Mike,

Quote
It depends on the gain or Hfe. This changes with the collector / emitter current.
So in order to answer your question you need to know what you want to switch. If the current is half an amp you will see from the data sheet the Hfe is 40. So you need to put one fortieth of half an amp to turn the transistor on. Which is 12.5mA.
Your response make very much sense. So if I want to drive an electromagnets that draws 500mA I need a resistor 1/40*500 = 12.5mA  which means I will need a resistor of 0.912 ohms.  (based on the formula I = V-Vbe/Rb)

So I can use a 1K resistor and I should be able to drive a 500mA electromagnet.

(I hope on the right track)

Now my question is: in our example we are using the condition Ic = 500mA, Vce=10V.  Where or how does the Vce=10V come into play? What is that trying to tell me.  In my circuit, I would be driving the electromagnet with 12v between CE because that is what I need for that part. Also, It is interesting the the datesheet mentions a max of 1A, but the highest hFE they show is 500mA (congruent with what was mentioned earlier I guess)


I also realized that I forgot to attach the Absolute Max Rating image of the datasheet but in there Vebo is 6.0V. What is this and how does it play into the circuit? We are not putting voltage through the base are we? Does this mean that I cannot put more than 6v at the base? (meaning I would need a voltage divider etc if I wanted to?)









Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: Grumpy_Mike on Jan 26, 2015, 09:44 am
You should always aim to have more base current than you need from the calculations so I would not go to 1K but to the next one down 910R or 820R.

The 10V in the data sheet is what they measured it at, it might make a slight difference in the gain but not very significant.

As they only tell you the Hfe at 500mA then it is wise to use the transistor at that rating. Note it drops as the current increases, at a higher current it will drop even more and throw you base current calculations out.

As mentioned before this base voltage rating is a reverse voltage rating when the emitter is higher than the base. In the forward direction you can not get more than about 0.7V across a base because it is a diode. Do not confuse this with the voltage you put on the other end of the base resistor.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Jan 26, 2015, 11:00 pm
Thank you guys for the help.

Quote
As mentioned before this base voltage rating is a reverse voltage rating when the emitter is higher than the base...
I see what you mean. Thank you for the clarification. I should have also note then it says "Emitter-Base" and not Base-Emitter. I thought it was confusing that the use the same characteristic in two places, but it make sense - 6.0V is the MAX.

I wanted to add that I came a cross a very informative video this morning that went over many of the things you guys shared but one thing that called my attention was that it is important to make sure the transistor is ALL the way on or ALL the way off. If you linger, then this is where things start to heat up and there is a voltage across the C and E. This explains and reinforces the why I want to have the correct base current to drive the collector.  Do you guys agree?

http://youtu.be/UlDz0vQUTlc
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: Grumpy_Mike on Jan 26, 2015, 11:48 pm
Any voltage across the collector emitter multiplied by the current through it is the power it will dissipate. With a transistor as a switch the product of these two is minimised. If you operate in the linear zone it is not. It is not crime for a transistor to get hot, it is natural, the trick is not to let it get too hot.

In practice it is often thermal considerations that limit the maximum current you can use a transistor at.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: screwpilot on Jan 27, 2015, 12:46 am
a small transistor like the 2n2222 will surely not close the circuit perfectly
switch it on end measure the voltage across the C and E, you will find that it's far from beeing 0V
the more the current the more this potential will be and the more the power it dissipates will be

you cannot reduce this voltage gap by simply adding more current on the base, you are already overstressing it
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: raschemmel on Jan 27, 2015, 03:22 am
FYI, the "all the way on/off" mode is called SATURATION MODE. Read the datasheet specs for this mode.
Your datasheet doesn't specify which package. The plastic package doesn't dissipate as much as the metal
can.
2n2222 TO-18 PACKAGE (http://www.pci-card.com/2n2222a.pdf)


You can parallel two (or more) of these for more current but usually fets are used for parallel device mode.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: Grumpy_Mike on Jan 27, 2015, 10:06 am
No you can't parallel up transistors to switch more current unless the transistors are on the same die, it just dosen't work. Better people than me have tried and failed to do this.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: screwpilot on Jan 27, 2015, 02:55 pm
you can easily parallel two or more bjts as long as they are identical and you put a low ohmage hi pow resistor per collector (like 1ohm 1\2W in your case)
i've seen a lot of schematics with paralleled bjts

but (again) use a more powerfull transistor and a spike suppressor diode
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: raschemmel on Jan 27, 2015, 04:33 pm
I've seen that too so I would have to say you're both right. Mike is probably right about not doing it without the resistor and you are right that it is done sometimes with the resistor.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Jan 27, 2015, 05:55 pm
Thank you for all the responses. Lot of information to digest but I am getting there.
In reality as I mentioned I don't need the electromagnet actuated for a very long period of time plus I was able to find a 600 mA version which I need to mearure in my tool box last night.

I have been toying with the idea of using a 555 timer to hold the electromagnet actuated for a brief moment and then release.


Here is a question related to the transistor, I see many board members prefer to use MoFets. Why is this? What is the advantage; It seems that the work the same?

I am also noticing a theme among components, come work with current (transistors) and some work with voltages (555 timer trigger) is this correct?

Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: Grumpy_Mike on Jan 27, 2015, 07:06 pm
Quote
you can easily parallel two or more bjts as long as they are identical and you put a low ohmage hi pow resistor per collector (like 1ohm 1\2W in your case)
Yes you can easily parallel them and they will easily melt.

Quote
I see many board members prefer to use MoFets. Why is this?
Because FETs can switch more current and dissipate less power (not so hot) than transistors. Above 0.5 to 1A you are better off with a FET.

@screwpilot - given this and some recent "advice" you have given, do you actually have any real experience in electronics? You certainly have no real experience in paralleling up transistors.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Jan 27, 2015, 09:20 pm
Quote
Because FETs can switch more current and dissipate less power (not so hot) than transistors. Above 0.5 to 1A you are better off with a FET.
Mike so maybe I should try a FET. I found this at radioshack today IRF510.

(http://i10.photobucket.com/albums/a146/Profoxcg/20150127_151046_zpsrgf8jyo9.jpg) (http://s10.photobucket.com/user/Profoxcg/media/20150127_151046_zpsrgf8jyo9.jpg.html)


BTW, are the radioshack components "generic" or copies of the brand name ones?

PS: Two transistors in a darlington arrangement are considered to be in series correct?
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: Grumpy_Mike on Jan 27, 2015, 10:05 pm
Quote
I found this at radioshack today IRF510.
This is not a logic level FET, it requires a gate signal of 10V to turn it on fully. You need a logic level FET, one that only requires 5V to turn it on fully.

Quote
BTW, are the radioshack components "generic" or copies of the brand name ones?
They are real components, but packaged and priced to a ridiculous extent.

Quote
Two transistors in a darlington arrangement are considered to be in series correct?
No they are considered to be in a Darlington arrangement.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: screwpilot on Jan 28, 2015, 01:42 am
PS: Two transistors in a darlington arrangement are considered to be in series correct?
no they are in "cascade"
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: raschemmel on Jan 28, 2015, 04:30 am
LOGIC LEVEL MOSFET (https://www.sparkfun.com/products/10213)
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Jan 28, 2015, 06:16 am
Quote
This is not a logic level FET, it requires a gate signal of 10V to turn it on fully. You need a logic level FET, one that only requires 5V to turn it on fully.
Ah, (urgh) how did I miss this. I wish the info on the package was a bit more clear. Or I should say I wish they had noted that on the package and not Vgs 2-4V.

BTW, 

Quote
They are real components, but packaged and priced to a ridiculous extent.
By this I am taking that you are saying they are way overpriced?

Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: Grumpy_Mike on Jan 28, 2015, 07:38 am
Yes way over priced, many times more than a top end distribuitor. But then you have to pay for a shop and the people in it.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: TomGeorge on Jan 28, 2015, 08:52 am
Hi, if that's an irf510 in the bag, take it back because the specs on the back are not for irf510, even radio shacks web site says that Vgs is +-20V, not 2 to 4V.

Tom...... :)

Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Jan 28, 2015, 06:54 pm
I think part of the challenge is also my inexperience.. 


I want to add that after some research I realized that Rds(on) is what you guys are looking at when you say the the FET I bought need 10V to be on. However my statement about Vds(th) still applies, to start conducting there needs to be a 2-4V differential to "start" to turn on the mosfet.


Quote
But for instance I do not see that listed anywhere on the data sheet other then as a Test condition for "Drain-Source On-State Resistance".
I am quoting myself: You guys are also looking at Rds(on).



Now with a logic level mosfet all the above goes out the window since it turn on with either 3.3V or 5v.


Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Jan 28, 2015, 08:30 pm
Hey guys, I found a good resource that explains things very well for newbs like me,

http://blog.oscarliang.net/how-to-use-mosfet-beginner-tutorial/

the only parts I dont understand which I am hoping you guys can explain is:


Quote
Where to put the load to a MOSFET? Source or Drain?

Because load  has resistance, which is basically a resitor. For N-channel MOSFET the reason we usually put the load at the Drain side is because of the Source is usually connected to GND.

If load is connected at the source side, the Vgs will needs to be higher in order to switch the MOSFET, or there will be insufficient current flow between source and drain than expected.
If I draw a schematic of either scenario, they both seem the same to me. Vcc stops at the gate...
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Jan 28, 2015, 09:10 pm
Is this guys solution correct?

http://letsmakerobots.com/content/mosfet-jokes-why-load-goes-always-drain
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: Grumpy_Mike on Jan 28, 2015, 09:53 pm
Can't read that link because it is not formatted correctly for my iPad now the forum software has changed. But the reason is that with the load in the source the voltage on the source can never be more than the voltage on the gate. It is called a source follower.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: Paulcet on Jan 28, 2015, 10:18 pm
Maybe you can work it out for yourself:

See image, and suppose we could somehow turn on the mosfet with 12V (this is over the required level, right?) and it would have Rds of .01Ω (Disregard the part #, I'm just pulling these numbers out of the ether!)

What is the voltage from A to Gnd?
What is the voltage from B to Gnd?
What is the voltage from C to B?  (This is Vgs)
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Jan 28, 2015, 10:40 pm
Paulcet,

Correct, we only need 10v to drive the mosfet, but let's say we will use 12v as you suggested.

A to ground = -2v
B to ground = -2.2v
Gate to Source is 12v - 2.2v = 9.8v

I hope I am doing this right.
But yes I see how is this case Vgs less than Vsd.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: Paulcet on Jan 28, 2015, 10:48 pm
Not quite right.  Ohm's law --- V=I*R  Voltage across the resistor is .02 * 500.  Add that to the LED forward voltage.

How did you come up with 2.2V B to Gnd?
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: Grumpy_Mike on Jan 28, 2015, 10:55 pm
Quote
we only need 10v to drive the mosfet,
No you need 10V between the gate and the source. If the source is being lifted up then the gate needs to be even higher.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: michinyon on Jan 28, 2015, 10:55 pm
You normally have the high-current circuit so that the current flows from the power source through the load ( your electromagnet )  and then through the switching device (  your transistor )  and then to ground ( back into the power supply ).

So you control the current coming out of the load,  not going into it.

In this aspect,   the diagram you drew in your very first post,  is the wrong way around.

The reason you do this,  is because the arduino ground is the same ground,    and you need to have the base/gate voltage of your transistor device at a level close to ground,   that the arduino can manage.


If you have a 12 V (  or higher )  power supply,   and you want to put your transistor device on the high side of the load,    then you have to be manipulating the base/gate terminal of the transistor around 9 or 11 or 12 volts,    which is possible,  but more complicated,  using the arduino.   You probably also need to use a P type transistor.

Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Jan 29, 2015, 03:47 am
No you need 10V between the gate and the source. If the source is being lifted up then the gate needs to be even higher.
Mike, I have two questions I would love for your to answer so we don't go in to many circles:

1. Where is the datasheet are you seeing that it takes 10v to run on the mosfet ?
2. When you say "you need 10V better the gate and source.." What does "between" mean? are you taking about putting the voltmeter probe on the gate and source and seeing 10V? or are you saying there needs to a 10V difference between the gate and source? meaning if the source were at -10V the gate would need to be at 0V (please entertain my example).


Not quite right.  Ohm's law --- V=I*R  Voltage across the resistor is .02 * 500.  Add that to the LED forward voltage.

How did you come up with 2.2V B to Gnd?
I was in the middle of a meeting trying to respond on my phone. But regardless my math was wrong.

So lets do yours. V=i*r    0.02 X 500 = 10V From across the Resistor.

So the answers to your prompt:

A to ground = 2V  There is only the VF of the LED (right?)
B to ground = 10V + 2V = 12V
Gate to Source = Not sure, I thought we said 12V.

Please tell me what I am missing. I don't want to waste your time or annoy / upset anyone.

Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: raschemmel on Jan 29, 2015, 06:09 am
I think the schematic is wrong. The resistor should be connected to 12 V, the led to the resistor, and the mosfet should sink the current. That would allow you to apply 12 V to the gate of the mosfet and it would
be 12V above the source.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: westfw on Jan 29, 2015, 06:14 am
Quote
If I draw a schematic of either scenario, they both seem the same to me. Vcc stops at the gate...
That's in the "off" state; you also need to consider the "on" state.
When the "high side" switch (MOSFET or BJT), the output of the ON transistor will be approximately at Vcc, because the transistor voltage drop is small compared to the load voltage drop (hopefully!)  The gate or base voltage is also at about Vcc, making the difference (Vbe or Vgs) much smaller than you want it to be.

Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Jan 29, 2015, 06:34 am
I think the schematic is wrong. The resistor should be connected to 12 V, the led to the resistor, and the mosfet should sink the current. That would allow you to apply 12 V to the gate of the mosfet and it would
be 12V above the source.
The whole point is the the Source needs to be higher than the source by at least the threshold value. (lets forget about the specified 10v Rds)

The schematic that PaulC drew was to show me how by putting the load on the Source the voltage at the gate "becomes less" thus I would need more than 12v to turn it on. Unfortunately I don't understand why even after doing the math he asked me to do. Maybe he will take a few minutes to give me why it does work.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: Grumpy_Mike on Jan 29, 2015, 04:01 pm
As current flows through the load in the source it develops a voltage across it. This raises the voltage on the source and thus reduces the voltage between the gate and source, thus starting to turn the FET off.

This then stops the drain / source drawing any more current.

So an equilibrium point is reached where you can not get any more current down the drain / source because if you did it would turn the FET more off. Any less current on the drain / source and the voltage between the gate and source rises and turns the FET on more. What you end up with is the balance point.

Quote
When you say "you need 10V better the gate and source.." What does "between" mean? are you taking about putting the voltmeter probe on the gate and source and seeing 10V?
Yes.
Quote
or are you saying there needs to a 10V difference between the gate and source?
again yes.

Quote
meaning if the source were at -10V the gate would need to be at 0V
No that would not be a difference of 10V it would be a difference of -10V. Fo an n-channel FET the gate has to be more positive than the source.

Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: Paulcet on Jan 29, 2015, 05:11 pm
Quote
meaning if the source were at -10V the gate would need to be at 0V
No that would not be a difference of 10V it would be a difference of -10V. Fo an n-channel FET the gate has to be more positive than the source.

I think he's got it right, Mike.  0V is 10V more than -10V  :smiley-grin:

The whole point is the the Source  (you meant Gate?) needs to be higher than the source by at least the threshold value. (lets forget about the specified 10v Rds)

The schematic that PaulC drew was to show me how by putting the load on the Source the voltage at the gate "becomes less" thus I would need more than 12v to turn it on. Unfortunately I don't understand why even after doing the math he asked me to do. Maybe he will take a few minutes to give me why it does work.
Good, I think you got the point I wanted to make.  I would have given you the "why" now, but Mike beat me to it.  His explanation is a good one for "source follower" or "emitter follower".  The gate volatage (or base current) "follows" the source current (or emitter voltage).

That balance point is not what we want for a switch.  So an N-channel mosfet must have the source at 0v to use it as a switch.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Jan 29, 2015, 06:22 pm
I am glad I am making progress.
Thank you both for the answers, so based on that lets see if I got PaulsC problem right this time.

I am still unsure about the voltage across the LED and ground.


But here we go.  Essentially there is 12V across the Source and ground, which means that if I am powering the mosfet with 12V there is a difference of 0V which is below the threshold Vds(th). This Mofet will never turn on. I would need at least 14V to make it start to turn on which is not ideal. please please correct me if I am wrong or please tell me if I am right.


(http://i10.photobucket.com/albums/a146/Profoxcg/2015-01-29%2012.14.58_zpsc29agufr.jpg) (http://s10.photobucket.com/user/Profoxcg/media/2015-01-29%2012.14.58_zpsc29agufr.jpg.html)

I am still unsure about the voltage across the LED and ground.

If I am correct, I would like to post a schematic in bit to make sure I am on the right track if its okay with you guys.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: CrossRoads on Jan 29, 2015, 07:28 pm
Seems to me you are using the wrong type of MOSFET there.
N-channel MOSFETs "like" to sink current from a load to Gnd.
P-channel MOSFETs "like" to source current to a load (to Gnd).

N-channel MOSFET can be turned fully on by Arduino if they have Logic Level gates (Vgs <= ~4.5V)
P-channel MOSET needs gate pulled to Vs (12V in this example) to turn off, and gate is pulled low (Vgs shown as a  negative #, as Vg is less than Vs), so a simple NPN is used to perform that while buffering the Arduino pin from 12V.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: CrossRoads on Jan 29, 2015, 07:41 pm
IRF540 has a "Standard" level gate, needing Vgs = 10V to fully turn on.
http://www.irf.com/product-info/datasheets/data/irf540npbf.pdf (http://www.irf.com/product-info/datasheets/data/irf540npbf.pdf)

Look where Vgs is called - it's always shown at 10V.

Where Vgs is shown lower:

Page 2, Electrical Characteristics @ TJ = 25°C (unless otherwise specified):
VGS(th) Gate Threshold Voltage, 2V to 4.0V Max, VDS = VGS, ID = 250μA  << hardly any current flow

Figure 1,2,3 do show it turning on with Vgs = 4.5V, but not nearly as much as with Vgs at higher voltages, and only brief pulses.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: Paulcet on Jan 29, 2015, 08:02 pm
There you go.  I think you got it.  The LED Vf=2V is just a typical value used in this case to test out a theory.  The actual value depends on the LED and conditions in use (found in the datasheet).

One thing for me to point out since others may be confused:  The schematic I posted, the values represented, and the voltages calculated by Crullier are for study only!  It won't actually work!
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: Paulcet on Jan 29, 2015, 08:10 pm
Just picking nits here, but the P-channel mosfet looks like this in a schematic:
(https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcT0cLoVnyuh00zQ19k17Zjdp3p3JlHdx6Y9zAH-tBCLS7nsBENntw)



Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Jan 29, 2015, 10:55 pm
Thank you everyone. I will post a schematic when I get home tonight,
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: polymorph on Jan 29, 2015, 11:32 pm
My head is spinning.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Jan 30, 2015, 02:55 am
My head is spinning.
And you know what you are doing... imagine mine. =)  Actually I am pretty clear now.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: raschemmel on Jan 30, 2015, 04:19 am
Quote
Actually I am pretty clean now.
Why, did you just take a bath ?
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Jan 30, 2015, 05:04 am
hahaha,   :D   yeah that too.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: polymorph on Jan 30, 2015, 06:04 am
Which circuit are you building? CrossRoads'? I hope so.

The one you gave here won't work:
http://forum.arduino.cc/index.php?topic=295165.msg2066072#msg2066072

It will require you to drive it with 17V if it is a logic level MOSFET, or 22V if it is a 10VGS MOSFET. That's because the gate voltage must be 5V (logic level) or 10V (regular) above the voltage on the Source.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Jan 30, 2015, 06:23 am
Which circuit are you building? CrossRoads'? I hope so.

The one you gave here won't work:
http://forum.arduino.cc/index.php?topic=295165.msg2066072#msg2066072

It will require you to drive it with 17V if it is a logic level MOSFET, or 22V if it is a 10VGS MOSFET. That's because the gate voltage must be 5V (logic level) or 10V (regular) above the voltage on the Source.

those schematics were provided to me to help me understand what you just posted.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Feb 04, 2015, 04:58 am
Hi guys, been waiting or some components (mosfets) to make this work as well as a darlington array as an alternative.

I came a cross the schematic below and did some reading and watched some videos on the zeener diode below.  I understand that R1 is limiting the current for the LED inside the opto, and I also understand that R2 sets to voltage drop for the Zenner to work and let only 4.7v pass to the opto. However I  have not been able to find information on how to "size" that resistor or how it related to the zeener (other than what I mentioned).

In this circuit Vcc is 12V.

(http://i10.photobucket.com/albums/a146/Profoxcg/OPTO_ZENNER_zpszwjgzpvz.jpg) (http://s10.photobucket.com/user/Profoxcg/media/OPTO_ZENNER_zpszwjgzpvz.jpg.html)


Also,

1- I need some guidance with respect to a schematics drafting software with simulation. The past week and I have been using LTspice which is free, but does not have many components and seems very "manual" to use. Is there an industry standard or something a little bit more advance even if its a paid version?

2- I noticed that many times when using a transistor to turn on another transistor, depending on what type of transistor the 2nd transistor is (NPN, or PNP) it needs to be either placed at the collector or emitter of the first transistor. Is this a correct statement?







Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: Grumpy_Mike on Feb 04, 2015, 08:21 am
Quote
I noticed that many times when using a transistor to turn on another transistor, depending on what type of transistor the 2nd transistor is (NPN, or PNP) it needs to be either placed at the collector or emitter of the first transistor. Is this a correct statement?
In a vague hand waving sort of way it is. But it is not very rigorous and open to misinterpretation.

Quote
Is there an industry standard
Yes it is called spice.

Quote
how to "size" that resistor or how it related to the zeener
You need to run the zenner at some current to get well into the knee region. You can get this current from the curves in the data sheet. Then you need some current for the LED. Add these currents together to see what needs to flow through this resistor.
Then the voltage across the resistor is 12V - 4.7V = 7.3V
So you know the voltage and current therefore you can calculate the resistor value from ohms law.

The calculate how much power will be dissipated in the resistor which is V times I ( current ) and choose a resistor of roughly twice that rating.

Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Feb 04, 2015, 08:09 pm
In a vague hand waving sort of way it is. But it is not very rigorous and open to misinterpretation.
Yes it is called spice.
You need to run the zenner at some current to get well into the knee region. You can get this current from the curves in the data sheet. Then you need some current for the LED. Add these currents together to see what needs to flow through this resistor.
Then the voltage across the resistor is 12V - 4.7V = 7.3V
So you know the voltage and current therefore you can calculate the resistor value from ohms law.

The calculate how much power will be dissipated in the resistor which is V times I ( current ) and choose a resistor of roughly twice that rating.


Quote
....But it is not very rigorous and open to misinterpretation...
Can you elaborate a little?


Quote
Yes it is called spice.
I guess my question is: Is there an industry standard Spice software? for instance in my professional field we have autocad (well there is better stuff out now.)


Quote
You need to run the zenner at some current to get well into the knee region. You can get this current from the curves in the data sheet.
So you are saying it is reverse current flow that makes the zeener reach its zeener voltage, as opposed to that I thought I understood which was a specific reverse voltage. got it.

Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Feb 04, 2015, 08:47 pm
I think I got it Mike,

Check this out. I looked up the sheet of the zeener.

(http://i10.photobucket.com/albums/a146/Profoxcg/20150204_143023_zpsbusfgb5g.jpg) (http://s10.photobucket.com/user/Profoxcg/media/20150204_143023_zpsbusfgb5g.jpg.html)

I used 0.200 W found under the testing condition and went on from there.

I am unsure on your last statement:

Quote
The calculate how much power will be dissipated in the resistor which is V times I ( current ) and choose a resistor of roughly twice that rating.
W = 12V * 0.044mA   I get aprox 1/2W. Are you saying then to get a 1W "166omh" resistor (I need to learn standard values sorry).

Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: Grumpy_Mike on Feb 04, 2015, 08:54 pm
200 W is way way over the top for running an opto isolator.

Yes if you are going to burn 0.25 W then get a 1/2 watt resistor.

There are many ways to interprate those words about transistors. You have to specify how you are connecting them, your words were ambitious and can only be interprets if you know the soloution in the first place.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Feb 04, 2015, 09:16 pm
Sorry it was a typo,  the cutsheet says 200mW 

Well If I got the math for the power dissipation I get 1/2W and if I double that I need a 1W resistor. Does that seem right? (sound too big to me)
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: polymorph on Feb 04, 2015, 09:22 pm
Is there a problem with 12V? Is it actually a range of voltage?

If it is regulated, why use a zener? Just size the resistor for 12V and the LED in the optocoupler.

(12-1.5)/0.015 = 700 therefore 680 ohms

P = V^2 / R
P = 10.5^2 / 680 = 162mW therefore 500mW or 1/2W resistor because you -always- use no less than double for resistor ratings. Or use a couple of 330 or 360 ohm resistors in series and you can use 1/4W.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Feb 04, 2015, 09:28 pm
Quote
If it is regulated, why use a zener? Just size the resistor for 12V and the LED in the optocoupler.
Thank polymorph, Yes its regulated. What you are saying make perfect sense.
In reality the voltage can be between 12v and 13.4v but should not make much of a difference.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: Grumpy_Mike on Feb 04, 2015, 09:35 pm
Well If I got the math for the power dissipation I get 1/2W and if I double that I need a 1W resistor. Does that seem right?
Yes that is right, you wonn't get anything inbetween anyway.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: polymorph on Feb 05, 2015, 12:01 am
Yes, that's about +-5%.
Title: Re: Confused about DataSheet, need help find a cure to a problem.
Post by: crullier on Feb 06, 2015, 01:24 am
Never mind, I found a great video on them.