Make GPS BORDER BOUNDARIES Using Arduino

by RonFrtek in Circuits > Arduino

2454 Views, 6 Favorites, 0 Comments

Make GPS BORDER BOUNDARIES Using Arduino

2020-12-31_12-28-50.jpg

In this tutorial we will learn how to make a GPS BORDER BOUNDARIES using Arduino, this is useful when you have a robot and you dont want it to go outside the specified area.

When the robot is outside the area, the display will show "Outside" and "Inside" when the robot is inside the area.

Watch the video!

What You Will Need

a460cd0e-00a8-40bd-8497-365cfa944a6a.87dd596e68a931acffa4cd8bc042c33b.jpeg
610eZbQEe7L._AC_SL1001_.jpg
VisuinoAdvrtisementVersion8.jpg
FNLOD2CKEY93G5N.jpg
FMT2X9VKEY93G5P.jpg

  • Arduino UNO (or any other Arduino)
  • GPS Neo 6m
  • OLED Display
  • Jumper wires
  • Visuino software: Download Visuino

The Circuit

2020-12-21_17-22-57.jpg

  • Connect Arduino 5V to GPS module VCC
  • Connect Arduino GND to GPS module GND
  • Connect GPS module RX to Arduino TX
  • Connect GPS module TX to Arduino RX
  • Connect Arduino 5V to OLED pin VCC
  • Connect Arduino GND to OLED pin GND
  • Connect Arduino SCL to OLED pin SCL
  • Connect Arduino SDA to OLED pin SDA

Start Visuino, and Select the Arduino UNO Board Type

FMW5CHBKFV47BP9.jpg
F311FBVK5AHN5HJ.LARGE.jpg

The Visuino: https://www.visuino.eu also needs to be installed. Download Free version or register for a Free Trial.

Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2

In Visuino Add Components

2020-12-31_12-51-11.jpg
2020-12-31_12-51-47.jpg
2020-12-31_12-52-07.jpg
2020-12-31_12-53-17.jpg
2020-12-31_12-53-42.jpg
2020-12-31_12-54-00.jpg
2020-12-31_12-54-30.jpg
2020-12-31_12-52-54.jpg
2020-12-31_12-54-47.jpg
2020-12-31_12-50-51.jpg

  • Add "Serial GPS" component
  • Add "Analog Multi Source" component
  • Add another "Analog Multi Source" component
  • Add "Digital Multi-Source Merger" component
  • Add "Detect Edge" component
  • Add another "Detect Edge" component
  • Add "Digital (Boolean) And" component
  • Add "Text Value" component
  • Add another "Text Value" component
  • Add "Analog To Text" component
  • Add another "Analog To Text" component
  • Add "Text Multi-Source Merger" component

In Visuino Set Components

2020-12-31_12-58-29.jpg
2020-12-31_12-58-42.jpg
2020-12-31_12-58-01.jpg
2020-12-31_12-58-15.jpg
2020-12-31_12-59-48.jpg
2020-12-31_12-59-32.jpg
2020-12-31_12-59-18.jpg
2020-12-31_12-59-04.jpg
2020-12-31_12-56-01.jpg

  • Select "AnalogToText1" and "AnalogToText2" and in the properties window set "Precision" to 6
  • Select "DetectEdge1" and in the properties window set Rising to False

  • Select "TextValue1" and in the properties window set "Value" to INSIDE
  • Select "TextValue2" and in the properties window set "Value" to OUTSIDE
  • Double click on the DisplayOLED1 and in the elements window drag "text field" to the left side
  • In the properties window set size to 2
  • In the Elements window Drag another "Text Field" to the left side
  • In the properties window set Y to 30 and size to 2
  • In the Elements window Drag another "Text Field" to the left side
  • In the properties window set Y to 50 and size to 2
  • Close the Elements window

Get GPS Coordinates

2020-12-31_13-13-10.jpg
2020-12-31_13-16-50.jpg
2020-12-31_13-13-52.jpg
2020-12-31_12-56-43.jpg
2020-12-31_12-57-33.jpg

Go to Google maps and find your location and

  • Click on the map (upper left corner of your Area ), the coordinates will be shown at the bottom.
    Copy first coordinate Latitude to the Visuino "CompareRange1" > Range > Max
    Copy second coordinate Longitude to the Visuino "CompareRange2" > Range > MIn

  • Click on the map (upper right corner of your Area ), the coordinates will be shown at the bottom.
    Copy second coordinate Longitude to the Visuino "CompareRange2" > Range > Max
  • Click on the map (down left corner of your Area ), the coordinates will be shown at the bottom.
    Copy first coordinate Latitude to the Visuino "CompareRange1" > Range > Min

In Visuino Connect Components

2020-12-31_12-55-11.jpg
GPS.png
2020-12-31_12-55-29.jpg

  • Connect GPS pin Out to Arduino Serial[0] pin In
  • Connect GPS pin latitude to AnalogMultiSource1 pin In
  • Connect GPS pin longitude to AnalogMultiSource2 pin In
  • Connect AnalogMultiSource1 pin Out to AnalogToText1 pin In
  • Connect AnalogMultiSource2 pin Out to AnalogToText2 pin In
  • Connect AnalogMultiSource1 pin Out to CompareRange1 pin In
  • Connect AnalogMultiSource2 pin Out to CompareRange2 pin In
  • Connect CompareRange1 pin Out to "And1", pin 0 In
  • Connect CompareRange2 pin Out to "And1", pin 1 In
  • Connect CompareRange1 pin Out to DigitalMultiMerger1, pin 0 In
  • Connect CompareRange2 pin Out to DigitalMultiMerger1, pin 1 In
  • Connect DigitalMultiMerger1, pin Out to DetectEdge1 pin In
  • Connect DetectEdge1 pin Out to TextValue2 pin clock
  • Connect "And1" pin out to DetectEdge2 pin In
  • Connect DetectEdge2 pin out to TextValue1 pin clock
  • Connect "TextValue"1, pin out, to TextMultiMerger1 pin [0] in
  • Connect "TextValue"2, pin out, to TextMultiMerger1 pin [1] in
  • Connect TextMultiMerger1 pin Out to DisplayOLED1 text field1 pin In
  • Connect AnalogToText1 pin Out to DisplayOLED1 text field2 pin In
  • Connect AnalogToText2 pin Out to DisplayOLED1 text field3 pin In
  • Connect DisplayOLED1 pin I2C Out to Arduino pin I2C In

Before Uploading to Arduino

FJHAK4DKFFEDJQO.jpg
FD4UTC6KFFEDJQP.jpg

  • Before you upload to Arduino disconnect the RX pin on the Arduino
  • After the upload connect the wire back to Arduino pin RX

Generate, Compile, and Upload the Arduino Code

2020-10-30_13-20-50.jpg

Important!

When uploading to Arduino disconnect the pin RX on the Arduino and after the uploading is done reconnect it back.

In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

Play

If you power the Arduino module, after a while (when NEO 6m calibrates), the display will start to show GPS coordinates and text: INSIDE/OUTSIDE.

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable, you can download it and open it in Visuino: https://www.visuino.eu