I got this new schematic and I've tried to construct it on the stripboard

Status
Not open for further replies.

MrChips

Joined Oct 2, 2009
35,040
What does the circuit do?

Water sensor schematic.jpg
When the rain sensor is dry, IC1 pin-1 is pulled down by R1 to 0V (logic LOW).
(We call the -ve terminal of the 9V battery our COMMON voltage reference point or node. All voltage measurements are taken with respect to this common node. LOGIC LOW would be 0V. LOGIC HIGH would be Vcc or 9V).

IC1 is a quad AND gate with inverted outputs, i.e. the output is ACTIVE LOW. That is what the circle or bubble on the output signifies. We call this a NAND gate. With a LOW level at pin-1, pin-3 is HIGH and so is pin-5 and pin-6. With pins 5 and 6 tied together that NAND gate becomes a NOT gate or INVERTER. Hence pin-4 is LOW.
Similarly, pin-12 is held LOW and pin-10 is also LOW, with gate at pins 8 ,9, 10 also acting as a NOT gate.

Transistors Q1 and Q2 are in the OFF state. No current flows through SPK and R6.
The voltage at R6, Q1 and Q2 collectors would be HIGH or 9V.

IC1 constitutes two square wave oscillators.
When the sensor is wet, IC1 pin-1 is pulled up to logic HIGH. This enables the first AND gate and the circuit oscillates at a relatively low frequency determined by R2 and C2.

On the HIGH portion of the square wave cycle, pin-4 enables the AND gate at pin-12, causing that portion of the circuit to oscillate at a relatively higher frequency determined by R3 and C3.

Compare the values of R2 and C2 with R3 and C3.
As a rough guide, calculate TIME CONSTANT = R x C
1MΩ x 0.1μF = 0.1s => 10 Hz
500kΩ x 0.001μF = 0.5 x 0.001s = 0.5ms => 2kHz

Try changing the values of C2 and C3.
For example, replace C3 with 0.002μF or 0.005μF. How would this affect the tone generated by the loudspeaker?
Replace, C2 with 0.2μF and 0.5μF. How would this affect the sound produced?

When the sensor is wet the circuit oscillates. Hence voltage readings will be meaningless because the DMM is seeing rapidly changing voltages. It only makes sense to take voltage readings when the sensor is dry.

Spend more time playing and analyzing this relatively simple circuit. There is so much more that you can learn with this exercise.
 

Thread Starter

Hannan007_

Joined Oct 31, 2021
44
What does the circuit do?

View attachment 251819
When the rain sensor is dry, IC1 pin-1 is pulled down by R1 to 0V (logic LOW).
(We call the -ve terminal of the 9V battery our COMMON voltage reference point or node. All voltage measurements are taken with respect to this common node. LOGIC LOW would be 0V. LOGIC HIGH would be Vcc or 9V).

IC1 is a quad AND gate with inverted outputs, i.e. the output is ACTIVE LOW. That is what the circle or bubble on the output signifies. We call this a NAND gate. With a LOW level at pin-1, pin-3 is HIGH and so is pin-5 and pin-6. With pins 5 and 6 tied together that NAND gate becomes a NOT gate or INVERTER. Hence pin-4 is LOW.
Similarly, pin-12 is held LOW and pin-10 is also LOW, with gate at pins 8 ,9, 10 also acting as a NOT gate.

Transistors Q1 and Q2 are in the OFF state. No current flows through SPK and R6.
The voltage at R6, Q1 and Q2 collectors would be HIGH or 9V.

IC1 constitutes two square wave oscillators.
When the sensor is wet, IC1 pin-1 is pulled up to logic HIGH. This enables the first AND gate and the circuit oscillates at a relatively low frequency determined by R2 and C2.

On the HIGH portion of the square wave cycle, pin-4 enables the AND gate at pin-12, causing that portion of the circuit to oscillate at a relatively higher frequency determined by R3 and C3.

Compare the values of R2 and C2 with R3 and C3.
As a rough guide, calculate TIME CONSTANT = R x C
1MΩ x 0.1μF = 0.1s => 10 Hz
500kΩ x 0.001μF = 0.5 x 0.001s = 0.5ms => 2kHz

Try changing the values of C2 and C3.
For example, replace C3 with 0.002μF or 0.005μF. How would this affect the tone generated by the loudspeaker?
Replace, C2 with 0.2μF and 0.5μF. How would this affect the sound produced?

When the sensor is wet the circuit oscillates. Hence voltage readings will be meaningless because the DMM is seeing rapidly changing voltages. It only makes sense to take voltage readings when the sensor is dry.

Spend more time playing and analyzing this relatively simple circuit. There is so much more that you can learn with this exercise.
woahhh I'm so impressed, I have question here in the schematic why do they put NAND gates instead of drawing the IC itself.
 

BobTPH

Joined Jun 5, 2013
11,618
why do they put NAND gates instead of drawing the IC itself.
Because a schematic is intended to show logical connection, not a physical layout. If you showed a rectangle with 14 pins, I would need additional information to understand what the circuit does. The logic gates tell me that with no additional info,

Bob
 

LesJones

Joined Jan 8, 2017
4,524
I assume that when you say " instead of drawing the IC itself. " you mean drawing it as a rectangle with 14 pins. Drawing the logic symbols (NAND gates in this case.) makes it easier to follow the logic of the circuit in the way MrChips has described in post #101. Other logic ICs may contain OR gates, NOR gates, FLIPFLOPS, INVERTERS, EXCLUSIVE OR gates etc. There are ICs that contain counters, shift registers, phase locked loops and other more complex functions.

Les.
 

MisterBill2

Joined Jan 23, 2018
28,077
The difference is that showing the components and interconnections is "a wiring diagram", useful for building a circuit but of much less value to understanding how it works. And we do get posts that show wiring diagrams and they are much harder to understand than the schematic diagram that shows how the circuit functions.
 

MrChips

Joined Oct 2, 2009
35,040
I intentionally omitted the discussion on the workings of Q1 and Q2 so as to not make it too complicated.
Here it is.

Q1 and Q2 are configured to give a Darlington pair.

1636036116343.png

The purpose of this is to increase the current gain of a single transistor. If the current gain of one transistor is 100, the gain of the Darlington pair is 100 x 100 = 10,000.

Do we really need that much gain in this circuit?

Try the circuit with one transistor.
Remove Q1 and connect R5 to the base of Q2 instead.
 

Audioguru again

Joined Oct 21, 2019
6,826
I think the peak current from the output transistor is 9V/(8 ohms + 10 ohms)= 500mA (!) that cannot be produced by one transistor that has a tiny base current and it also cannot be produced by a little 9V battery.
 

MisterBill2

Joined Jan 23, 2018
28,077
That is another reason to think that this is not an excellent circuit. If the drive were AC coupled then the buzzer would only be delivering spikes. AND, was it supposed to be an 8 ohm speaker and not a 32 ohm speaker??
 
Status
Not open for further replies.
Top