Arduino GPS speed logger

  Рет қаралды 14,806

iforce2d

iforce2d

Күн бұрын

Sketch: www.iforce2d.net/sketches/GPS...
UBX protocol stuff: • UBX binary protocol, e...
GPS module (Banggood): goo.gl/r0Txmz
OLED screen (Banggood): goo.gl/CXtw3r
Quad specs: SS 2204, Kingkong 5040BN, 3S 1400mAh 40c, AUW 570g

Пікірлер: 82
@hoggif
@hoggif 8 жыл бұрын
Some simple filtering is probably needed to get rid of single jumps that you always get with poor gps signal. You could eg. take 5 samples, discard the extremes and take the average of the 3 mid values. You can add a condition like min 4-5 satellites to discard anything with very poor value (and/or require some value for HDOP).
@Les_Grossman
@Les_Grossman 7 жыл бұрын
Cool little device- thanks for sharing! Looking at your footage- you might want to tune your PIDs though?
@Rustaceann
@Rustaceann 6 жыл бұрын
I have also had this problem with these screens. I remedied this by drawing a small black box over only the area that will be updated instead of redrawing the whole screen. This allowed me to show sensor data from in multiple places on the screen that would update many times per second as well has have moving graphics and animations. 1. Create a static text field: "GPS: " 2. Change "updateScreen()" to something like: display.drawRect(x,x,x,x, BLACK); display.setCursor( just after static line "GPS: ") displayln(gpsVariableData) 3. Repeat as necessary for each variable as necessary and you can still call them simultaneously from updateScreen() and it will be many times faster than redrawing the whole screen.
@SailorJohn34
@SailorJohn34 7 жыл бұрын
awesome that you put a direct link to the zip file. Thank You. Trying this soon.
@roidroid
@roidroid 8 жыл бұрын
i guess that gives a rough answer to the "how far can it go?" question too. If a battery lasts about 10mins you'd get around 10 to 20km of range (autopilot permitting)
@lsdave
@lsdave 8 жыл бұрын
Could you use nested interrupts and set the gps to a higher priority than the screen?
@muh1h1
@muh1h1 8 жыл бұрын
Top questions asked by strangers going by: 1) how far can it go? 2) how high can it go? 3) does it have a camera? 4) what did all of this cost? 5) how long can it fly with one battery? 6) how fast can it go?
@iforce2d
@iforce2d 8 жыл бұрын
+muh1h1 oh yeah, does it have a camera, that's gotta be my number three
@Pourya49
@Pourya49 6 жыл бұрын
Hi, I'm going to build this gps but I want to know how mush accurate is this?
@mmbodnar
@mmbodnar 7 жыл бұрын
Hi, thanks for the video. As a beginner amateur Arduino programmer.... I am trying to figure out how to log the 1 Hz binary messages to SD card for viewing or processing later. Have you done this? all the tutorials are how to log the parsed NMEA data but would like the raw binary for efficiency.
@iforce2d
@iforce2d 7 жыл бұрын
Pretty sure the write function will write bytes to a file.... www.arduino.cc/en/Reference/FileWrite
@davidroul7374
@davidroul7374 3 жыл бұрын
Hello, and thanks for the awesome work. I have troubles in finding GPS neo-M8N modules with flash memry so you can update firmware. You pointed a Bangood link in the header of the video, but it is broken. Can you share us a link to recommended sellers ? thanks again
@iforce2d
@iforce2d 3 жыл бұрын
These days I usually use a BN-220 module, they work well and are pretty cheap. www.banggood.com/search/bn-220.html
@yaseenalrifaie4255
@yaseenalrifaie4255 3 жыл бұрын
is it possible to detach the screen and make it wirelessly?
@themiklesshow2706
@themiklesshow2706 7 жыл бұрын
Hello. What GPS module do you use?
@gertjansaarberg11
@gertjansaarberg11 7 жыл бұрын
mike look one replay down.!
@gertjansaarberg11
@gertjansaarberg11 7 жыл бұрын
Witch GPS are you using. The link is not working aneymore. I like to build one. gert-jan
@iforce2d
@iforce2d 7 жыл бұрын
This one looks very similar (also a 7M) goo.gl/lBD3OC But that's out of stock too right now, and these days you can get an M8N module for around $20 so not much point to get a 7M. I use this one on my quads whenever I can, they perform very well: goo.gl/mLtazm Haha again out of stock on BG. Just look around for "M8N".
@dirkpienaar8521
@dirkpienaar8521 6 жыл бұрын
Hello Thank you this helped me a loot I do want ask if you can help me more I have looked at the other vids but can get the awnser I want to record the max altitude also but cant seem to figure it out please can you help I am using your code in this project
@carloshernanduquesanchez703
@carloshernanduquesanchez703 2 жыл бұрын
hello i'm trying to do this project but i don't have any gps signal, the arduino at this moment only gives me a height value but it doesn't mark any speed or satellites.... i'm using a beitian bn220 gps..... which can be failing? Thank you
@pitersmieja8395
@pitersmieja8395 Жыл бұрын
I have only had success with the NEO modules that are designed for the ubx software. I made the same mistake in the past trying to use the bn220 and it never worked
@jankomuzykant1844
@jankomuzykant1844 8 жыл бұрын
I think You should anyway try interrupts for receiving GPS packets without loseing data, especially on 10 Hz. For graphic LCD - u8g library. The same screen (also I2C, mini pro 16 MHz) is enough fast for simple graphics animation then there is something wrong (slow) with I2C in this sketch.
@iforce2d
@iforce2d 8 жыл бұрын
+janko muzykant interrupts is a good idea. Yeah I do not remember this screen being so slow in the past when I used it before. I have occasionally played with the I2C speed in the arduino Wire library, but right now I have it set back to the default so that should not be the problem.
@iforce2d
@iforce2d 8 жыл бұрын
+janko muzykant I've been trying the u8g library lately, it's pretty nice. I also realized that the slow update is caused by the software serial connection of the GPS. The interrupts of the incoming data are taking up a lot of time. I switched to using the hardware UART and it runs nicely.
@jankomuzykant1844
@jankomuzykant1844 8 жыл бұрын
+iforce2d Software serial is nice for fast, not very time rigorous diagnostic but in this case (10Hz GPS update rate) hardware UART works perfect. Glad to know, keep going :)
@claudiufarcas
@claudiufarcas 8 жыл бұрын
1) is this a drone? 2) how much does it cost? 3) how far can it fly? etc.. ;)
@anomoly40
@anomoly40 2 жыл бұрын
So, I tried to follow the link to the sketch but it looks like the link is broken.
@iforce2d
@iforce2d 2 жыл бұрын
Yeah, KZfaq likes to mangle those links sometimes. Even when I paste it here again it might not work. You'll have to copy and paste the URL into your browser address bar, just up to the 'sketches' part is enough to see a list of all sketches related to my videos.
@RyuuzakiJulio
@RyuuzakiJulio 8 жыл бұрын
you said I²C is slow. is ISP or RX-TX faster?
@iforce2d
@iforce2d 8 жыл бұрын
+Julio Ryuuzaki I think it may have been more that the software serial was slow. After this I tried the u8g library for this screen which improved the speed too. In general I2C is much faster than UART (RX/TX)
@RyuuzakiJulio
@RyuuzakiJulio 8 жыл бұрын
+iforce2d I had been using several OLED screens like yours. Some with the Arduino Pro Mini like you and also with the 100Mhz Mbed platform. Thinking more MHz would give me more speed. But in reality the speed of communication is the problem. If the controllers would directly control the screen it would be faster but it will use many cables, the problem is the screen is controlled by a controller that needs to be operated with "commands" sent trough I2C, UART or SPI.
@Just-A-Guy-Learning
@Just-A-Guy-Learning 5 жыл бұрын
i get a height incorrect error when flashing
@chrisroddick3899
@chrisroddick3899 4 жыл бұрын
I deleted those 3 lines of code then flashed .
@wdave6944
@wdave6944 8 жыл бұрын
Though not of me, the most asked questions I hear are "Hey, you come here often?" followed by "What's your sign?" ... I gotta find a better place to hang out ;) sorry;)
@roidroid
@roidroid 8 жыл бұрын
Get this one a lot: "Why are you flying a quadcoptor in my dance club?" and "Didn't i tell you i'd call the police if i saw you here again?!"
@stewartrv
@stewartrv 7 жыл бұрын
GPS Link is broke, can you update the link or tell us what the module details are pls.?
@iforce2d
@iforce2d 7 жыл бұрын
Any ublox module will do, try to get a 7 or 8 series one, eg. neo-7m or m8n.
@Soeren_Hetzer
@Soeren_Hetzer 7 жыл бұрын
I have got the neo 6m and it does not work. Is it the wrong antenna for the script or should it also work?
@iforce2d
@iforce2d 7 жыл бұрын
The NAV_PVT message is only available on 7 or above.
@Soeren_Hetzer
@Soeren_Hetzer 7 жыл бұрын
Thx
@Soeren_Hetzer
@Soeren_Hetzer 7 жыл бұрын
I have got an neo m8n and it still dosen`t work, do i have to change something in the script or should it normally work as it is?
@ReubenHorner
@ReubenHorner 8 жыл бұрын
So on 4s many magics will happen i guess
@jahroen
@jahroen 6 жыл бұрын
hello thank you for making this vid. i,m geeting a error when i try to upload the skecht i dont know what to do , i am a noob when it comes to programing Arduino: 1.6.9 (Windows 7), Board: "Arduino Nano, ATmega328" GPS_MaxSpeedDisplay:20: error: #error ("Height incorrect, please fix Adafruit_SSD1306.h!"); #error("Height incorrect, please fix Adafruit_SSD1306.h!");
@iforce2d
@iforce2d 6 жыл бұрын
maybe you just need to get the Adafruit SSD1306 library github.com/adafruit/Adafruit_SSD1306 www.arduino.cc/en/Guide/Libraries
@jahroen
@jahroen 6 жыл бұрын
Sorry i forgot to say i have downloaded that library via arduino software, but if the other is different then try that to
@jahroen
@jahroen 6 жыл бұрын
thank you i got it to work , but no data coming in from the gps its not getting a lock
@gertjansaarberg11
@gertjansaarberg11 7 жыл бұрын
is it possibe to use a other gps ? regards
@iforce2d
@iforce2d 7 жыл бұрын
This requires a ublox GPS, that does UBX protocol.
@gertjansaarberg11
@gertjansaarberg11 7 жыл бұрын
to use a other gps with the tiny gps plus libary i have to complete make a other code ? gj
@iforce2d
@iforce2d 7 жыл бұрын
Yes. This code requires a ublox GPS, that does UBX protocol.
@gertjansaarberg11
@gertjansaarberg11 7 жыл бұрын
Thanks. Can you mark the section who had to be changed? gj
@iforce2d
@iforce2d 7 жыл бұрын
Well, basically the whole thing. You could look into the TinyGPS library, which handles NMEA messages.
@icebluscorpion
@icebluscorpion 2 жыл бұрын
You should structure your code as OOP Object Oriented Programming and move away from procedural coding. Because that a very large code to refresh procedurally. In the time that you refresh the screen the GPS had sent 50 times the information. That's the reason why you get a multiple/division of 10. It gets every 5 sec in sinchrony and the rest of it will not match, because everything under 5 seconds is not a multiple of then.
@iforce2d
@iforce2d 2 жыл бұрын
The microcontroller doesn't care if the code is OOP or not, if anything it will just run a little slower with OOP. The screen is slow because data is transferred via I2C, and OOP will not help that.
8 жыл бұрын
anyways whats that in mph? as kmh is crap measurement i need mph lol?
@iforce2d
@iforce2d 8 жыл бұрын
+Jay Mee there are whole other countries out there Forrest...
@ReubenHorner
@ReubenHorner 8 жыл бұрын
+Jay Mee I thought everyone sorta knew that 60 mph = 100km/h. Also who needs google when you have youtube comments
8 жыл бұрын
yer some countries use khm and others use mph it should be same world wide ppl need to forget kph, and same goes for temperature c is better than f unless c goies into the minus then f is ok for that reason :D
@iforce2d
@iforce2d 8 жыл бұрын
+Jay Mee you are joking right?
8 жыл бұрын
mph makes more sense! even things that should use fps or knots are sometimes represented in mph as that's the best scale to understand! everyone recognizes what a mile is as 1 mile bridges here and there a 1000 meters is no good lol i hate having to convert it in my head it gives me head ache!
@SailorJohn34
@SailorJohn34 7 жыл бұрын
Flying FPV?
@iforce2d
@iforce2d 7 жыл бұрын
yes, of course :)
@gertjansaarberg11
@gertjansaarberg11 7 жыл бұрын
i understand i will order a new gps. thanks
@iforce2d
@iforce2d 7 жыл бұрын
See if you can get a M8N one, they perform really well and you can do all this UBX stuff with them.
@gertjansaarberg11
@gertjansaarberg11 7 жыл бұрын
only the 7 m is availble
@Soeren_Hetzer
@Soeren_Hetzer 7 жыл бұрын
Hello, i am building your speed logger, but in my case for skiing. I have a problem were I think you might can help me. I have bought this GPS module drotek.com/shop/en/drotek-parts/613-ublox-neo-m8n-gps-hmc5983-compass-xl.html but it doesn't want to work. I changed it to 10Hz. do you know were the problem is or how i can get it to work ? Thanks and sorry for my bad english.
@iforce2d
@iforce2d 7 жыл бұрын
no, how could I possibly know.... (tip: saying just "doesn't work" is a completely useless description)
@Soeren_Hetzer
@Soeren_Hetzer 7 жыл бұрын
Ok sorry the monitor is showing everything but it doesen't find the Gps signal even wenn i am out and wait several minutes.
@iforce2d
@iforce2d 7 жыл бұрын
Connect the GPS module to the u-center app and check what's happening. kzfaq.info/get/bejne/it2YdrthyJ68lWQ.htmlm48s
@Soeren_Hetzer
@Soeren_Hetzer 7 жыл бұрын
I have done that and changed the rate to 10hz and it also works and finds some satellites. But one it's hooked up to the arduino it couldent find them. Do i have to change anything else than just the Hz ?
@Soeren_Hetzer
@Soeren_Hetzer 3 жыл бұрын
@@alaskahudson unfortunately I gave up
8 жыл бұрын
kilometers not killer meters!
@iforce2d
@iforce2d 8 жыл бұрын
+Jay Mee killergrams?
@user-py2dq9ez1k
@user-py2dq9ez1k Жыл бұрын
hello @iforce2d . i want to build this speed logger and shall buy Arduino promini, gps neo 7m, and lcd oled 128x63. but your link for wiring and the code is broken. could you provide me the wiring and code please ?
@iforce2d
@iforce2d Жыл бұрын
Sorry, try here www.iforce2d.net/sketches/
@user-py2dq9ez1k
@user-py2dq9ez1k Жыл бұрын
Thanks
@user-py2dq9ez1k
@user-py2dq9ez1k Жыл бұрын
Is it ok to use 3s 12 V battery as power supply for the arduino pro mini ?
Arduino GPS speedometer
23:05
iforce2d
Рет қаралды 85 М.
路飞被小孩吓到了#海贼王#路飞
00:41
路飞与唐舞桐
Рет қаралды 76 МЛН
Red❤️+Green💚=
00:38
ISSEI / いっせい
Рет қаралды 75 МЛН
100❤️
00:19
MY💝No War🤝
Рет қаралды 23 МЛН
Arduino GPS  Speed Indicator!
3:25
Compact DIY
Рет қаралды 2,2 М.
Logging GPS Data to an SD Card with Arduino
18:14
ForceTronics
Рет қаралды 23 М.
How I Designed the World's Fastest Drone |  Guinness Record
14:52
The GPS SPEEDOMETER Everyone is using! - GSM020 Unboxing & Review
7:49
Arduino Wearable OLED Data Display Project Revisit
16:36
Julian Ilett
Рет қаралды 68 М.
UBX binary protocol, extra tips (arduino)
26:39
iforce2d
Рет қаралды 34 М.
Build Your Own Small Gps Tracking Using Sim28 GPS Module
4:11
Just Do Electronics
Рет қаралды 1,6 М.
5Hz NEO-6M Speedometer with Arduino
7:58
3D Electro Tech
Рет қаралды 5 М.
GPS module showdown - BN180, BN220, BN880, 7M, M8N, M8P
29:54
My daughter always appears at the most critical moments
0:35
昕昕一家人
Рет қаралды 8 МЛН
ЖВАЧКИ!!!
0:47
Li ALINA
Рет қаралды 1,6 МЛН
Spot The Fake Animal For $10,000
0:40
MrBeast
Рет қаралды 50 МЛН
Как котики ложатся спать, до конца!
0:31
🌀 Вирусные видео
Рет қаралды 6 МЛН