Inertial navigation peripheral/Sensors

From OLPC
< Inertial navigation peripheral
Revision as of 17:50, 23 December 2008 by 115.132.95.217 (talk) (Microcontroller)
Jump to: navigation, search

This section will cover the main hardware needed for the peripheral to function, the sensors, micro controller and XO connection.

Hardware choice

Sensors

Our choice of sensors was primarily dictated by cost. We needed at least two sensors, a gyroscope to measure angular velocity, and an accelerometer for tangential acceleration. Initially we were planning to have pitch and roll compensation for the device, but this was shoved towards the end.

For the accelerometer, we got a Triple Axis Accelerometer Breakout - ADXL330 from Sparkfun for $34.95 and for the gyroscope, we got a Gyro Breakout Board - Dual Axis IDG300 for $74.95, also from Sparkfun. Hypothetically, we could get cheaper sensors in the future, as we only ended up using one axis of the gyroscope and accelerometer.

Microcontroller

We used a PIC 18F4550 as the heart of our peripheral. This was a slightly excessive choice, as we could have used the PIC 18F2455 as well, which would shave off some cost. Both uCs have built in USB modules, which minimizes the number of components needed in the peripheral.

Like most PIC uCs, they have built-in analog to digital converters which are used to convert the analog signals from the sensors into integers.

Firmware

Microcontroller

The firmware uses a template developed by Prof. Bradley Minch from Olin College. The template implements a basic USB peripheral with a few samples of how to perform requests.

In our case, we will be modifying the vendor requests of the device, using the GET_RA2 request as a template. Instead of just sending a single byte with every request, we send five, one for each of the five channels of the sensors. You will need to change the endpoint number in the code, as that is what determines the number of bytes sent.

The five bytes being sent are all signed integers. During the main program loop, the PIC MCU will read all five sensors inputs and convert them into a 10 bit number. I only choose to read the upper 8 bits, as there is a significant amount of jitter in the signal. The stored values can then be requested by the vendor request as needed.

A future effort would entail having a timestamp with the data conversion. This would minimize the problem of the vendor request taking a significant amount of time. However, this becomes very minor once other issues are considered.

We installed some 1uF capacitors from each of the input pin used by the sensors to ground as a low pass filter. This helped reduce the jitter in our signal tremendously.

Calibration

Future work