Pool Main

The "C" program.


  • Up to 6 relays. (Set by a constant so trivial to increase)
  • Relay channel can force another relay channel to activate. Useful as most booster pumps require the filter pump to be on before booster is activated.
  • Up to 4 temperature probes. (Set by constant so trival to increase, Hardware limits to 7 analog channels though.)
  • Temperature probes can be either 10K or 50K thermistors. 10K thermistors are pretty standard for pool probes and I had a bunch of 50K Vishay thermistors for extra temperature probes. But if you have other thermistors, just add an entry with the thermistors constants into the table.
  • Any relay can be activated if a freeze condition is detected.

    Controller setup

    The program runs all the time as a daemon, and is started in the rc.local on the beaglebone. I also discovered an even cheaper version of the beaglebone called a beaglebone green(BBG), which drops the HDMI output. I opted to go with this even more barebones version since I did not need HDMI. From bone scratch, I did the following to the BBG.

  • Setup my wireless network using wicd-curses. Initial login is via hard wired ethernet port.
  • Add the line CAPE="cape-bone-iio" to capemgr.sh in /etc/init.d. This sets up analog.
  • In rc.local change #!/bin/sh -e to #!/bin/sh +e to ignore errors
  • In rc.local add echo 41 > /sys/class/gpio/export to make a gpio pin available. In my case, I made a total of 6 pins available.
  • In rc.local add echo none > /sys/class/leds/beaglebone\:green\:usr1/trigger to make led usr1 available for program use. In my case I setup led1 and led2 for program use.
  • In /etc fix localtime with a symlink to /usr/share/zoneinfo/??? wherever you are located.
  • Turn off any services you are not going to need. In my case I disabled apache, cloud9, avahi, bluetooth, xrdp and jekyll-autorun. I also uninstalled some stuff that is not used to free up some space. Probably unnecessary as the controller does not write anything to disk.

    I also tweaked up the cron.* directories to eliminate any unnecessary stuff and added a script to update a file called /etc/timestamp with the date once per day. I also tweaked up the way the BBG sets up the time to query a machine on my network for the current date/time. The setting is located in the file /etc/default/ntpdate. Because the BBG does not have a real time clock, setting up the way it handles the date is a little more important. Note the C program waits a bit as it is started before the BBG has established the correct time, as rc.local is fired before the BBG has joined the network.

  • ©2016 Stabie-Soft, Inc. All Rights Reserved.