Below are some initial sketches I’ve built to test the plausibility of several of the components of my design for Nod Bang.
Link to project description
I’m using an Arduino, arcade button, and Adafruit Neopixel for the buttons.
The button colors will indicate track state (on or off) as well as pulse brightness to indicate each head nod detected.
Adafruit has a library for working with their Neopixels which has been helpful. I also looked into several Arduino button libraries, but haven’t stuck with one yet.
The accelerometer is a common analog model, ADXL335. I initially tested it on a breadboard with an Arduino for ease of wiring.
Live plotting accelerometer after some smoothing / resampling.
Arduino + Headset Accelerometer + Max
Finally, I put the accelerometer on a headband and built a Max patch to read the serial data from Arduino over USB.
Above, you can see my Max patch reading the serial data while I nod my head. The small slider moving up and down is using a first derivative of the accelerometer’s x axis data to show directional movement. It actually does a pretty good job of tracking my head motion.
The circular flashing button is my first attempt to recognize nodding motions. I’m looking for large changes in the second derivative of the x axis data (directional change).
Next Steps, nod recognition and latency
The accelerometer data is very noisy and there’s also a lot of jitter. It’s causing a lot of false positives for nods.
I’m currently looking into different data cleaning / smoothing methods in Max. If I end up using a very simple smoothing method, I might look into whether doing the smoothing on Arduino would reduce latency vs doing it in Max.
The Max visualizations also seems quite laggy, so I’m generally concerned about latency issues. I will ask my physical computing professor for advice.