Sztimo
Posts: 2
Joined: Fri Jun 06, 2014 2:08 pm

Pool automation

Fri Jun 06, 2014 7:02 pm

Need Help and Ideas,

I have a pool pump that is permanently running on low speed and I have to manually turn it to high-speed a few hours of the day. I already have the schematic for the circuit. What I need is a program written in python that can start a gpio pin at a certain time.

say to turn on the pump via relay

0700 am turn on GPIO11 till 0800pm.
0700 am turn on GPIO 13 to highspeed till 0800am
0800pm turn on GPIO 15 and turn off at 2300pm (pool-light)

I can write a small program to run it manually but would like to have it automated For the pool light i could also use a light-sensor with a timer.

Tks Timo

ps. here is a link how i want to wire it. any input welcom

https://www.circuitlab.com/circuit/7a63 ... ntrol-1_1/
Attachments
raspberry-pi-pool-control-1_1.png
raspberry-pi-pool-control-1_1.png (39.36 KiB) Viewed 3000 times
Last edited by Sztimo on Sat Jun 07, 2014 8:23 pm, edited 2 times in total.

elatllat
Posts: 1337
Joined: Sat Dec 17, 2011 5:05 pm

Re: Pool automation

Sat Jun 07, 2014 5:19 am

man cron
SBC with 32GB RAM: https://hardkernel.com

FAQ : https://raspberrypi.stackexchange.com

Unanswered: https://www.raspberrypi.org/forums/search.php?search_id=unanswered

Kewngen
Posts: 15
Joined: Thu Jan 30, 2014 10:03 am

Re: Pool automation

Sat Jun 07, 2014 6:27 am

Just use:

Code: Select all

crontab -e
If you need root privilages use (in your script):

Code: Select all

sudo crontab -e
And then add for example:

Code: Select all

#*/5 * * * * /usr/bin/python /home/pi/test.py
To run a script every 5 minutes.

Check this page for the values:
http://en.wikipedia.org/wiki/Cron

If you need irregular values, just add multiple lines.
One alternative is to do a cron that triggers the script every minute (or even every x number of seconds) and then program the schedule into the script and just ignore to run unless the time is right.

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Pool automation

Sat Jun 07, 2014 3:06 pm

Sztimo wrote:Need Help and Ideas,

I have a pool pump that is permanently running on low speed and I have to manually turn it to high-speed a few hours of the day.
Why? I have a similar setup on my pool and the only time I have to turn it to high speed is when I vacuum the pool.
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

Sztimo
Posts: 2
Joined: Fri Jun 06, 2014 2:08 pm

Re: Pool automation

Sat Jun 07, 2014 8:14 pm

Hi Richard,

i have a very powerful pump that turns the pool 3 times a day you need to cycle a pool only ones per day. also on highspeed my jets turn on at the lounge area. i also have a vacuum line pump. i could tell the vacuum to come on for one hour or so before i go in it.


but thats not the point here. i want to control my pool, pool lights and garden lights via network.
Richard-TX wrote:
Sztimo wrote:Need Help and Ideas,

I have a pool pump that is permanently running on low speed and I have to manually turn it to high-speed a few hours of the day.
Why? I have a similar setup on my pool and the only time I have to turn it to high speed is when I vacuum the pool.

jsobota
Posts: 42
Joined: Tue Jul 10, 2012 3:24 pm
Location: Plzen, Czech Republic

Re: Pool automation

Tue Jun 24, 2014 8:04 am

You might be interested in the following tutorial on pool automation:
http://www.rexcontrols.com/articles/ras ... on-project

BMS Doug
Posts: 4040
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Pool automation

Tue Jun 24, 2014 8:56 am

Sztimo wrote:Need Help and Ideas,

I have a pool pump that is permanently running on low speed and I have to manually turn it to high-speed a few hours of the day. I already have the schematic for the circuit. What I need is a program written in python that can start a gpio pin at a certain time.

say to turn on the pump via relay

0700 am turn on GPIO11 till 0800pm.
0700 am turn on GPIO 13 to highspeed till 0800am
0800pm turn on GPIO 15 and turn off at 2300pm (pool-light)

I can write a small program to run it manually but would like to have it automated For the pool light i could also use a light-sensor with a timer.

Tks Timo

ps. here is a link how i want to wire it. any input welcom

https://www.circuitlab.com/circuit/7a63 ... ntrol-1_1/
Some thoughts:

currently your failed state (if Pi loses power or loses program) is pump off, move the wire from the normally open contact to the normally closed contact on relay 4 to have a default condition of pump running and Pi will be able to switch it off (you still have the same control, but now if the pi packs up your pool will still have minimal circulation).

People often like a facility to override the default conditions, so adding a facility to allow this might be a good idea, whether that be a set of manual override switches or an interface to the Pi that allows you to change the program is up to you.
Doug.
Building Management Systems Engineer.

Return to “Automation, sensing and robotics”