Arduino GPS Speedometer with Analog Gauge
Vložit
- čas přidán 7. 09. 2024
- Put the GPS Speedometer into your car, motor bike, bicycle or just keep it with you while you are walking, And It will show your speed on the LCD. You can even see much more data on the little Oled display, Like Speed, Latitude, Longitude, Connected Satellites, Direction Heading and Atomic Time (Much accurate time than your watch). I have built analog gauge to show the speed in km/h. The project get data from NEO6M GPS Module, and then it display the GPS data on the Oled Display. It is simple and fun project.
Parts Used in This Project:
1. Arduino Nano - amzn.to/3ZWKAz2
2. OLED Display - amzn.to/3l35Lk1
3. NEO6M GPS Module - amzn.to/3YwyWd7
4. Breadboard
5. Jumper Wires
Software Used in This Project:
1. Arduino IDE
2. u8gLib Library to control Oled display
3. TinyGpsPlus Library to parse GPS data coming form GPS module
Language:
1. C/C++
--------------------------------------------------------------------------------------------------------------------
Useful Video Links
--------------------------------------------------------------------------------------------------------------------
New Blynk IOT Home Automation System with Security System
• New Blynk IOT Home Aut...
SIM800L Home Automation Project Using Arduino and Push Buttons
• SIM800L Home Automatio...
--------------------------------------------------------------------------------------------------------------------
Social Media Links
--------------------------------------------------------------------------------------------------------------------
GitHub:
github.com/ahm...
CZcams:
www.youtube.co...
--------------------------------------------------------------------------------------------------------------------
Download Code
--------------------------------------------------------------------------------------------------------------------
github.com/ahm...
--------------------------------------------------------------------------------------------------------------------
Disclaimer
--------------------------------------------------------------------------------------------------------------------
Disclaimer: All videos are for educational purposes and use them wisely. Any video may have a slight mistake, please take decisions based on your research. This video is not forcing anything on you.
#Arduino #Speedometer #GPS
Thanks this is exactly the thing i was looking for just gonna change the display to a larger lcd graphical display and use this on my boat. Thanks!!
so nice of you
Do you have the code with bigger display?
If you have it please send it to me
Thanks
@@georgesalloum8847 I never got it to work I believe I had some conflicts with the libraries and the internet being a bunch of self superior trolls that they are (most of the time they just tell you to read the docs) I never bothered asking for help. sorry I couldn't be more help
Thank you very much Ahmad! I appreciate the time, effort and knowledge you have presented to the viewers in this project. I mimicked the code and basic design from your project, built and successfully tested a prototype and will use it in my project truck. Thank you again Ahmad👍
Glad to hear that
Thank you very much, love that tiny little gadget
I just wanted the viewers to know one things: I have successfully changed the time zone, and also, I add another digit to GPS location to get more accuracy. I will be working on converting from KM/H to MPH, because, I found the math formula using COS and SIN to change the speed on analog on screen.
Will you share your results? Sounds, awesome!
that's great! tinyGPS library has a built-in function that give you the speed in mph with doing any math
How to change the time zone
what digit do you add to gps location to get more accuracy?
@@halconblanco23xx Sorry for some slight delayments, I will get the information from my old laptop, cause currently I am using the new laptop. Been busy lately, I will give you the line as soon I have time. Thank your for your patience. Kermitinmountain
Thank u guy!! I loved this Project!!
thanks
Thank you very much, great 👌
why is your speed changing at the end, if the gps is static
Of course
Thank you for a nice project. I am updating it for ESP32 and U8G2 lib. I will provide the code back to you, if you wish.
A very well executed clean code that works well done sir!
thanks
Ahmad thank you for the great project everything works perfect. super great project.
with the u8g2 library
Very nice Ahmad! I would like to use GPS on a robot I’m trying to build. I’m hoping that eventually the robot will cut my grass. I hate cutting grass!
great!
Ahmad thank you for providing this awesome tool. I plan to use it on an upcoming go kart. I have some questions. Is it possible for me to possibly hook up a second or even third display to display things individually. Also, is there a way to increase the gps refresh rate or possibly the screen. Mine seems to lag quite a bit and I don't know if it's due to a faulty gps or something else. Thank you, much love!.
Thank you for the video. I have a question: if I want to replace LCD with a bigger one such as 2.4" or 3.2", what band and module do you recommand for smoothly upgrade with minimum code changing?
Very nice, it works, thanks
my speedometer that ibuilt with the same parts and code as this video has a lag/latency around 1-2 seconds. Does anyone know how to reduce this lag/latency
how to remove the gauge and make the speed numbers bigger?
It works perfectly for me :) Thanks...
Does anybody know how to change time zone?
thanks
How to change the UI? or how to make it show the travel distance?
Ahmad exelente work. Please could you tell how to change or add the time zone? But please ask you to show how to do not simply add time zone. I apologize for my ignorance. just say: Add the line or change and show how to do. Thank you
ok
thank you very much bro
hank you very much Ahmad
thanks
0 satellites connected. Any idea?
Could you please use the newer u8g2 library instead of the deprecated u8gllib ?
will try
Hi, I'm planning to switch to an Arduino Mega 2650, but for some reason I'm not getting data from the tx pin. It's connected to D2, should I use the rx on the gps and connect it to pin 3?
Great & nice
thanks
Thank you for interesting and basic project, so that way I won't be bored. However, for the time which is 6 hours difference. Any Idea on how to adjust time? Thank you.
the time shown on the lcd is GMT time. you need to add the timezone in the time to make the exact time for your country
Took the project out today, apparently seems to be working well .The Coordinated of GPS Location looks accuracy, however, the speed was a little off by few KM/H.
@@kermitinmountain6371 hmmmm. you might subtract your speed difference from the actual gps speed to get more accuracy.
Bro did u sort it time zone?
@@TECH-vs7gf not yet
GOOD JOB BRO
Thank you so much 😀
@@AhmadLogs I DID it and it's work perfectly .thank you
@@aniszed3641 great
great job and its work perfectly ........ but can we use biger display like st7789 ?
yes
Would you please send code
@@georgesalloum8847 DID YOU MAKE IT WITH ST7789???
@@KAUXIK no
Did you?
Hi ahmad, awesome project…
Do yo think would there be possible to add to them like elapsed time(1/8mile,1/4mile etc)…like dragrace gps timer?? Thanks
Yes, you can. but I have a very little knowledge about grag race gps timer. I will try to update my knowledge and will try to make this timer when possible
@@AhmadLogs do you mind if i can get your email?? Thanks
sir my display is on but it is not showing any data like number of satellites connected, speed or time plz help.
check serial monitor
Great Project sir
thanks
Hi I have a question. Also thanks for this! I just set it all up and it works great! Your other video on the GPS module helped me too ( I didn't realize I might have to wait so long for the small battery to charge and a gps lock. I thought i might have done something wrong) Anyway, I am putting this inside a radio controlled car of mine and I'd like the speedometer to read me back 1/6th scale speed (that's the size of the car) rather than real world scale kmp/h ,, How would I go about having the speedometer's needle read something like 300% more than what it reads right now? what values should I change in your .ino file? thx.. Also, It doesn't need to be exactly 6th scale, just as long as it's reading faster than it's actually moving.
Regarding your question about modifying the speedometer to read 1/6th scale speed, you can achieve that by adjusting the scaling factor in the code.
speed *= 3.0; // Adjusting the scale to 3x
@@AhmadLogs thanks so much! I’ll give it a shot.
I'm having trouble finding the correct GPS Library. The version I have installed won't recognize the commands " Read_GPS(); " or " Get_GPS(); "
Can you please provide a link to the correct Library?
Thank You...
Respectfully: Curtis
Made this already, looks great. But can you add max speed log?
will try
Great Bhai Jan 🌹
thanks
thanks for the video but i noticed the Arduino Nano link in the description directed me to an Arduino UNO REV3 so witch one is the right one to use ?
hmmm. I think I have added the link of Arduino UNO by mistake.
but the nano and UNO both are the same
Nice job, i have a question with 5v i had enough power supply or i will need more
with 5v it is enough
Thanks
Hello friend, I have assembled your project because it is very useful to me, just as you have assembled it in the video, I have taken the code and uploaded it to the Arduino. I have some problems in the code, the rx is on pin2 and the rx pin3 is unused. In the assembly, the tx is on pin2, I don't know if it is your fault. My second problem is that it does not detect satellites, could you give me a solution? Thank you very much.😊😊
Hey Ahmad I am asking for a custom project
I was thinking for a a gps speedometer when it shows the gps and it shows total distance as i am trying to make this for my Bike
kind regards Dylan
I am mobile developer, I really like this. and newbie with this. could you share the document to implement it? Thanks you
Great project.if can you make a another video gps base taxi meter I hope its very usefull for ud
you can use it for taxi or any other vehicle
Super projetc 👍👍👍👍
thanks
Amazing info
thanks
Hello Ahmad. It is a cool video :) I searching a long time to my motorcycle a lean angle meter gauge. I don’t want to know any other data, what do you think? Is it possible to show with this device a real lean angle? Thank you for your answer, Regards, Zsolt
I'm really glad you enjoyed the video! Creating a lean angle meter gauge for your motorcycle sounds like a fantastic idea. While the Arduino GPS speedometer with the analog gauge on the OLED might not directly display lean angle data, you could potentially integrate an accelerometer or gyroscope sensor to measure the tilt of the motorcycle and convert that into a lean angle reading. It could be a bit more complex.
@@AhmadLogs Wow, thanks the answer :-D I am pretty sure, my motorcycle measure the lean angle, but just not capable to show it... but it is another topic :-D i will do the research , what sensor will give the exaxt data when i need... i think the gyroscope not will the perfekt choice...
Did someone solved the timezone issue ?. GPS displays 3 hours difference to local time . regard Jose
It's couze probably it's using utc , just do the math
Guys, I have a problem, maybe you can help me: When I power the Arduino up, the red LED on the GPS module won't turn on and the OLED does not show data. When I disconnect the ceramic antenna the red LED comes on for a few seconds and the time on the OLED is also there. When I now connect the antenna again the red LED starts flashing after half a minute and the OLED shows all the date (Time, Coordinates, Speed, ...).
When I reset the Arduino with its reset button everything is working fine. When I disconnect power and reconnect it, the problem is there again. Any ideas what could be wrong?
Bhot sandar
Super project 👍🏼 Question: What is the pliers you use to plug the cables 🤔
tweezers
Great job♥️
Can you give us the circuit as a file of proteus simulation ?
thanks. Unfortunately I dont have what you have asked
Hi, friend. Is it possible to replace Arduino with ESP32?
sir, can you please make a project for blind person a stick that will send the live location of a blind person by pressing a button that is on stick by using gsm sim 800l, GPS neo 6m, and Arduino UNO.
it is possible
What the different if i use arduino uno ,?
Thank you for sharing this project, do you have a way to display in mph instead of kph?
yes, you just need to change one line in the code.
speed = gps.speed.kmph() to speed = gps.speed.mph()
@@AhmadLogs thank you!
Snyper Bob, I am working on this later this week. I have to work on math formula on how to change speed measure units. 😊😊
@@kermitinmountain6371 I got this project up and running with mph rather quickly. This is such a fun project!
@@snyperbob So, How did it go?
Como le instaló para poner una pantalla de 1.3
hello! Thanks for your contribution, but I can't get the gps to work. any ideas?
check this czcams.com/video/0rnZKiEsZnk/video.html
hi, why don't coordinates change when you move, what changes should i make when i use uno instead of arduino nano
no changes are required. both are same. if coordinates not changing then there might be some other issue.
@@AhmadLogs thanx for respond
Hi, I really like the project but I've been working on it for two days but I can't set the time, can you help me do it? I live in Italy! Thank you.
time is already added in this project
can you show how did you connect it to the vehicle
It does not required to connect it to vehicle. just put it in any vehicle and it will start working
This code isnt working for me, it is displaying th basic structure of the speedometer, but it is not displaying the speed
Please help as soon as possible
have you tested you gps module?
Bhai aapke home automation firebes vale code me thoda error aa rha he
D5 ,D6 work kr rha he s2 or s3 switch work nhi kr rha he any solution ?
use pullup resisters with push buttons. there might be loose connection
Hello
can you do this project using ws2812b led
It would be great if it was placed behind the car or engine.
yes some of its features can be implemented using ws2812b led
@@AhmadLogs
Would you do this?
czcams.com/video/Ji4lz2oMtDo/video.html
7 segments 3 digits
as
@@dragon-cu6cc I can do it but I dont have the we2812 led strip right now.
@@AhmadLogs
😞
what material is needed
i have ws2812b
Can you send the Arduino ino file for testing?
czcams.com/video/Xz3ypUU0Wfw/video.html
Nice
Thanks
Can the informations from gps be shown on 2 screens?I want to rewrite code to show digital speed on second oled, and I;m using multiplexer tca9548a because screens have same address but I can;t manage to figure out a code for that. PLease help!
It is possible you can transition between the screens on some interval or you can use push button to switch between the screens
@@AhmadLogs I made it to make code, now I'm showing only digital speed and satelite numbers with logo on one screen and just clock to another screen, but in that case multiplexer must be used because of the same screens addresses.
@@masterdeki yes you are right multiplexer is required to work with two screens.
Where in the code do i change the analog ports? I use a Arduino pro micro and there is no A4 or A5 on that board. i have 0-3 and 6-10
Arduino
int x_pin = A4;
int y_pin = A5;
pro micro
int x_pin = 18; //A4
int y_pin = 19; //A5
works with nano ^^ but I have no idea where to paste this on pro micro :|
int x_pin = 18; //A4
int y_pin = 19; //A5
Hello Ahmet, I have made the project after. It works for 4 or 5 days, after that it can not find satellites. What is the reason?
Some possible factors to consider
1. Heavy cloud cover, dense foliage, or being surrounded by tall buildings can obstruct the GPS signal, making it harder for the module to establish a connection with satellites.
2. A stable power supply is crucial for GPS modules to work consistently. Voltage fluctuations or insufficient power could cause the module to malfunction.
3. Nearby electronic devices emitting electromagnetic interference (EMI) could disrupt the GPS signal.
Hello, how can I change the range? You have a range from 0 to 200. I need from 0 to 60 km/h can you help me please?
I have hard coded it. you can change the range by modifying the line number 76 to 82 from speedometer-v2.ino. you also need to change in loop() function. the following line
needle_pos = map(speed,0,200,0,90); to
needle_pos = map(speed,0,160,0,90);
@@AhmadLogs Thanks! You are great!
Hi Ahmad Can you add AM PM ?
this line of code convert the time to AM PM time.
String amPm = (hour < 12) ? "AM" : "PM";
@@AhmadLogs plz add this to the code
@@EasyOne will add in the next version
how to adjust the clock time? because after I tried it in my area here (Indonesia, the difference in hours is 7 hours.
you have to add the your time difference in the gps time. like just add the 7 hours in the time
@@AhmadLogs how do we add a 7 hours in time in your code?
@@amuraojanryanchristiana.6923 I will update the code and will add time zone feature in the project
@@amuraojanryanchristiana.6923edit the line "const int timezone_hours"
Hi brilliant project, thankyou so much for your efforts, but I think I have found a bug in the software, as the "num_sat" number gets get 5 added to it from the statment " u8g.print(num_sat, 5); " if above 4, i'm not quite sure why? I thought it odd how I was getting 33 satellites, so i was playing with the code. can you confirm my findings, serial printing gives the correct number, but the display adds 5 above 4 saterllites I found, making 5 saterllites 11, and 6 saterllites 12.
To fix this, you should remove the second argument from the u8g.print() function call, like this:
u8g.print(num_sat);
let me know if it is working for you.
@@AhmadLogs Yes, that works, I couldn't find a reason for the second term. Thanks for getting back with the updated solution, you have done a great job with this project, I am finding it a useful example to crest other projects, Thanks Ahmad.
is it possible to make it log gps cords, speed for a trip ?
I think so
where command do i have to change to set the time where i live?
there is no command for this
How to change utc to ist timezone
use the following two arduino libraries
#include
#include
then use the following code in the loop function
// convert the UTC time to local IST time
TimeChangeRule IST = { "IST", Second, Sun, Apr, 2, 330 }; // Indian Standard Time
TimeChangeRule *tcr = &IST;
time_t utcTime = makeTime(second, minute, hour, day, month, year);
time_t localTime = utcTime + 19800; // add 5 hours and 30 minutes (19800 seconds) for IST
setTime(localTime);
Hello,super project but no speedometer code sharing? Too bad!
updated
Thank you for the efficiency and speed of the answer!
i am doing this with Arduino mega but not work please help
please give me the full detail about the issue
Does this work using wifi?
How to change update rate from 1 hz to 5 hz , please do a video on it
Sir can u make rpm gauge with OLED display that can connect directly to ignition coil
not sure
Can i use Uno instead of nano?
yes you can use, without making any change in the code.
very good , but i want use code with esp8266, can you help me ??
how can I help you?
Literally my brain:minecraft vs in real life
música perruna
Hi, Nice project. Can you pls modify the code to change country code? UTC+. I am not getting Indian time by default.
will try
edit line "const int timezone_hours"
Thank you mr.ahmad .may you upload code?
uploaded
@@AhmadLogs thank you very much .
@@rampage_xdit so nice of you
Sir I'm your student. Kindly reply me
what happend
Sir can you reply to my questions?
what happend
is this wifi base?
it is gps based. and no need any internet or wifi connection. the gps is free for all
@@AhmadLogs okay thanks 😊
Is the screen time real time bro?
yes, it is gps time. and it is accurate
@@AhmadLogs i need help bro 😭
i newbie :(
C:\Users\arh\xxx\xxx\speedmetter\speedmetter.ino:15:10: fatal error: U8glib.h: No such file or directory
compilation terminated.
exit status 1
Compilation error: U8glib.h: No such file or directory
@@duchiu2212 you just install the u8glib from the library manager and the error will gone.
1. click on Tools>ManageLibraries in Arduino IDE.
2. Search for "u8glib" and then install the library
@@AhmadLogs I have installed U8glib but when I export it gives an error 😢😢