GPS Fence - Project Overview

GPS Fence Module:


A GPS fence uses a GPS module and software to track and limit the movements of the rover/mower/vehicle within a defined area.  The GPS fence is defined by inputting the GPS coordinates (using google maps or another map APP).  A line is projected around these coordinates so that if the mower crosses the line, a signal is sent so that action can be taken. (e.g. turn around and go back into the fenced zone)

This system provides a very flexible way to monitor the position of robots and therefore control and limit its movements.  The fence can be setup for almost any terrain.  The GPS fence has many applications for robots which can move within large areas where traditional cable based perimeter systems are impractical.


Smartphone APP Screenshots:

Via a smartphone app, the GPS fence and mower movements can be tracked:



The screenshots above show a simulated (hence - no sats) mower travelling on one of my favourite golf courses in Alabama.  The chosen GPS Fence on the fairway perimeter is shown and the mower is labelled (sorry but The App only allows black markers with one type of symbol).
The GPS coordinates from the Mower (Y Latitude) and (X Longitude) are compared via equations to the IN (1) and OUT (0) of the GPS Fence.  As the mower crosses the fence the signal of OUT(0) is given.


GPS Fence Input:

The GPS fence can be inputted simply in the Arduino code:

GPS fence points are inputted clockwise.  The boundary condition variable will be explained later.  The Arduino code then calculates the coordinates which are inside the fence and coordinates which are outside the fence.  In theory any number of GPS fence coordinated can be used.


In the following video the GPS fence coordinates of the golf course have been expanded to 86 (87 Fence lines), which gives a very accurate fence around the fairway.

The software tracks the position of the vehicle/mower and compares it to the GPS fence coordinates.  If the vehicle crosses the fence an OUT(0) signal is given which turns the vehicle/mower around.  The Arduino software allows you to simulate the vehicle in the fence to test that all is correct before using it live. 

The following video shows the simulation mode testing the fence. The screen is from the Smartphone Blynk app.  If the mower has a WIFI connection it can send data to the APP which can be monitored from anywhere in the world:



The accuracy of this system depends on the Latitude and Longitude coordinates the GPS module provides.  The more accurate the location of the module is given the better the system will work.

Typical low cost GPS modules give an accuracy of 3-4m.  If this is acceptable for your project then these module can be a very affordable option.

More expensive RTK GPS systems can give an accuracy of a few cm.

Both types of modules will be tested and instructions given how to implement the modules in the project