The following circuit is a controller for a water pump. It turns the pump on when the reservoir water level drops below the 'L' probe and turns it off when the level reaches the 'H' probe. This circuit works well except a small problem. We have frequent power outages in my area. Every time the power is restored, the water pump starts. Most of the times water level is between the 'L' and the 'H' probes. Theoretically the pump should remain off if the power is restored during the middle levels. Any thoughts what is causing this behavior? How can it be corrected?

enter image description here


I simulated this circuit in multisim using the following schematic. enter image description here

The left two switches simulate the test probes. Down positions of S1 and S2 simulate the lower and upper probe immersed in water, respectively. The oscilloscope output is obtained by switching on-off the power using X-switch. The 555 gets ON after each power restoration. Have implemented the time delay circuit for reset pin IC1-4 as advised by @EM Fields.

  • \$\begingroup\$ The first thing to do when seeing a 555 timer circuit in industrial use is to run away. Well, maybe the second thing. You can wait until you stop laughing. \$\endgroup\$ May 29, 2016 at 13:27
  • \$\begingroup\$ Isn't the 555 more rugged and time tested device? Embedded design has complications of its own. \$\endgroup\$
    – Abu Bakar
    May 29, 2016 at 13:31
  • \$\begingroup\$ Olin denigrates the 555 - the most widely used and best-selling chip in history - yet doesn't support his derision with facts justifying it. \$\endgroup\$
    – EM Fields
    May 29, 2016 at 13:37

2 Answers 2

  1. Disconnect IC1-4 from +12V
  2. connect one end of a 100k ohm resistor to +12V and the other end to a 100nF capacitor.
  3. Connect the free end of the 100nF cap to GND.
  4. Connect IC1-4 to the junction of the resistor and the capacitor.

Like this:

enter image description here

  • \$\begingroup\$ The circuit is on a PCB. I tried, some time ago, this type of delay-off circuit using the reset pin without much help. I think the problem with this approach was the capacitor not fully discharged before the start of next power cycle. \$\endgroup\$
    – Abu Bakar
    May 29, 2016 at 12:42
  • 1
    \$\begingroup\$ @Galaxy: If it's just for a single application, then cuts and jumpers and hot glue or epoxy is usually the way to go. If the cap is staying charged for too long a time after a power failure, then increasing C2's charge time and decreasing its discharge time by paralleling C2 with a bleeder should cure the problem. Another thing is that if you're using a bipolar 555 there should be a 100nF cap soldered directly across pins 1 and 8 \$\endgroup\$
    – EM Fields
    May 29, 2016 at 13:56
  • \$\begingroup\$ I checked there is a 1uF capacitor already soldered very close to the power pins. Should I add a 0.01uF/.1uF in parallel? \$\endgroup\$
    – Abu Bakar
    May 30, 2016 at 8:58
  • \$\begingroup\$ What kind of capacitor is it? \$\endgroup\$
    – EM Fields
    May 30, 2016 at 9:08
  • \$\begingroup\$ It is a throughhole ceramic capacitor. \$\endgroup\$
    – Abu Bakar
    May 30, 2016 at 9:26

Instead of being used as a timer, in this application the 555 (IC1) is being used as a window comparator, of sorts, and when the voltage on pin 2 falls to less than Vcc/3, IC1-3 will go high and stay high until the voltage on IC1-2 rises above 4 volts and the voltage detected by IC1-6 rises above 2Vcc/3.

In your application, the input required to cause IC1-3 to go high comes from the voltage divider comprising your R2, R4, and the resistance exhibited by the water in the tank.

If we call the water resistance Rw, then the voltage divider will look like this:

enter image description here

and the voltage at E2 will be:

$$ E2 = \frac{E1R2}{Rw+R1+R2}$$

If we wish to rearrange in order to solve for Rw, we can write:

$$Rw =\frac {R2(E1-E2)}{E2}-R1$$ $$ = \frac{1M\Omega \times 8V}{4V}-10k\Omega$$ $$ = 1.99M\Omega $$

Now, since IC1-2 is connected to ground through 1 megohm, when the water level in the tank falls to the point where contact between the low probe and the water is broken, IC1-2 will be pulled to zero volts through 1 megohm, IC1-3 will go high, and the pump will start.

When the water level then rises to the point where contact is made with the low probe, your voltage divider Rw, R2, R4 will be connected to Vcc and, if the water resistance is less than 1.99 megohms, the voltage on IC1-2 will rise to greater than 4 volts. IC1-3 will remain high, however, and the pump will keep working until the tank fills and the water contacts the high probe.

When that happens, the output of your voltage divider Rw, R1, R3 will cause the voltage on IC1-6 to rise to greater than 8 volts and, since the voltage on IC1-2 is greater than 4 volts, IC1-3 will go low, the pump will stop, and once the tank's water level drops to the point where contact with the low probe is broken, the fill cycle will begin anew. Note that Rw will not be the same for both the low and high probes

As far as your pump problem is concerned, if it's not the lack of a hard reset on power-up after power fail, the only other thing I can think of is that it may be something (some unaccounted-for capacitance, perhaps) in the tank-probe configuration or connection which is causing IC1-2 to stay low during power-up after power fail when the water level is between probes.

In any case, as long as the pump doesn't start up when the tank is full and cause an overflow, it seems like a convenience instead of a problem. :)

  • \$\begingroup\$ No problem with normal operation. The frequent power outages mean frequent glitches of mains power. Also the noise of the pump gets annoying. \$\endgroup\$
    – Abu Bakar
    May 30, 2016 at 8:37
  • \$\begingroup\$ What can you tell us about the tank and the probes, physically and electrically, please? \$\endgroup\$
    – EM Fields
    May 30, 2016 at 8:46
  • \$\begingroup\$ @Galaxy: I seem to have lost your comment about the cable but: I'm confused. Your drawing shows 1 wire carrying 12V into the tank, 1 ground, 1 wire for the low sensor and 1 wire for the high sensor. 1. If you're using the two twisted pairs to get those four wires, what goes where? 2. How long is the cable? 3. Is it running in conduit ? 4. What's running along with it that's electrical? 5. How are the Vcc and sensor wires configured in the tank? That is, has any insulation been stripped from the ends? \$\endgroup\$
    – EM Fields
    May 30, 2016 at 9:44
  • \$\begingroup\$ @Galaxy: At this point, I'd be willing to bet that there's enough junk on the low probe during power-up that it pulls IC1-2 low for long enough to drive IC1-3 high and start the pump. Try soldering a 10uF cap from IC1-2 to GND and see if that doesn't fix the problem. Also, it wouldn't hurt to clean up Vcc by putting 1000uF electrolytic from Vcc to GND on the board. \$\endgroup\$
    – EM Fields
    May 30, 2016 at 10:26
  • \$\begingroup\$ I used two pairs, using one wire of each pair for the +12V line. Approximate cable length is around 10-15 meters and it is not in conduit. I confess it is unprofessional, the cable was buried without conduits. I have updated my question with a sample simulation and it replicates the problem. \$\endgroup\$
    – Abu Bakar
    May 30, 2016 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.