Goals of this project
To create a simple, effective, inexpensive way to turn the electric fence on or off from a remote location. We will do this using cell phone text messages. This project was inspired by and heavily based on the FIDO FarmHack project.
Update (Jan 2016):
The software for this has been posted to GitHub: https://github.com/claytonrcarter/Rover
Bill of Materials:
How to Build
We use the Protoshield and stacking headers offered by AdaFruit to build the circuitry of the Rover. This allows the "guts" of the project to plug into the "brains" of the Arduino, thereby not altering (and risking ruining) the most expensive part of the project, and allows the Arduino to be easily reused for another project should that need arise.
This unit functions very simply: when power is supplied to the Rover for the first time (eg, not plugged in and battery backup turned off), it will activate the fence and send you a text saying the power has been restored. After this, it will respond to texts to turn the fence on and/or off, and it will monitor the power supply to see if the mains power is active. If it detects that mains power is down, it will send you a text alerting you that the fence is off and power is down, and vice versa when power returns. Two things to note: 1. Rover doesn't actually know if the fence is functioning or not; it controls a unit that it assumes is plugged into an electric fence charger. If the charger has been fried by something or come unplugged from the Rover or the fence wire has fallen out of the charger, Rover will still happily report the fence status as on. 2. Mains power is monitored by asking the cell phone if it's in a charging state. If mains power is on, the cell phone will always reply "yes"; if off it will reply "no". This is another assumption we make, so if this feature is important to you, make sure the that Rover power, fence power supply controller and cell phone are all plugged into the same circuit. (A surge protector/power strip is handy for this.) This "mains power monitoring" feature depends on the cell phone battery and 9v Arduino backup battery (that we build below) be able to holdup for the duration of the power outage, or at the very least for long enough for the "power failure" text to be sent.
Download the Arduino Software. The full tutorial is available on the Arduino site.
Download the libraries and unzip them. There should be three individual folders, each containing at least two files, one with a .h suffix and one with a .cpp suffix. Open your Arduino sketchbook folder. If there is already a folder there called libraries, place the library folders in there. If not, create a folder called libraries in the sketchbook folder, and drop the library folders in there. Then re-start the Arduino programming environment, and you should see your new library in the Sketch > Import Library menu. Additionally, under File > Examples, you should now see our libraries along with their example sketches.
Activate SIM card and load with text messages
AT&T, GSM, cheap cheap cheap.
Make the wire to connect your cell phone to your Arduino
Connect the cell phone and thermistor to shield
Build your back-up battery. Connect the battery pack to the Arduino?
Upload the Rover sketch from File > Examples > Rover to the shield and start fixing Fence.
How to Use
- Text the cell # to establish "ownership"
- Text "ON" to turn the fence on or "OFF" to turn it off.
- Text "STATUS" to to told if the fence is on or off.
Because of the battery backup, the unit will be able to text you if the power fails and will text you again with the power comes back on.
In a future version we hope to add the ability for others to be added to the notification list temporarily. This would be nice when you have friends or employees working on the fence with/for you but the might not care to get the updates about the fence at all hours.