GPS Fence - Standard GPS
Standard GPS Module Circuit Diagram:
If a few meters of accuracy is acceptable for your project then a standard (NEO6M/7M) GPS module can be used. this is combined with a ESP8266 board to give the output of the system to a smartphone. Connections are made as follows.
A 5V supply can be used to the NODEMCU board to power the project.
GPS Fence Case - Standard NEO6M/7M GPS Modules
I have designed a GPS case for the NODEMCU and NEO6M module. STL's files for this case are available on my GITHUB site here
The GPS module will output different sets of data to the TX port. The type of data that is outputted can be setup in the UBLOX U-Center software using a PC or Laptop computer. To access the UBLOX module on the GPS board, a board with a USB port is required.
U-Blox U Center Software
For the Arduino code to read the TX messages from the GPS board we need to make sure they are speaking the same language. The Arduino code looks for $GPGGA and $GPRMC messages from the board. If these messages are not enabled then the Arduino code wont be able to process the data.
To enable these messages follow these steps:
1. Connect the GPS module via USB to the computer.
2. In the U-Center connect to the GPS module selecting the right port
3. Goto Menu item View then Messages View.
4. Using the scroll menu on the left goto: + UBX -> CFG -> NMEA and you will see the following setup menu.
5. Ensure that 1 - GP is set as the main talker.
6. Make sure to Send the updated commands to the module with the send button in the bottom left hand corner.
This should enable the GPGGA and GPRMC output of the UBlox chip on the GPS module.
To check that the messages have been enabled goto the View menu and Text Console. There you should find lines starting with a time and then $GPGGA
Building the APP
For the APP we are going to use the Blynk APP. The app is very simple and requires just a few drag and drop placements and settings to setup. If you are new to the Blynk App see this tutorial on setting up the NODEMCU and Blynk App.
If you don't already have the Blynk APP on your smartphone from the Mower project download this now.
Create a new APP and make note of the Blynk Authoriation Key. This will be needed later in the Arduino Sketch. Fill the APP with the following elements and change the setting of each element as described below. If you don't have enough credits to build the elements then you will need to purchase these in the Blynk App. (not expensive just a few euros).
|Element||Pin Type||Pin Number||Title|
|Value Display||Virtual||2||Mower Satellites|
|Value Display||Virtual||3||Mower Lattitude|
|Value Display||Virtual||4||Mower In(1) Out(0)|
|Value Display||Virtual||5||Mower Longitude|
The APP consists of just 5 elements. 1 GPS Map and 4 Value displays. The position and size of the elements can be changed by long pressing the element and then dragging the element around the screen.