Go Down

Topic: Gather data on battery power; how to get it off? (Read 1 time) previous topic - next topic

Mark Fickett

I would like to gather/generate some data while my Arduino is running on battery power, and then later connect the Arduino to my computer to save and analyse the numbers. (Similar to this.)

Specifics: I am using the Arduino LilyPad as a bicycle computer. I want to put it on my bike, turn it on, and let it record wheel revolution counts and timings. (During this data collection, connecting it to my laptop is inconvenient!) Once back from the ride, I want to offload the numbers so I can make histograms etc - an easy way to do this during development is to dump the data over Serial.


  • If I plug in the USB (and adapter) while the battery power is connected, will this fry my computer/Arduino and/or render the serial data unusuable (as suggested elsewhere)?
  • If I plug in the USB after the fact, will it unavoidably reset the board, anyway?
  • Is EEPROM the answer? (The write/erase cycle note on the EEPROM.write() page made me hesitate, but I doubt I'll take the Arduino for 100,000 bike rides; who knows if I'll even power-cycle the device that many times.)
  • Wireless: are XBee or bluetooth worth investigating?
  • SD: is a simple microSD board enough to dump numbers to the card with minimal code / library-learning?

Thanks for any insight into the best way to approach this!


Do not worry about thee EEPROM write limit because your sketch upload suffers from the same problem!
Flash memory lasts 20K-150K writes which is a VERY long time.
Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!


An SD card would be somewhat better as you could read it from a card reader (provided you used FAT on it).

To use the eeprom, you'd have to create a data map and then when connected to the pc, it would send all the stored data.
But depending on the Arduino you have and sampling time, the eeprom might not be enough. :\

Do some math about the number of values you want to keep and the eeprom size.
This... is a hobby.

Mark Fickett

Thanks to both! I've implemented a solution using EEPROM, which seems sufficient; 256 ints (each being two bytes) should be enough for the data I want to gather.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131