# Soil Moisture Detector – B1P14

We’re now going to build a very interesting soil moisture circuit.

This is what the circuit looks like and there’s quite a bit going on here so it’s best we break it down and approach it in sections. The first section is very simple, like before, we have a jumper wire that acts as a probe point. Depending on the base-emitter voltage and current, Q1 will either be in the linear or saturation region. In other words, the output of section 1 will be a voltage that depends on the moisture level. This output is fed into section 2 which is the rest of the circuit.

In order to understand this section, let’s take a look at the simulation above. We have replaced section 1 with a variable voltage source whose output voltage is shown. This variable voltage is then fed into the base terminal of the transistors through resistors of different values. Since these are all NPN transistors, the base has to be at a higher potential compared to the emitter, for them to switch ON.

Q4 will switch ON when it’s base-emitter voltage is approximately 0.6V. Since the emitter is not connected to the ground potential, the voltage at the base of Q4 will have to be higher than 0.6V depending on the voltage drop across the diode. We plot the voltages at the base of each of the transistors, along with the voltage between the base-emitter terminals of Q4 for analysis.

Let’s run the simulation and slowly increase the variable voltage supply until Q4 switches ON. Q4 switches ON when the base-emitter voltage is about 0.65V, but the voltage at its base is actually around 1V due to the forward voltage drop of the diode. We can extend this principle to the other transistors.

The base of Q4 is at about 1V, and this is also connected to the emitter of Q3. This means that Q3 will switch ON when it’s base is at about 1.6-1.7V compared to ground.

In order for Q2 to switch ON, it’s base voltage will have to be about 0.7V higher than it’s emitter voltage or roughly about 2.4V as seen.

What we have here are 3 transistors that are switched ON at different voltage levels. This was possible because of the way they are connected together along with the resistor values connected to the base. When the soil has high water content, it will be very conductive. This means that the output from Q1 will be high and this will switch ON all the LEDs. As the water content decreases, the soil conductivity will decrease and the output from Q1 will drop causing the LEDs to switch OFF accordingly.

The threshold voltages can be adjusted by varying the values of R2, R4, R6.

The next question is why do we need to use a 9V battery here instead of 3V. Each transistor needs about 0.7v for it to switch ON and a diode has a voltage drop of about 0.7v as well, bringing the total to about 2.4v as seen at the base of Q2. Remember that we still have transistor Q1 which will need another 0.7V for it to switch ON, taking the total to about 3.1V.

The next thing to consider is the soil resistance which will depend on the amount of soil, the distance between the terminals etc. A 9V battery has a higher potential difference and if you remember the video about batteries, you will know that a higher potential difference can push a current faster or in further, so to speak.

Let’s quickly build the circuit using the breadboard layout. We will connect the 9V battery by using this 9V battery plug instead of the 3V battery box. Let’s move on to the next project.

Categories: BBox 1