Sunday, January 3, 2010

The Pool Pump Timer Dilemma (Broken Pool Pump)

Oh no, our pool pump timer has died and our pool is going green!

Here is the entire unit in all it's glory:

The timer module no longer turns off once it switches on. There are two options, replace the timer module, or replace the entire chlorinator unit.

This is the culprit:

Inside the unit:

Being the stubborn bastard that I am, I elected to build my own new timer unit. One of the major issues faced with the timer circuit to be developed is that it is connected to an off-peak circuit.

To control all of the functions I chose to use a PIC18F4550 microcontroller. To overcome the issues with the unreliable power supply I decided to use the DS1307 I²C Real-Time Clock. This handy little integrated circuit has a battery backup that consumes less than 500nA in battery-backup mode. This allows the circuit to retain time for years on one lithium button cell.

Putting all of this together we get something like this:

The circuit itself is based off a simple USB interface design and is etched using a simple toner transfer method and a hydrogen peroxide/hydrochloric acid etchant. I prefer to use Canon Glossy Photo Paper "Everyday Use" (GP-501), it's cheap and it works exceptionally well. The LCD is connected by a 4bit interface. The DS1307 is connected via the I²C interface (remember to put pull up resistors) and it is all powered by an LM7805. To control the LCD light and the relay we use a general purpose PNP transistor and resistor connected to one of the microcontroller outputs (be sure to place a diode on the relay controlling transistor so it will not keep blowing). If you need any specifics on the circuit, let me know.

The circuit itself has been mounted onto a perspex sheet to help with waterproofing of the circuit. The use of IP67 dome buttons also helps with keeping dust and water out. The circuit itself will need to drive a 30A relay.

The completed mounting:

The new timer allows for the user to change the current hour of the day, as well as set when the timer is to come on and off. To save these settings the configuration is written to the flash of the microcontroller.

All of the components mounted inside the chlorinator unit:

The unit all mounted and working:

Update: I have added a video of the unit working (watch with annotations):

Here is the mikroElektronika MikroC code:

Click Here

No comments:

Post a Comment