Makayla is a really big fan of wearable electronics and tinkering to create accessories with Arduinos. She needed to buy a neopixel ring anyway for another project she has been working on, so, we decided we'd use that to make something. Of the sensors we had, the coolest sensor was a combination of an accelerometer, magnetometer, gyro, and heat sensor all in one. Thus, the compass was born.
What it does
While the sensor is level, the compass displays north, south, east, and west as colored parts of the ring: blue indicates north, yellow indicates east, green indicates west, and red indicates south. The lights move in response to the wearer's movement to continue indicating the correct direction. If the user forgets which color indicates north, he/she can put his/her hand over the sensor, causing the temperature gauge to notice the increased heat, and only north (the blue lights) will show.
When not using the compass (when the sensor is not level), such as down at the wearer's side, the neopixels display three trailing lights changing colors as they follow around the circle.
How We built it
We started off by learning how to use the neopixel ring, figuring out how to address the different leds and how to use for loops to iterate through all the pixels to set each of their values. When we had sufficient knowledge for that part, we then started to work with the adafruit LSM9DS0 3 axis accelerometer, magnetometer, gyro, and temperature sensor. With this sensor we were able to read movement from the accelerometers as well as rotation and direction based on the gyro and magnetometer values. Also, with the addition of the temperature we were able to add another feature based on the user being able to change the temperature of the chip using their finger. With this knowledge and the functions we knew from the neopixel ring, we were able to combine the magnetometer readings with the led ring to show the cardinal directions in led format as described above. Then we attach both the ring and the sensor onto a fabric that acted like a glove, allowing the user to wear the led ring and use it like a compass as intended. We were first going to make the compass wearable as a bracelet like a watch, but the wires became too difficult to work with and too sensitive to stray movement, so the design changed to a glove. Also when not in use as a compass, the wearable compass acts as a nice fashion device with a circling led trail of different colors to make it aesthetically pleasing when not in use.
Challenges We ran into
With the restriction of soldering, we were unable to solder any of our wires and, as a result, the wires had trouble staying connected to each other and the boards, causing the program to freeze. Also, due to the amount of wires, we were unable to follow the original plan of making the wearable compass a watch design. We instead had to make it into a sleeve because of the amount of wires and space needed for them. If we tried to cram all the wires into the smaller space of a watch design, we would have risked disconnecting some important wires. In addition, because the smallest arduino on hand compatible with the sensor had breadboard pins soldered onto them from previous use, the trinket pro arduino didn't fit nicely in the end design layout.
On the programming side of things, we had a fair bit of trouble with the leds not shifting correctly. When the leds had to move in the negative direction, each led has a value (0-23), they would skip over a led, causing a gap to form between the four sections and making the compass look off. This took many hours of going over code and trying different ideas before figuring the correct way. This halted our progress for a while as we had to get through this problem before we could create the others functions of the compass.
Accomplishments that We're proud of
We are proud of every aspect of this project. We are especially proud of getting the sensor to work. We had a lot of fun exploring its capabilities and adding light patterns for every new feature we learned. We are also very proud at our ability to learn the sensor and neopixel ring code as neither of us had much experience with the libraries yet we were still able to decode and implement them quickly and successfully.
What We learned
We learned how to program a neopixel ring, to understand the pins and format of the sensor, and to create a program to work between the two, using different outputs from the sensors to determine what to input into the ring. Also we learned how to troubleshoot on the fly and be prepared for anything, even to the point of a battery cable breaking after we thought we had finished the project.
What's next for Wearable Compass
This product could be improved by soldering the wires onto the circuits and the adafruit trinket, the brain of the system. This would drastically reduce the clutter caused by the extra wires and would allow for a more streamlined design as well as a more efficient set up. Also, the prototype could be reduced in size down to the a watch style, looking more stylish and cleaner due to the compact design. The wire connections would also work dependably instead of seemingly at random.