How would you seal a surface-mounted humidity (or temp/humidity) sensor on a PCB? For example, if it's in a very humid environment, the water could condense and ruin the PCB, but as far as I know the humidity sensor can't sense the humidity unless it is exposed to the moist air. I also couldn't find any surface- or through-hole mounted sensors on Digikey that protrude so that a gasket of some sort can isolate it.
I would also like to avoid using large external probes for measurement, and would like to keep everything in one box.
How would you seal a surface-mounted humidity (or temp/humidity) sensor on a PCB?
You don't, as you said it needs to be exposed to the environment.
The sensors are designed to withstand high humidity, otherwise they wouldn't be reliable.
You need to PROTECT your PCB from humidity, either a sealed enclosure, controlled atmosphere, or a coat of sealing compound over the PCB and components.
Through hole mount humidity sensor.
Yea that's mainly what I was asking: a way to seal off the sensor from the rest of the components so that, for example, just a little hole for the sensor is exposed to the air. Is this basically impossible with surface-mounted components? They're so low-profile I don't see a way to seal the PCB off, but sometimes using a through-hole one like that isn't so elegant on a PCB.
I've used an HIH-6130 before and if you buy them as components to solder yourself they will have a little protective sticker over the sensor hole. If you leave that on you can solder them to your board and then use some sort of spray coating like lacquer or enamel on the rest of the board.
High humidity area, like bathroom/shower.
I have used dew sensors (from an old VCR) for that.
They are more sensitive in the 90-100% area.
Edit: just found out that there is a resistive dew sensor inside a DHT11
I was also thinking of using some sort of coating, not completely potting everything but just filling the edges so nothing gets shorted out. However, would this cost a lot for production-quality PCB's? My goal is to learn about the alternatives for not just a hack-it-together DIY jig but of a more refined variety.
However, with coating I would have to make sure that it doesn't get on the humidity sensor. How does sticking the PCB in a reflow oven not burn off the sticker?
Is it possible to just put a foamy layer of something that is sandwiched between the humidity sensor and the enclosure? (with a hole where the humidity sensor is, of course). Something that will yield accurate humidity readings but prevent water from dripping all over the PCB?
Put your PCB in a waterproof box and make a "pass through connector" to connect to the sensor outside the box.
We don't do anything with a humidity sensor, but build hundreds of boards with barometers. After the board is completely built and the flux is washed and the boards are dry, the barometer is hand added using solder with no-clean flux. A humidity sensor would be handled the same way.
And brush your board with polyurethane (except connectors, etc) to give some protection from moisture.
You can coat the board with Type UR polyurethane.
Spray on and brush formulations are available.
Be sure to cover any connector openings before applying.
The DHT11 seems to contain a resistive dew sensor element.
That can be removed, and mounted a short distance away from the rest of the electronics, including the DHT electronics.
Awesome, thanks for the ideas guys! So with the polyurethane, could I just solder all the components, including the humidity sensor, onto the board then cover the humidity sensor and coat everything else? These humidity sensors are pretty tiny surface mounted components.