enter image description here

I am very new to ECE and when i googled circuits for the beginner and this was one of them.

So far i have a basic knowledge of transistors and that they exist. please correct me if i am wrong.

  1. Current flows to junction 1 and ignores it because transistor is currently off.

  2. current flows to water sensor and if it is not sensing any water means that the circuit is not active.

  3. in case there is water, at junction 2 current activates the DC 548 transistor.

  4. i assume after that current from junction 3 goes in to the ground.

  5. At the same time, at junction 1 current starts to flow towards junction 4 and 5 which activates the speaker.

  6. Capacitor is connected between junction 4 and junction 2 is there to act as a some kind of short battery to make the sound to decay nicely instead of weird crackling.

Question: Also i have a thought that capacitor could be use as some kind of oscillator but i don't see how would it work in this circuit.

i started to learn electric circuits this morning so please be gentle.


1 Answer 1

  • This isn't a circuit I'd throw at a raw beginner!
  • Your picture of "current" vs. "voltage" is incomplete. I'm going to re-describe the operation for you, trying for the terminology that'll give you a good mental picture of what's going on.

With no water present:

There is voltage across both transistors, but neither has any voltage on their bases, so the transistors remain off.

With water present

The water sensor becomes conductive, allowing current to flow through the 330k-ohm resistor into the base of the NPN transistor (the BC548). Because the base of the PNP is at a higher voltage than the emitter of the NPN, this causes current to flow from the PNP base to the NPN emitter, which turns on the PNP.

Here it gets complicated. When the PNP transistor turns on it pulls its collector voltage higher. This raises the voltage on one end of the 10k resistor, which increases the base current of the NPN. At this point each transistor is acting to turn the other one on harder: this condition is known as positive feedback.

This state cannot last, because the capacitor starts charging up and the current into the base of the NPN drops. At some point the NPN's base current drops to the point where the PNP's base current starts dropping. At that point the PNP's collector current falls, and the speaker's voltage drops. When that happens the capacitor and 10k resistor try to pull current out of the NPN's base, and it turns off more. You have the same positive feedback situation, only it's acting to turn off both transistors. Eventually the capacitor discharges completely, the NPN starts turning on gently, and the process repeats.

If the components are sized right, the whole cycle takes between 1/200 and 1/2000 seconds to repeat, and you hear a tone in the speaker. The frequency of the tone will be dependent on the resistance of the water sensor, the temperature, the transistors chosen, and a whole slew of other things you cannot control.

  • \$\begingroup\$ It is a very complicated thing. i did get it to some extend but have few questions left. 1) i drew juntions on pictures, could u please tell when capacitor starts charging up, in which direction current flows in the capacitor. \$\endgroup\$ Commented Oct 17, 2018 at 17:11
  • \$\begingroup\$ @AntonStafeyev the capacitor charging current obrazki.elektroda.pl/4861929900_1539796738.png \$\endgroup\$
    – G36
    Commented Oct 17, 2018 at 17:19
  • \$\begingroup\$ wow, ok. i got how capacitor charges. so while capacitor is chagrin it allows current through it and thus keeps the NPN active and PNP. once it is charged it can not let any current through it so NPN turns off right, and therefore turn the PNP off since no current can flow from from PNP base to NPN emitter is that correct ? \$\endgroup\$ Commented Oct 17, 2018 at 17:42
  • \$\begingroup\$ or if somebody can give me few classes on how not to suck at electonic engineering :) \$\endgroup\$ Commented Oct 17, 2018 at 17:44
  • \$\begingroup\$ @AntonStafeyev: "Wow, OK. I got how the ..." -- yes, that's correct. "Or if somebody can ... not suck ..." -- it's almost cruel to represent this circuit as something for a beginner to try to understand. It's easy to build, but really understanding it in depth requires that you have a pretty good grasp of how transistors and capacitors work, and that you can juggle a circuit model in your head. This would be a good one to try simulating, so that you can look at the various voltages & currents in the circuit and see how they interact. \$\endgroup\$
    – TimWescott
    Commented Oct 17, 2018 at 20:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.