My company car that I normally drive tends to have a "small" problems from time to time, the speedometer fall to 0 Km/h when driving (after some time it resumes again).
Normally this is not a big issue since if you know how to drive a car, you are not, I hope, always looking to the speedometer. You now more or less the speed that you are driving. The problem present it self when you need to decrease speed to the road limit that you are entering and you notice that "the speedometer is down".
This presented like a good opportunity to build a new project, "The GPS Speedometer". Of course the ideal solution would be, really repair the car or use a normal GPS or use an app with this function but what would be the fun in this.
MicrocontrollerI selected the DFRobot Dreamer Nano V4.1 because it has a usb plug that I can use for power and a compatible breadboard pinout.
Check DFRobot wiki page for more info regarding this microcontroller.
GPSI'm using the UBX-G7020-KT, that comes with an integrated antenna and allows to change the refress rate until 10Hz(for this project this featuring can came in hand).
On the DFRobot wiki page you will find more info regarding it.
DisplayI wanted to have a good display without "blowing" the budget, my choose was the OLED 2828 Display Module. Check again the wiki page for some more info.
PowerThe power for the system will be provided by the car cigarette lighter socket.
CasingThis time I when for designing a casing and 3D printing it. After some attempts, in the end I was hopping to get something like this.
The design with the LED's was not my first choice. So initially I designed this schematic for the circuit.
But in the end the final result was this.
I forgot to take some pictures of the assembly process, so what I can say is that everything is assembled in the prefboard, in one side is the oled display and in the other the microcontroller and connections. In order to make this easy leave the oled display for last since some of the connections will be done on its back.
CodeIn order to run the code you will need to have installed the following library 's in your Arduino Library Folder.
- U8glib - For the oled display.
- TinyGps++ - For the GPS.
The code is "printing" the speed, course, number of satellites, latitude and longitude.
But it is possible to display much more information, ex.: time, date, distance to point. Check the full example of the TinyGPS++ library to see all available options that you can have regarding the information retrieved by the GPS.
The other featuring is the LED's bar. I've set it up for a max. of 190Km/h. I live in Germany and some of the highways do not have limits, if not, I would place +/- the maximum road limit available.
Simply change the limit in the "map" function to the one that fits your needs.
ConclusionI still relatively new in the 3D printing word, so it is natural that my prints do not come perfect.
In general I can not complain but I still have a lot to improve on this area. The back plate currently is not fixing go good as in the beginning, so some more design updates will be needed.
Also I left out the GPS antenna in the back plate, thing that I will not do in the next design. The course display also did not work so well, but this was only to a little detail. In the future I'm planning to replace with something more useful, ex.: time of arrival to a point (size the majority of my trips are going back and forward).
Fell free to comment or send me a message if you found any mistake or if you have any suggestion/improvement or questions.
"Do not get bored, do something".
Comments