GeoSense Pro : Smart GPS and Environmental Monitoring

by Akshaj Maheshwari in Circuits > Microcontrollers

1546 Views, 4 Favorites, 0 Comments

GeoSense Pro : Smart GPS and Environmental Monitoring

IMG_20241031_002950.jpg

In this instructable article, you will learn how to build your own portable, real-time GPS and environmental monitoring device designed to provide users with critical location and weather data in a compact form factor. It combines the capabilities of GPS tracking and environmental sensing, allowing users to monitor latitude, longitude, temperature, and speed directly on a small OLED screen.

All the required materials are cheap and this project should not cost you more that $15.

The device is powered by an ESP8266 microcontroller and integrates:

  1. A NEO-6M GPS module to track real-time location data.
  2. A BMP180 sensor to measure temperature and pressure.
  3. A 0.96" OLED display for easy reading of GPS coordinates and environmental conditions.

Supplies

ESP8266.jpg
BMP180.jpg
NEO 6M GPS MODULE.jpeg
OLED.jpg
arduino_logo.png

HARDWARE REQUIRED

  1. ESP8266 (NodeMCU) OR you can use ESP32
  2. NEO-6M GPS Module
  3. BMP180 Sensor (or BME280 for enhanced functionality)
  4. 0.96" OLED Display (I2C)
  5. Jumper wires
  6. Breadboard (optional for prototyping)
  7. Battery (3.7V LiPo or similar)
  8. 3.3V voltage regulator (optional, depending on power setup)
  9. small neodymium magnets (optional for enclosure)

SOFTWARE REQUIRED

  1. Arduino IDE

Schematic

Components:

  1. ESP8266 (NodeMCU) – Main microcontroller
  2. BMP180 – Sensor for measuring temperature, pressure, and altitude
  3. NEO-6M GPS module – For real-time GPS tracking
  4. 0.96" OLED display – For displaying GPS and sensor data

Connections:

1. ESP8266 to OLED (I2C communication):

  1. OLED VCC → ESP8266 3.3V
  2. OLED GND → ESP8266 GND
  3. OLED SCL → ESP8266 D1 (GPIO5)
  4. OLED SDA → ESP8266 D2 (GPIO4)

2. ESP8266 to BMP180 (I2C communication):

  1. BMP180 VCC → ESP8266 3.3V
  2. BMP180 GND → ESP8266 GND
  3. BMP180 SCL → ESP8266 D1 (GPIO5)
  4. BMP180 SDA → ESP8266 D2 (GPIO4)

3. ESP8266 to NEO-6M GPS Module (UART communication):

  1. GPS VCC → ESP8266 3.3V
  2. GPS GND → ESP8266 GND
  3. GPS RX → ESP8266 D7 (GPIO13)
  4. GPS TX → ESP8266 D6 (GPIO12)


THESE IMAGES ARE AI GENERATED ONLY FOR ENTERTAINMENT

Gather All Components and Set Up the Breadboard (for Prototyping)

IMG_20241015_155147.jpg
IMG20241023150427~2.jpg

Start by gathering all the required components for the project Once you have everything, set up the breadboard by placing the components and connecting them according to the schematic. Make sure to organize the wiring neatly to avoid confusion during the assembly. [PLEASE DOUBLE CHECKTHE WIRING BEFORE POWERING THE CIRCUT]

Code

IMG20241028102418.jpg

The code for this project will capture data from the GPS and BMP180 sensors and display it on the OLED screen.

  1. Libraries Required:
  2. Adafruit_BMP085 (for BMP180 sensor)
  3. Adafruit_GFX and Adafruit_SSD1306 (for OLED)
  4. TinyGPS++ (for NEO-6M GPS)
  5. Wire (for I2C communication)
  6. Code Explanation:
  7. GPS data (latitude, longitude, time, speed) is fetched and displayed.
  8. BMP180 reads temperature, pressure, and altitude.
  9. Data is updated in real-time on the OLED display.

Downloads

Assembly and Enclosure

IMG20241028102712.jpg
IMG20241028114951.jpg
IMG20241028132818.jpg
IMG20241028132826.jpg
IMG20241028111559.jpg
IMG20241028120900_BURST000_COVER.jpg
IMG_20241028_220004.jpg
IMG_20241028_215729.jpg
IMG_20241028_215832.jpg
IMG_20241028_215650.jpg

I highly request you to check out images for reference


Select an Enclosure:

  1. Choose a small, durable case, like a plastic or metal project box, that fits the ESP8266, modules, and power source comfortably.

Create Openings:

  1. Drill or cut openings for the OLED display to be visible from outside the enclosure.
  2. If the GPS module needs a clear view of the sky for better signal reception, cut a small opening above the GPS antenna or position it near an opening.

Mount Components:

  1. Use adhesive foam tape or mounting screws to secure each component to the inside of the enclosure.
  2. Ensure there’s adequate space between components to prevent overheating and avoid interference with wiring.

Cable Management:

  1. Organize wires with zip ties or heat-shrink tubing to keep them tidy and prevent accidental disconnections.

Enclosure Seal:

  1. Once all parts are secure and the device is functioning, close the enclosure securely using screws or a snap-fit mechanism, ensuring it’s sturdy and portable.

You can add an magnet to make the contraption close like a flap

Testing and Usage

IMG_20241029_144427 (1).jpg
IMG_20241031_000621.jpg
F34HYZFM2VW1P4Q.jpg

Now that your device is built and enclosed, it is now time to test everything so that everything works as expected. Here's a step-by-step guide for the Testing and Usage phase of your GPS and environmental monitoring project:


1. Initial Power-On Test

Connect the device to a power source either by using a battery or USB.

Turn on the device.

Check if the ESP8266 powers up and if the OLED display lights up.

Check if there are any indications, such as the LED on the GPS module, which is flashing or pulsating, showing that the module is turned on and is trying to find a signal.

2. Testing All Components

OLED Display:

Check if the display is showing some initial text or status messages based on your written code.

Text and sensor readings should be readable and updated in real time.


GPS Module (NEO-6M):

Give some time to the GPS module to acquire the satellite signal. It may take a few minutes to acquire the satellites, especially when you are indoors.

If your setup includes tracking of speed, altitude, etc., check whether they are being displayed correctly or not

Test the outdoor performance of the GPS with a good satellite connection to rule out the weak or intermittent signals of indoor GPS.


BMP180 Sensor:

Check that the temperature and pressure readings are showing up as expected.

Compare the reading from the device against a known temperature or barometer to ensure it is within an acceptable range.

3. Data Consistency and Refresh Rate

Check the data on the OLED updates at a reasonable rate (say, every second or every few seconds).

If the data lags, then check if the update intervals are too long in the code or if there are issues with power that may be causing delays.

4. Testing of Battery Life

Charge up the battery completely and observe how long the device runs on that charge. Observe how features like GPS can cause the battery to deplete very quickly.

If battery life falls below expectation, then look for ways to fine-tune power management through the code, for example, inserting sleep modes so that some power is preserved between each data update.

5. Testing for Environmental Conditions

Outdoor Testing: Because the GPS module has to have a clear path to the satellite to receive the signal, test the gadget outside to confirm its efficiency in tracking location, speed, and altitude.

Indoor Testing: Since the BMP180 sensor works indoors, it is possible that the GPS might be weaker or unattainable. The OLED should be tested by confirming that it handles an unsuccessful GPS signal by giving feedback such as "No Signal" or something related.

6. Edge Case Handling

Signal Loss: Test for weak or completely lost signal by moving the device inside a room or behind the wall. You'll notice the behavior of the code with such situations and make sure your code detects and displays loss or weak signal situation.

Environmental Changes: For BMP180, do the rapid changes in temperature as well as in altitude, and note whether the values are maintained steady with a change in the environment

7. Testing for Accuracy of Collected Data

Take readings from your device and compare them to reference sources:

GPS: Compare your GPS coordinates and altitude with a GPS-enabled smartphone.

Temperature: Compare BMP180 temperature readings to a reliable thermometer.

Pressure: Compare barometric pressure readings with a weather station app or website for your area.

8. Usage

Portable Use: Test how the device performs in real-world use — carrying it around, mounting it on a bike or placing it in a backpack.

Real-Time Monitoring: See how well the display communicates environmental conditions, GPS location and updates if configured for real-time monitoring.

9. Code Calibration and Fine-Tuning

Based on test data, fine-tune the code parameters to get as accurate as possible, perhaps GPS refresh rates or adjusting the BMP180 calibration settings

Ensure the OLED display cycles through information logically if presenting multiple data points to not clutter the display

10. Final Checks

The unit should operate seamlessly at power-up without needing to be configured.

Long-term endurance tests for stability should yield a display that is not frozen and can show updates after months of operation.

When you are done with these tests, your unit should be put through rigorous testing in practical, error-free applications as a field portable GPS and environmental monitoring resource.

Key Use Cases

Outdoor Navigation: You can capture live GPS coordinates. This might be particularly useful while hiking or bicycle touring through uncharted routes.

Weather Monitoring: the instantaneous reading of temperature and pressure, which helps predict impending changes in the weather condition and prepare the user before it happens.

Altitude Tracking: It tracks the change in altitude in mountainous or hilly terrain and can be useful in tracking hiking or climbing expeditions.

Vehicle tracking: It tracks the location and conditions of transport vehicles or fleet.

Environmental Research: It captures temperature and pressure ranges of several regions for environmental study purposes.

Improvements

original.jpg
sd-card-module.jpg
IoT.png
  1. Replacing BMP180 with BME280 for humidity readings.
  2. Replacing 128*32 OLED with 128*64 OLED for bigger screen or migrate to some other big & energy efficient display.
  3. Adding data logging via an SD card module.
  4. Implementing wireless data transmission with MQTT or HTTP for remote monitoring.
  5. Adding solar power for continuous operation in outdoor environments.

Conclusion

In this project, we've built a portable device that monitors real-time GPS coordinates and environmental data like temperature, pressure, speed, and altitude. Whether you're a hiker, researcher, or IoT enthusiast, this device can help you track your location and monitor your surroundings, all in one compact design.

Thanks for following along! Feel free to leave comments or suggestions below, and don’t forget to share your own version of the project.