Assignment 7: Two Hearts Beat as One

Inspiration

We’ve all had the intuition that the music we listen to can affect our heart rate, whether its getting us excited or calming us down, and at least one scientific study has found some evidence to confirm this suspicion. There is even some evidence that we may match heartbeats with our partners when we’re near them.

With this in mind I attempted to create a prototype to play a melody with the goal of encouraging the user to raise or lower their heart rate to match a target.

Setup

The program measures time between beats and translates that into a BPM measurement. This measurement is averaged with the target to create a match beat halfway between the target and measured BPM. As the rates converge the music plays in time with the heart beats of the user.

Beat measurements are simulated with a pushbutton, and a modulated sound output plays an F6 arpeggio at the match rate. F6 was chosen from experience to work well both as an uplifting and calming chord for either raising or lowering heart rate.

Demo

Tech Stuff

The circuit is pretty basic. A button pulls down pin 3 to trigger an interrupt which calculates the time since the last interrupt to measure current heart rate (this represents a heart monitor). Audio output is on pin 13 (with a 100Ω resistor in series), and the onboard RGB LED cycles along with each note in the sequence.

Code and wiring: BeatMaker.zip

 

 

Author: Matt Franklin

I'm a recovering engineer + sales guy... BSEE from UMD 2004, and then 15 years of working with signal processing, AV, control systems, networking, and other gadgetry (mostly B2B). Now I'm in the Master of Human-Computer Interaction program, graduating in August 2020. I have pretty solid experience with: - Linux - audio - video - rs232/422/485/midi/dmx protocols - sketchup and other cad tools - soldering - music (mostly guitar, but others too) - general troubleshooting - networking (wired + wireless) - signal processing - streaming video/audio - python I have some experience with or am mediocre at: - woodworking - welding - laser cutting - sewing - reverse engineering - ML (none really but I'm currently in a class) - some javascript - rusty with C++ and Java, but used to be decent - tube amplifiers - RF

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.