Introduction: Speed HeadUp Display
Easy and cheap HeadUp display under 15 $.
First - English is not my native language - so sorry for bad grammar :-)
Second - My first Instructable. Please, be patient... :-)
I´ve started thinking about HeadUp diplay in summer, when I left piece of paper on my car , near front window.
I´ve been surprised when reflection of this paper has been perfectly readable - so I decided to try to mirror something more usefull than just sheet of paper.
And when I found prices of GPS modules and LED matrix displays for Arduino, I was sure - I need GPS driven HeadUp speed display.
So, what we need?
Used material -
Arduino - Arduino Pro Mini 5V/16Mhz ... (Aprox. $ 1,8 )
GPS module - Ublox Neo-M8N module chip UART TTL Smart GPS gnss antenna dual GLONASS receiver (Aprox. $ 6.90)
LED matrix display - MAX7219 Dot Matrix Module For Arduino Microcontroller 4 In One Display (Aprox. $ 3,75)
Photoresistor - 5549 Light Dependent Resistor LDR 5MM (Aprox. $ 0.70 (20pcs))
StepDown Voltage convertor - Mini360 DC-DC Buck Converter Step Down Module (Aprox. $ 0.33)
Some resistors
wires
Optional: LEDs
Arduino can be used any type - I´ve choosed this small chinese clone. It works on 5V TTL logic. - If you use the same type as me, you will need USB to TTL convertor for loading code into arduino. It is just for loading, for normal operation is not necessary.
GPS module - So there are plenty of cheap GPS modules on eBay or AliExpress. Most of them works on 3,3V.... I decided to pay little bit more and buy 5V TTL logic module. So, I need no level shifters for Rx/Tx communication and I need only one DC stepDown module for 12V to 5V conversion. Integrated antena is benefit :-) And can receive GPS, GLONASS and BAIDOU satellites.
Display - For our pusposes is purchased module too big - for correct speed information is needed to display three digits. There is so few drivers, who can reach more than 999 km/h :-) So... Half of this display module is enough. Fotrunatelly pcb is modular and can be divided, for example, by fret saw. Carefully :-)
Display brightness is regulated according to ambient light. More bright in sunny afternoon, less in highway tunnel. Voltage divider is created by LDR 5549 and 150k resistor - voltage according to light is measured on analog port A0 of Arduino.
There is optional use of two, or one LED for indication GPS lock. In case of two LEDs there are Green and Red LED connected to pin D8 and D9. Green means 2D fix, Red means 3D fix... After aprox. 5 month use i can say, that they are not necessary :-) But, if you want to know... There is also possible to use Pps pin from GPS module - if GPS is locked there is appearing 5V pulses (one second duration if fixed).
A few words about power - All components are powered by 5V. So we need make 5V from 12V (or 24V) from board power. I have good experience with DC-DC converter mentioned above. It is small, cheap and can handle current up to 2A. Which is much more than we need. Device has consumption around 150mA. Output voltage of converter is regulated by small screw - Make sure, that is 5V before connect Arduino and rest of device.
Input voltage you can take, for example, from cigaret lighter socket in your car, or from power socket of your radio... But, be carefull. If you do not know, where take your 12V, use lighter socket!
About code -
Library for serial communication should be common SoftwareSerial library, I´ve used NeoSWSerial library because is little smaller. You can even use Rx/TX pins of Arduino and avoid SoftwareSerial, but in this case, you have to accordingly change code.
Library for matrix display is brilliant PAROLA https://github.com/MajicDesigns/MD_Parola It allow us to display mirrored text just in one command :-) So, thanks to author.
GPS - Module gives in text mode straight informations about time, position, fix, number of satelites, speed and more... It is defined by NMEA protocol. I´ve tried some of GPS parser libraries, but finally I decided to directly parse NMEA messages to get required informations. Mainly because all tried libraries has been too big and provide lot of unwanted informations.
Speed is displayed in km/h. If you want to use miles per hour, please make changes in code. Comment conversion from knots to km/h and uncomment conversion to mph
my_speed = my_speed*1.852; //Original speed from NMEA is in KNOTS... So we have to convert it to km/h
//my_speed = my_speed*1.15077945; //This is conversion for mph
So... That´s all...
I hope, that all is written in clear way and your device will work on first attempt :-)
Feel free to write me at ludek.talian@gmail.com if you have any problems.
EDIT: Some users found strange behaviour of display - digits are not mirrored and they are shifted about half of position.
This is, probably, caused by new version of MD_Parola library...
So. Here is solution, which works for me -
Go to your Arduino library folder. Find folder according to MD_MAX72xx library . And inside this folder find folder named src...
In this src folder find file MD_MAX72xx.h. Open this file in some text editor and change
#define USE_FC16_HW 0
to
#define USE_FC16_HW 1
accordingly find and change
#define USE_PAROLA_HW 1
to
#define USE_PAROLA_HW 0
And save...
Detailed info about display HW settings -> https://arduinoplusplus.wordpress.com/2017/04/14/parola-a-to-z-adapting-for-different-hardware/
Attachments
Step 1:
New version of code - version10. Changed startup - now is displayed number of satellites before fix.
Added support for speed limit warning - three LEDs according to limits inside city, outside city and highway...
44 Comments
3 months ago
Hello ludektalian, sir, I made this project, but I connected it correctly according to your code and wiring diagram, 8*16 LED dot matrix, there is no display, please help, thank you
Reply 2 months ago
Hi! Sorry for delay - Please, send me more info about your problem to my email - ludek.talian@gmail.com. We should find solution together.
Ludek
Reply 2 months ago
Hello, Mr. Ludektalian, thank you for your reply, I am in the new version (the one with 3 LEDs), I have slightly modified the code, it has been solved, it will be displayed, and the test effect is very good, I will install it on my motorcycle, I Cancel the reverse display (mirror image) in the code. Of course, the motorcycle does not have a windshield. I am currently creating a 3D printed shell (with waterproof), which will be erected on my motorcycle after it is installed. I changed the code _ino of the new version, it was successfully displayed, and it will be sent to your email, thank you
PS:Type-c charging module + lithium polymer battery + buck-boost module has been added (can be input into the car 12v), it will be assembled, it can come from free movement, and put it on my motorcycle
Reply 3 months ago
It was not displayed at first, but I researched and changed the code, and it has succeeded. I canceled the mirror item for the font, and I have added a Type-c charging module + lithium polymer battery + buck-boost module (can be input into the car 12v), and it will be assembled and ready to go. , on my motorcycle
This is my actual assembly schematic:
3 months ago
我來自台灣:
本來沒有顯示,我研究更改代碼,已經成功了,字體我取消鏡項,我已添加Type-c充電模塊+鋰聚合電池+升降壓模块(可輸入汽車12v),會在組裝好, 可以來行動,放在我摩托車上
這是我實際組裝ㄕˋ示意:
I am from Taiwan:
It was not displayed at first, but I researched and changed the code, and it has succeeded. I canceled the mirror item for the font, and I have added a Type-c charging module + lithium polymer battery + buck-boost module (can be input into the car 12v), and it will be assembled and ready to go. , on my motorcycle
This is my actual assembly schematic:
4 years ago
I made it as well but i had the problem that some of the pixels did break during summer, i parked my car in the sun and after a day some of the pixels stoped working. Sad i glued them in with epoxy now i need to rebuild the casing and the display.
5 years ago on Introduction
This is a neat project and not too difficult. I did have some problems with it to begin with but Ludek and I worked it out. The most recent code is version 7. Can't guarantee anything before that. First my receiver wouldn't lock on to satellites I found out that it was, I just didn't know what information is contained in a GPS sentence. A google of GPS sentence breakdown helped a lot. Secondly, Your supposed to get a $ at the beginning of the sentence. I never got one. third and this was the biggest problem I had. My 8x16 display was offsetting too far to the right and the display was not inverted to make a readable display on the windshield. After trying to run some of the other MD_Parola examples and finding they were garbled. I found an article on the internet that told how to run a test program and adjust the MD_Parola and MAX72xx include files to correct the issues I was having.That did it.
Reply 5 years ago
bonjour
avez vous trouvez comment regler le probleme MD_PAROLA
merci
5 years ago
I´ve removed text part of code from article, because internal Instructables editor changed some rows and made it unusable.
Please use attached file...
I´ve made some minor updates in code - mainly translated names of variables to English.
5 years ago
This is of great help to me, I'm making a HUD using an OLED display, I've been having issues with getting speed info from TinyGPS, I think it was just an issue that I wasn't waiting for the GPS to be available. I'm going to try your code though, I think it will work more efficiently anyway. Theoretically I can add more functionality later.
Thanks.
5 years ago
Very nice project !
I wonder if I can use some GPS a bit less expensive.
What do you think ?
Reply 5 years ago
Sorry for delay - I´ve been ill :-)
Of course - you can use any GPS module which have serial (Rx/Tx) communication a his output is NMEA sentences... But I have bad experiences with cheap GPS -around 3-4$ on AliExpress, because all I´ve used has been not so much reliable... Mostly problem with external antenna.
And second - these cheap modules use 3,3V TTL logic. I´ve seen some people connect them directly to 5V Arduino, but I think that this is not correct - you have to use level shifter...
I think, that difference 3 or 4$ is not so big and there is less problems, than if you use cheap module...
5 years ago
Nice instructable! I live in the US, near the Canadian border. I frequently visit my sister who lives in Canada. I’m wondering if it’s possible to change the display from KPH to MPH with say a push button? This could be very handy for me and my family.
Reply 5 years ago
Sure! There is possibility to change this... I can even imagine to make automatized switch based on geographical location... If you cross for example N48.99870, northern direction, device automatically switch to km/h :-) And vice versa - in Southern direction it will switch to mp/h...
5 years ago on Introduction
Great idea!!.. I would add blinking or color changing (if possible) when speed goes over some limit. Congratulations on your well done first instructable.
Reply 5 years ago
Color changing is possible if you use more expensive dot matrix - This, which I've used, is just red...
I understand idea you mean - if you are "over limit" - do some warning...
Maybe using of different colors LED should work.
Blinking should be distrupting, don't you thing?
Reply 5 years ago
Exactly. Blinking is disruptive which exactly what I want. In my area you will get a big ticket from the police and the idea is exactly that the display helps me avoid that.
Reply 5 years ago
OK... But imagine - you drive, for example, 49km/h - then you increase to 50km/h -limit -blinking display - you slow to 49 -speed to 50 - again blinking- 49-50-49-50 - It will continuously blinking... I think it is not good idea... I prefer to lit some warnig LED - it will reflect in windscreen in the same way as display... :-)
Reply 5 years ago
Yes, I understand YOU don't like blinking but perhaps I did not make my self clear. That is WHAT I WANT. You can set yours as YOU WANT. Your device is a great starting point and I THANK YOU for sharing it but from that good idea more ideas could be build on top. I even would make more changes to MINE like using a color ramp for the speed so when going slow the display will be blue and the color will go to red when reaching speed limit, also the other half of the display could show elevation or pitch, or temperature etc, but again as I said on my first comment that is what "I would add" and I'm not saying you should add to yours. Again thanks for sharing.
Reply 5 years ago
OK. OK. I understood :-) I´ve just thought about situation if you drive on edge of limit... :-) Change color of whole display is good idea - I think better than blinking... But in that case you have to use much expensive dot matrix... So... If you do your enhanced HeadUp, share your improvements... Thanks!