Gps car distance tracking

Hello. I am a total newb to arduino and i need heelp in my projects. So for the first one i would like to make a arduino with a small display that measures cars distance traveled with a gps module and saves it. Just like the one that comes in car from factory but becouse mine is broken in my oldtimer I want to make a new one with arduino.
So what parts would I need? can anyone help?

An Arduino, a GPS module and a display

can arduino store the traveled distance so it would show up again when the car starts next day or do I need some kind of memory attached to it?

and I have chosen a project to begin with which is much too hard.
Please get some experience first.

I would have thought the parts you need are obvious. An Arduino, a display, an SD card to store the data in and a GPS module, and a push button for resetting the original point.

You need to save the GPS reading to a file on the SD card whenever the reading shows a certain distance since the last one you stored, that distance should be more than the random fluctuations your GPS gives you.

Then you have to do some non trivial, but not too hard, maths to convert latitude and longitude differences into distance, then add them all up together. It would help if you also used a circuit that gave you advanced warning of loss of power so you can close the file on the SD card before it is potentially corrupted.

An Arduino can save a value to EEPROM and reload it when restarted, but as Mike suggests an external SD card may be more appropriate. This would avoid the need to save the value as part of the shutdown process by saving the current value frequently

Yes but you can get corruption and possible damage if the power goes in the middle of an EEPROM write.

Hence my suggestion to use an SD to avoid the need to mess around with detecting shutdown and saving to EEPROM. Basically I was supporting your suggestion

wont need the buton to reset.

do you think every 100meters would be ok?

I was planing to connect the arduino to the car battery. do you think that is a good idea? and if I have the SD card do I need constant 5v power to arduino cicuit? even when the car is turned off. My guess is it doesent need it?

If you want some background reading material, try a Google search on;

'Arduino GPS car distance tracking'

Seems to be quite a lot of stuff out there.

I'm with @Grumpy_Mike on this, @tonco888. This is awfully ambitious for a first project (I can tell from your questions that you are not only new to Arduino, but probably new to developing microcontroller projects). Be prepared for it to take many weeks, if not months.

Just to help us: Have you done any programming before? Do you know the 'C' language? What experience do you have in electronics?

As a general approach, it would be a good idea to break the project down into very small bites, building up its functionality as you go along. If you try to implement the whole thing in one go, you'll end up with too many obstacles to overcome simultaneously.

Meanwhile, start with some tutorials and simple example projects, just to get a feel for Arduino.

I have not done any programming, but I have a friend who can help me with that and write the code.
In electronic I have some experiance since I have finished electromechanic school here in Croatia.

I am aware of that and it is not a problem if it takes a long time

No. Automotive power is terribly noisy with high voltage spikes that can instantly destroy unprotected equipment. Use a good phone charger made specifically for automotive use instead.

Get some experience with simpler Arduino projects before seriously considering this one.

It depends what you mean by "connect".

Certainly, using the car battery as a source which will not turn off while your program is running is quite sensible. You need to connect to one of the circuits that is always on, such as that which powers the roof light.

You next need to consider that the Arduino actually operates on 5 V and the internal regulator on the older boards - UNO Mega 2560, Nano, Pro Mini and such - is not usable for serious projects so you need an external "buck" regulator rated for automotive use, to provide your 5 V to the "5V" pin and ground. As jremington points out, a possible such regulator is a good quality automotive "phone charger" although you will not be able to just plug it into the cigarette lighter as that is obviously not a reliable power source.

And speaking of practical Arduino versions, the UNO format is not useful for practical projects such as you cite as the form factor - with socket pins - is particularly inconvenient unless you have a matching "shield" which contains all the parts you want. A Nano is generically a good start or a Pro Mini with a USB adapter which can be disconnected after you have finished programming and no longer need to connect to a PC. The Pro Mini also avoids the current draw from the USB adapter.

Hello tonco

I wanted a GPS speedo for my car. I knew next to nothing about GPS and nothing about Arduino. After two years of effort I now have a device that works brilliantly.

As others have said -- this is a highly ambitious project.



1 Like