I have purchase a GPS receiver at junk market. The GPS receiver continuously outputs the fix data in NMEA-0183 format. When record the fix data into a storage media, it enables many interesting applications of GPS. For example, convert the log file with a GPS tool into an HTML form and display what route we followed. I designed and built a GPS data logger for automotive. Also pocket sized GPS data logger is documented here.
Right image shows the inside of the built GPS data logger. The GPS data is stored into the MMC/SD card. The external antenna connector was used by the old GPS receiver but it has been replaced by new one and the antenna connector is no longer used.
There are some considerations different from generic electronics equipments on designing of power supply circuit of automotive equipment. It is what the power source from the battery is painful to the power supply circuit. The supply voltage at 12/24V system is not that kept to 12/24 volts. Because the battery is continuously charged while the engine is in work, the supply voltage rise to around 14/28 volts, and the voltage dips down to 5 volts on cranking the engine due to high current discharge by the starter. If the equipment uses the ACC power, it is swiched off while cranking the engine but this is not a simply switch off. Because many loads are attached to the ACC line, it should be considerd that the input line is shorted to the ground at ACC switch off. As the result, voltage regurator ICs without immunity of Vi<Vo will easily fail. In this circuit, D2 at the input stage blocks the instant discharge by the voltage dip.
Right image shows an example of the wave form of the load dump test for 12V system. This is called load dump surge that generated by failure of wiring. D1 in this circuit is a zenner diode rated 36V/5W to absorb the load dump surge. The GPS data logger is designed for 12/24V system. For 12V system, D1 can be changed to 18V/5W zenner diode and rated voltage of C1 can be changed to 16V.
For easy installation, the GPS data logger is powered by only ACC line. No power switch is supported and start/stop the logging by ACC on/off. The energy for file close process after black out is held in C1. Of course it should be not only proof against painful input but also avoid incorrect operation due to unstable supply voltage. This requires also some considerations on software design.
When a short time dip of input voltage occured, Vcc may rise again before it reaches to 0 volt. In this situation, the power sequence may not meet the requirement of the MMC/SDC. As the result, the reset sequence of MMC/SDC is not work and some MMC/SDC cards get wrong state and no command is accepted. Once the card gets the wrong state, no way to exit this state except applying a correct power sequence to the card. To support this procedure to always reinitialize the MMC/SDC, a power control circuit to the card socket is required.
First, MMC/SD card is initialized after the supply voltage stabled. If a memory card is not present in the socket, it waits until a card is inserted. When the file system on the card is successfully recoginized, a short beep is sounded and go to next step. At this time, power supply to the GPS receiver is enabled and initialized to the proper operating mode if needed.
Next, GPS logger watches the GPS sentence received from the GPS receiver. This is to get current time from the GPS sentence because the system has no RTC. When the receiver acquired the position and RMC sentence goes valid, the data logging process is started. The log file is named YYMMDD.LOG with the current local date gotten from the RMC sentence. If a file with the same name is existing, it start to log at end of the file. Two short beeps is sounded on file creation/open.
Right LED indicates that the MMC/SD is being accessed. Green LED indicates the current status (off: card is not initialized, on: fix data is valid, blink: fix data is invalid) of the GPS data logger.
The data logging process is terminated by ACC switch off, so that the black out occures asynchronously. When a black out is detected, the file being written must be closed as soon as possible by capacitor C1 is discharged. The data logger detects a bloack out and start the shutdown process when input voltage is below 9V for 100 miliseconds. After the shutdown process succeeded, a long beep is sounded. To minimize risk of data loss due to unintentional card removal or failur of the shutdown process, f_sync function is performed every 3 minutes.