I wanna run a HR202 moisture sensor and an Arduino. Yes, I picked a HR202 to challenge myself to make it work. I already have some easier-to-use SHT40 in stock.

This sensor can only run with AC 1.5Vpeak max. So, I’ve created this little circuit to provide AC, and I’ll only read it when the oscillator output is HIGH, so I can read it briefly at the same time with the help of Arduino’s ADC. Could this circuit work? Thank you.

  • Susan_B_Good@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I’m assuming that those "v"s are meters and not constant voltage sources. A 2.4v zener does NOT have exactly 2.4v across it. A 1.2 v supply will not be precisely 1.2v. Both will also vary with time and temperature. So, in practice there WILL be a dc component across the sensor - which will destroy it.

    • macusking@discuss.tchncs.deOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      1 year ago

      Thank you. Do you recommend me something (circuit) else? The 2.4v zener would provide about 2.4v. To keep 1.2V exactly half of the zener produced by the zener, I was considering split its voltage with 2 x 10k resistor in series and feed into an opamp in buffer configuration, so even it the 2.4 reference changes a little bit, the other side of circuit would be always zener / 2.

      • Susan_B_Good@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        How I would do it is to use two digital IO pins on the processor to generate the reference square wave. Put the sensor plus a series precision resistor between them and just pull one IO pin high as the other is pulled low and then swap them. That presumes that IO pins can both source and sink IO current. Then take the junction between the two to an Analogue in pin. You get two measurements each cycle. Use a lookup table of values and interpolate between them. If you wanted more precision - add more series resistors of different values covering the range of humidity that you want to sense, going to different IO pins. So you can choose the IO pin pair that brings the centre point between sensor and resistor closest to the mid-voltage point. It’s effectively a balanced half bridge arrangement - using the precision of the resistors to determine overall measurement precision. OK it ties up several IO pins - but microcontrollers are so cheap, I’d probably just dedicate one to this sensor and that’s all that it would do.