Geo Data Logger: Arduino+GPS+SD+Accelerometer to log, time-stamp, and geo-tag sensor data



I thought it would be educational to build a prototype that I can take on the road to log, geo-tag, and time-stamp sensor data to be analyzed later with mapping and/or data analysis applications.  So I figured why not start with a gadget that can log road conditions. This prototype, the Bump-O-Meter, measures road conditions by using an Arduino, a GPS receiver, an SD card, and an accelerometer sensor.

This prototype is a generic sensor logging/geo-tagging gadget which means the accelerometer can be replaced with any other sensor(s) to log and map anything anywhere.  

As a matter or fact my next adventure with this logger is to replace the accelerometer with a pollution sensor to visualize levels of air quality around town. 


This guide is divided into the following sections:
  1. Overview & Background
  2. Hardware & Software Components
  3. Wiring the Prototype
  4. Logging data to the LC STUDIO SD Card
  5. Geo-Tagging & Time-Stamping With the LS20031 GPS Receiver
  6. Measuring Road Condition with an ADXL335 Accelerometer
  7. PROGRAM: The Arduino Program That Pulls It All Together
  8. PROGRAM: A Plain GPS Logger To Interface With Google Earth
  9. Scrubbing & Formatting Data with a Spreadsheet
  10. Plotting and Color-coding Road Condition Data with
  11. Formatting GPS Date/time Output For Stamping Data
  12. Speed vs. Logging Accuracy


The Bump-O-Meter uses an Arduino to capture the X,Y,Z motion data generated by the ADXL335 accelerometer. In this case, we are measuring road "shakiness" as a result of road condition. Poor road conditions and uneven road surfaces generate lots of sudden acceleration in the car body up and down (z-axis). But before this data is saved to the SD card, it's tagged with location information from the LS20031 GPS receiver and also date/time stamped in real-time using the GPS satellites' atomic clock. More on this later.

We want to capture and analyze the z-axis acceleration information visually to determine which road stretches are poorer and need attention. We can repeat this and compare our data over time. The possibilities are endless. Not just for road condition scanning, but for any sort of environmental geo data logging.  


We can use this gadget by placing it in a car and driving over a given road stretch to assess its condition.  We can even attach this prototype to a bike or skateboard to identify irregular and rough stretches of tracks.

We can substitute the ADXL335 accelerometer sensor with any other sensor(s) such as temperature or pollution sensors with simple code modification.

The data on the SD card can then be imported it into a spreadsheet for scrubbing, sub-setting, reformatting, analysis, and visualizing.

We will also make use of a wonderful website to plot our data over a map using intelligent markers that change shape and color according to magnitude of road shakiness so we can visually detect road conditions in need of further inspection.

I have published a guide titled "Connect your LS20031 GPS receiver to Google Earth via PC" explaining how to configure the LS20031 GPS receiver.  You can refer to it for more details on how to use the LS20031 GPS receiver.


  • Arduino Uno or Leonardo*:  $25 (,
  • LS20031 GPS receiver: $50 (Ebay, Pololu, Adafruit, Sparkfun)
  • ADXL335 or ADXL345 Accelerometer (or any other sensor): $7 (
  • SN74AHC125 as level shifter from 5V to 3.3V**: $1 (,
  • SD reader socket. The LC STUDIO: $2.50 (
  • SD memory card.  $5 for 4GB. 
  • LED: $0.1
  • Resistor 1K Ohm: $0.1
  • Breadboard: $5
  • Jumper wires: $2
  • Male headers 2.45mm (0.1") -  straight and right angle: $1 (
  • Any battery or power source that can provide 7-12V and a minimum of 500mA.

* I have not tried this prototype with the Arduino Leonardo because of some known issues with the SD library . But according to the release notes of the  Arduino IDE 1.02 software these issues have been addressed.

** In the future, I am phasing out the SN74AHC125 level-shifter (5V to 3.3V converter) in favor of the CD4050BE HEX Non-Inverting Buffer/Converter simply because it's more readily and cheaply available on  I purchased 10 ICs for $4.0. That's $0.4 per IC. The CD4050 is not pin compatible with the SN74AHC125 but there are plenty of examples on the net.

  • Arduino IDE 1.02 
  • MiniGPS 1.4: This is a nifty utility to configure the LS20031 GPS receiver.
  • This amazing website will help us plot logged sensor data along with the GPS coordinates using color schemes to indicate road conditions.
  • MS Excel or comparable spreadsheet: We will use a spreadsheet to scrub the logged data, to remove any garbage, to make sub-selections of our logged, and to format it in a manner that can be read by other applications and websites such as and Google Earth.
  • SD Arduino library (bundled with Arduino IDE)


This is a prototype and prototypes by definition are drafts of products not finished yet. Your feedback is appreciated.

Hazim Bitar (techbitar)
techbitar at gmail dot com
Remove these adsRemove these ads by Signing Up

Google it and see if others have used it and what are their impressions. then check the datasheet and see if the specs meet your requirements

clickyummy1 month ago


bearblue1 month ago


In this tutorial I find what I need to start interfacing the gps sensor with an Arduino. And because I want to help many more hobbyists to start building robots, I share this tutorial on my post Thank you!

chimplost2 months ago

Hello techbitar - I'm thinking of building an adaption of your project but am considering changing the SD card adapter to the microSD card shield from Sparkfun:

steveazhocar3 months ago
You can read the accelerometer more often than the GPS, so there should be no need to interpolate the accelerometer reading.
regaltaxlaw3 months ago
True but not all sensors (temperature, humid, etc.) possibly used by others will be as fast as the accelerometer I am using in my project.
Hello techbitar,

I just ordered all the hardware for this project, and I should be beginning it some time next week. I just had a question. Obviously all of these components would need to be powered up whilst in car data collecting while driving, so would one of these do the job: . Also, I got this for the 'in-home' programming and construction of the actual project: ..... Do you think that'll be good as well? I would assume so.
techbitar (author)  zmilosavljevic1 year ago
The Arduino Uno specs are as follows:
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V

As for current, I have tested my Bump-O-Meter with a USB connection which provides 5V and up to 0.5A. I did not run into any issues but I did not perform any exhaustive tests.

While driving around in my car, I powered the Arduino Uno via the DC plug using a battery brick made of 6 X 1.2V (NiMh) = 7.2V @ 2A. That voltage is close to the minimum recommended voltage. It worked but of course the moment the battery dropped to 6V and below I am sure I would have ran into all sorts of issues.

If I go production with this, I would use a 3S LiPo for a cool 11.1 Volts and 1.5A or 2A current for safety margin in case I need to add additional power hungry gizmos to the bump-o-meter.

Check you choices of power supplies against the min/max voltage specs and add a comfortable margin to the current with an eye on your future plans. then decide what fits your requirements best.
lmcwill techbitar6 months ago
I was riding my bike recently and remarked to another rider that it would be useful to quantify just how bad our roads are. My thinking is to first breadboard components as you have laid them out, and then substitute an Arduino Micro and micro SD card reader for compactness. While I like LiOn batteries, a 3S 11.1V 2 amp battery is fairly large (and heavy and needs a requisite charger). Do you have an idea for a compact battery with a 3-hour runtime?
scottwal10 months ago
Hello techbitar - I'm thinking of building an adaption of your project but am considering changing the SD card adapter to the microSD card shield from Sparkfun:

Do you see any obvious problems with this change, and would it break the code you've written? Cheers
techbitar (author)  scottwal7 months ago
I have not tried it but if it Sparkfun's SD adapter does not work out of the box you may need to tweak my circuit and/or code.
clickworried7 months ago
You can read the accelerometer more often than the GPS, so there should be no need to interpolate the accelerometer reading.
techbitar (author)  clickworried7 months ago
True but not all sensors (temperature, humid, etc.) possibly used by others will be as fast as the accelerometer I am using in my project.
techbitar (author)  keithentwhistle7 months ago
You're welcome.
My Diet Area8 months ago
awesome and super useful..
3dotter9 months ago
SUPER Tutorial and explanation!! Thanks.
zmilosavljevic12 months ago
Does anyone know why I am getting this: , and not what the instructable shows? Any help would be much appreciated, especially seeing how far I've gotten.
0xKD1 year ago
"We have to level-shift the Arduino's 5V signals to 3.3V before we can connect them to the SD card."  Why?

Can I power the SD card via a 3.3V output of the SN74AHC125? I just have the SD socket and have got all components except the LM1117 to build a circuit like the LC STUDIO.
techbitar (author)  0xKD1 year ago
Wikipedia says "The power consumption of microSD cards varies by manufacturer, but is in the range of 66–330 mW (20–100 mA)"
"Just because this SD card socket can be powered with 5V or 3.3V, we still can't connect 5V Arduino pins to the SD card socket's pins".

Also ask why? If the arduino's 5V socket can hold 500mA shouldn't I be able to connect this socket to the shield's 5V socket directly?
moguraj1 year ago
Hw to make this data logger into real time to upload the SD card contents after formatting into any GPS visulaizing website automatically !!
Can any one help me !!!
danang11 year ago
everything is well
tolstoyan1 year ago
does the GPS data logger always have to be connected to the internet or all it needs is a power source? i need an urgent reply coz im about to start making it please help me hehe tnx in advanced
techbitar (author)  tolstoyan1 year ago
there's no need to connect the gadget to the internet.
oh i get it thank you very much
skrubol1 year ago
You can read the accelerometer more often than the GPS, so there should be no need to interpolate the accelerometer reading. Either you would interpolate the position reading (write 10 accelerometer readings for every GPS reading and do the interpolation in post processing,) or characterize the 10 accelerometer readings (likely take RMS or peak) and record once per GPS reading.
tolstoyan1 year ago
actually this is my 2nd time to use the arduino and im a student, most of the materials that you use is available in the Philippines but they differ on the look and sizes but the function remain the same

SN74AHCT1G32DCKR 2 input OR Gate tsop-5 <--- is this IC are allowed to use? i find it hard to find the IC SN74AHC125 as level shifter from 5V to 3.3V
or do you have any alternatives?
techbitar (author)  tolstoyan1 year ago
Google it and see if others have used it and what are their impressions. then check the datasheet and see if the specs meet your requirements
ok tnx for the reply
awesome and super useful....keep going :)
tolstoyan1 year ago
this is a LOT better than your previous version, i am planning to build it, i am from the Philippines, is it okay if i present it to my school? anyway i hope you can help me out if i encounter trouble in making this prototype :D
GOD bless thank you :)
techbitar (author)  tolstoyan1 year ago
Hi tolstoyan, by all means you can do whatever you want with the design. But if this is your first Arduino project, may I suggest that you start with something more basic (so many nice Arduino projects on before you start with the geo data logger. I have provided point to point wiring diagrams both visually and textually so you can implement this with little need for intervention from anyone. if you use the same parts and wire them according to my instructions, the accompanying software will also work as-is. I would love to see some videos of your final project. Best of luck and keep me posted please.
Scubamatt1 year ago
Hello, this looks pretty awesome. I am learning to fly a Powered Paraglider and would live to have some type of instrumentation that gives similar results to what you have here. Just a simple GPS or Variometer seems like minimal information. Thanks for the post ill keep up with you to see how things progress. If you ever need an aviation instrument tester let me know!
techbitar (author)  Scubamatt1 year ago
Thanks, Scubamatt. I am not sure I will be flying things with my gadget any time soon :) but I think the nice folks at have great guides and tools for what you have in mind. Check this out:
borogoves1 year ago
Air quality depends a lot on time of day. This seems like a good way to measure that variation on a local level over many, many trips through the same area at different times of day.
techbitar (author)  borogoves1 year ago
good point.
borogoves1 year ago
I would like to use something like this to log mileage driven in my informal two-household car-sharing program, for the purpose of sharing expenses. We determined that we don't need to know where the car has been, but would like to know just the amount of time it is driven + time it is away from the garage, for each user. So I think it's three sensor inputs needed to log three pieces of info:
1. am i away from the garage?
2. if so, am i moving?
3. if moving, who is driving me?
And the rest can be worked out offline. Any ideas?
techbitar (author)  borogoves1 year ago
my first impression is that you will have write a program to analyze the data generated by the geo logger. we already capture location, speed, and date/time. Since know your garage's latitude/longitude you can analyze logged data ranges that start and end with your garage's location.this signifies a completed round trip. then you calculate difference of time/date when you left the garage vs when you returned. that's the duration of your journey. then you scan the previous data for in between locations to look for periods where location does not change much which should mean the car is stationary. subtract the time for the stationary locations from total round trip time to determine for how much time the car was moving. this is very preliminary approach but you get my drift. the solution will be mostly programmatic.
scistarter1 year ago
This is great! Is there a way to retrofit this to log climate info from homes? ?? Thanks for your thoughts.

Get More Out of Instructables

Already have an Account?


PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!