Why does my humidity reading swing wildly every time the mister kicks on?

Oct 23, 2026 Last reply: 10 hours ago 5 Replies

First reply

PrairieWorks

That immediate spike is almost certainly a localized saturation issue. The SCD30, like most good sensors, measures exactly what's right in front of it. If you’re misting near the sensor, it registers the local droplet cloud and thinks the entire chamber is at 100 percent…

Read the full reply

So I've been building an automated fruiting chamber in my closet using a Pi 5, a relay board, and one of those combo CO2/temp/humidity sensors. The whole thing runs a simple Python loop that fires the humidifier when humidity drops below the target and kicks the fan on when CO2 climbs. Sounds fine on paper.



Here's the wierd part. When the mister runs, the sensor a few inches away shoots up to like 95 percent almost instantly, so the code cuts it off, then twenty minutes later it's back down at 70 and the cycle repeats. The lions mane I've got fruiting right now seems okay but the caps near the mist pipe look soggy and the ones on the top shelf are a bit dry.



Is this just a placement problem with the sensor? I'm wondering if I shold move it to the middle shelf, or maybe average the readings over a few minutes before deciding to run the mister. I don't want to keep hammering the chamber with short bursts of mist if a longer gentler run would actually hold things steady.



Anybody dealt with this kind of oscillating setup before?


That immediate spike is almost certainly a localized saturation issue. The SCD30, like most good sensors, measures exactly what's right in front of it. If you’re misting near the sensor, it registers the local droplet cloud and thinks the entire chamber is at 100 percent instantly, even if the overall chamber humidity is still low. It's not just a placement thing; it's a physics thing.

I had a similar loop going before I shifted to a delay-based system. Instead of trying to average the sensor readings, I just added a time delay to the trigger. When I first started my automated setup, I realized I needed a simple countdown. A basic physical kitchen timer, the cheap analog kind, ended up being the only tool I needed to find that perfect window of time. It made the logic far more stable than trying to account for immediate pressure spikes.

I've run into this when setting up humidifiers for plants, and it's often about the air movement. Moving the sensor might help, but you've gotta consider the airflow itself. Is your fan powerful enough to really circulate that mist around the whole chamber fast enough for the sensor to stabilize? If the fan is too weak, you're just gonna have stagnant pockets of air, and that's not gonna let the humidity settle evenly, no matter what you code.

I agree completley with the part about the sensor reading exactly what's immediately around it. That's definately a physics problem more than just where you placed the unit. I ran into this exact oscillation while setting up a terrarium a while back. Trying to keep the sensor perfectly positioned didn't help much in the end, so I changed the programming logic entirely. I programmed the mister to activate for a fixed amount of time when it hit the threshold. Instead of stopping the moment the sensor spiked, it would run for five seconds and *then* check the readings again. That fixed duration approach prevented the cycling from happening so rapidly.

Update: moved the sensor to the far wall from the mist pipe and added a two minute delay before the mister can kick in again. The constant on-off cycling is mostly gone. What I'm stuck on now is the airflow question from earlier in the thread. When the fan runs it actualy drops humidity fast, so I'm wondering if I should shorten the fan runs instead and let the mist mix slower.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required