this post was submitted on 05 Jul 2023
4 points (100.0% liked)

Ask Electronics

3316 readers
1 users here now

For questions about component-level electronic circuits, tools and equipment.

Rules

1: Be nice.

2: Be on-topic (eg: Electronic, not electrical).

3: No commercial stuff, buying, selling or valuations.

4: Be safe.


founded 1 year ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] Susan_B_Good@discuss.tchncs.de 2 points 1 year ago (1 children)

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.

Thank you. I'll try this approach!