Go Down

Topic: Servo Movement Recording (Data Logging?) (Read 2 times) previous topic - next topic

mem

Storing all the data is easier and you would use less than 100k bytes per minute, or half that if 256 byte resolution was enough. Anyway, storage is not a problem if you use an external sd card.

Yes, it sound like an RC  transmitter would not be much help if you will 'record' using a helmet for input. How were you planning to sense helmet motion using pots? Have you considered using something like a wii nunchuck attached to the helmet to get the recordings?

pd2kplus10

 256 resolution will be sufficient. I've been searching like crazy for an example where someone saved serial data to an SD card, but can't find anything. I did find the hardware for the SD card:

http://cgi.ebay.com/SD-MMC-Card-Adapter-AVR-PIC-Microcontroller_W0QQitemZ380022650234QQihZ025QQcategoryZ4663QQcmdZViewItemQQ_trksidZp1742.m153.l1262

  I'm not sure exactly how I would build the helmet. I did think about the wii nunchuck but would like to keep it simple using some cheap pots.

 I think right now I'll worry about figuring out the data logging part.



thanks,
Phil

mem

#7
May 05, 2008, 06:01 pm Last Edit: May 05, 2008, 06:25 pm by mem Reason: 1
Before finalizing your decision about a memory card, have a thorough search on which technology has the easiest interface support for the arduino. Ideally, I think you want a library that allows you to read and write data as if it was an array of bytes.

Variable length strings are awkward to manage in a file system and if you use fixed length strings, you might as well use fixed length binary data. My suggestion is you have each data 'sample' as a two byte pair, the first is the servo number and the second byte is the servo position where 0 and 255 represent the extremes of movement. To start, it could make things simple if you treated the SD card as a two dimensional array, where one dimension is the servo number (from 1 to 8) and the other dimension is the sequential value of the servo for all the samples you have taken.

Once you figure out how you will do the data logging you may want to look a some of the nunchuck interfaces published. The
video here gives an idea of what can be done and the interfacing of published code is not all that difficult.
http://growdown.blogspot.com/


pd2kplus10

  hmm. There aren't any libraries available for writing to flash memory. I wish there were. Maybe I should 1st try to save the data on my PC via Processing.

 I probably will end up going with a Wii nunchuck interface. Looks like I could simply strap it to top of my helmet and it would translate head movements. Still gonna need to figure out the jaw and arm pots.



thanks,
Phil

mem

#9
May 05, 2008, 07:48 pm Last Edit: May 05, 2008, 08:05 pm by mem Reason: 1
Have a look at some of the i2c (aka TWI) interfacing to external flash that has been done on the arduino. A 256k chip http://www.sparkfun.com/commerce/product_info.php?products_id=525 would give you two minutes of recording of six servos.

edit: I just realized that the chip linked is 256k bits, you would need a couple of these: http://ww1.microchip.com/downloads/en/DeviceDoc/21941E.pdf  for two minutes recording at a 50hz frame rate and they are a lot more expensive.

But you could experiment with a lower recorded frame rate. It may be that you only need to store 5 or ten samples every second instead of 50 if your movements are relativly smooth.


Also, I do recall reading somewhere that people have got conventional card memory working with the arduino so don't give up on that either.


You could actually test using Arduino program memory and that would give you quite a few seconds of playback. It would not be too difficult to write a processing sketch that captured your data and created a header file that could later be read by your arduino sketch to create the C statements to define the array in program memory.  

You can also test a second or two of record and playback in ram using just one  or two servos.

The nunchuck has a two axis pot in addition to the xyz accelerometers so you may be able to use that for the jaw and arm.

Go Up