1
\$\begingroup\$

the two circuits below do the same things as far as I can tell, they both measure soil moisture using resistive sensing. However the one from Sparkfun is using a 2N3904 transistor, since the voltage divider circuit does the same thing, what's the purpose of the 2N3904 transistor in the Sparkfun circuit? Sparkfun Resistive Moisture Sensor Circuit vs Simple Voltage Divider Circuit

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

The sensitivity will be higher by a factor of more than 100 (typically) with the transistor due to the current gain of the transistor.

That means slower corrosion of the sensor as well. Both circuit have DC flowing through the sensor which causes electrolytic action, but 1/100 the current is 100x better.

\$\endgroup\$
2
  • \$\begingroup\$ So essentially is they were both only turned on briefly to get a reading, the circuit with the transistor would last 100x longer? Could you please explain the current gain of the transistor piece? I am not sure I fully understand but my thinking is that the transistor reduces the current through the probes because its able to sense small changes? Sorry these might be stupid questions..... \$\endgroup\$
    – baebsndeep
    May 20 at 22:43
  • \$\begingroup\$ If they are connected as shown in your schematics there is voltage there continuously (as long as Vcc is present). If you have some other circuit, then it may behave differently. The transistor, in this configuration, will have a base current that is less than the collector current by the gain, which is over 100. To raise the emitter to 2.6V (the highest it will go with 3.3V Vcc) requires 260uA in the case of the simple 10K resistor and more like a couple uA in the case of the transistor. \$\endgroup\$ May 21 at 0:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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