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.
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.
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.
Project update –
Progress has been slow over the last few months, school and work have been taking priority, but I am still thinking about the wave buoy. I’ve also been receiving emails and support from others who are interested in the project and want to say THANKS! I am looking forward to collaborating with others in the near future.
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.
Picked up a new spool of clean PLA and am trying to reprint the upper portion of the hemisphere again. Last time I tried this print the Printrbot jammed after finishing 70% of the build.