The basic idea for this project is to program a score tracking feature into a hula hoop and use LEDs to communicate to the user how many revolutions they have completed so they don’t have to stop and check their score.
The Building Process
- Soldering Iron
- Hot glue gun
- Wire stripper
- Wire snips
Measured the length of the tube and decided to use 40 LEDs alternating in groups of three and one.
The next step was to spend most of a day soldering all the LEDs back together in a long strand and testing them periodically to make sure all the lights work. After soldering the wires onto the pads, I coated all the of the contact points with hot glue to make the string more durable and help prevent shorting out the system.
A common challenge with physical computing projects is figuring out how to power them. I had a 5V power bank so I took it apart and found out that it happened to fit perfectly into the tube. I liked that this power bank has a on/off button built in, which allows it to function as a power switch for the whole project.
Cutting some notches out of the end of the tube set the components more securely.
In order to get the micro-controller to fit in the tube, I decided not to solder header pins onto it, and instead soldered the three wires from the sensor and the three wires to the LED strip directly to the board.
wires from sensor to board
wires from board to LED strip
Because the tube is translucent, the sensor wasn’t triggering the score function in bright sunlight, so I took a piece of heat shrink tubing and cut a small piece to limit the field of light hitting the sensor. This worked quite well. The company I got the tubing from included a short piece of smaller diameter tube that fits snugly inside the hoop to give a hula hoop some structural stability, so I used this piece to house my sensor.
Then, I folded up the short USB/micro cord I had inside behind the sensor breakout board so that when the hoop is completed, the USB plugs into the battery pack. This layout also makes it easy to open it up and reprogram the pro micro.
The final step was to create an enclosure using the moldable plastic to create a sort of cage to keep the two ends of the tube together. Additionally, I made some counter weights to help balance out the weight of the battery and the electronics so the hoop rotates more evenly.
Writing the code for this project, I came up against way more obstacles than I would have expected. The concept is pretty simple: if the light sensor level reads below 5, then the “score’ increases by one. I originally wanted there to be nine “levels” that would trigger different light animations so the user would know when they hit a certain number of rotations.
Unfortunately, the program got glitchy after counting to 30, and the pro micro didn’t seem to be able to handle 9 different animations from the ALA library, so I had to limit the counting to a score of 20 and automatically reset to 0 at that point, and limit the number animations to three. If the score is less than 5, then glowing blue, between 5-10 a glowing red, and between 10-20 bright flashing red and yellow.
Link to gist
What I Learned
Embedding electronics into an odd shaped enclosure is an interesting experience. I ended up having to tie a metal screw to the end of a piece of string and then pull it through the tube using a magnet so I could then use the string to pull the string of lights into the tube.
Also, it turns out that using a light sensor is perhaps not the best choice because it only works if the is a significant amount of ambient light, and the best environments for a light up hula hoop are lower light situations.
Here is a short video of it working, but it is a little hard to see the LEDs in the daylight:
Finally, I really like working with the ALA Library, but found that it has some limitations if your using a board with limited memory.
I would like to experiment with some different sensors, accelerometer, pressure sensor, and maybe just a button to see if any of these work better for lower light conditions where LEDs show up better.
It would also be fun to get a radio chip and play with using the hula hoop as a controller interface for a separate installation.
For example, perhaps the faster a user spins the hula hoop, the faster a toy hula girl dances, using some motors to make the doll move in matched speed.