Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Newbie, looking for humidity controller help

Not open for further replies.


New Member
Hey guys!
I'm putting together a humidity controller that would trigger a humidifier or fan if humidity levels leave a particular range.
...or at least I'm trying to.
I had a bit of experience programming MCU's way back when, but I'd love some help with the basic direction of how I might go about this. I can figure out the code, circuit, etc. on a case-by-case basis, but I'd love if someone could point me in the right direction.

- How much memory would such a thing require? Could this be done on the simplest 8-bit MCs, or would something else be best suited?
- Assuming I picked out a humidity sensor that has an integrated analog-digital converter, what more would go into it? Would it break down to: sensor --> MCU --> appliances?

I appreciate any expertise and tips you can share with me!
Your design requirements


From what you posted this seems fairly straight forward, and I am happy to help in any way that I can. I don't think memory would be much of an issue as the application will be relatively small, that is unless you actually want to log the humidity at given intervals for example. The other area you will need to consider is what you referred to as 'appliances', I guess these would be mains voltage so suitable circuitry would be required to drive them. I suggest you come up with a proposed schematic and post it on the forum and I together with other members (doubtless with more experience!) will help point you in the right direction.

Have you decided on which micro you are thinking of - Pics, AVRs etc and what language - Assembler, C, Basic ?

The language will to some extent determine the micros memory size but with the chips being so cheap thats no such an issue, and an 8 bit micro will be fine.

The number of other devices on your project will really determine which chip to go for depending on how many control switches, output ports and any display it may need.

As for the sensors a couple I have experience of are the Sensirtron SHT11 range which does humidiy and temperature in a Digital output.
Another is from Sure Electronics that also does H & T and outputs in Analogue and Digital **broken link removed**

- see both their sites for datasheets and full details.

Last edited:
Thanks! It's great to run into such helpful folks. :D

This is sort of what I'm thinking:
**broken link removed**
As far as appliances, fans to bring in dry air or blow in air over a water source would be able to regulate humidity one way or the other.
This schematic has a huge amount of amplifiers all connected, though... Are the amplifiers necessary? They're used mostly for resolution on the readings, I'd imagine.
Yes the simplest microcontrollers can handle this.

The humidity sensor itself works by changing capacitance. The way you work from there is use the capacitance as the timing cap for a 555 and count the number of cycles per sec. Humirel makes bare sensors and published a schematic for a very accurate circuit including temp compensation, and gives a chart of freq vs RH.

Now a full module like the SHT11 has its own ADC for that and communicates via SPI which is easy. But these are a bit more expensive. IIRC a SHT11 has a precision temp sensor too and that's a good thing. Actually getting precision temp on a PIC takes some "work", and most common thermistors lack high precision in this area unless you calibrate it in software.

Note that RH changes with temp, even if no moisture is added or removed from the air. "dry" warm outside air with a low RH will have a much higher RH if it cools down, even without the addition of water. However, the way air conditioning works, the coils are very cold, below the dewpoint, and water condenses on them as it passes and that gets drained away. That's why you don't get wet, mucky inside air after cooling dry outside air.
Last edited:
Ah, nice. My lab-head recommended the SHT11 so I'm sure he's fine with paying for that particular sensor.
Would the temp sensor on the SHT11 compensate on its own or would reconciling the temperature and RH readings also go into the programming of the PIC?

As far as languages and PICs go, I'm undecided as I have little preference... it'll be a lots-of-googling project regardless, though C would be the most intuitive language based on what I've touched before. Any MCU's particularly suited for this or are there a broad range that would work?
I purchased this sensor module off Ebay awhile back. It has temp and humidity, supports Analog output, SPI and UART. I have been playing around with it for ahwile so can give you a hand with soem basic code in getting it to work.

**broken link removed**
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips