Soldering Sponge Automatic Water Dispenser

Soldering Sponge Automatic Water Dispenser Connected

About

In this post,  I’ll show you my automatic soldering sponge water dispenser. I got tired of the soldering sponge drying out, so I built an automatic water dispenser to “water” it.

The dispenser uses a sensor to measure the resistance of the sponge. If the sponge dries out too much, the resistance goes up, the microcontroller detects it and turns on the pump.

This is another one of those projects I started years ago and finally got around to finishing. I started this thing in early 2017, maybe late 2016, then I restarted it somewhere in 2024, and I’m now finally writing a blog post about it. So yeah… It’s been almost a decade since I started it, but better late than never, I guess.

I remembered I actually made a post about the project on Hackaday, and then never finished it.

Project Files

You can find all the project files, like the firmware, 3D enclosure files and KiCad project files in this GitHub repo here.

Initial Prototype

Build

The sensor is simply a piece of copper-clad PCB split in half with a wire connected to each half. The more moist the sponge is, the lower the resistance of the sensor will be.
Schematic.
PCB in KiCad and the DIY PCB I made myself with the toner transfer method and ferric chloride etching.
Attiny45 MCU firmware. Note: See this tutorial here if you want to know how to program an Attiny.
int relayControllPin = 0;
int moistureDetectionPin = 7;

int dispenseTime = 1000;
int dispenseThreshold = 600;
int timesDispensed = 0;
int maxTimesDispensed = 10;
int minutesPassed = 0;
int moistureLevel = 0;

void setup() 
{
  pinMode(relayControllPin, OUTPUT);
  //pinMode(moistureDetectionPin, INPUT); //Don't use pinMode() for ADC.
}

void loop()
{

  if(minutesPassed > 30 && maxTimesDispensed <= timesDispensed)
  {
    delay(60000);
    return;
  }

  if(maxTimesDispensed <= timesDispensed)
  {
    int newMoistureLevel = analogRead(moistureDetectionPin);
    
    //If the new moisture level is within +/- 50 of the old moisture level assume there is no change in the moisture level.
    if((moistureLevel+50) > newMoistureLevel && (moistureLevel-50) < newMoistureLevel)
      timesDispensed = 0;

      minuteDelay();
      return;
  }
  
  moistureLevel = analogRead(moistureDetectionPin);
  
  if(moistureLevel < dispenseThreshold)
  {
    dispense();
  }
  /*else if(moistureLevel > 900)
  {
    //Sennsor pads probably shorted.
  }*/
  else
  {
    minuteDelay();
  }
}

void minuteDelay(){
  delay(60000); //Delay for a minute.
  minutesPassed++;
}

void dispense(){
    digitalWrite(relayControllPin, HIGH);
    delay(dispenseTime);
    digitalWrite(relayControllPin, LOW);
    
    timesDispensed++;
    
    delay(1000);  
}
All assembled.
This is it all connected up. The power and manual water dispense are connected to the gray control panel on the left. I use that control panel to control the solder paste/flux dispenser,  fume exhaust system and the ventilation controller I wrote about in this post.

Demonstration

Leave a Reply

Your email address will not be published. Required fields are marked *

The following GDPR rules must be read and accepted:
This form collects your name, email and content so that we can keep track of the comments placed on the website. For more info check our privacy policy where you will get more info on where, how and why we store your data.