loading

This small project demonstrates how to build a simple GPS-receiver from an Arduino-board (or similar), an OLED-display and a GPS-module with antenna.

Step 1: Collecting the Parts

Step 2: Connecting the Display

Use 4 jumper wires to connect the display to the Arduino board.

This is very straightforward:

5V -> VIN

GND -> GND

SDA -> SDA (I2C-data)

SCL -> SCL (I2C-clock)

Install a small demo sketch on the Arduino, connect the battery and check, if the display does its jobs.

Step 3: Connencting the GPS Module

a) Mount the GPS-bee onto the Xbee breakout-board. The spacing of the 2mm headers of the bee is a little bit too small for regular jumper wires.

b) Plug the remaining 4 jumper wires into the TX, RX, 3.3V and GND sockets of the Arduino, as it is the case here, into 8 and 9.

SoftwareSerial is used to provide more than one serial interface, hence not the regular RX/TX pins are used. Instead in the sketch pin 8 is assigned as RX and pin 9 as TX:

in Code: SoftwareSerial softSerial(8, 9); // RX, TX

Then connect GND and GND, VIN to 3.3V (do not use 5V with the GPS bee), and TX to 8 (RX) and RX to 9 (TX). As always, swapping RX and TX on a serial port is confusing.

That's almost it, the system should work, except that very often satellites' reception indoors is poor.

Step 4: Getting the Signal

Finally the setup is ready to acquire some signals and translate them into coordinates. But before that the bits and pieces have to be wrapped up for some protection. Any water proof enclosure with some transparency for the display would do it. Some soft cushions might be of help.

Once all is set, any cozy place with sunshine, indicating an open sky, is suitable to determine its exact location.

The coordinates and other values are shown on the display:

The first 2 lines show latitude and longitude, every asterisk in the third line stands for a satellite used, only 3 here, the next line gives time and date (in UTC) and the last line indicates the altitude.

All these values are generated in code, and more values, like speed on ground, can be obtained from the GPS signals. The mileage may vary.

Step 5: Software

Library

The software has been completely rewritten. None of the libraries I founds supports the GSV-sentences from, those one, who tells you where all the satellites are.

Hello again<br>Tried with another arduino (no memory issues); tried with Tinysine OLED. Stuck with initial &quot;Adafruit&quot;. Display never clears.<br>And I get good GPS fix.<br>Thanks<br>Pedro
<p>just move the &quot;</p><p>GPS.callBack = updateGPSData;</p><p>&quot; from void setup() to void loop().</p><p>it will no more stuck and run well!</p>
<p>This approach is not advisable. The callback has only set before execution, not always while running 'loop()'.</p>
<p>Hi!</p><p>No mention of 8 and 9 in the code!</p><p>I wrote software serial (8,9); but the sketch is stuck at the opening Adafruit!</p><p>Any help?</p><p>Regards</p><p>Pedro</p>
<p>Pin 8 and 9 for SoftwareSerial are used only on boards with enough memory provided.</p><p>The example code does not show it. There you have to use the pins for serial directly. It is in the comment:</p>/*<br> * Serial is occupied. It cannot be used for debugging here. * If you want to see the data on the screen of your computer, * please use the version without OLED.<p>...</p><p>*/</p><p>It is a memory issue, because The OLED's display memory is in the RAM.</p><p>Please observe the outcome of your IDE. There you got a message about memory consumption of your board, hence whether or not you might want to use SoftwareSerial.</p>
Hi Dial<br>Using your sketch with no changes the opening logo Adafruit gets stuck and nothing happens<br>.<br>Thank you very much for your help<br>Pedro
<p>Sounds like a memory issue. Look at your memory consumption.</p><p>The sketch is very tight, for an original Arduino with 2k.</p><p>Or a hardware issue. The splash screen is left before loop () starts.</p><p>Evaluate this line: It depends on your hardware:</p> display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3D (for the 128x64)
does that use a sim card?
<p>This is a standalone application.</p>
thank you, didn't have time to read all the instructable before. i got it now.<br>nice work.

About This Instructable

3,447views

31favorites

License:

More by dial:Simple Arduino GPS with OLED Sparkcore Xmas tree star RGB with SparkCore and curl 
Add instructable to: