Attitude and Heading Reference System (For a Violin Bow)

The Idea….

As a diversion from the industrial IoT projects I’ve been working on, I decided to investigate the wonderful world of wearables and build a system to track violin bow movement.

An attitude and heading reference system is a 3 axis description of an object that transmits the data to a mobile device via bluetooth ble. The data can then be used for generating sound, tracking a person’s movements, falls, etc. I used the Adafruit Flora wearables platform because it seemed well suited for the task at hand which was to gather data on how my violin bow moves about when I play percussively as in Métis fiddle music which I enjoy. I will use the data to build a midi track that produces a percussion accompaniment and will produce a video in the near future to demonstrate.

Skills Needed:

You’ll need some experience at installing Arduino/Flora libraries and some familiarity with sensors and bluetooth. There’s a lot of info out there so you won’t have any difficulty finding it.

Hardware Required:

Adafruit Flora Wearable Board

Adafruit BlueFruit BLE

Adafruit LSM9DS0 Accelerometer, Gyro, Magnetometer

If you don’t purchase their kits, be prepared to acquire some soldering and sewing equipment.

Read about the platform here…

Software

Arduino IDE

Following Flora Libraries: ( follow directions on Adafruit site for installing )

Adafruit Universal Sensor Driver

Adafruit ARHS

Adafruit LSDM9DS0

Bluetooth Apps for receiving data

nRF Toolbox for BLE , Android

Adafruit Bluefruit LE Connect, Android

Adafruit Bluefruit LE Connect, iOS

LightBlue Explorer – Bluetooth Low Energy, iOS

 

There are many more of course on the AppStore and Google Play.

Or you can download the source code for a barebones Android app that I have created that will allow you to customize the way you receive and view the data. You will have to code anything you want to do with the data that isn’t raw bytes.

Down the app source code here !

ahsr_bobhale

Alligators and Sensors during Testing

Code Walk Through

After all the components are wired up and communicating we can begin to push some data out to our mobile devices. First we wake up the sensors and bluetooth and repeatedly query the AHRS module that takes the input of the sensors and calculates the Euler angles and returns them to the main loop which bundles them up and transmits to the mobile device. Using one of the above mentioned apps, we can view the data as it arrives. Simple eh ?

The comments in the code provide a good narration of each function.

The source code for this Arduino project can be found on my github site.

Coming Soon: The Performance !!

About the Author

Bob Hale is a mobile and IoT developer and musician who likes to write about it all…

Leave a Reply

Your email address will not be published.