DIY GPS Speedometer With the Help of Arduino and OLED

by hIOTron IoT in Circuits > Arduino

9 Views, 0 Favorites, 0 Comments

DIY GPS Speedometer With the Help of Arduino and OLED

Arduino gps.jpg

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

Supplies

Hardware Components

Arduino Nano R3

NEO6M GPS Module

OLED I2C display

Breadboard (generic)

Connecting jumpers

About Project

NEO6M GPS Module.jpg
I2C OLED.jpg

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

DCOperating 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

DCResolution: 128x64

Interface: I2C

Current consumption: 8 mA

Viewing angle: >160 degree

IoT Training Online will help you to get a thorough view of various IoT applications.

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); }