Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Pages: [1]   Go Down
Author Topic: Gather data on battery power; how to get it off?  (Read 1510 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Questions:
  • 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!
Logged

Washington
Offline Offline
God Member
*****
Karma: 39
Posts: 808
Firefox & Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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!

'round the world...
Offline Offline
Faraday Member
**
Karma: 42
Posts: 3394
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Eu não sou o teu criado. Se respondo no fórum é para ajudar todos mediante a minha disponibilidade e disposição. Responder por mensagem pessoal iria contra o propósito do fórum e por isso evito-o.
Se realmente pretendes que eu te ajude por mensagem pessoal, então podemos chegar a um acordo e contrato onde me pagas pela ajuda que eu fornecer e poderás então definir os termos de confidencialidade do meu serviço. De forma contrária toda e qualquer ajuda que eu der tem de ser visível a todos os participantes do fórum (será boa ideia, veres o significado da palavra fórum).
Nota também que eu não me responsabilizo por parvoíces escritas neste espaço pelo que se vais seguir algo dito por mim, entende que o farás por tua conta e risco.

Dito isto, mensagens pessoais só se forem pessoais, ou seja, se já interagimos de alguma forma no passado ou se me pretendes convidar para uma churrascada com cerveja (paga por ti, obviamente).

0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Jump to: