Friday, November 24, 2017

Accelerometer Project!

This project was a paid gig (for something that's my hobby - how great is that!) to build a display and data logger using an Arduino MegaAdafruit TFT Touchscreen Breakout board with an onboard SDCard, and MMA8451 Accelerometer.  The intended use was to easily visualize and log the resonance on different parts of mechanized laboratory equipment.

Below is the finished wiring with the accelerometer attached to the end of a long cord for placement on the machine.  A mount for the accelerometer would be built later.




The display plots the m/s^2 acceleration of all three axes over a 20 second period and then repeats.


Additionally, the bottom of the display includes the absolute max of the acceleration reading from each axis over a 5sec and 60sec period. The top right of the display shows the name of the CSV file being generated on the SDCard with the sampled data.  The folder name for the file is a randomly generated hash value to create a unique storage location for each session (i.e. power-on of the Arduino) and then the CSV files are created in that folder sequentially named.



One of the more challenging aspects of the project was to ensure data was plotted in real-time with no lag or jitter.  It turned out better than I thought it would be given the hardware.  Check out the video!



No comments:

Post a Comment