top of page

SD Card Data Logger Progress: E-Bike Blog #18

  • Tim Ellsworth
  • Jul 4, 2017
  • 2 min read

Adafruit Pro Trinket

My fist attempt at creating a data logger for the E bike was based on this video on Youtube by Paul McWhorter where he setup a GPS data logger. I used this SD card data logger from Amazon. I followed the instructions all the way through but I was not logging any data to a text file. I did have a few differences in my setup. I used an Adafruit Pro Trinket instead of an Uno board. Since the Pro Trinket board does not have a digital pin 2 I used 4 and 3 as my GPS TX/RX and pin 6 as my SC Card CS. I changed the pins in the code according to match my setup. I still was not getting any data logged. Something that confused me about the code for the SD card was that the pins 11 through 13 did not seem to be defined anywhere. My guess is that it is included in the library for the SD card. That seems really odd to me and it makes the code less flexible.

DataLogger Test

I decided to start from scratch and use one of the test examples included in the Arduino IDE. I uploaded the Datalogger example to my Uno board and used the suggested pins in the comments. This was successful.

Back to the Uno

Now I went back and copied Paul McWhorter's code and setup exactly. I was able to get a fix and create the two text files. I still do not fully understand the SD card code. I guess I will just need to work around those pins if I want to add more inputs.

Next Steps

I am worried that I will run out of memory on the Uno while creating this DAQ. I will continue to learn about the different sensors that I will need to gather the information that I want using an Arduino board but I will most likely need to switch to the Rasberry Pi. The attributes that I still need to find a way to collect the data for are

  • A voltage meter

  • An amperage meter

  • A temperature sensor

© 2016 by Tim Ellsworth. Proudly created with Wix.com

  • LinkedIn Clean Grey
bottom of page