Here is a datalogger that I have been designing for use in testing our robot.
Parts:
I used two IMUs from past Kits Of Parts, along with a Parrallax 3-axis magnetometer. This ended out with a total of 9 degrees of freedom:
- 3 axis magneto
- 3 axis accelerometer
- 2 axis accelerometer
- A rotational gyro
Not really degrees of freedom, but these are there too:
- A temp. sensor for the gyro
- An RTC
- 4-5 DS18B20 temp sensors (for motors)
- SD card for datalogging
It periodically gets the data from all the sensors, and prints it to the serial port and saves it to a CSV file on the SD card.
I will make the code available soon, once I get an SD card glitch worked out. I really wish we had finished our robot sooner (that 11:58 on the last day), because I wanted to try it out with this datalogger.
I would love to see your code on this. I always enjoy reading other peoples code, as it gives me great ideas for projects I’m already doing or plan to do.
For example, my son and I are building an automatic dog self-fetching machine. It throws the ball, the dog returns it, drops it into the machine, and it shoots the ball again. Then the cycle repeats.
I also plan on building a dual axis accelerometer data logger. I’m curious to compare car driving styles between people based on how smoothly they drive. I want to use logged acceleration data as the criteria for “smoothness”.
Bill,
It’s interesting you mention this. I just prototyped an accelerometer logger for someone that used it on a dirt track racing car. For reference, I used an Arduino Micro, kit of parts dual axis accelerometer (2.5g - I think it’s spec’ed at 2g), SDLogger from SeeedStudio and a small (160 x 128) TFT for information display. I was storing data once every 10 msec (30 sample averages). It made for some interesting data. The SDLogger was used because it was easy to communicate with it over a serial port at 115k baud and I didn’t have the time to get the SPI SD code operating. My only recommendation for a street car, would be to use an accelerometer with a smaller range - around 1g or less for better resolution and you could certainly slow the sampling down.
Mike
Thanks for the suggestions Mike.
One of my goals for the off season is to get very familiar and comfortable with using SPI. I’ve already done some testing and communicating between two Arduino’s with SPI, and the data logger might be a perfect time to get really used to the code.
I’m glad you brought this up. I originally was only going to have a single accelerometer and temp. sensors for each motor. I still have yet to get some of the temperature sensors. I might also do a decoupled battery voltage reader.
You’ve built it, the sensor array
Example Picture
[spoiler]http://img2.wikia.nocookie.net/__cb20111015195717/stargate/images/e/ec/Sensor_array.JPG[/spoiler]
And we have code!