Saturday, April 17, 2010

IMU Data Transfer Corruptions

While receiving data from the IMU over the serial connection, a strange event was happening. Every once in a while (approximately every 20 data transmissions when we printed the data over serial to the computer) a large jump in the data would occur. These "hiccups" produced VERY bad responses. While attempting to work with our PID controls, the quadrotor would be smooth and then violently respond to the data (for instance, the pitch would read 0 and then jump to -1400).

After disabling subsections of our code one-by-one, the culprit was found. It was determined that the wireless transmission from the controller was causing our data from the IMU to be sporadically corrupted. These errors in the data were large enough to throw our quadrotor into an unstable state. Our solution to this problem was to disable the wireless receive interrupt (the pin-change interrupt that indicates there is data to be read) while reading the IMU data over serial. This allowed the data to be loaded in its entirety before the wireless was read, thus preventing corruption in our IMU data.

1 comment:

  1. did u take care of baud rate serial buffer overflow? could have been that