Arduino Sump Pump

5.4K291

Intro: Arduino Sump Pump

This Arduino Pump Tutorial shows an example of how to use a float switch, Powertail, and pump to create a sump pump system. When you want to operate larger pumps from an Arduino you need a stronger relay to handle the larger voltage and current. The PowerSwitch Tail is a perfect tool for the job. It incorporates the relay and outlet plugs all into one unit making it easy to turn on and off larger motors, fans, and pumps.

STEP 1: Setup Your Arduino/Geekduino

Our instructable will be using the RobotGeek Geekduino board and the RobotGeek SensorShield. If you've never used an Arduino or the RobotGeek Sensor Shield, these guides will get you up to speed.

RobotGeek Hardware Primer

RobotGeek Sensor Shield Wiring Primer

Geekduino Getting Started Guide

We'll also have some wiring diagrams for a standard Arduino Uno if you're not using a RobotGeek kit.

STEP 2: Project Parts List

This is a list of the parts we used to make this project. An Arduino Uno or Duemilanove will also work for your microprocessor board. We recommend using the Sensor Shield listed here though, because it absolutely simplifies the build process.

STEP 3: Wiring

Wire as shown in the diagram above that matches the parts you've chosen to use.

Device Sensor Shield Port Float Switch Digital Pin 2
One wire to signal / one wire to ground PowerSwitch Tail Digital Pin 4
White = 1 +in / Black = 2 -in RobotGeek LED Board Digital Pin 7

STEP 4: Coding

You can download the code sketch here:
https://github.com/robotgeek/sumpPumpDemo/archive/master.zip

If you take a look at the code, you'll notice that it is incredibly simple, turning the pump and LED on when the float switch is floating, and turning them off when it isn't. We do take advantage of the Arduino's internal pullup resistors using the line pinMode(FLOAT_SWITCH_PIN, INPUT_PULLUP); to invert the HIGH/LOW behavior of the float switch and allow us to use it with no external pullup resistor.

STEP 5: Project Ideas

Now that you've got a working sump pump, what are you going to do next? Could you find a sensor to replace the float switch? How about activating something that makes noise instead of just the LED? What about finding a way to integrate a Raspberry Pi to send twitter alerts when the pump is active? Maybe you could integrate this into a Hydroponic system, keeping your fluid levels steady? There's a lot you can do, so get to it!

Comments

The level sensor is easily done just with wires for electronic sensing with the Arduino, the analog inputs are high impedance, so just use a 1M pullup resistor so it sits at 5V normally, and when the level of the water rises enough to touch the sensor wire, it'll bring it to ground, which gives you the high water trigger indication. I used galvanized wire inside straws to isolate them from contact with the walls of the pit, and the on/off levels can be maintained more precisely than with mechanical floats or timers.