This was one of my first Arduino projects. After some near misses with bicyclists while running at night, I decided to get some lights so people could see me in the dark. But why stop at boring plain lights? Wouldn’t it be cool if they could respond to my heart rate?
I looked at a number of existing heart rate sensors for Arduino, but most were optical and could not get accurate readings while I was running since they were constantly being jarred. Since I run with a Garmin GPS watch and heart rate monitor, I tried to hack into the information being sent between the heart rate monitor and the Garmin watch.
Reading a bit more about the technology, I learned that Garmin used the ANT protocol for communication between the watch and heart rate band. The good news was that SparkFun made an ANT transceiver breakout board. The bad news was that the board was discontinued and I could only get my hands on one board. I decided to move forward with this board for prototyping knowing that I would need to come up with a different solution when I made the final project.
The first step was to get the Garmin heart rate monitor and an Arduino communicating with each other. The ANT protocol documents are pretty thorough and they make great bedtime reading. Fortunately for those of us who are impatient, this thread on the SparkFun forums has sample code that already implements the protocol for the Garmin heart rate monitor.
Now that I had the pulse rate information, it was time to add lights. I am a huge fan of Adafruit’s LED strips. These strips have weatherproofing so it would be possible to run outside in the rain. I trimmed the strips to the length of my arms and sealed the ends.
I added seven different light modes which increased in speed with the heart rate: rainbow, raindrop, range pulse, color shot, twinkle, circulatory and Cylon. Most of these modes are self-explanatory. The range pulse mode faded the strips in time with the pulse and also chose the color based on the current pulse rate (blue being low pulse, red being high). Here you can see a quick demo of the seven modes:
I then began building the final version. For this, I chose to use a Teensy 2.0 because of its low price and small size. I also had to revisit the ANT transceiver. Searching around, I found this ANTAP281M5IB module with an on-board antenna. After some very delicate wiring and soldering, this proved to be a direct replacement for the SparkFun board.
Once everything was working, it was time to put this into a portable package for running. The main concern was power. After a bit of research, I found these Energizer power packs that I could plug directly into the Teensy. The one amp power pack would power both LED strips for about an hour. After verifying that everything still worked, I placed the assembled project into a small project box.
The last issue was how to attach the LED strips to my arms. I thought about embedding them into a jacket by sewing them in, but I decided against that as it would be a pain to clean. Finally, I just glued some cable clips to the back of the LED strips and used velcro straps to adjust them for the right fit.
And after all that we were ready to go! My first real-world test was the Midnight Run in Central Park on New Years Eve 2013.
And now I can easily be seen in the dark!
I like it!
Wow, impressive project and very usable. I like it.
Nice project. Just saw it over on HAD.
Would you be willing to share the code?
I made something similar for my rear bike light.
The LED strips work great and you can get a 1000mah battery from ebay for about $5 http://www.ebay.com/itm/291010592731?var=590179650808&ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649
Hi, I’m interested in what you did for your bike, as I’ve thought of this, but have no idea on how to go about it. Any thoughts on using a raspberry pi or is that over the top?
You could definitely get this to work with Raspberry Pi, but would require a bit more power so it may not be the best solution. Depending on how you wanted to do this, you might be able to start with an Adafruit SpokePOV kit and modify it to use other sensors. Have you thought about how you would like to attach the lights to the bike?
hi just started working on a more refined version of what you seam to have ? yours is nice.more to follow ???
This is great! Nice work.
Is the jacket waterproof? Will it survive in the rain?
That is brilliant! Excellent idea 🙂