Skip to content

Build a professional GPS-based vehicle tracking system using Raspberry Pi Pico, GSM module, and Neo-6M GPS receiver. This project tracks real-time vehicle location via SMS and Google Maps, offering reliable performance even with poor connectivity. Perfect for vehicle monitoring, and asset tracking applications, all programmed in MicroPython.

License

Notifications You must be signed in to change notification settings

ShahbazCoder1/GPS-Vehicle-Tracker-using-Raspberry-Pi-Pico-MicroPython-Thonny-IDE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GPS Vehicle Tracker using Raspberry Pi Pico

Real-time Vehicle Tracking System with GSM & GPS

License: MIT Platform Language

A professional GPS-based vehicle tracking system built with Raspberry Pi Pico, GSM module, and Neo-6M GPS receiver. This project enables real-time vehicle location tracking via SMS and Google Maps integration, offering an affordable and efficient solution for vehicle monitoring.


πŸš€ Features

  • βœ… Real-time GPS Tracking - Accurate location tracking using Neo-6M GPS module
  • βœ… GSM Communication - Send/receive location data via SMS
  • βœ… Google Maps Integration - View tracked location on Google Maps
  • βœ… Low Power Consumption - Optimized for battery-powered applications
  • βœ… MicroPython Based - Easy to understand and modify code
  • βœ… Cost-Effective - Affordable alternative to commercial trackers
  • βœ… Remote Monitoring - Track vehicles from anywhere via SMS commands
  • βœ… Compact Design - Small form factor suitable for vehicle installation

πŸ“‹ Table of Contents


πŸ”§ Hardware Requirements

Component Specification Quantity
Raspberry Pi Pico RP2040 Microcontroller 1
Neo-6M GPS Module GPS Receiver with Antenna 1
GSM Module SIM800L / SIM900A 1
SIM Card Active cellular SIM 1
Power Supply 5V 2A adapter 1
Breadboard Standard size 1
Jumper Wires Male-to-Female, Male-to-Male 20+
USB Cable Micro USB for programming 1

Optional Components

  • External antenna for better GPS signal
  • Battery pack for portable operation
  • Enclosure/case for weatherproofing

πŸ’» Software Requirements

  • Thonny IDE (v3.3.3 or later) - Download Here
  • MicroPython firmware for Raspberry Pi Pico
  • Python 3.7+ (for development)

Required Libraries

  • machine - Built-in MicroPython library
  • time - Built-in MicroPython library
  • utime - MicroPython time utilities

πŸ”Œ Circuit Diagram

GPS Module (Neo-6M) Connections

Neo-6M GPS    β†’    Raspberry Pi Pico
-----------------------------------------
VCC           β†’    5V (VBUS - Pin 40)
GND           β†’    GND (Pin 38)
TX            β†’    GP1 (UART0 RX - Pin 2)
RX            β†’    GP0 (UART0 TX - Pin 1)

GSM Module (SIM800L) Connections

SIM800L       β†’    Raspberry Pi Pico
-----------------------------------------
VCC           β†’    5V (VBUS - Pin 40)
GND           β†’    GND (Pin 38)
TXD           β†’    GP5 (UART1 RX - Pin 7)
RXD           β†’    GP4 (UART1 TX - Pin 6)

⚠️ Important: Ensure proper power supply to GSM module (SIM800L requires stable 3.7-4.2V with peak current up to 2A). Consider using a separate power source or voltage regulator.


πŸ“₯ Installation

Step 1: Install Thonny IDE

  1. Download Thonny IDE from https://thonny.org/
  2. Install for your operating system (Windows/Mac/Linux)
  3. Launch Thonny IDE

Step 2: Flash MicroPython Firmware

  1. Download MicroPython firmware for Pico: MicroPython Downloads
  2. Hold the BOOTSEL button on Pico while connecting to PC
  3. Pico will appear as a USB mass storage device
  4. Drag and drop the .uf2 firmware file to the Pico drive
  5. Pico will automatically reboot with MicroPython

Step 3: Clone or Download Repository

git clone https://github.com/ShahbazCoder1/GPS-Vehicle-Tracker-using-Raspberry-Pi-Pico-MicroPython-Thonny-IDE.git

Or download ZIP from GitHub and extract.

Step 4: Upload Code to Pico

  1. Open Thonny IDE
  2. Go to Tools β†’ Options β†’ Interpreter
  3. Select "MicroPython (Raspberry Pi Pico)"
  4. Open the main Python file from the repository
  5. Click Run β†’ Save to Raspberry Pi Pico
  6. Save as main.py

πŸ”— Wiring Guide

Complete Connection Diagram

Raspberry Pi Pico Pinout:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ GP0 (TX)  ──→  GPS RX   β”‚
β”‚ GP1 (RX)  ←──  GPS TX   β”‚
β”‚ GP4 (TX)  ──→  GSM RX   β”‚
β”‚ GP5 (RX)  ←──  GSM TX   β”‚
β”‚ VBUS      ──→  GPS VCC  β”‚
β”‚ VBUS      ──→  GSM VCC  β”‚
β”‚ GND       ──→  Common GNDβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Safety Tips

  • Double-check all connections before powering on
  • Use a multimeter to verify voltage levels
  • Ensure GSM module has adequate power supply
  • Keep GPS antenna away from electronic interference

βš™οΈ Configuration

1. Configure Phone Number

Edit the main code file and update the phone number:

# Replace with your phone number
ADMIN_PHONE = "+9186********"

3. Configure GPS Update Interval

# Update interval in seconds
GPS_UPDATE_INTERVAL = 10

πŸ“± Usage

Starting the System

  1. Connect all hardware components as per wiring guide
  2. Insert active SIM card into GSM module
  3. Power on the Raspberry Pi Pico
  4. Wait for GPS to acquire satellite lock (blue LED on GPS module)
  5. Wait for GSM module to register on network

Monitoring Status

  • GPS LED: Blinking = Searching, Solid = Lock acquired
  • GSM LED: Blinking = Network registered

πŸ’¬ SMS Commands

Send the following SMS commands to the tracker:

Command Description Response
LOCATION Get current GPS coordinates Lat, Lng, Google Maps link
STATUS Check system status GPS status, GSM signal strength
HELP List available commands Command list

Example

Send: LOCATION
Receive: Lat: 37.7749, Lng: -122.4194
Google Maps: https://maps.google.com/?q=37.7749,-122.4194

πŸ› Troubleshooting

GPS Not Getting Fix

  • Ensure GPS antenna has clear view of sky
  • Wait 2-5 minutes for initial satellite lock (cold start)
  • Check UART connections (TX/RX not reversed)
  • Verify 3.3V power supply to GPS module

GSM Module Not Responding

  • Check power supply (needs 3.7-4.2V with sufficient current)
  • Verify SIM card is active and has credit
  • Check antenna connection
  • Ensure correct APN settings for your carrier
  • Try AT commands manually to test module

No SMS Received

  • Verify phone number format (include country code)
  • Check SIM card has SMS capability
  • Ensure GSM module is registered on network
  • Check signal strength in your area

Code Upload Fails

  • Ensure MicroPython firmware is properly installed
  • Check USB cable connection
  • Try different USB port
  • Restart Thonny IDE

πŸ“„ License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.


πŸ“§ Contact

Shahbaz - @ShahbazCoder1

Project Link: https://github.com/ShahbazCoder1/GPS-Vehicle-Tracker-using-Raspberry-Pi-Pico-MicroPython-Thonny-IDE


πŸ™ Acknowledgments


⭐ Show Your Support

If you find this project helpful, please give it a ⭐ on GitHub!


Made with ❀️ by ShahbazCoder1

About

Build a professional GPS-based vehicle tracking system using Raspberry Pi Pico, GSM module, and Neo-6M GPS receiver. This project tracks real-time vehicle location via SMS and Google Maps, offering reliable performance even with poor connectivity. Perfect for vehicle monitoring, and asset tracking applications, all programmed in MicroPython.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages