Gps Arduino Coding
Gps Arduino Coding
× 1
× 1
Speed
Bearing
Track
Trip dist
Distance to destination
What's the signal?
GPS satellites transmit at least 2 low-power radio signals. The signals travel by line of sight,
meaning they will pass through clouds, glass and plastic but will not go through most solid
objects, such as buildings and mountains. However, modern receivers are more sensitive and can
usually track through houses.
A GPS signal contains 3 different types of information:
Pseudorandom code is an I.D. code that identifies which satellite is transmitting information.
You can see which satellites you are getting signals from on your device's satellite page.
Ephemeris data is needed to determine a satellite's position and gives important information
about the health of a satellite, current date and time.
Almanac data tells the GPS receiver where each GPS satellite should be at any time throughout
the day and shows the orbital information for that satellite and every other satellite in the system.
2. Download and install required libraries for GPS to
work in Arduino IDE
(i) SoftwareSerial library
(ii) TinyGPS library
3. NEO-6M GPS module
The NEO-6M GPS module is shown in the figure below. It comes with an external antenna and
does not come with header pins. So you will need to solder it.
Pinout
GND is the Ground Pin and needs to be connected to GND pin on the Arduino.
TxD (Transmitter) pin is used for serial communication.
RxD (Receiver) pin is used for serial communication.
VCC supplies power for the module. You can directly connect it to the 5V pin on the Arduino.
Arduino Uno
Arduino is an open-source electronics platform based on easy-to-use hardware and software.
Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter
message - and turn it into an output - activating a motor, turning on an LED, publishing
something online. You can tell your board what to do by sending a set of instructions to the
microcontroller on the board. To do so you use the Arduino programming language (based on
Wiring), and the Arduino Software (IDE), based on Processing.
Pinout
Pin Description
Arduino Uno is a microcontroller board based on 8-bit ATmega328P microcontroller. Along
with ATmega328P, it consists other components such as crystal oscillator, serial communication,
voltage regulator, etc. to support the microcontroller. Arduino Uno has 14 digital input/output
pins (out of which 6 can be used as PWM outputs), 6 analog input pins, a USB connection, A
Power barrel jack, an ICSP header and a reset button.
The 14 digital input/output pins can be used as input or output pins by using pinMode(),
digitalRead() and digitalWrite() functions in Arduino programming. Each pin operate at 5V and
can provide or receive a maximum of 40mA current, and has an internal pull-up resistor of 20-50
KOhms which are disconnected by default. Out of these 14 pins, some pins have specific
functions as listed below
Serial Pins 0 (Rx) and 1 (Tx) ==> Rx and Tx pins are used to receive and transmit TTL serial
data. They are connected with the corresponding ATmega328P USB to TTL serial chip.
External Interrupt Pins 2 and 3 ==> These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value.
PWM Pins 3, 5, 6, 9 and 11 ==> These pins provide an 8-bit PWM output by using
analogWrite() function.
SPI Pins 10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK) ==> These pins are used for SPI
communication.
In-built LED Pin 13 ==> This pin is connected with an built-in LED, when pin 13 is HIGH –
LED is on and when pin 13 is LOW, its off.
There are 6 analog input pins, each of which provide 10 bits of resolution, i.e. 1024 different
values. They measure from 0 to 5 volts but this limit can be increased by using AREF pin with
analog Reference() function.
Analog pin 4 (SDA) and pin 5 (SCA) also used for TWI communication using Wire library.
AREF ==> Used to provide reference voltage for analog inputs with analogReference() function.
Reset Pin ==>Making this pin LOW, resets the microcontroller.
4. Connection of Arduino UNO and GPS module
Connect the four pins from UBLOX to an Arduino as follows:
GPS module ==> Arduino
GND ==> GND
TX ==> Digital pin (D3)
RX ==> Digital pin (D4)
Vcc ==> 3.3 V
Here, I suggest you to use external power supply to power the GPS module because minimum
power requirement for GPS module to work is 3.3 V and Arduino is not capable of providing
that much voltage.
To provide voltage use prolific USB TTL.
USB driver
One more thing I have found while working with GPS antenna comes with module is its not
receiving signal inside the house so I used this antenna.
https://linxtechnologies.com/wp/product/sh-series-gps-antenna/
For connecting this antenna, you have to use connector:
5. JHD162a LCD