Introduction: Individually Addressable LED Hula Hoop

About: I like to play around with sensors and LEDs to create interactions in otherwise lifeless objects.

In this instructable I am going to show you how to make your own individually addressable LED hula hoop. Individually addressable means that each LED in the hoop can have a different color at the same time. I wanted to create some nice LED patterns and with individually addressable LEDs you have much more flexibility.

This was my first ever electronics project. As a first ever electronics project I can tell you that this was not an easy one. There were a lot of things to figure out and I wanted to share my discoveries with people who - like me when I started this project - don't have a lot of experience with electronics. This results in a very long instructable because it is very detailed. Please don't let this scare you off! If you are new to all this, the details will help you get through all the steps. You'll have all the instructions right here and there is no need to look up things separately. If you are experienced, you can skip big chunks of the instructable so it won't be such a long one for you!

So let's get started!

List of materials:

  • Transparent tube
    1. If you're making a single hoop you need only 3m (order from NL): De Hoepelwinkel
    2. If you're planning on making a lot of hoops you can buy in bulk (30m order from GB): Omega (get the biggest one: TYPP-3458-100 OD: 3/4", 19mm; ID: 5/8", 15.9mm)
  • Tube connector stuff (push button, rivets, tube connector piece)
    1. For a single hoop: De Hoepelwinkel
    2. For lots of hoops:
      • Connector piece (outer diameter (OD) of the connector piece must be the same as inner diameter (ID) of the tube) order from Fancy-tapes
      • Rivets (get it at your local supply store)
      • Pushbutton (get it at your local supply store)
  • Batteries Rechargeable Ni-MH AAA batteries, 8 pieces. The greater the capacity the better. (For example: Batteries)
  • Charger Ni-MH trickle charge 4 cells minimum, 8 cells maximum: Charger
  • LED strip Digital strip, so that each LED can be controlled individually. Order from Aliexpress because it is so much cheaper and so far they all work great! Get the 5m 30 IP30 option. (You don’t need waterproof coating as the strip will be in the tube. Plus, it would take up too much space. Also, you don’t want 60 LED’s per meter because your batteries will run out twice as fast.) Note: this is the WS2812B but as I mentioned you could also go for WS2813.
  • ATtiny85 chip: ATtiny85
  • Base ATtiny85 chip: base (optional)
  • Connectors: jack plug and jack bus
  • Slide switch (for example this one)
  • PCB hard paper
  • Resistor 300 - 500 Ω (I use 430 Ω)
  • CapacitorElco 100 µF
  • Capacitor 100 nF
  • Fuse 5v 5A
  • Soldering wire: I use stiff wire (wire with a solid core) to connect the batteries. This will make it easier to handle, keep the batteries more in place, and easier to push the whole thing through the tube. I use flexible wire (soft core wire) for the connection between the PCB and the Jack bus, because the jack bus needs to be able to come out of the tube and be pushed back in to the tube easily. It is always good to stick to red wire for 5V, black or white for GND and other colours for data. It's less confusing when you stick to conventions. I use 3-core wire for LED wire connections because it's easy and keeps the wires together. This is optional though.
  • Shrink sleeve: Put heat shrink wherever you can. It's handy to get an assortment of heat shrink.

List of tools:

  • Soldering iron
  • Solder tin
  • Third hand (optional but very useful)
  • Multimeter
  • Drill
  • Dremel (with milling head, saw blade and sanding head)
  • Rivet pliers
  • Arduino Uno (and connection cable)
  • Arduino IDE (installed on your computer)
  • Capacitor 10 µF (this is needed when using the Arduino to upload code onto the ATtiny85)
  • Jumper wires
  • Breadboard
  • Battery holder 4pcs (optional)
  • Battery charger (optional)

Step 1: Getting Started

In this project the challenge is to get all the electronics in the hula hoop tube of only 16mm diameter! We’ll need to put the batteries in, a chip to control the LEDs, the LED strip, some other electronics parts and something to be able to charge the batteries when they're empty. I used Fritzing to visualise the whole setup. I find it useful to have it as a reference point, especially when you have a lot of wires everywhere it’s handy to fall back on the image.

Let’s break up the project in smaller steps. Each bullet here is explained as a separate step below in more detail.

  • First you can play around with the code that controls the LED strips. Just upload the code to an Arduino and connect a piece of LED strip. You can change the light patterns by editing the code. When you like the patterns you can transfer the code to the AtTiny chip.
  • Then you’re going to make the PCB. You solder the chip, the capacitors, the resistor, the fuse and a long piece of servo wire. Make sure to test your PCB!
  • Next we’re gonna make the hula hoop. Cut the tube at the desired length and cut out a hole for the switch.
  • Now we’re going to solder the batteries. Lay out the hoop and place your 8 batteries evenly around the hoop in order to spread the weight. Now you know the length of the wires you need and you can solder the batteries together.
  • Put everything in the tube. Connect the batteries and the LED strip to the PCB. Tape the batteries to the LED strip to keep everything in place and pull everything through the hoop.
  • The charger. You are using a jack connection to charge the batteries in the hula hoop. Solder the jack plug to the charger. Solder the jack bus to the batteries.
  • Closing the hula hoop. Add the switch by soldering the wires and pushing the switch into the hole you created for the switch. Then put the connector piece in the hula hoop. On one side put a rivet in, and on the other side put a push button in.
  • OPTIONAL: Grip. You can add something like gaffer tape on the inside of the hula hoop to create some extra grip.

And that’s it! You’ve got your hula hoop!

Step 2: LED Strip + Code

LED Strip

As mentioned I wanted an individually addressable LED hula hoop, for which I need an individually addressable LED strip. This is a WS2812 or WS2813 LED strip. Adafruit calls these type of LED strips neopixels. These type of LED strips run on 5 volts. WS2813 is a newer version of the WS2812 LED strip. The difference is that if an LED breaks in the WS2813 strip, the rest of the strip will still work. With the WS2812 strip, if an LED breaks in the strip all the LEDs that come after won't work anymore. The WS2812 has 3 connections on each side (5v, GND, Data-in or Data-out) whereas the WS2813 has an extra connection which makes sure the data signal is still passed on to the next pixel.

(Note: The other main type of LED strip is the SMD 5050 which normally run on 12V. But, with this type of LED strip all the LEDS in the strip emit the same color at the same time. So it is completely ON with all LEDs in a certain color or completely OFF.)

LED Controller

I would like to be able to create and define the LED patterns for the hula hoop myself. This means I will write the code and put the code on a chip, which I will solder to a PCB. However, if you want to skip a few steps you can also decide to order a controller online. It comes with a remote to change between pre-programmed LED patterns. You can even adjust speed and brightness or just set the whole hoop to one color. Luckily, this controller fits in our hula hoop tube! If you're going for this option, you can jump to step 4.

In my case we need a programmable controller to tell the LEDs what to do. The easiest would be to use an Arduino. Unfortunately, an Arduino does not fit in our hula hoop tube (not even the Arduino Nano) so we will use an ATtiny85 chip. But for now we'll use an Arduino Uno to test our code because it is easier to upload new changes and to debug.

Uploading code to the Arduino Uno and testing it on the LED strip.

(I've added a screen capture video of these steps as well.)

  1. Open the hulahoop.ino file in the Arduino IDE.
  2. Download the Adafruit Neopixel library
  3. In the Arduino IDE import the library from Sketch -> Include Library -> Add .ZIP library and select the downloaded unzipped Adafruit library.
  4. Compile sketch
  5. Connect the Arduino Uno and attach LED strip according to the image.
  6. Upload sketch
    1. Tools -> Board -> Arduino/Genuino Uno
    2. Tools -> Port -> port with (Arduino/Genuino Uno)
    3. Tools -> Programmer -> AVRISP mkll (default)
    4. Click upload
  7. Check if you like the light patterns. If not, modify the code. Check your pattern in this setup. It is easier than changing the pattern when you are uploading code on the ATtiny chip. But beware, sometimes code may work on the Arduino and not on the ATtiny, for example because it has less memory. So make sure not to make too many changes without testing it on the chip.

Transfer the code to the ATtiny85 chip

(I've added a screen capture video of these steps as well.)

  1. Open example sketch “ArduinoISP" and upload to Arduino Uno. (Note: if you already setup your Arduino wired to the ATtiny, then make sure to take out the capacitor between RESET and GND when uploading this sketch.)
  2. Connect the ATtiny85 to your Arduino Uno like in the image. You will have to place a 10 µF capacitor between the RESET and GND on the Arduino Uno while uploading code to the ATtiny chip with the Arduino. Note, there is a small circle indent on the chip on top on the left side. Use this to make sure you place it the right way around.
  3. Add ATtiny as a board in Arduino IDE (Skip this step if you already have ATtiny as a board installed):
    1. Open the preferences dialog in the Arduino software.
    2. Find the “Additional Boards Manager URLs” field near the bottom of the dialog.
    3. Paste the following URL into the field (use a comma to separate it from any URLs you’ve already added): https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json
    4. Click the OK button to save your updated preferences.
    5. Open the boards manager in the “Tools > Board” menu.
    6. Type 'attiny' and click install.
  4. Upload the hulahoop.ino sketch to ATTiny85.
    1. Change the PIN number in the sketch to a PWM ATtiny pin such as 0. (PWM means Pulse Width Modulation which means that this pin can send a digital signal with a message encoded. The data signal that is sent over the pin holds a message namely the amount of R,G,B for each pixel in the strip. Not all pins are PWM. This is true for the Arduino as well as the ATtiny chip. You can google 'pinout attiny85' to find an image that shows the pin numbers with their types for the chip).
    2. Tools -> Board -> ATtiny25/45/85
    3. Tools -> Processor -> ATtiny85
    4. Tools -> Clock -> Internal 8 MHz
    5. Tools -> Programmer -> Arduino as ISP
  5. First, do Tools->Burn bootloader before uploading your sketch. If you skip this step, the chip might sometimes not work or show incorrect behaviour. Unfortunately, I don't really know why. I think it has to with the fact that the chip uses an internal clock unlike the Arduino. If the clock is not reset the timing might be off, which results in strange LED patterns.
  6. Check that the code is working on the ATtiny chip. Wire the ATtiny chip to the LED strip as shown in the image. Connect power (± 5v). I use a battery holder with 4 rechargeable batteries (4 x 1.2v = 4.8v). Rechargeable batteries have a slightly lower voltage than non-rechargeable batteries. If you use normal non-rechargeable batteries for testing you should use only 3 (3 x 1.5v = 6v). Of course, in the hula-hoop you're going to use rechargeable batteries because you can't replace the batteries in the hoop.

Step 3: The PCB

Next we will make the PCB onto which we put the chip. Additionally, the PCB will have some capacitors, a resistor, a fuse, connections to the batteries and a connection to the LED strip. We'll make it as small as possible. The smaller it is, the easier it is to manoeuvre in the tube. You can use a hand saw or a Dremel to cut out the right size from a hard-paper piece of PCB. I cut out a 15x5 holes piece. If you don't know how to solder, I'd recommend to watch some tutorials online. Don't worry, just try it out!!

Note: if you decided to order an LED strip controller online, you can skip this step!

Note 2: It is possible to make an even smaller PCB. You could design your PCB and order it online so that the connections are already embedded in the PCB and you only have to solder the components. However, I prefer to work with hard-paper PCB cutouts because it is easier to make adjustments or even just make a new one if you realise you've made a mistake somewhere. Another option for an even smaller PCB is to use a microchip ATtiny, but these are hard to solder because they are so small. I prefer to use the normal ATtiny in combination with a base, because you can solder the base to the PCB but still take out the chip in order to update the code.

It is always a good idea to start with an electrical scheme, which is shown in the image. In case you're not familiar with the symbols I've added labels to the image. The chip, the capacitors and the resistor are going to be soldered to the PCB. So start by laying out your components on the PCB hard-paper. Try to make them take up as little space as possible. Put the components that are to be connected close to each other. You can rearrange them until you know all connections can be made and you are happy with the layout. After you've laid out all your components on the PCB and you've made a plan of where the connections will be, you can start soldering all the components. You can have the pins sticking out a bit. This is handy in case you still want to make changes then you can desolder the components and bend the pins differently. Once all components are soldered and you are happy with the layout, you can use cutters to cut the pins short (this also minimises the height of the PCB). Finally, you can solder all the connections.

Note: the 100 µF capacitor has a plus and minus pole, whereas the 100 nF capacitor doesn't. Normally when a component has a plus and minus pole, the plus is a little bit linger than the minus pole. Make sure to place the 100 µF capacitor the right way around on your PCB!

Now that you have the base PCB, you can prepare the connections for later on (meaning the LED strip and the power). Connect a long enough piece of servo wire (a wire with 3 cores) to the PCB to which we’ll connect the LED strip later on. The reference image of the setup that I added in step 1 shows that the servo wire needs to go from the opening of the tube until the PCB. Make sure the piece of servo wire is long enough, because it is easier to make it shorter than longer later on. You can also attach the fuse already. One side of the fuse is attached to the 5V on the PCB, the other side of the fuse will be connected to the switch. For now you can just solder a wire to it, which will be long enough to stick out through the hole in the tube.

Test your PCB! As soon as you can test anything, do it. The first hula hoop I made I did not test at all. So when I was done and all electronics were in the hoop I turned it on and it didn’t work. If you test each step then it's much easier to deduct what the problem could be. You can test the PCB by using crocodile clips for example, to connect the servo wire to a piece of LED strip. You can use a battery holder with 4 rechargeable batteries (or 3 non-rechargeable batteries) and connect it to the 5V and the GND on the PCB also with crocodile clips for example. If your piece of LED strip starts lighting up and showing your light pattern, you know all your soldered connections are good.

Step 4: The Hula Hoop Tube

I want to make a 36” inch hoop, which is a 91.44 diameter hoop. That means I need a tube length of 2.87 meters. I used a bit of rope to measure the length of the tube and marked the tube where I want to cut it. The tube also needs a hole where the switch is going to be. I prefer to make the hole before I cut the tube, just in case I mess up the hole then I will only need to remove a small bit from the tube instead of cutting out a whole new piece.

To determine where the hole for the switch will be, refer to the reference setup image provided in the beginning. There will be a jack bus and a push button before the switch. In my case the switch ended up being at about 9.5 cm from the start of the tube. Use a dremel with a milling head to make a hole in the hoop, exactly at the size of the switch. Keep checking the hole with the switch because the tighter the hole the better. If you can push the switch in with a bit of pressure then it’s just perfect.

When the hole is done, cut the tube at the marked bit with the dremel with a sawing head. You can also use a normal saw for this. You might want to use the dremel with a sanding head or normal sandpaper, to smooth the ends of the hoop.

Step 5: The Batteries

The LED strip and the ATtiny chip both work on 4.5V - 5.5V. Rechargeable batteries are 1.2V each, so we will put 4 of these in series to get 4.8V. We’re using AAA batteries because although AA batteries do fit in the hula hoop tube by themselves, we also need a little bit of space for the wires. (You won’t be able to get all AA batteries with wiring through the hoop. Trust me, I tried). To prolong the on-time of the hoop we use another set of 4 rechargeable batteries and place these parallel. Placing them parallel keeps the voltage but doubles the amperage! It’s actually quite nice to use 8 batteries in total because this allows us to spread the weight nicely over the hoop. Also, the total weight of the hoop gets to about 500 grams which is perfect. If you're a bit confused about the batteries being 'in series' or 'parallel' then just refer to the setup image. The image shows the connections of the batteries and how to spread them around the hoop.

Before you get started with soldering the batteries, make sure they are all fully charged. I use a wall socket charger for the initial charge. First of all it’s easier to test your setup when your batteries are full. But also, in your circuit the batteries need to be equally charged. After you soldered them, it will be more difficult to get them equally charged. This is mainly because we will use a trickle charger (or slow charger). There also exist fast chargers, which can very rapidly charge the batteries and they make sure the batteries are equally charged! But it's a more complicated circuit and a little more dangerous, so we will stick to the slow charger and just charge our batteries beforehand. Please be careful when soldering the batteries. Although the tin doesn’t stick so easily on the batteries do try to be quick so you don’t overheat them. (I saw an intractable about how to make soldering batteries easier by filing them a little bit first. I haven't tried this myself).

So now lay out the hula hoop and place your batteries such that all 8 of them are spread around the hoop evenly. Now measure how long the wire between the batteries should be. Keep in mind that you’ll bend the ends of the wire to be able to solder it to the battery.

You are soldering 4 batteries in series, thus solder the positive end of one battery to the negative end of the next battery. I find it easiest if the batteries are facing with their positive side towards the PCB. It is also better to minimize the distance between the 5V power supply and the chip and LED strip. This way the far end is the GND. When you soldered the batteries together you can use the multimeter to measure if both packs generate a voltage of about 5V.

When you’ve made both packs of batteries in series, you’re going to make them parallel to each other. Connect the free negative ends of the battery packs, such that they go over into 1 wire. This wire will have to be taken through the entire hoop. This wire will then split up so that one end goes to the PCB and the other to the charger. The charger will be connected by a jack plug and the jack bus will be placed in the hoop opening (see hoop setup image).

Now also connect the free positive ends, such that they merge into one wire. This wire will go to the middle pole of the switch. The switch will have 2 modes: ON OFF/CHARGING. For both modes you need a connection to the batteries which is why this positive battery wire goes to the middle pole of the switch.

You can check again if the 2 packs of soldered batteries still generate a voltage of about 5V.

Step 6: Put Everything in the Tube

Now you want to put all your components in the tube: the LED strip, the batteries and the PCB.

First you tape the batteries to the LED strip. This will make it easier to handle the wires and the batteries and to get everything in the hula hoop tube. It also makes sure the batteries won’t move around too much in the tube while you’re hooping.

Then solder the servo wire to the LED strip. You want the LED strip to cover the entire tube (no gap). So measure how long your servo wire should be, by placing the components next to the tube and measuring the distance from the tube opening to the position of the PCB. The LED strip cannot be bent 180° so your servo wire has to make the bend. Keep this in mind when measuring how long the wire has to be. Finally solder the negative wire from the batteries to the PCB. You will also have a piece of negative wire sticking out of the tube which will be soldered to the jack connection later.

Now you can pull the whole thing through the tube. Make sure the LEDs are pointing outward. Also make sure the positive wire from the batteries and the positive wire from the PCB (fuse) stick out through the hole for the switch. The negative wire should stick out as well, but then from the tube opening instead of the switch hole.

It's a good idea to test your circuit again before putting everything in the tube!

Step 7: Charger

If the charger doesn’t have a jack connector then cut off the connector and strip the wires. You need to know which wire is negative and which is positive. You can use the multimeter to measure the voltage when the charger is plugged in (make sure the stripped wires don’t touch each other!!). When the voltage is about 5.6V you know you have your positive measuring end on the positive charger wire. If the voltage is about -5.6V you have your positive measuring end on the negative charger wire.

Unscrew the jack plug and pull your wire through the plastic cap of the jack plug (if you forget this, you’ll have to desolder the plug because you won’t be able to pull the cap over). Now solder the positive wire to the center connection of the jack plug and the negative wire to the outer connection of the jack plug.

The jack bus will have to be able to stick out of the hula hoop tube for charging (otherwise you cannot put the jack plug in), but when hooping the jack bus should be inside the hoop behind the push button. Thus, it is easiest if you use a piece of soft wire for this, although it is also possible with stiff wire. Solder a piece of wire to the positive connection (refer to the image). The negative connection of the jack bus comes directly from the batteries and PCB.

You can test the charger by using a crocodile clip to connect the jack bus positive wire to the batteries positive wire and plugging in the charger. The charger should show a red light meaning that it’s charging.

Step 8: Closing the Hoop

Now that everything is in the tube (the batteries, the LED strip, the PCB and the jack bus) you’re going to connect the switch to your circuit. First, use a dremel to saw off the bit that sticks out from your switch. When you’re hooping this would be an annoying and it’s not needed to operate the switch.

Then connect the 3 positive wires that are sticking out through the hole for the switch. The middle switch connection should be the wire going to the batteries, because either the batteries are used to power the hoop or the batteries are being charged. In either mode you need a connection to the batteries.

Another switch connection goes to the fuse wire (which goes to the PCB). The last switch connection goes to the charger wire. For these two connections it doesn’t matter which switch connection goes to which wire. But to be sure, during soldering, set the switch to the side you’re not soldering. I find it handy to connect the charger to the switch on the side of the tube opening, because that’s where it’s physically located.

Once you soldered the 3 connections, push the switch into the hole of the tube. You can use electrical tape or small rivets or screws to secure the switch more firmly. Now the hula hoop has two modes: 1. ON 2. OFF (or charging if the charger is plugged in).

You can test your switch. When it is in ON mode, you should see the light pattern in your hoop. When you switch it to OFF mode the lights should be off. Then if you connect the charger, the light on the charger should be on to indicate that the batteries are being charged.

Finally you can put the connector piece in the hula hoop. On the side of the tube where the jack bus is located you’re going to put a push button. Drill a hole through the outer and inner tube for the push button. The push button should come in front of the jack bus. On the other side of the tube drill a hole through the outer and inner tube for a rivet. Use rivet pliers to get your rivet in.

NOTE: your rivet and your push button are metal. Your LED strip has bits of exposed copper, to which you can make connections. If your rivet or push button ends up touching the copper of the LED strip this might give unexpected behaviour. Keep this in mind when closing the hoop. You will want to put some electrical tape at the ends of the LED strip, to insulate the exposed bits of copper.

Now, your hoop is finished! And everything should stay in place whilst hula hooping!

As a bonus you could add gaffer tape on the inside of the tube, to create better grip.

Enjoy!

Step 9:

The hula hoop was a gift to my awesome friend Ashlee who's a great hooper. She's the one in the pics and videos. You can find more really cool stuff on her facebook page.