2
\$\begingroup\$

I have one of these ubiquitous soil moisture sensors:

sensor

The only information I can find is that it operates from 3.3V to 5V, uses an LM393 to trigger a digital output and also exposes an analogue reading.

I'm intending to hook it up to a low power PIC (actually a PIC16LF1554 ) and want everything to remain sleeping until I periodically read the sensor from the analogue output. So, I'll power the sensor, take a reading through ADC and the power it off again.

Trying to keep everything as small as possible, with minimum components, I'm considering powering the sensor from a spare PIC pin, which I know will source/sink 25mA maximum. So I'll just drive the pin high to power up, take a reading then drive the pin low again.

How can I find out what current the sensor assembly will draw so I don't risk overloading the PIC pin? If I hook my (cheap) DMM in series with the sensor when powered from 3.3V standalone, the power LED on the sensor doesn't light up and the meter shows zeroes on the lowest range (2000uA). So I can't tell what it draws when it's working normally.

Do I need a better DMM or is there some other way I can see if I need to power this via a transistor (or some other way)?

\$\endgroup\$
  • \$\begingroup\$ Usually people that sell stuff provide you with datasheets... But for that small circuit it should not be hard to reverse engineer it and calculate/simulate yourself \$\endgroup\$ – PlasmaHH Dec 23 '14 at 16:53
  • \$\begingroup\$ You don't even need that circuit. You just need the probe and a single resistor. The probe acts like a resistor itself - use a second to create a voltage divider, then measure the midpoint voltage with a PIC ADC. \$\endgroup\$ – Majenko Dec 23 '14 at 16:56
  • \$\begingroup\$ @Majenko Thanks - I did wonder if I needed that circuit if all I wanted was the analogue reading, but still not sure how I can safely power it from a PIC pin. Do I simply choose a second resistor to limit to 25mA (assuming the sensor is shorted)? \$\endgroup\$ – Roger Rowland Dec 23 '14 at 16:59
  • \$\begingroup\$ @RogerRowland Are you sure you're using the DMM correctly? Have you got the lead in the current-measuring socket, not the voltage-measuring socket (if it's that type of DMM)? \$\endgroup\$ – John Honniball Dec 23 '14 at 17:42
  • \$\begingroup\$ @JohnHonniball Yes, it's in the right socket, there's one for high current but this one is marked VmAOhm, but I tried both anyway. \$\endgroup\$ – Roger Rowland Dec 23 '14 at 19:49
3
\$\begingroup\$

The best way to know what the current draw can be is to consult the datasheet. If that is not available, and this is for production, go get something that does have a datasheet.

You can also just measure the current. However, keep in mind that only tells you what that unit draws on that day at that temperature.

However, looking at the bigger picture, what's the point of embedding someone else's unit into yours? The circuit for a moisture meter is very simple, and is probably easier to incorporate into your own product than to try to embed someone else's. Also, there are a lot of bad ways to try to measure resistance between electrodes. Something that doesn't come with a datasheet doesn't inspire confidence that someone that actually knew what they were doing designed the unit. Since it appears to be just a simple analog circuit, it is quite unlikely to be using a good technique.

The best method pretty much requires a microcontroller doing a 4-phase measurement. I discuss it in the context of detecting water, but the principle is the same. See https://electronics.stackexchange.com/a/33938/4512, https://electronics.stackexchange.com/a/103330/4512, and https://electronics.stackexchange.com/a/28485/4512.

\$\endgroup\$
  • \$\begingroup\$ Thanks - this is a hobby project and there is no datasheet - at least none that I can find. I'll take a look at your links .... \$\endgroup\$ – Roger Rowland Dec 23 '14 at 17:01

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.