Can't understand basic schematic

Thread Starter

Volttrekkie

Joined Jul 27, 2017
63
Hi. I am a beginner. I am just learning about transistors but am confused about this schematic at this website:

https://www.elprocus.com/top-10-simple-electronic-circuits-for-beginners/

It is a schematic for a Rain Alarm.
In the schematic, I see that there is a NPN transistor at the bottom and a PNP transistor at the upper right.
The NPN has the collector at the top leg and the emitter at the bottom leg.
The PNP has the emitter at the top leg and the collector at the bottom leg. Right so far?
Seems to me when there is no rain Prob acts like an open circuit? But when it rains it acts like a closed switch?
Then, current flows through the NPN emitter to base, as the emitter is connected to the negative terminal of the battery and the base is connected to the positive terminal of the battery.
This allows current to flow between the NPN collector and emitter. This is how a NPN transistor works?
When this happens, current flows out of the PNP base, right?
This is where I get stuck. As I understand it, when current flows out a PNP base, the flow between the emitter and collector stops? But then the circuit to the speaker will be disconnected? Then how can this alarm work? Seems like once current flows through Prob, current then flows through NPN, then next current flows through PNP and the speaker turns on? But I read that a PNP transistor normally allows flow between collector and emitter until current flows out the base. But looks like if NPN turns on, PNP should turn off, as the collector of the NPN is connected to the base of the PNP transistor? Help would be appreciated.
 

ericgibbs

Joined Jan 29, 2010
21,391
As I understand it, when current flows out a PNP base, the flow between the emitter and collector stops?
hi Vol,
A PNP transistor is turned ON when current flows out of its Base.
A NPN transistor turns ON when current flows into its Base.

E
EDIT:
These images for PNP and NPN transistor current flow, show the Emitter,Base and Collector currents.
 

Attachments

Last edited:

WBahn

Joined Mar 31, 2012
32,703
Your understanding of how a PNP transistor works is completely wrong. It is very analogous to an NPN transistor. From about the simplest model, as you establish a base current (into an NPN or out of a PNP) then the collector current is some fairly large multiple of the base current (collector to emitter for an NPN and emitter to collector for a PNP).
 

Thread Starter

Volttrekkie

Joined Jul 27, 2017
63
Oh, I get it. They both act like switches or amplifiers in the same way but their polarities are different.
Another question: I see that a capacitor was connected in parallel to the speaker. I read that this is done to smooth out the voltage. But how do you know to use .01 microfarad? For the resistors too, how do you know to use 10K and 330K? Is there a formula?
 

crutschow

Joined Mar 14, 2008
38,321
I see that a capacitor was connected in parallel to the speaker.
The capacitor is not in parallel with the speaker.
It is connected in series with the resistor from PNP's collector to the NPN's base as part of the relaxation oscillator circuit which generates a tone in the speaker when there is moisture across the probes.
 

Thread Starter

Volttrekkie

Joined Jul 27, 2017
63
The capacitor is not in parallel with the speaker.
It is connected in series with the resistor from PNP's collector to the NPN's base as part of the relaxation oscillator circuit which generates a tone in the speaker when there is moisture across the probes.
Thanks. I found a website on how to build a relaxation oscillator with a transistor.
 

Thread Starter

Volttrekkie

Joined Jul 27, 2017
63
I found a simpler variation of the relaxation oscillator crutschow mentioned. So, the charging and discharging of the capacitor causes the oscillation. But what makes the capacitor discharge? Apparently, the transistor makes it discharge. But how? I read the transistor has a breakdown voltage at the emitter-base junction. That is how current flows from emitter to collector to LED. But why does the capacitor charge and discharge?
 

WBahn

Joined Mar 31, 2012
32,703
Once the voltage is high enough to cause breakdown, the transistor is able to keep conducting until the voltage drops to a much lower value to extinguish it. Once it does, the voltage has to build back up to break down again.
 

Thread Starter

Volttrekkie

Joined Jul 27, 2017
63
I made a mistake: current flows from collector to emitter. It says: "Once the voltage across the capacitor reaches a certain threshold level, the transistor is turned on. Once the transistor is turned on, it can conduct current across from collector to emitter. So at this voltage threshold, the capacitor stops charging up and begins to discharge." Voltage across a capacitor is governed by Q =CV. How does this turn the transistor on? And why does current flowing through the transistor discharge the capacitor?
 

WBahn

Joined Mar 31, 2012
32,703
I made a mistake: current flows from collector to emitter. It says: "Once the voltage across the capacitor reaches a certain threshold level, the transistor is turned on. Once the transistor is turned on, it can conduct current across from collector to emitter. So at this voltage threshold, the capacitor stops charging up and begins to discharge." Voltage across a capacitor is governed by Q =CV. How does this turn the transistor on? And why does current flowing through the transistor discharge the capacitor?
The description you are quoting appears to be referring to electrons and not current. Current is the flow of charge and electrons are negatively charged, so charge flows from emitter to collector once it breaks down.

Once the transistor breaks down, it is capable of conducting more current than can be provided via the resistor. The bulk of the charge that makes up the current comes from the capacitor, which results in the capacitor discharging.
 

Thread Starter

Volttrekkie

Joined Jul 27, 2017
63
In the above schematic, I was trying to understand why when power is turned on the transistor does not break down right away but has to wait for the capacitor to charge up to a certain voltage. Then I found this schematic.

This clearly shows that when the switch closes the LED will not turn on. It waits until the capacitor is charged past a certain point. Why is that?
 

WBahn

Joined Mar 31, 2012
32,703
The voltage across a capacitor cannot change instantaneously -- this is because the voltage on a capacitor is directly proportional to the charge stored on it and charge can't change instantly -- it has to flow into and out of the cap and must therefore be continuous. Assuming that the capacitor is fully discharged when the switch is closed, it has 0 V across it. When the switch closes that means that the full battery voltage appears across the resistor R. Since there is no voltage across the resistor/LED combination, no current flows that direction. So all of the current flowing in R flows into the capacitor and it starts to charge. But as it charges the voltage across it starts to build. This means that the voltage across R is decreasing and so the current decreases. This means that the rate at which the capacitor is charging decreases (but it is still going up). Eventually, the voltage gets high enough so that some current will start to flow down through the LED. This further reduces the rate at which the capacitor charges. Eventually, an equilibrium is established in which the voltage on the capacitor is such that all of the current flowing through R goes down through the LED and the capacitor voltage no longer changes. In effect, the capacitor behaves as an open circuit until the switch is opened. Once the switch opens, however, the voltage on the capacitor is still there and now it provides the current that was flowing in the LED. But that causes the voltage on the capacitor to decrease, which means less current flows in the LED, which means that the rate at which the voltage on the capacitor drops decreases. Eventually the voltage drops enough that the LED stops working (at least to human perception) but even once it is no longer shining there is still a small current flowing in it (as long as there is any voltage across it at all) and so it continues to very slowly discharge the capacitor.
 

Thread Starter

Volttrekkie

Joined Jul 27, 2017
63
You wrote:
"Since there is no voltage across the resistor/LED combination, no current flows that direction."
Could you explain this further? Why is there no voltage? Looks like there should be. The positive charge should flow from the positive side of the battery to the top of the resistor at the top then to the resistor in the middle then to the diode and to the LED then to the negative side of the battery? Why is there no voltage?
 

WBahn

Joined Mar 31, 2012
32,703
You wrote:
"Since there is no voltage across the resistor/LED combination, no current flows that direction."
Could you explain this further? Why is there no voltage? Looks like there should be. The positive charge should flow from the positive side of the battery to the top of the resistor at the top then to the resistor in the middle then to the diode and to the LED then to the negative side of the battery? Why is there no voltage?
Again, the voltage across a capacitor cannot change instantaneously.

What is the voltage across the capacitor just before the switch is closed? It is 0 V.

So what is the voltage across the capacitor immediately after the switch is closed? It is 0 V. Why? Because the voltage cannot change instantaneously.

What is the voltage across the resistor/LED combination? It is equal to the voltage across the capacitor. Why? Because they are in parallel.

What is the voltage across the resistor/LED combination immediately after the switch is closed? 0 V. Why? Because the voltage across the resistor/LED combination is ALWAYS the same as the voltage across the capacitor and the voltage across the capacitor immediately after the switch is closed is 0 V because that is what the voltage across the capacitor was immediately before the switch was closed and the voltage across a capacitor cannot change instantaneously.
 

MrAl

Joined Jun 17, 2014
13,667
Hi,

Real quick, did you ever see the equation for a charging capacitor, charging through a resistor connected to a voltage source?
That might help. It's a rather slow, gradual change.
 
Top