9-Axis Motion Sensor

A client asked me to develop a multi-axis sensor for embedded applications.  It needed a gyro, accellerometer, and a magnetometer, so I decided on the Invensis 9150 9-axis motion sensor.  In order to output the data to something, I used Bluetooth LE so that I could communicate with a smart phone (Android or IOS).  At the time, the most popular BTLE device seemed to be the Nordic nRF8001.  For control, I could have gone several ways.  There was a lot of code in the public domain using Arduino which is based on Atmel AVR devices primarily.  However, due to my roots, I decided on the Silicon Labs C8051F931.  The circuit design was easy.  Most of the work had already been done by others in terms of the radio…the rest was just connecting pins!  Here is the schematic.

Board schematic

Next task was to do the board layout.  I have a guy that is good at this sort of thing, so I contracted it out…both board design and assembly.  Here is the result.

Board

Once the schematic was done, I set about writing the code.  I started with the codebase that was developed for the Arduino.  Basically, I had to port everything over to the Silabs MCU.  It was not trivial, but after some effort, I got it working.

I also benefited from the work Nordic and others had done on the smartphone side.  So I had my son take the Arduino Android code and modify it to interface with my board.  Here is a screen shot of an Android phone showing the results being read from the board over BTLE.

screen

This was a great project!!

Leave a Reply

Your email address will not be published. Required fields are marked *