Can someone help me. I have this sensor

I just connected it to the 3V pin of my arduino only I read online that its better to connect it to a Arduinopin for power so you can put it off when not measuring. How do I do this? Can I just connect it to, let's say D4 and put this to HIGH and LOW or do I need something more. I googled a bit but found all kinds of different solutions. Some even talked about the need to PULLUP and PULLDOWN. whats the best way to do this.

  • If the sensor draws less than about 20mA when running then yes, you can just power it from any GPIO pin and set it HIGH for on or LOW for off. If you need more than about 20mA then you will need to switch the power with a transistor.
    – Majenko
    Aug 25 '19 at 22:43
  • Thnx :). How do I find out how much mA it draws? its not on the board itself.
    – Zeepblok
    Aug 26 '19 at 0:01
  • RTFM. If it's not in the FM then RTFM for the major component(s). (F = Fine :p )
    – Majenko
    Aug 26 '19 at 0:02

The entire circuit board, including the LM393, power light and it's resistor, uses 2.2 mA at 3.3 VDC (4.12 mA at 5 VDC). Once the comparator is "triggered", the "D0-LED" and it's associated resistor come in to play which bumps the current up to 3.6 mA at 3.3 VDC (7.82 mA at 5 VDC).

I think it would be OK to use digitalWrite(pin_number, HIGH) to power the circuit board, then use digitalWrite(pin_number, LOW) to turn the power off.

  • Where did you find the specs? And do you read Dutch?
    – Duncan C
    Aug 26 '19 at 3:20
  • I used a DVOM with a variable output power supply to test one of the boards. This "voltage comparator board" is a common "addition" to several different moisture / rain sensors available on Aliexpress, Ebay, Amazon, etc. I don't read, write, or understand Dutch.
    – VE7JRO
    Aug 26 '19 at 3:42
  • It worked. It gave lower numbers but I'm making % out of them anyway. thnx :)
    – Zeepblok
    Aug 26 '19 at 8:45

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.