# humidity sensor

How can I use humidity sensor hs12sp with arduino uno?

Humidity sensor.pdf (333 KB)

With a fair amount of difficulty, judging by the paucity of information.
First, figure out how you’re going to supply it with AC, and then figure how you’re going to measure its impedance.

You’d be better off with a DHT22 or a BME280, IMO.
Much easier to interface.

TheMemberFormerlyKnownAsAWOL:
With a fair amount of difficulty, judging by the paucity of information.
First, figure out how you're going to supply it with AC, and then figure how you're going to measure its impedance.

I for one would call that part "fairly straightforward" but that's only because I've been working for a few years on doing exactly that (for conductivity measurement - much higher frequencies, but the principle is the same).

The hard part is that the frequency range (50 - 1000 Hz) spans just over two orders of magnitude, while the impedance range (1.4k-3900k) is more than 3 orders of magnitude, so that means you need two capacitors, one for the higher end, one for the lower end of the range.

That capacitor provides both the AC for the sensor, and the charge/discharge time gives the impedance.

It obviously needs temperature compensation as well, impedance changes by about an order of magnitude going from 5 to 45°C.

So, possible? Yes. Easy? No. Just get a BME280 (the DHT22 is pretty unreliable in my experience, especially when used in a high humidity environment like our climate).

Thank you a lot Shannon

But can you show me the circuit for connecting the hs12sp humidity sensor to Arduino uno ?

This may work for you. Schematic in the .cpp file, it's really that simple, the magic happens in software. Adapt capacitor size to get the resulting frequency within the proper range for that sensor. Use a second capacitor in parallel, connected to a fourth pin, to extend the range (set the pin connected to the unused one to INPUT).

Use film capacitors, best is PP but PET also works pretty well.

Tareek:
Thank you a lot Shannon

He's wvmarle, not Shannon

Thank you so much wvmarle

But still I can not understand how to connect arduino uno to hs12sp.

Can you show me a diagram? please

Moreover how shall I program Arduino to read the resistance of hs12sp?

Did you actually study the link I gave you?

Your sensor goes where the EC probe goes normally. The software doesn't calculate resistance, you must calibrate number of processor cycles (which is what it actually measures - discharge cycles I call this) vs resistance.