Wednesday, November 11, 2009

day 4 - Arduino Success

Today we successfully characterized both our linear motor and a simple low-pass RC filter with the Arduino, connected by serial port to matlab.

Picking up where we left off yesterday, we quickly sorted the programming trouble and successfully stored Matlab-generated white noise data to the Arduino. Even with only streaming the data one direction, from the arduino to matlab, and shortening the transmit to a single byte, we were only able to acheive 60Hz.

Next step was to store the output data to the arduino as well, and then transmit it after the motion loop was finished. We had been hesitant to employ this, as it would require timekeeping on the arduino side, which in our group members' previous experience slowed the arduino down greatly, and we were also unsure about the arduino memory capacity. However, we implemented and ran it, and were pleasantly surprised to find the loop could deliver a data point every millisecond, resulting in a 1000Hz sampling frequency. Also, the arduino had no trouble storing up to 800 samples, each with white noise command, position, and time.

For our highly damped linear motor, the 1000Hz sample time was appropriate. Keeping that constraint in mind, we assembled a low pass filter with a relatively low critical frequency for successful validation.

No comments:

Post a Comment