Michael On Everything Else

Arduino-Based Boxing Glove Dryer

Because there’s no kill like overkill…

Problem: Stinky boxing gloves due to moisture build-up inside from sweaty workout.

Solution: Build a smart dryer that reads the humidity inside the gloves and powers fans to circulate the air.

Normally I’ve been leaving my gloves positioned so that the opening is pointing straight up towards ceiling fan that I run on high for a few hours to dry the gloves. This works okay but eventually the gloves start to stink because moving air doesn’t reach parts of the inside of the glove—namely the compartment where the fingertips go, because its curved.

There are glove dryers out there that I can buy, but what fun is that when I can make one?

The dryer is at a stage of proof-of-concept and yesterday I got the opportunity to test it…and it worked well!

Overview

I used the Grove base and sensor because they are plug-and-play and made it easier to learn other things. But I wouldn’t necessarily use them again, partly because it feels like cheating.

In the image below, the diode looks like it’s connected clumsily but that’s how I had to represent it in the diagram. In reality, the diode is directly inline with the transistor. Hopefully that is more clear in the photos.

glove dryer schematic

Image made with Fritzing
glove dryer full view glove dryer back view glove dryer side view glove dryer angled view glove dryer in glove

The base shield stacks on top of the Arduino and provides a breakout of connectors for various sensors and devices offered by Seeed. It passes-through all of the various jumpers from the Arduino.

The sketch (a program for Arduino) polls the sensor every second and gets a new humidity reading and then with a series of if/then statements it lights up various LEDs and determines when to power on the fan using the TIP120 transistor. The diode protects the Arduino from electrical spikes generated by the fan when it is shut down.

I also output to serial so that I can see what the sensor is reading.

I’d like to eventually use another sensor on the outside air so that I can shut down the fan once the to humidity measurements (inside and outside the gloves) match rather than shutting off the fan at a relatively arbitrary number. Here in Singapore, with the windows open, the humidity in the house is routinely 75+%. So if the external air is at 80% humidity, fans alone an’t drop the humidity below that.

Basically the sketch does this:

  1. Monitor relative humidity
  2. At a given threshold, turn on the fan
  3. Indicate relative humidity level via LED lights
  4. Once the relative humidity is down to a certain level, run fan for five more minutes
  5. Turn off fan and start monitoring again (goto 1)

For my first “real” test, I left it for three hours while I ran errands so I don’t know how long it ran to reach the desired RH. However, after three hours, the test glove was 5% dryer than the control glove (no fan in it). Also, shortly after I returned and checked everything, the 9v battery died, so a single 9v with a single, small fan is inadequate.

The Sketch




#include 
#include "Arduino.h"
#include "Wire.h" 

// Define which pin to be used to communicate with Base pin of TIP120 transistor
int TIP120pin = 11; //for this project, I pick Arduino's PMW pin 11

const int RED=3; //define LED for pin 3
const int YELLOW=6; //define LED for pin 6
const int GREEN=7; //define LED for pin 7
  
//Define functions to reduce code
void allledon()
{
  digitalWrite(RED, HIGH);
  digitalWrite(YELLOW, HIGH);
  digitalWrite(GREEN, HIGH);
}
void allledoff()
{
  digitalWrite(RED, LOW);
  digitalWrite(YELLOW, LOW);
  digitalWrite(GREEN, LOW);
}
void redblink()
{
  digitalWrite(RED, HIGH);
  delay(100);
  digitalWrite(RED, LOW);
}
void fanconstant()
{
int count=0;
float humidity = TH02.ReadHumidity();
  
while(count < 300){
  analogWrite(TIP120pin, 255);
  if (humidity >= 85)
   {
    digitalWrite(RED, HIGH); //Turn on LED
    digitalWrite(YELLOW, LOW); //Turn off LED
    digitalWrite(GREEN, LOW); //Turn off LED
    }
      if (humidity > 80 && humidity < 83)
   {
    digitalWrite(RED, LOW); //Turn on LED
    digitalWrite(YELLOW, HIGH); //Turn off LED
    digitalWrite(GREEN, LOW); //Turn off LED
    }
      if (humidity <= 80)
   {
    digitalWrite(RED, LOW); //Turn on LED
    digitalWrite(YELLOW, LOW); //Turn off LED
    digitalWrite(GREEN, HIGH); //Turn off LED
    }
  Serial.println("Humidity: ");
  Serial.print(humidity);
  Serial.println("%\r\n");
  Serial.println("Fan on CONTINUOUS");
  delay(1000);
  count++;
  }
}

void setup()
{  
  pinMode (RED, OUTPUT); //Set the LED pin as an output
  pinMode (GREEN, OUTPUT); //Set the LED pin as an output
  pinMode (YELLOW, OUTPUT); //Set the LED pin as an output
  
  //Blink LEDs on startup
  allledon();
  delay(100);
  allledoff();
  delay(100);
  allledon();
  delay(100);
  allledoff();
  delay(100);
  allledon();
  delay(500);
  allledoff();
  delay(100);
  
  Serial.begin(9600);        // start serial for output
  
  Serial.println("****THO2 power up delay, letting voltage settle****\n");
  /* Power up,delay 150ms,until voltage is stable */
  delay(150);
  /* Reset HP20x_dev */
  TH02.begin();
  delay(100);
  
  /* Determine TH02_dev is available or not */
  Serial.println("TH02_dev is available.\n"); 

  pinMode(TIP120pin, OUTPUT); // Set pin for output to control TIP120 Base pin
}
 
void loop()
{
   float humidity = TH02.ReadHumidity();

   if (humidity >= 85)
   {
    digitalWrite(RED, HIGH); //Turn on LED
    digitalWrite(YELLOW, LOW); //Turn off LED
    digitalWrite(GREEN, LOW); //Turn off LED
    Serial.print("Humidity: ");
    Serial.print(humidity);
    Serial.println("%\r\n");
    Serial.println("Fan on");
    analogWrite(TIP120pin, 255); // By changing values from 0 to 255 you can control motor speed
   }
   else if (humidity >= 83 && humidity < 85)
   {
    digitalWrite(RED, LOW); //Turn off LED
    digitalWrite(GREEN, LOW); //Turn off LED
    digitalWrite(YELLOW, HIGH); //Turn on LED
    redblink(); //Blink red LED
    Serial.print("Humidity: ");
    Serial.print(humidity);
    Serial.println("%\r\n");
    Serial.println("Fan on");
    analogWrite(TIP120pin, 255); // Fan on
   }
   else if (humidity > 80 && humidity < 83)
   {
    digitalWrite(RED, LOW); //Turn off LED
    digitalWrite(GREEN, LOW); //Turn off LED
    digitalWrite(YELLOW, HIGH); //Turn on LED
    Serial.print("Humidity: ");
    Serial.print(humidity);
    Serial.println("%\r\n");
    Serial.println("Fan on");
    analogWrite(TIP120pin, 255); //Fan on
   }
   else if (humidity <= 80)
   {
    digitalWrite(RED, LOW); //Turn off LED
    digitalWrite(YELLOW, LOW); //Turn off LED
    digitalWrite(GREEN, HIGH); //Turn on LED
    Serial.print("Humidity: ");
    Serial.print(humidity);
    Serial.println("%\r\n");
    Serial.println("Fan off");
    int once=0;
    while(once < 1)
    {
      fanconstant();
      once++;
    }
    analogWrite(TIP120pin, 0); // Fan off
   }
      delay(1000);
} </code></pre>