Skip to main content
Nastrotek
IoT SolutionsIoT SolutionsNew

An IoT anti-mold humidity monitor for wardrobes and camera cabinets

Notes for a small ESP32 humidity monitor for wardrobes or camera cabinets, using an SHT sensor to catch high humidity that lasts too long.

Share

LinkedInFacebookX
Hộp IoT theo dõi độ ẩm chống mốc đặt trong tủ đồ và tủ máy ảnh

Some things do not fail immediately. They quietly degrade when they sit in a damp cabinet for too long: jackets you rarely wear, leather bags, camera lenses, camera bodies, filters, documents, or small boxes of electronics. The annoying part is that the cabinet can look perfectly normal until one day there is a damp smell or a small mold mark.

What I want is a small box that can sit inside a cabinet quietly enough to be forgotten, but measure often enough to catch high humidity that lasts. It records humidity, keeps a history, alerts when the level crosses a useful threshold, and can remind me to replace or dry desiccant packs.

Practical target

For wardrobes and camera gear, humidity should stay below the range where mold becomes comfortable. The EPA recommends keeping indoor humidity below 60% RH, ideally around 30-50% RH. For camera gear, I would use a slightly more careful operating range:

StateSuggested range
Stable40-50% RH
Watch50-60% RH
AlertAbove 60% RH for several minutes
Too dryBelow 30-35% RH for a long period

The important part is not reacting to one instant reading. If you open the cabinet door, humidity may jump for a few minutes and settle again. The device should alert only when high humidity lasts for a while, for example 10-15 minutes.

Illustration of three humidity states inside a camera cabinet: safe, warning, and action with desiccant or airflow.

Hysteresis keeps the device from repeatedly toggling alerts when humidity hovers around the threshold.

Hardware proposal

A compact first version could use:

  • ESP32-C3 or ESP32-S3 mini module.
  • SHT31, SHT40, or SHT41 humidity sensor over I2C.
  • 0.96-inch OLED if local readout is useful.
  • A small LED or gentle buzzer for local alerts.
  • Li-ion/LiPo battery with a charger board, or USB power if the cabinet has power nearby.
  • A 3D-printed enclosure with ventilation slots, keeping the sensor away from the ESP32 and charger heat.

A DHT22 is fine for a quick prototype, but for a long-running cabinet monitor I would lean toward SHT31/SHT40. SHT sensors are usually more stable and better suited for environmental monitoring.

Illustration of an ESP32 humidity monitoring box with a humidity sensor, battery, display, alert output, and a phone or Home Assistant connection.

A small cabinet node only needs to measure reliably, report regularly, and alert when humidity stays too high.

How it works

The firmware loop can stay simple:

  1. Wake up on a schedule.
  2. Read temperature and humidity a few times, then average the result.
  3. Send data through MQTT, Home Assistant, or Arduino IoT Cloud.
  4. Check alert thresholds.
  5. Turn on an LED or buzzer if humidity stays high.
  6. Track whether humidity drops slowly, which can hint that desiccant needs attention.
  7. Enter deep sleep if the device runs on battery.

A simple rule set could look like this:

If RH > 60% for 15 minutes:
  Send a "cabinet humidity is high" alert

If RH > 55% for 6 hours:
  Remind me to check desiccant packs or cabinet seals

If RH < 30% for 24 hours:
  Remind me that the cabinet may be too dry for rubber, leather, or some materials

I prefer using hysteresis instead of one hard threshold. For example, trigger an alert above 60%, but clear it only after humidity falls below 55%. That prevents the device from toggling constantly around 59-61%.

The same delayed-alert pattern also fits other quiet home IoT devices, such as a CO2 window reminder for stuffy rooms. The sensor changes, but the product logic stays similar: measure, wait for a real condition, then nudge gently.

Where should the data go?

If you already run Home Assistant, MQTT is the simplest durable path. The node can publish a compact payload:

{
  "temperature": 28.4,
  "humidity": 57.2,
  "battery": 82,
  "state": "watch"
}

The dashboard can show daily trends, while automation handles alerts. Without Home Assistant, Arduino IoT Cloud, ThingsBoard, or a small SQLite/InfluxDB server are all reasonable. I would avoid building a custom app first. The hard part of this product is not the UI; it is stable measurement and alerts that are useful without being annoying.

Easy details to miss

The enclosure needs airflow around the sensor. If the sensor sits in a sealed pocket, or too close to the battery charger, the reading will drift.

A camera cabinet is usually more sealed than a wardrobe, so humidity changes more slowly. After replacing a desiccant pack, it may take tens of minutes or a few hours before the RH curve clearly drops.

The buzzer should be gentle, or skipped entirely. For something sitting in a bedroom or wardrobe, phone notifications are usually more useful than a loud local alarm.

If the node is battery powered, Wi-Fi is the expensive part. A good pattern is measuring every 5-15 minutes, publishing quickly, then going back to deep sleep. If you want a smoother chart, you will probably need to charge more often.

MVP version

My first version would be intentionally small:

  • ESP32-C3.
  • SHT40 over I2C.
  • No OLED, only one small LED.
  • MQTT publish every 10 minutes.
  • Home Assistant alert when RH stays above 60% for more than 15 minutes.
  • 3D-printed enclosure mounted with a magnet or adhesive pad inside the cabinet.

After a week of real use, I would decide whether it needs an OLED, buzzer, or integrated desiccant tray. A good IoT device does not need a lot of features on day one. It needs to measure correctly, alert at the right time, and avoid becoming another thing I have to babysit.

Long-term checklist

  • Compare readings against a commercial hygrometer for 24 hours.
  • Keep the sensor away from heat sources and charger circuits.
  • Check humidity behavior after opening and closing the cabinet several times.
  • Test alerts by placing the box near a damp towel for a few minutes.
  • Watch battery behavior for at least a week before finalizing the deep sleep interval.
  • Log when desiccant packs are replaced or dried.

I would trust this build when it catches a humidity pattern I would normally miss: several rainy days in a row, tired desiccant packs, or a cabinet seal that is no longer tight. If it only complains after every door opening, the firmware needs tuning before the enclosure or PCB deserves more time.

References

Share

LinkedInFacebookX

Keep exploring

Read next

Related articles

View more in IoT Solutions

Nastrotek uses cookies for analytics and ad personalization to help us understand how the site is used. You can accept or decline non-essential cookies.