Close
0%
0%

DIY GPS Speedometer with Arduino and OLED

Speedometers are utilized to estimate the traveling speed of a vehicle. Here we are using GPS to estimate the speed of a moving vehicle.

Similar projects worth following
Speedometers are utilized to estimate the traveling speed of a vehicle. Here we are using GPS to estimate the speed of a moving vehicle.

About Project

NEO6M GPS Module

In this project, we are using the NEO6M GPS module. The NEO-6M GPS module is a well known GPS receiver with a built-in ceramic antenna, which also offers strong satellite searchability.

With the on-board signal indicator, we can easily analyze the network status of the module. It has a data backup battery so that the module can protect the data when the central power is shut down unexpectedly.

Features:

  • Operating voltage: (2.7-3.6)V DC
  • Operating Current: 67 mA
  • Baud rate: 4800-230400 bps (9600 Default)
  • Communication Protocol: NEMA
  • Interface: UART
  • External antenna and built-in EEPROM.

I2C OLED Display

OLED can be easily interfaced with other microcontrollers to build some interesting projects.

Technical Specifications:

  • Driver IC: SH1106
  • Input Voltage: 3.3V-5V DC
  • Resolution: 128x64
  • Interface: I2C
  • Current consumption: 8 mA
  • Viewing angle: >160 degree

  • 1 × Arduino Nano R3
  • 1 × NEO6M GPS Module
  • 1 × OLED I2C display
  • 1 × Breadboard (generic)
  • 1 × Connecting jumpers

  • 1
    Run a Program
    #include #include #include #include
    #define OLED_ADDRESS 0x3C
    #define OLED_RESET -1
    Adafruit_SH1106 display(OLED_RESET);
    int RX = 2, TX = 3;
    TinyGPSPlus gps;
    SoftwareSerial gpssoft(RX, TX);
    void setup()
    {
    Serial.begin(9600);
    gpssoft.begin(9600);
    display.begin(SH1106_SWITCHCAPVCC, OLED_ADDRESS);
    display.clearDisplay();
    display.display();
    }
    void loop()
    {
    display.clearDisplay();
    display.setTextSize(1);
    display.setTextColor(WHITE);
    display.setCursor(27, 2);
    display.print("CIRCUIT DIGEST");
    display.setTextSize(1);
    display.setCursor(35, 20);
    display.print("SPEED(KMPH)");
    display.display();
    while (gpssoft.available() > 0)
    if (gps.encode(gpssoft.read()))
    displayspeed();
    if (millis() > 5000 && gps.charsProcessed() < 10)
    {
    display.setTextSize(1);
    display.setCursor(35, 40);
    display.print("Error!!!");
    display.display();
    while (true);
    }
    }
    void displayspeed()
    {
    if (gps.speed.isValid())
    {
    display.setTextSize(2);
    display.setCursor(40, 40);
    display.print(gps.speed.kmph());
    display.display();
    }
    else
    {
    display.setTextSize(1);
    display.setCursor(35, 40);
    display.print("No Data!!!");
    display.display();
    }
    delay(100);
    }

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates