Tuesday, November 27, 2012

Navigation board build

As I explained in a previous post, I want the plane to be able to track its attitude. The receiver is already doing a time critical function in software (namely the servo updates), so it would be quite a strain on it also to read all the different sensors and to filter the data. I thus ended up building these functions on a separate board, which interfaces with the receiver through UART.

The IMU module I ended up using
The IMU sensor board I'll be using has a gyroscope, a magnetometer and an accelerometer. The sensors are all read through I2C, which is nice as the microcontroller I thought of using (Atmega328) has built in I2C hardware support. However, in addition to these three I2C sensors, I need also to connect a GPS receiver. This presents a problem, because the microcontroller only has one hardware UART, and that is already in use for communication with the receiver. I could change my choice of microcontroller, to something that has two hardware UART ports. On the other hand, I could go with a software UART as I already have several Atmega328s in my components bin. I decided on the cheaper option, and went with an Atmega328 and software UART. I was fairly certain that this choice would bite me in the ass later on (which it did, in the form of timing issues in the code).

I ordered the IMU board from ebay and was so eager to get this thing built as fast as possible that I took measurements of the board dimensions from the photo on ebay and started the design. The board is very straightforward and there is nothing special about it what-so-ever, as can be seen in the schematics and the layout.
Unfortunately I screwed up measuring the dimensions from the photo, and as a result the mounting hole of the IMU board doesn't match up with the hole on my board. It doesn't really matter, as now I just hold the board steady with double sided tape :-).

Top side of the board after etching and drilling.

Bottom side of the board after connecting the vias
I have recently investigated the possibility of doing through hole plating for the vias, but it seems to be quite a bit more involved than what I'm currently doing. I guess I'll have to continue soldering short pins through the vias to connect them.

Top side almost completed
The hardware UART port is used to communicate with the RC receiver whereas the software UART port connects to the GPS receiver. I put in the external I2C port for the possibility to add a barometric pressure sensor later on, although now you can buy cheap sensor boards that already contain a pressure sensor.

Bottom side almost completed

While assembling the board, it turned out I had run out of 20 MHz crystals. I picked up some the next day, but I didn't take new photos of the board.

No comments:

Post a Comment