Controlling aquarium air pump

Hello I am trying to control an aquarium air pump with arduino. Actually I am not trying but I want to. It is a basic air pump works with wall electricty. Is there any way to control those kind of devices with an Arduino ? Basically I'd like to adjust the air level, tank temperature etc. from my computer instead of using my hand.

Thanks :)

There are lots of ways to make the Arduino control real world devices.

Computer control could be as simple as a terminal program with an ASCII menu if you like. More complex if you want a Visual Basic interface (You can also use a language that has good serial port support, like Perl, Python, TCL... etc)

Controlling a pump or heater ON/OFF would be done with a Solid State Relay unless you are talking about making an analog adjustment to the pump rate... you are on your own there... maybe a servo?

Tank temperature is pretty easy. You would need to waterproof an LM34 or a 1-wire DS1820. (Less accurate but cheaper could be a thermistor) The analog inputs on the Arduino could read the LM34 or Thermistor voltage to get a reading or just get a computed result with 1-wire and the Dallas/Maxim part.

So yes, it can be done.

I've taken a cheap aquarium air pump apart - inside is a small bellow connected to a rod with a pivot halfway and the other half sits in an electromagnet. It relies on the AC current to operate it back and forth.

I wonder if that much voltage is needed, or if you could get away with a smaller (safer) amount, say 12v. There is a spring to return the bellow, you could always switch this for a less stiff one. You might loose some pressure from the pump but it would mean you could control the flow rate from the arduino which would be useful ( those things are noisey!!)

I might try it when I get home - stick a 12v battery over the electromagnet breifly - see if it is able to move the bellow...

If you can find a pump where in you can adjust the air pressure by a screw then, you can use a servo motor and make it spin the screw for you

If you're in the U.S., you can get solid-state relays cheap here:

You can use mechanical relays, too, but the SSRs are easier to interface to an Arduino, and it's easier to wire them so you're less likely to electrocute yourself :)

One thing to learn about for doing temperature control is "hysteresis" (especially if you decide to use mechanical relays). When the temperature is right around the target, a little bit of noise in your temperature readout can send the controller into a frenzy of turning off and on. If your goal is, say, 70 degrees, you don't turn the heater on until you've confirmed that the reading stays at 69 or below for several seconds, and don't turn it off until you get to 71 degrees. That keeps the temperature in the right range without nearly so much on/off cycling.


You might also look into X10 (appliance switches). There is an Arduino interface to these. The Arduino can wirelessly control these, there UL approved and you just plug your pump into one and the heater into another. Rough cost is ~$20 for the transmitter and receiver and about $7 for each 115VAC device you want to control. You can then add more to turn on lights etc. (Signals are sent through the house wiring.)