This bike vest project uses a wrist mounted accelerometer to detect hand turn signals and lights a vest appropriately. When not signaling a turn, it flashes a warning pattern for visibility.
By law, cyclists are required to use hand signals, but not continuously. Since the hand signal is required anyway, I chose gesture recognition for the interface. The signal can be turned off with a wrist flick and the Bean's LED on the wrist shows if the signal is turned on. When not turning, the vest can flash an orange pattern to improve visibility.
The Bean is powered with a 3V button battery and 3 AAA batteries power the Neopixels. I discovered that I did not need a level shifter. The Bean does need to share the ground with the other power supply. I chose wire to connect the Neopixels and had no trouble threading the wire through the mesh in the vest. I would not recommend using bare conductive thread on something as flexible as this mesh vest. The Neopixels are daisy chained in a diamond pattern with the first one in the middle upper left. The vest has a front pocket that the battery pack is stored in and the power is wired over the right shoulder.
The most difficult part about writing the software was determining a set of accelerometer values that would not trigger a false turn. I don't want to set it off getting my water bottle or just riding in aero position. Using signed data, the right turn is distinctly different from any of these motions, but the left turn is a bit tricky. I settled on a position that has my wrist slightly raised and slightly turned back.
In regular mode, the code will flash an orange pattern, alternating odd and even pixels. It will also check for a turn gesture. Once a turn gesture is detected, it will blink the appropriate lights in green and check for a reset (wrist is turned upside down). Once the reset signal is detected, it pauses (to avoid triggering a left turn) and then resumes blinking the orange pattern mode.
Originally I tried making a glove that would signal (there are now commercially available ones). I programmed my wearable boards and connected them up with alligator clips. It worked fine. After I sewed it on to my glove, nothing. Oh duh, my hand is conductive. Testing just the glove without my hand, still didn't work although the connections tested fine. The accelerometer is capacitive and the glove is a high tech material that is also capacitive. This was an example of how combing two simple projects in different fields can have unforeseen complications. I have learned my lesson and will not use capacitive fabrics that come in contact with the electronics.
I would like to eliminate the wire from wrist to vest. I have a second BLE device without built in accelerometer that I plan to use as the light controller, and my Bean can wirelessly communicate to that. Also it would be nice to have some signal in front- perhaps on my helmet.