CLARK TEEPLE
  • Home
  • Research
  • CV ↷
    • Publications ↷
    • Projects ↷
    • Outreach ↷
    • PDF
  • Other Experience
    • Senior Design: ENG 490
    • MIT Lincoln Lab
    • Kandu Incorporated
  • Just 4 Fun!

Wifi-Enabled Humidifier

1/9/2017

 
If you live in a climate that gets winters, you'll generally notice that the humidity drops substantially indoors during the winter. You'll also be familliar with chapped lips, sinus congestion, and dry skin casued by low humidity. In my case, I was seeing humidity measurements of less than 20%. 

Now that I have my sensor network set up and working reliably, I wanted to use that to regulate humidity!

Materials:
  • ESP8266 NodeMCU 12e Board  (Arduino-compatible development board with Wifi connectivity)
  • 120V 10A Relay (5V control signal) (Arduino-compatible relay with screw terminals)
  • Cheap Humidifier (Very basic humidifier from Amazon. This one is completely electrical (just basic electrical switches)
  • MicroUSB cable and changing brick (cheap from Amazon)

Software:
  • Custom Android App (It allows me to set the state of the humidifier as well as the setpoint)
    • I used MIT App Inventor to make this. It's pretty straighforward to use!
  • Another Thingspeak channel (My Android app spits settings into it)
  • Custom Arduino Code (It reads humidity data from my main ThingSpeak channel and compares it to settings from the settings ThingSpeak channel)
Results:
  • Hardware: Hacking the Humidifier
    • I hacked the humidifier by putting the relay as a switch in line with one of the mains voltage terminals.
    • I wired the relay to be normally closed, so if the MCU isn't working or the internet is out, I can still use the humidifier normally without any modifications or issues.
    • The MCU board passes power and signal to the relay using the power pins and a GPIO pin.
    • Now I can programmatically turn the humidifier on and off. I left the original power dial set to "high".
  • I made a custom Android App. It works great!
    • It pulls the current temperature and humidity data from my main ThingSpeak channel and displays them all .
    • It pulls humidifier settings and updates the buttons and settings
      • On/Off/Auto (On = Always On,  Off = Always Off, and Auto turns the humidifier on or off to maintain the setpoint )
      • Humidity Setpoint (the target humidity to maintain)
      • Deadband (The amount of wiggle room around the target humidity
        •  I just have an On-Off Relay actuator, so I have built in some hysteresis in the control loop to avoid turning the relay on and off too much
    • You can set these 3 settings, then submit them.
    • Since ThingSpeak only allows incomming data every 15 sec, The app forces you to wait for 15 seconds before submitting settings again. 
Picture
  • Custom Arduino Code
    • Algorithm:
      • ​It reads the latest average humidity data from my main ThingSpeak channel.
      • It then enters a loop
        • The Humidifier settings are read from the humidifier channel.
        • The program decides what to do next based on the following logic:
          • If the Humidifier is set to ON, set the relay to the "on" position ​(This is the resting position).
          • If the Humidifier is set to OFF, set the relay to the "off" position.
          • If the Humidifier is set to AUTO:
            • ​If the average humidity is lower than the "setpoint" - "deadband",
              • then turn the relay "on"
            • ​If the average humidity is lower than the "setpoint" - "deadband",
              • then turn the relay "on"
            • ​If the average humidity is in the deadband
              • ​then don't change the relay state.
        • ​​​wait for 2 sec.
      • After ~60 sec (timed based on how long it takes to perform 1 iteration of the inner loop and doing that loop several times)
        • ​​exit the inner loop
        • repeat the whole process, gathering new sensor data.
    • Sensor data is only updated roughly every minute, so this code makes sure we don't spend power and bandwidth gathering the same data over and over.

Comments are closed.

    Author

    Write something about yourself. No need to be fancy, just an overview.

    Archives

    January 2017

    Categories

    All

Powered by Create your own unique website with customizable templates.
  • Home
  • Research
  • CV ↷
    • Publications ↷
    • Projects ↷
    • Outreach ↷
    • PDF
  • Other Experience
    • Senior Design: ENG 490
    • MIT Lincoln Lab
    • Kandu Incorporated
  • Just 4 Fun!