Hacking an existing soil moisture sensor to use lower power supply

sensor

Found a cheap soil moisture sensor that works well. It's powered by a 9V battery which would allow the output range to be outside my microcontroller's A-D input range.

I had two options in mind:

  • Use a voltage divider to lower the range
  • Change the power supply

I'd rather remove parts than add new ones, so I'm leaning toward the second option.

Would the new schematic I made be the way to go about it, and would it work well with this transistor Q1 (c1815)? Also Would I want to keep LED D1 or can I remove it like I have in the new schematic?

Original Schematic

The # of LEDs lighting up is proportional to the water level

schematic

simulate this circuit – Schematic created using CircuitLab

New schematic

schematic

simulate this circuit

Best Answer

The circuit is an emitter follower with the base voltage controlled by a potential divider formed between the soil resistance and R2 (120k). R1 sets a lower limit.

Q1: "would it work well with this transistor Q1 (c1815)?"

Yes. The transistor, c1815, is a general purpose NPN type with a minimum gain of 70, maximum of 700 and saturation of about 0.1V, max collector current 150mA so it would be quite happy in the new circuit.

In the original circuit the input voltage could go up to about 8.9V. This gives a maximum emitter voltage of 9 - 1.5V (due to the LED) = 7.5V in saturation. Three LEDs would require at least 4.5V and if we assume a current of 5mA across R6 (470R) that would add another 2.35V giving a total of 6.85V, so all three LEDs could be lit.

In your modified circuit. The maximum output voltage would be 4.35V (4.95 - 0.6) This might allow 3 LEDs to be powered if they were chosen for a low forward drop voltage (say 1.4V, giving a 4.2V drop total). Its a good range for the ADC.

Q2: Would I want to keep LED D1?

You could if you wanted to. You would lose 1.6V across the LED and transistor. Output would be between 0V and 3.4 (max soil resistance 29k). The original circuit measured the soil resistance up to about 33k. A slight increase in the 120k value (say 150k) would give you the same range.