Matlab + IMU example

Here is a quick youtube video to demonstrate the code that I have been using to stream accelerometer data to matlab. The basic structure of the code is all referenced from the MatlabArduino youtube videos. There are several videos that explain how it all works and is a great reference.

Continue reading


Buoy design – 95mm diameter

I recently built a smaller buoy design while I continue to work on the IMU code. The previous buoy was approximately 150mm in diameter and had room for lights, GPS, a large li-po battery and a considerably bigger microcontroller. This latest version is based on the electronics from a previous post and only needs to house a trinketpro, Xbee, and BNO005 IMU from Adafruit.

Old vs new design.


Project files for CAD and STL here.

Continue reading

Visualizing vibration data from accelerometer

update: link to source code for IMU to Matlab connection

The next steps for the wave buoy project involves collecting accelerometer and gyroscope data from the onboard IMU and filtering/processing the data with a laptop to determine orientation and position. The math needed to perform these computations is too much for an arduino alone, so for now I plan to transmit the IMU data to my laptop with an Xbee and let the laptop do all the heavy lifting. Later on, the laptop will be replaced by a Raspberry Pi or other Linux based computer board, but for now it easier for me to develop everything in Matlab and then convert the code to C/C++ or something else in the future. Just personal preference.

Screen Shot 2016-02-07 at 11.27.05 PM

Schematic of arduino + Xbee + acceleroemter

Continue reading

Arduino + Xbee + MATLAB – wireless data transfer over serial

Recently, I fabricated a crude prototype of the buoy’s sensor circuit board using perfboard and soldering connections to wire the inertial measurement unit (IMU), GPS , RGB LEDs, and Xbee to the Ndogo microcontroller. All the connections have been tested and the individual modules all function correctly so the next step is to write code for the microcontroller that will pull data from each of sensors in a specific sequence and time interval before transmitting the data to a base station wirelessly. For preliminary testing the base station will be my laptop but the concept can easily be scaled for longer ranges.

photo 1 (1)

Xbee Series 1 module for easy wireless communication over serial.

Continue reading