# Cicuit to keep power supplied (12V DC) for a few seconds after power is cut?

Ok I'm just starting to learn electronics and here is what I got. I have a water pump that drains until water has lowered to a certain level (I don't want the pump running dry, the pump sits in the water). I am using a relay and a float switch to shut the pump off when the water drains to a certain level. The 110v AC pump is connected normally open (I believe) so the switch cuts the 12v DC coil power when level is reached, thereby cutting the pump. The problem is that when the water reaches that level the float switch is rapidly moving open and closed during every ripple in the water, so the pump is constantly on, off, on, off for about a half hr to hr until it pumps enough water out with every tiny squirt of water during the short on phase until the ripples don't raise the switch high enough.

My solution was to put a 2000uF capacitor in parallel with the coil on the relay. This keeps power applied for about a second after the switch is opened. It seemed to be working at first, but eventually the float switch would get stuck closed, therefore the pump would stay on indefinitely. Also, the switch stays stuck closed when I disconnect it from the circuit. I verified this with a multimeter. I could flick the switch with my finger and it would unstick. I don't know exactly how the switch is made, possibly a reed switch cause the floater must have a magnet to work I guess. The switch is supposed to handle up to 100V so I am assuming its a current problem maybe?

Max Switch Voltage : 100V DC;Max Switch Current : 0.5A;Max Breakdown Voltage : 220V DC;Max Carry Current : 1.0A

Here are my questions:

1) Why is the switch getting stuck closed? Do I need to use a resistor or something?

2) What am I doing wrong or could do better? Is there a better solution?

Here is the float switch I am using http://www.amazon.com/gp/product/B005NFWWLW/ref=oh_details_o05_s00_i00?ie=UTF8&psc=1

The switch is getting stuck because of the surges of current that the capacitor draws. Each time the switch closes, the capacitor looks like a short circuit until it charges up. Without the capacitor, the current was limited by the coil in the relay; with it, it is limited only by the ESR of the capacitor.

One possible way to mitigate this in the short term would be to add a resistor in series with the switch. Select a value that doesn't cause more than, say, 0.5V drop with the coil alone. This will provide an upper limit on the surge that the capacitor can draw.

A better long-term solution would be to eliminate the capacitor altogether and instead use a different kind of float switch that has a hysteresis effect. With this kind of switch, the pump turns on at one (higher) water level, but turns off at a different (lower) level. This is how most sump pumps work.

This effect can be simulated by using two float switches of the type you have, plus an auxiliary relay.

• Hey Dave I appreciate the reply, thanks! I actually should of known that about the capacitor. I feel stupid now. I'll also look into getting a different switch like you said. I'm basically using this as a small sump pump anyway. – user29439 Sep 22 '13 at 0:28

It sounds to me that you either have a switch without enough vertical distance between the on/off positions, or you are missing a check valve in your outlet. Without a check valve, your pump will push out a bunch of water, then most of it will drain back, and the pump will switch on again.

• Hey you know what... that is exactly what is happening. The water left in the hose is draining back. Thanks for the help! I'll get a check valve and probably a different switch that Dave was talking about above. – user29439 Sep 22 '13 at 0:23