Hi! I just wanted to thank you, great video and a very nice sketch! Im builing my own Speedometer for my motorcycle and this video has really given me a great start! I used a Ublox module called VK2828U7G5LF TTL which i bought from banggood, worked right out of the box.
Big thank you from me too. Your insights into the hardware and datasheet helped me get going with the uBlox protocol much faster. For the record my setup is: V.KEL VK2828U7G5LF (UBX-MK8030-KY chip), Wemos D1 ESP8266, and the display library U8g2. I enjoyed calibrating the car speedometer on every bit as much as you did!
Thanks! I plan on using this to make a small stick on module for my motorcycle helmet. A semi-transparent mirror will sit at a 45 degree angle between the lcd and my eye so I can have a heads up display mounted to my helmet.
Thanks for posting this and the code! I am using it as a basis for an Arduino Nano controlled GPS OLED Speedometer that also controls some WS2812 LED light strips(different patterns based on speed). I needed to optimize the code a lil to get everything running smoothly(I also switched to a SPI OLED). Let me know if you want to see the updated code.
I like it. You may like to retain your max speed function and display it in a corner of the screen??? Of course, you're only a hop, a step, and a jump away from building a fully featured OSD. In all seriousness, putting the altitude on the display would be quite useful if you were viewing it real-time. Given the nature of the drone control laws appearing left, right, and centre around the world, a "simple", cheap(ish), and accurate altimeter would be a boon. My main interest stems from restoring a 50 year old car, I'm planning on discreetly adding more accurate instruments, one multifunction display really, to complement the standard setup. Adding SD card functionality to record a trip's/flight's details will be the next on my list.
If you added a logger feature (or used a ready made logger) you could overlay eg. a track and display speed over video image. Something like this could be neat for videos to publish. I would rather use the same battery as the quad. Carrying two batteries is some extra weight for no reason. (A cheap step-down would do fine in case the arduino linear reg heats up too much on higher cell count).
i can only imagine what your neighbor would have thought if they had looked out there window and seen you running around like a crazy person in you yard. :D
It seems to be bang on. The car always marks 4 or more kph. Real test is against a phone with google maps. When i do a 100 on g maps, the car says 104.
I've looked through the U8glib documentation and can't seem to find anything about reversing the screen image I'm attempting to create a heads up display for my car using this design but can't figure out how to get the screen to reverse itself Any idea how to accomplish this? Thanks!
I've tried building this. I'm using the Arduino Uno. I've used your sketch, which I've also found in the Arduino Project handbook by Mark Geddes. The left most spinner animates when running, but not the spinner to the right of it. The Speed displays as 0, and satellites 0. I think this is indicating that the Ublox Neo 6M GPS data is not being read. The red LED on the Ublox is flashing - indicating that it is receiving a signal. I've double and triple checked the wiring connections. I have also found another sketch that only reads the Ublox - running this sketch, I can see that the GPS unit works ok and sends data. I've updated all libraries and am using the latest 1.8.12 Arduino IDE. Has anything changed since you wrote the code in 2016? How can I get this working? Any suggestions would be greatly appreciated.
Car is not telling the real value, I have noticed that with Google maps speedometer. Basically, especially if it is a European car, the speedometer is forbidden to show values lower than the actual one and to achieve that, the manufacturers pump the values on the speedometer. It is usually around +4 km/h and has 110% upper bound of the real value. The odometer is apparently not fooled by this and it shows the real km value.
I'm not even sure you still check these comments. However I am trying to get this to work. Right now I have the far left spinner that spins and the middle spinner is stationary. gps- gt-u7 ublox-7 Display - 1.3 OLED Arduino nano
No action on the middle spinner means either the GPS is not sending any messages or your program cannot make sense of the data being received. You might be better served to start with this: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-TwhCX0c8Xe0.html Yeah it's not very exciting, but the first thing to do is confirm that the GPS you have will actually work with this method of handling the incoming data using a much simpler example, and you'll know about the u-center utility which is quite handy for various other uses as well. There are some differences between versions of the firmware on these GPS modules, some of the early ones don't have the NAV_PVT message at all. Even when the NAV_PVT message is supported, there is sometimes a difference between the size of the message (usually this differs between 7 and 8 modules). You can use u-center to check which messages your particular module has available, and to check the size of them too. The most common problem I have seen so far is that you need to add a few dummy bytes at the end of the NAV_PVT struct so that it is the correct length, but typically that is required for 8-series modules, not 7-series: byte dummy[6]; So if you are more interested in being given a fish instead of learning to fish, as the saying goes, you could try that right off the bat, it might work :) But since your module is a 7-series, I think it's more likely that it just doesn't have the NAV_PVT message this sketch is set up to use. See the video above and the other one linked to in the description about other messages you can use.
Been looking for ways to send speed and fuel level in a scale Rivierra model rc boat via nrf24L01 high power transceivers to an Oled display mounted on my rc transmitter. Initially thought maybe use a similar arrangement as you used in your cheapass tester unit. For extracting the GPS data thought along the lines of using an Omnibus F4 controller as you used in your sea test with monitors etc. and then saw this video. I can see where all of this is rather a muddle at present but thought you may have some link to build something like this. ps..also have a BN220 gps.
I have finally a working speedometer thanks to this video. I've changed the speed font to fur42n and so it is bigger than to choose setScale2x2 code.google.com/archive/p/u8glib/wikis/fontsize.wiki
When I made a GPS speedo in my car, I noticed that when I came to a stop from say 30 mph, it took 3 ish seconds to return to zero. I am wondering if the GPS units have an averaging process for the speed?
Hello Sir. Could you make a video on how to use arduino with gps to turn on or off a relay based on speed detected. I'll like to have a gps control relay to turn some lights on in my car when current speed is 10mph. Thank you.
Great Video. Having a problem. I'm using a Pro Micro. On the Pro Micro "Serial" is the USB serial connection to the PC. The GPS is on Tx0 Rx0 which is and instance of "Serial1" . I've changed your sketch accordingly and I scoped out that the data is being sent/received to the GPS. But the Spinner for the GPS update never spins. Display update is fine. GPS module looks exactly like yours. I worry that my version of the GPS module is somehow different than yours and somehow the packet formating/decoding is different. I'll debug further...
Couldn't get your stuff to work...went back to TinyGPS++. Sorry. This is the data that came back from GPS with yours stuff...then froze B5620501020006010F38 B5620501020006010F38 B5620501020006010F38 B5620501020006010F38 B5620501020006010F38 B5620501020006010F38 B56205B562050102000608163F
These lines look like the module is acknowledging the CFG-MSG and CFG-RATE instructions, which seems fine. B562 header 0501 message type (ack-ack) 0200 payload length (2 bytes) 06 clsID of acknowledged message 01 msgID of acknowledged message 0F38 checksum The final line is partially corrupted, there should not be multiple B562 so close together. If you are starting out with this video being your first usage of the UBX stuff, you might like to get a better foundation from these other videos: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-TwhCX0c8Xe0.html ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ylxwOg2pXrc.html In particular see the pinned comment of the latter video. There are slightly different sized NAV-PVT message firmwares out there. For this particular sketch you also need to ensure that NAV-PVT is the only message being sent. Other message types (especially those of a shorter size) will cause the header of the NAV-PVT to be skipped, even if it is being output. My code disables the 6 most common NMEA messages that are often enabled by default, but your module may be outputting more, especially if you have already used it with other applications like Ardupilot. It might be easier to just use u-center to set up and save the message output configuration, then your sketch will not be required to do any setup when it starts. It will be much easier to see in u-center what it's doing and to check there is only NAV-PVT being output.
@@iforce2d Thanks for responding. I saw your other videos and I am aware of the PVT message. But keep in mind I have the same gps unit you are using and I used your provided sketch. I ended up going with the NeoGPS library which was not so bad as far as memory footprint goes. My big issue was that the ug8lib library was too big. So I found and alternate that works for my 128x32 oled and I am good to go. I may return to explore your stuff later if I run into memory constraints. FWIW I am building a gps speedometer to convert an old British car Smith's speedometer. I think the way forward is to go with a small ESP32. They are just as cheap as the Pro micr/minis and you get so much more of everything. Don't you think?
This is so awesome!! I tried TinyGPS but I’m so dumb in programming, tried to modify your script and no luck ) Could you please tell what I have to change to output 4 lines: lat, lon, number of sats and HDOP? Keeping your spinners, if possible. Thank you so much!!!!!
I need this. WIth giving me a short beep at 60km/h , two short beeps at 70km/h and 2 sec long beep at 80km/h. Why? Because I always go above the limit because 50 and 80, or 70 and 100 km/h look exactly the same to me. So beeps would be nice to notify me when I am above the limit.
Hello, nice job!. Did you try with a bigger 1.3 OLED display ? I suppose you are limited by the arduino pro mini memory, since I've seen bigger characters on the 0.96 was a problem. What arduino do you suggest for a compact solution if I want to use a 1.3 in display?. thanks a lot
Nice stuff. I love your videos, they're all very helpful. I've tried your code using M8N GPS receiver. Unfortunately, no packet detected. I was suspecting the neo M8N binary setup to be different so I've manually setup the receiver using UCenter but still no packet detected. Everything looks ok in Ucenter Packet view. Baudrate is ok. Do you have an idea?
+gabe FPV I had to modify it a bit to get it to work with my M8N, here's what I ended up using: s3-ap-southeast-2.amazonaws.com/alhazan-au/UBX_GPS_NAV_PVT.ino
+alhazan that's a very timely bit of help, thanks. I just got a M8N a few days ago and beat my head against a wall for hours trying to get it working with my sketches. I knew the packet size was different but didn't pay attention to what the U1[6] was meaning in the protocol description. +gabe FPV fwiw you should be able to replace the last few lines in the NAV_PVT struct definition (just after the pDOP member) as follows. Before: short reserved2; // Reserved unsigned long reserved3; // Reserved After: unsigned char reserved2[6]; // Reserved long headVeh; // Heading of vehicle (2-D) unsigned char reserved3[4]; // Reserved I guess what we really should be doing is using the 'len' member of the incoming data to get the packet length right in the first place, instead of just having a hardcoded packet length. Then the sketch would handle both the 7 and 8 series without changes.
Hi! Thanks for video! I have a question, I want to do a speedometer using GPS. URL of your GPS broken and I found a GPS which named GY-NEO6MV2. Can I do using this module?
This video is a life saver for my project. Thanks! Thumb up! :) Have you ever tried to change the baud rate with this module? It's funny that with 10Hz and 9.600 baud rate I get the correct ground speed, while with 115.200 baud rate it fluctuates terrible. Do you know what could cause that? Thanks!
goo.gl/9XzOVX Looks like it's sold out. This one is slightly better, but has long wires on it, not good for putting on a quadcopter, but maybe ok for in your car goo.gl/kF6Ucr
Hello! Instead of display the speed on a screen, is it possible to plug an OSD and transmit the speed and others telemetry datas by the video? Thanks buddy
nice work ! about 4km less than the car's so not bad could work on my application! I would like to ask you which GPS module are you using ? would for example a arduino gps neo 7m work ?
im new to arduino and have a project in mind where i can make a light come on when it detects deceleration and iv managed to make a code to get it to work how i want it, but come across a problem. when im going down hill it will make the light come on. do you know how i can fix this
If you're only using lat/lon values from the GPS then I'm not really sure why going downhill would even be detected. There is a velD value which measures vertical speed, make sure you're not using that by mistake. And if all you care about is speed and not direction, you could just use the groundspeed value.
Hi, what was the equipment that you used? Did you go any further, I would like to add a trip counter, so I know when I am getting close to running out of fuel. As my fuel level gauge is not accurate. How much do the parts cost about? Is the code available? Thanks,
When verifying, I'm getting the following error: "ino:153:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] char* spinner = "/-\\|";" Only the first spinner on my OLED is spinning and there's no movement from the others or with speed itself. I'm using a 128x32 i2c instead of the one you are using. Any ideas?
Hello, have you tried bigger fonts from u8glib library ? 'u8g_font_courB24' is only 20 pixels height and for example 'u8g_font_fub30' is 30 pixels height. Some fonts are also in compact version with digits only.
+janko muzykant I see. I thought this was the largest so I didn't look further. Given that I finally got it working though, I think I'll stick with this one, since making the text larger is what was causing the problem :)
I don't understand the question. You can use GPS as long as you want to, it doesn't cost anything. If you're asking how long does it take to acquire a lock, usually about 5 minutes for a 'cold start' (not used for a long time). Typically within 30 seconds for a warm start. This is outdoors of course.
Awsome work but I tried to imagine you running through your backyard, me watching you as an uninvolved person... xDDD Car speedpos are always reading a bit more, its around 5-8% I believe, they have to.
You can find all my sketches here www.iforce2d.net/sketches But RU-vid likes to screw up links, so I will type that again without the punctuation: www dot iforce2d dot net slash sketches
I believe the module he was using was the UBLOX Neo-7M module. I happen to have a UBLOX Neo-6M module hanging around that I used but had to do major re-write to work with NEO-6M because of the different UBX messages it outputs (no NAV-PVT message that he uses).
@@tjones99 Can I get a copy of the changes that you made for the UBLOX Neo-6m as I'm using that model. I've finally got the OLED SH106 with the 'new' U8g2lib. I've cut down the refresh rate to 5hz, now having to investigate NMEA code. Any help appreciated
@@tjones99 Hi Terry, Thank you for your offer. The only way I can think of without releasing my email details here, is possibly for you to post something on your youtube channel, even if its a couple of screenshots, I'll retype the info from pictures. Unless you have a different idea? Great Home picture on your RU-vid, regards Chuck from Australia
The U8GLIB has larger fonts you can select in the screen section, but if you go too large you may run out of RAM in your arduino. Look in the library files for the U8GLIB to see what font names to use.
Hi, how are you? Please, can you help me?... I need how to do the speedometer, i know than your code work's.--- but i dont have a OLED display... i just have a 16X2 LCD.... please give me a hand
I have no idea. Never used one of those and I don't have one.... I'm sure there will be plenty of documentation and examples on the internet somewhere.
Well yeah, but in my case the only examples just say about gps data.... And i don't need all data.... Just long and lat maybe.... And the most important... Speed... In real time.... I'm a racing driver.. I have a kart 125 cc and this is a personal proyect... Because i need to know my performance.... Record in a ad car's and after see that information in my laptop.... I'm a mechanical engineer.... This product are really in know for me
That's great, but I still have no idea. Are you expecting me to do research for a LCD screen that I don't own, and will probably never use? Try typing in the model of that LCD into google... with 'arduino' etc
This screen uses I2C, so you'll need to use the SCL and SDA pins. For leonardo I think this layout: duino4projects.com/wp-content/uploads/2013/04/Ardunio_leonardo_pinout.jpg
I just wanted to get it on my GY-NEO6MV2, it really is too bad to understand and translate this work. I would like to know if you can make our lives easier by leaving a library ready for GY-NEO6MV2. with the same characteristics of this work. great
Hey! Thanks a lot for the video. It's very useful to me. I've downloaded your sample and flashed it to an Arduino Nano with the same display you have, and an Ublox NEO-M8N. It seems that there is some kind of problem with the checksum. The "processGPS()" function never returns true, so it never updates the data. If I bypass the checksum control, it works, but sometimes I get weird values though. Any ideas of what could be the problem?
Ok, I think I found the source of the problem, but I still can't make it work. It seems like the M8 has a different UBX-NAV-PVT message: www.u-blox.com/sites/default/files/products/documents/u-blox8-M8_ReceiverDescrProtSpec_(UBX-13003221)_Public.pdf I modified the structure according to the datasheet by following your steps, but the checksum still returns false. This is the new structure: pastebin.com/u5MjgLk7 Am I missing something? Do I have to modify anything other than that in your example? Thanks!
I don't see any discrepancy between the pdf document and the struct you have. Perhaps the module you have is not running the firmware version of that document, I think the firmware can be flashed and changed similar to arduino etc. fwiw I had NAV-PVT working with a neo7M in the sketch for this project (the few struct members right at the end are slightly different to yours): ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Lphe8Vih5VY.html If you disable all messages except for NAV-PVT and simply println the bytes to the serial monitor, you should be able to see the packet start markers (the two bytes μb) and from that you'll know how long the packet is. These might help: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-TwhCX0c8Xe0.html ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ylxwOg2pXrc.html
I finally found it! The problem was that the "reserved1" field is actually 6 bytes long. So I added "reserved1", "reserved2" and so on. Now it works! Another thing I found is that my module has version 2.01 on it, and when I tried to update it, I got an error about the flash memory. Doing a little research I found out that my module is not original and it does not even have a flash memory, so no way to update it. Thanks for your help and I hope this helps someone with the same problems.
Hi...i loved the video... And I'm making one... But i only have NEO 6M GPS module.. So it's not working.. What do i need to change in the code...plz help.
These videos should help: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-TwhCX0c8Xe0.html ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ylxwOg2pXrc.html
iforce2d Hey...i tried...but i think I'm bit confused... If you can modify your code to NEO 6M It would be great full..Can you help? My email is... pushpitha.munasinghe@gmail.com
try moving the updateScreen function to be before the loop function. Or you could add a forward declaration for it en.wikipedia.org/wiki/Forward_declaration
His code works with NEO-7M directly I believe. Code changes needed to use NEO-6M (I just used a NEO-6M) and I think maybe just a small structure change to use an M8N module.
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ylxwOg2pXrc.html 9600 is plenty for 10Hz though. Especially if you're gonna attempt software serial, nothing to be gained by making the connection faster.
@@seblebarge Thats a big change, not just a couple of lines of code. This uses an I2C OLED display and the OLED library. In theory you could use something like the Adafruit 7 segment (www.adafruit.com/product/879) and their library but you are doing some pretty significant changes.
If you want the speed displayed on the FPV screen properly, (along with a lot more information as well) you could use a flight controller like we use for planes/drones. Eg. omnibus f4 pro, has OSD onboard. Would give you something like this result: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-dIvC4ZB88h0.html
+iforce2d hi, I am planing to make a HUD windshield with arduino and Ublox - NEO6MV2 GPS Module by using 3x7 segment display. Speedometer is the only thing which I need.. What do you think is it possible to make it like this? And also I want to make a mirror effect because the speed should be on windshield.
+Tomas Naujalis I don't see why the arduino+GPS part of it shouldn't be possible, basically that's what I just did in this video. If you are talking about the display, brightness, reflecting, mirrors etc I really don't know. I have a feeling it will be difficult to see in daylight.
Hi, I built it with a neo m8n and I am experiencing a very weird delay (5 or 6secs). Does someone know the reason for that? And where did you get your neo7 from?
I had a similar problem when working on the 'sbusmixer' not long ago (although it was about 2 sec delay), but I can't remember what the cause was or how I fixed it. If I remember I'll let you know. I got the neo7 from Banggood about ten years ago, they've pretty much been superseded by m8n which is a better performing module for the same price.
+iforce2d Seems to be a HTML5 videoplayer cache problem. Works with Flash player on IE. Just need to find where the HTML5 player cache is and empty it. :)
Hello, which gps model version did you use in this video and will the code work for www.flyingtech.co.uk/electronics/mini-ublox-neo-m8n-gps-cleanflight-betaflight-inav
Terry Jones 1 second ago I believe the difference is the structure for the M8N module is larger than the NEO-7M . If you look at the docs for the NEO-7M (www.u-blox.com/sites/default/files/products/documents/u-blox7-V14_ReceiverDescriptionProtocolSpec_%28GPS.G7-SW-12001%29_Public.pdf) and the M8N (www.u-blox.com/sites/default/files/products/documents/u-blox8-M8_ReceiverDescrProtSpec_(UBX-13003221)_Public.pdf) and specifically compare the structure for NAV-PVT you will see that NEO-7M is 84 bytes and M8N is 92 bytes. Adding more reserved at the end of the NAV_PVT structure in his code should solve the issue..
The NAV_PVT message is only available from 7 series onward. You can use other messages to get the same information though. The UBX settings video linked to in the description might be helpful.
I'm really interested in making one of these but I have no experience with Arduino. Do you have a parts list you could recommend to me so I can build one to install in to a car? Thank you!
Arduino pro mini: goo.gl/xin02G OLED screen: goo.gl/YcXosi GPS module: goo.gl/9gxc6J You will also need an FTDI adapter to upload the program to the arduino: goo.gl/RbfWpc
Any ublox chip from the 7 series onward should work with my code, which I think would exclude the adafruit one since it appears to be non-ublox. I'm not so sure the adafruit one is better anyway. It has some potentially nice features like a connection for an external antenna, but the m8n I linked to does such a good position fix I think it would be hard to beat. It also has a compass if you ever want to use it for GPS features on your quadcopter :)
Thanks! void draw() { //u8g.setScale2x2(); don't do this! u8g.setFont(u8g_font_courB24); u8g.drawStr( 36, 45, speedBuf); When I changed Font to others ,The speed stuck in 20km/h(seem like offline) why?
I think you're asking the wrong person :) But at a guess, I would say that the "size" you are talking about is for the points to describe the text, not the size of the on-screen memory required to display it. These are not the same thing. For example, I could tell you to draw a line from points (0,10) to (10,10). It takes me four numbers to describe the line to you, and the on-screen memory used is 10 pixels. If I said instead draw from (0,10) to (50,10) that's still four numbers to describe but now 40 pixels on-screen. Just a guess...
Hi ! Can you help me with this problem ? I post a video drive.google.com/open?id=0ByPT1E7FC_MdTVh4X1d0V2hHVHM I connect it using arduino uno and it is not responding.