NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Basic Electronics » Understanding transistors

October 07, 2009
by mikedoug
mikedoug's Avatar

Okay -- so I'm really starting to get a lot of these electrical concepts -- now what I'm trying to really hammer down on is the transistor. I've got a series of questions in this post to help me narrow down and make sure I understand all of this. (Too bad I didn't have a nerdkit BEFORE I spent hours with the guys at Demo!)

On this page http://www.nerdkits.com/videos/servosquirter/ you show a short schematic of putting +5V on the drain, GND on the source, and the gate is connected to a 0 or +5V output from the MPU.

When the gate goes to +5V, the transistor allows current to flow from drain to source -- and when the gate goes to 0 no flow is allowed at all through the transistor. Is that correct? Flow is NEVER allowed between the drain and the gate?

When the gate is at +5, I presume some flow is going gate<->source as well? Is that correct? Or is there NEVER flow between gate and either of the pins?

The next question -- the two types of transistors (Ns and Ps) simply differ on the direction of flow between the gate and the source -- meaning that if you switched the type of transistor you used here you'd have to reverse the +5 and GND between the drain and source to make it work?

I'm guessing that would be dangerous if there is a flow between gate and source during operation?

Learning, MikeDoug

October 07, 2009
by mikedoug
mikedoug's Avatar

I'm still interested in answers to my questions, if for no other reason than to have the conversation...

BUT! I found this awesome java applet based simulator that let's you build some pretty basic circuits and see what happens with them.

http://www.falstad.com/circuit/

Back to the fun!

October 08, 2009
by mrobbins
(NerdKits Staff)

mrobbins's Avatar

Hi MikeDoug,

With this type of transistor (MOSFET) there is no current flowing into or out of the gate terminal under any circumstances (until you apply so much voltage that you destructively blow through the gate insulation).

When the gate-to-source voltage is at 0, then no current is allowed to flow from drain to source... with one big caveat: due to the way these things are made, there's a "parasitic diode" in parallel with the drain and source, so if the drain voltage actually goes negative with respect to the source by a few hundred millivolts, current will start to flow.

The p-channel MOSFETs, as you describe, basically just invert the polarity of the sense of the connection. Source would get connected to +5V, and then when the gate-to-source voltage difference is sufficiently big (but now the gate voltage is negative with respect to the source), you'll get conduction from source to drain.

Other types of transistors, called BJTs (Bipolar Junction Transistors), do have current flowing into their control terminal, called the base. This makes them undesirable in most digital applications because of the current and power consumed just to keep them on. (In contrast, MOSFETs consume essentially zero current and power in complementary digital logic, unless they're actively transitioning from one state to another.) But they've got lots of good properties and find lots of uses in analog applications. See our Piezoelectric Sound Meter project for a ~20 minute video about BJTs and designing a small amplifier with them.

Does that answer your questions?

Mike

October 08, 2009
by mikedoug
mikedoug's Avatar

Yes... I'm not moving on to other types of transistors until I have MOSFETs under my belt.

So if I hooked the output pin of the processor to the GATE of an p-channel MOSFET, +5 on the source, and connected it to the +5 wire of the LCD display; I could effectively use the output of the MPU pin to turn it off (LO) and on (HI). Is that correct?

October 08, 2009
by mrobbins
(NerdKits Staff)

mrobbins's Avatar

Basically, yes, but I want to clarify two points:

First of all, I think you have LO/HI confused -- if the gate of the p-channel MOSFET were low (0V), then current would flow (on). If the gate of the p-channel MOSFET were high (5V, same as the source pin), then no current would flow.

Second, there's a little detail that makes reality tricky: if any of your data pins were being driven high (+5V), then the input protection diodes on those pins of the LCD controller chip would actually take current from those input pins to try to power the entire LCD -- even if you had turned the VCC wire "OFF" as described above! The presence of these input protection diodes has to do with the way CMOS chips are made... but in any case, take a look at Figure 13-1 on page 72 of the ATmega168 datasheet.

But if you made sure all your data lines were low, and then disabled the VCC via the p-channel MOSFET method you describe, then yes, you would turn the LCD off.

Mike

October 08, 2009
by mikedoug
mikedoug's Avatar

Ah yes -- I did have lo/hi backwards -- if +5 is on the source, then off would be HI, and on would be LO.

Okay -- it took me a while to understand what you were saying with the input protection diodes -- but I think I understand. If I want to use an output pin and transistor to cut off power to the LCD, I need to also ensure that ALL output pins tied to the LCD are driven LO -- otherwise the +5 from those pins may try to power the LCD.

Interesting. :) This electricity thing is tricky!

MikeDoug

Post a Reply

Please log in to post a reply.

Did you know that there are Power MOSFETs for switching big loads on and off? Learn more...