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
[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

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.

[–] [email protected] 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.

[–] [email protected] 1 points 1 year ago

Thank you. I'll try this approach!