Humidity Controlled Box for Storing Camera, Lenses, 3D Printing Filaments Etc.

by roastedneutrons in Living > Organizing

1369 Views, 4 Favorites, 0 Comments

Humidity Controlled Box for Storing Camera, Lenses, 3D Printing Filaments Etc.

IMG_20211115_185809.jpg
IMG_20211115_185639.jpg
IMG_20211115_184555.jpg

Many items need to be stored in a controlled humidity environment. Camera lenses for example get infested with fungi if left in humid places. 3d printing filaments like PLA show defects while printing, if they have absorbed too much moisture from the air. In some cases, like in the case of filaments, putting it in an airtight container, and tossing in a couple silica gel packets might be sufficient to keep it dry. However, if the box is reopened often, the silica gel will need rejuvenation, as it will get saturated with water over time. And in other cases, like the lenses, sucking all the moisture out is a bad idea as it dries out the lubrication. A 35% - 45% relative humidity is a good target humidity for cameras and lenses. Just throwing in silica gel packets will not let you have control to maintain it within that range.

The goal of this instructable is to show you how to build a box within which humidity is controlled within a set range. We will first build a dehumidifier module using a peltier plate and a couple of heatsinks. We will then place it in a sealed box and control it using an arduino that measures the humidity using an AHT10 sensor

Supplies

  • 12706 Peltier plate
  • Arduino Micro (Any other microcontroller like an uno can be used too. I just find the form factor of the micro convenient as it can be plugged into headers soldered onto a PCB)
  • AHT10 (Humidity and ambient temperature sensor)
  • SSD1306 128x32 OLED display to show the humidity (You can choose any other display like an LCD, or even choose to not have a display at all, and trust that the circuit will keep it within acceptable limits)
  • 100uF capacitor
  • 470 ohm resistor
  • perfboard (5cm x 7cm)
  • TIP122 Darlington transistor (Any other transistor that can handle ~1.2 amps of current draw will do too)
  • A small heatsink for the TIP122
  • Two heatsinks at least 40mm x 40mm. for the Peltier module. I used 40x80 and 40x120, as i had them lying around.
  • 5V 40mm x 40mm heatsink fan.
  • Heatsink paste
  • zipties
  • Connectors to be able to plug in the peltier, fan etc., and a barrel jack for the input power.
  • A 5V power supply capable of delivering at least 2A
  • A small plastic box roughly 15cm x 10cm x 5cm for making the dehumidifier module
  • A small plastic box roughly 10cm x 6cm x 2cm to hold the electronics
  • A large plastic box that is reasonably airtight, that can hold the things you want to store after placing the dehumidifier module in it. (A 2 ft x 1ft x 1ft box was adequate for my DSLR + lenses)
  • Craft knife to make cuts in the boxes

Understanding Dehumidification

Before measuring and controlling, we should first know what we are trying to control. Air has a capacity of how much water vapour it can store. If more vapour is added to the air than its maximum capacity, it will condense. Relative humidity expressed as a percentage, is the percent of that maximum capacity that is occupied by the water vapour in the ambient air. And this percentage is what we need to maintain in our box.

The air's capacity to hold water vapor increases with temperature. So, at lower temperatures, the air can carry less water vapour. The trick we are using to dehumidify, is to cool the air down enough that water condenses out. And when we reheat the air back out, there is lesser amount of water vapour present in the air.

To accomplish this, we use a Peltier plate, which essentially pumps heat from one side of the plate to the other, thus cooling one side while heating the other.

Building the Dehumidifier

1.jpeg
2.jpeg
3.jpeg
4.jpeg
5.jpeg
7.jpeg
6.jpeg
8.jpeg
9.jpeg
10.jpeg
IMG_20211115_205150.jpg
IMG_20211115_205139.jpg

Take the small plastic box. Cut a 40cm x 40cm square in the lid of the box using a craft knife. This is so that the peltier can go in there. Cut some small holes near it, for zipties to go through. Place the peltier in the large square hole. Apply heatsink paste on both sides of the peltier, and sandwich it between the two heatisnks as shown. Don't rely on the heatsink paste to act as a glue. Use zipties to secure this sandwich on the lid of the plastic box. The side outside the box is meant to be the hot side, and the part that goes into the box will be the cold side. Attach the heatsink fan on the hot side (outside of the box).

Now is a good time to do a test run. Connect the peltier and the fan to the 5V supply. And see that the heatsink on the inside of the box gets cold and the one outside the box warms up. In case the outside one is cooling down instead, you've got your pletier's polarity wrong. Just switch the polarity of the peltier and all should be good. If you leave it running for some time, you will see water condensing on the heatsink on the cold side. The bottom part of the box is for collecting the dripping water. Cutting some extra holes on the side of the box, or on the top, will let the air move in and out of this chamber.

The 12706 peltier will draw a current of 6A, when powered with 12V. And it does a phenomenal job of cooling if the heat is taken out from the hot end at the rate that it pumps it. But if you do not, it ends up heating both sides of the Peltier, as the pumped heat is just conducted back. Our cooling requirements are more modest, so we will power it with 5V, where it draws around an amp. And that will be sufficient to get enough condensation.

Sensing and Controlling the Humidity

Screenshot from 2021-11-15 22-15-32.png
IMG_20211115_152808.jpg
IMG_20211115_153322.jpg
IMG_20211115_153812.jpg
IMG_20211115_155158.jpg
IMG_20211115_155726.jpg
IMG_20211115_160352.jpg
IMG_20211115_161251.jpg

The AHT10 sensor can be used to measure the relative humidity and ambient temperature. An OLED screen can be used to display these values. And a simple logic of switching on the peltier whenever the relative humidity is above a threshold of 45%, is sufficient to get satisfactory results. Since the value doesn't vary wildly quickly, we can check this leisurely once a second. The peltier will draw around an amp at 5V. So the arduino will need a transistor / relay to control the current flowing through the peltier. A TIP122 darlington transistor, equipped with a small heatsink will do the job for us. The fan and peltier are controlled by the same TIP122. The schematic shows how all of this is wired up.

I used a visiting card box for housing the control electronics, with cutouts to let air move around, and for connectors to enter the box. The OLED display is placed outside the box for easier visibility.

A barrel jack connector on the outer box, will provide the power to the electronics. The barrel jack should be powered by an external 5V supply capable of providing at least 2A. We are not using the USB for the power because it is limited to 500mA on most Arduinos, and we need significantly more than that.

Upload Code to Arduino

Now that all the electronics is wired up, we need to upload the Arduino code. Make sure that the 5V external supply is not connected when the usb connector is plugged in for uploading code. This is to prevent any problems arising from slightly different voltages at the RAW pin of the micro coming from the USB and the external supply. Also, disconnect the peltier while connected to usb, so that it doesn't draw power beyond the capability of the port.

The arduino code that needs to be uploaded is shown below.

#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Adafruit_AHTX0.h>


#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 32 // OLED display height, in pixels
#define OLED_RESET     -1 // Reset pin # (or -1 if sharing Arduino reset pin)


#define peltierPin 15
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
Adafruit_AHTX0 aht;


const float humidityThreshold = 45;




void setup() {
  Serial.begin(115200);
  aht.begin();
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  display.clearDisplay();
  display.setTextSize(2);
  display.setTextColor(WHITE);
  display.setRotation(2);
  display.display();
  pinMode(peltierPin,OUTPUT);
}


void loop() {
  display.clearDisplay();
  display.setCursor(0, 0);
  sensors_event_t humidity, temp;
  aht.getEvent(&humidity, &temp);// populate temp and humidity objects with fresh data
  float h = humidity.relative_humidity;
  display.print(h,1);
  display.println("%");
  float t = temp.temperature;
  display.print(t,1);
  display.println(" C");
  display.display();
  if(h>humidityThreshold){
    digitalWrite(peltierPin,HIGH);
  } else {
    digitalWrite(peltierPin,LOW);
  }
  delay(1000);
}

You will need to install the Adafruit GFX library, Adafruit AHTX0 library and Adafruit SSD1306 library from the library manager for the code to work.

Finishing Up

IMG_20211115_185819.jpg
IMG_20211115_190015.jpg
IMG_20211115_185944.jpg
IMG_20211113_210723.jpg
IMG_20211113_210659.jpg

Now place the dehumidifier we built inside the larger airtight box. Keep the precious cargo (lenses/filaments etc.) in the airtight box. Close the lid, and power it up. You will see the relative humidity dropping down gradually. If the humidity around is high enough, you will soon see water condensing on the inner heatsink. And it will drip down into the inner box. Empty it out occasionally (once a month perhaps) when there is a lot of accumulated water.