Jump to main content

Wearable RGB LED Unicorn Horn

Summary

Active Time
1-2 hours
Total Project Time
1-2 hours
Key Concepts
Wearables, circuits
Credits
Jennifer Lee, Science Buddies
Sewable RGB LED Unicorn Horn

Introduction

Sewable circuits are a fun way to mix electronics and arts and crafts by sewing circuits into clothing or fabric. This sewable circuit focuses on creating a unicorn horn with a programmable red-green-blue (RGB) LED in the tip that changes colors. You will use conductive thread to make the circuit, but your stitched lines will also form the spiral lines of the unicorn horn.

This activity is not recommended for use as a science fair project. Good science fair projects have a stronger focus on controlling variables, taking accurate measurements, and analyzing data. To find a science fair project that is just right for you, browse our library of over 1,200 Science Fair Project Ideas or use the Topic Selection Wizard to get a personalized project recommendation.

Materials

Tools:

Materials needed for unicorn horn activity.

Prep Work

  1. Print out the activity template.
  2. Make sure you have the Arduino IDE installed on your computer.
  3. If this is your first time using an Arduino, see the Science Buddies How to Use an Arduino page. That page is for the Arduino UNO, but the process is similar for a TinyLily board.

Instructions

Setting up your circuit

  1. Connect your RGB LED to your TinyLily mini processor using the jumper wires and male header pins as shown. These are temporary connections that allow you to test the circuit before you do any sewing with conductive thread:
    Circuit diagram of TinyLily Mini Processor to RGB LED
    1. Connect the + pin on the TinyLily to the + pin on the LED board.
    2. Connect the - pin on the TinyLily to the - pin on the LED board.
    3. Connect pin 1 on the TinyLily to the pin with the arrow pointing into the LED board.
  2. To use the male header pins, use your needle nose pliers to gently twist or snap off one of the pins from the long row of pins.
    Needle nose pliers pinching breakaway male header pins. One male header pin snapped off of breakaway male header pin rail.
  3. To connect the jumper wires through your board, loosely thread the male wire into the pin hole. For the female end of the jumper wire, sandwich the board between the female jumper wire and the male header pin, as shown in the following figures.
    Male jumper wire, tinylily. Female jumper wire, LED board, and male header pins.
  4. Launch the Arduino IDE.
  5. Connect your TinyLily to the computer using the TinyLily mini USB adapter and a micro USB cable.
    Circuit connected to mini USB adapter and micro USB cable.
  6. In the Arduino IDE, go to the top bar: Tools → Board. Click the drop-down menu and select "Arduino Pro or Pro Mini."
  7. Select Tools→ Processor. Select "ATmega328p (3.3V, 8MHz)." Note: this option will not appear until you have selected "Arduino Pro or Pro Mini" for the board.
  8. Select Tools→ Port. Select the available port. This should be "COM" followed by a series of numbers on a PC or "dev/cu.usbserial" followed by a series of numbers on a Mac.
    Arduino IDE Tools setting required.
  9. Download RGB_LED.ino and open it in the Arduino IDE.
  10. Download and install the FastLED Library. To do so, navigate to the top bar and click: Tools→Manage Libraries. This should bring you to the window shown below.
    Arduino IDE's Library Manager
  11. Using the search bar at the top, search "FastLED". Install the first result's most recent version of FastLED by Daniel Garcia. There should be an install button that appears when you hover over the option.
  12. Upload the code onto your TinyLily. Do this by clicking on the arrow pointing right on the top bar.
    Where upload button is located on the top bar of the Arduino IDE
  13. Once your Arduino code has been successfully uploaded onto your TinyLily, you should see the LED light up and cycle through the colors of the rainbow. If not, double-check your wires' connection pins and their fit. The jumper wires are a loose fit, so wiggling your wires around may result in a better connection.
  14. Switch your USB adapter with your battery adapter to power the TinyLily with the LiPo battery.
    Circuit wired to lithium polymer battery
  15. The circuit should perform the same.

Preparing your unicorn horn

  1. Cut out the shapes on the printout. You can leave a bit of space around each shape.
    Cutout of printed unicorn template.
  2. Using double-sided tape or rolled up one-sided tape, tape the shapes down to the felt sheet that you want to use for the horn.
    Paper template pieces taped onto felt
  3. Cut out the shapes from the felt.
  4. Lay the TinyLily face-down (writing facing down) on felt piece A. Use a marker to label the + and − holes and pin 1 (briefly flip the board over to check the labels if you need to but be careful not to get the holes mixed up when you put it face-down again).
    Labeling pins on felt referencing TinyLily
  5. Hot glue your TinyLily down onto the felt piece. Avoid hot gluing the pin holes.
    Hot gluing TinyLily onto felt piece A.
  6. Next you will prepare connections to your RGB LED. Note that in some sewable circuit projects you can use conductive thread for all the connections. In this project you will use regular jumper wires for two of the connections because that makes it easier to avoid short-circuits in the narrow tip of the unicorn horn. Alternatively, you could use conductive thread for all of the connections if you cover the thread in an insulating material like tape or fabric paint. You will need two of your male headers and a pair of scissors. Remove the metal pins from the plastic by pinching the black plastic piece between your fingers and pulling the metal piece with your scissors. You can also use your needle nose pliers to hold the plastic piece and pull with your scissors.
    Fingers pinching black plastic piece of male header pins while scissors are pinching metal wire. Fingers pinching black plastic piece of male header pins while scissors have removed metal wire

    You should be left with small black pieces with holes, as shown. This plastic part is what you need.

  7. Thread your two jumper wires of different colors through the positive and negative pins on your RGB LED (from the flat side to the LED side). The long metal piece should stick out past your LED and sit flush against the flat side of the RGB LED. Note which jumper wire color corresponds to which pin. In this case, the white jumper wire corresponds to the positive (+) pin on the RGB LED, and the black jumper wire corresponds to the negative (-) pin.
    Male side of jumper wire through RGB LED.
  8. Cap both metal wires with the two black plastic pieces from step 5. Thread them all the way through.
    Jumper wires are capped by black plastic pieces from male header pins.  Birds-eye-view of capped jumper wires.
  9. Place hot glue over the exposed metal wires for extra security.
    Hot gluing metal leads to secure them onto RGB LED. Hot glued metal leads on RGB LEDs.

Making your unicorn horn

  1. Take your horn cutout piece (a layer of paper taped onto a layer of felt) and fold it in half vertically down the middle.
    Horn paper template on felt. Horn paper template folded in half.
  2. Using a regular (not conductive thread) thread similar in color to your felt, sew the paper and felt layers together along the dotted line using a double-threaded backstitch. In the demonstration, I will be using a contrasting thread color so you can see it better. If you run out of thread, remember to leave about two inches so you can knot the ends. Then grab a new piece of regular (non-conductive) thread and continue the stitches.
    Needle threaded with normal thread for horn. The back of the horn that is stitched. The front of the horn that is stitched.
  3. Carefully tear off the paper from the felt. Your stitches should hold strong enough for your paper to easily come off. If not, wet the paper around the stitches to make it easier to remove.
    The back of the horn without paper. The front of the horn without paper.
  4. Glue down your stitches with a little bit of hot glue on both sides. Wait for the glue to cool. This is to secure the threads down so that it does not get tangled with the threads and wires in future steps.
    Hot gluing down the stitches.
  5. Once the glue is cool, turn your unicorn horn inside out. If it is difficult to invert the narrower part of the horn, carefully use a pen to help push it through.
    inverting horn. Inverting horn, but tip is not inverted yet.
    Using pen to fully invert the tip. Final inverted horn.
  6. Thread the jumper wires connected to your RGB LED through the small hole at the top of the horn. If the hole at the top is too small, cut a little bit of felt off the top to make the hole bigger. Be careful not to make the hole too big, or the LED at the tip won't be secure.
    Threading RGB LED circuit through inverted horn from the top.
  7. Once the jumper wires are threaded through the horn, carefully stuff the unicorn horn with stuffing or cotton balls. Take a little bit of stuffing at a time and poke it into your horn using a pen. Stuff until there is about half an inch of room at the bottom of the horn free of stuffing.
    stuffing horn
  8. Trim felt piece A so that it is slightly smaller than the bottom of the horn opening.
    Trimmed Felt Piece A as size reference against base.
  9. On the A piece, poke the two male headers (that you used when you initially set up your circuit) through the felt piece and through the positive (+) and the negative (-) pins on the TinyLily. Connect the female leads on the jumper wires (connected to the RGB LED on the other side of the unicorn horn) to the long metal pieces that are sticking through the TinyLily.
    Male header piece threaded through TinyLily and felt piece. Jumper wire and header piece sandwiching felt piece A
  10. Push the A piece into the unicorn horn base so that the TinyLily is facing outwards. Firmly fold the flaps around the base onto the A piece. Hot glue the flaps onto the felt piece.
    Hot gluing flaps on horn down to felt piece A. Hot gluing flaps on horn down to felt piece A
  11. Now it is time to connect pin 1 on the TinyLily to the input pin on the RGB LED. Prepare the needle and the conductive thread. Stitch in a spiral pattern around the horn from the LED down to the TinyLily using a double-threaded backstitch.
    Double-threaded backstitch spiraled around unicorn horn.

    When stitching the TinyLily to the bottom of the horn at pin 1, make sure to not touch the positive or negative pins on the TinyLily. You can add additional decorations later to the horn to cover your stitching mistakes.

    Completed circuit stitch onto pin 1 of TinyLily.
  12. Use a double-threaded whipstitch to firmly stitch felt piece A to the horn with normal thread (not conductive thread).
    Whipstitched base of unicorn horn.
  13. Once you have confirmed your circuit is complete, connect your LiPo battery using the battery adapter.
    LiPo battery connected to circuit on base of horn.

Finalizing your unicorn horn

  1. Trace the bottom of your final unicorn horn onto the paper side of felt piece B.
    Tracing unicorn horn base onto felt piece B.
  2. Trim felt piece B so it is slightly bigger than the traced shape. Remove the guiding paper piece.
  3. Cut a piece of ribbon approximately 3 feet long. Hot glue the ribbon's midpoint onto piece B. In the diagram below, the dotted line indicates the midpoint of the ribbon, and the shaded red area is where hot glue should be applied on felt piece B.
    Midpoint of ribbon indicated hot glued onto felt piece B.
  4. Hot glue the bottom of the unicorn horn onto Felt Piece B so that the ribbon side is facing up. Leave a gap in the hot glue ring for easy access to the LiPo battery. The shaded area in the picture below shows where the hot glue should be placed.
    Open ring indicating where hot glue should be placed on Felt Piece B.
  5. Decorate! You can glue or sew other elements onto your horn. Trim any excess threads flying around. Optionally, you can hide the seam of the unicorn horn with ribbon as well.
    Finished unicorn horn with LED on, three flowers for decoration.
  6. To wear your unicorn horn, place the horn gently on your head and wrap the ribbon around the back of your ears and under your chin. Tie firmly. This is better done with some assistance.
    Front image of unicorn horn with LED on. Side image of unicorn horn with LED off.

Cleanup

  1. Unplug your battery by gently removing the LiPo battery cord from the battery adapter on the bottom of your horn through the small gap in the hot glue ring.
  2. You can recharge your LiPo battery as needed.

What Happened?

Were you able to make your LED light up? Did your LED change colors as it lit up? You connected three wires from the TinyLily to the RGB LED. Two of these wires provide power to the LED. The third wire (the one you made with conductive thread) sends a control signal to the LED. This signal tells the RGB LED what color to be.

If the LED was correctly wired (positive to positive, negative to negative, and pin 1 to the input pin) the LED should have lit up in different colors. If you accidentally connected the positive wire to the input pin of the RGB LED, it would have been bright white all the time instead of changing colors.

Digging Deeper

RGB LEDs are made up of three colors: red, green, and blue. By controlling the different amounts of the three colors, you can create a large array of colors. This process is called additive color mixing. For example, red and green light combined make yellow light. All three colors of light combined make white light. Note that this process is different from subtractive color mixing, which you may have experienced when mixing paints (if you mix all your paints together, you will get brown or black).

In this project you used a microcontroller (the TinyLily) to electronically control the brightness of the red, green, and blue LEDs. You connected the microcontroller to the LED board with wires. Two of the wires were regular wires, used to provide power to the LED. The third wire was a conductive thread, which has the same electrical function as the regular wires but can be sewn into fabric. This wire provided the control signal to change the LED colors. The example program automatically provides that control signal. You can modify the example program to change the speed at which the colors fade. You can also write different programs to make the LED blink or stay a single color. To modify the program, you will need to replace the battery adapter attached to your TinyLily (which is secured at the base of the horn) with the mini USB adapter and reupload the code. See the Further Exploration section for additional example programs.

icon scientific method

Ask an Expert

Curious about the science? Post your question for our scientists.

For Further Exploration

Activities

STEM Activity
1
2
3
4
5
16 reviews
Do you like arts and crafts? How about making sculptures with Play Doh® or modeling clay? Imagine how cool it would be if you could add lights to your creations? That is exactly what you will get to do in this activity! Keep reading to learn how you can make any light-up sculpture you imagine, such as a house with lights in the windows, an animal with light-up eyes, or a colorful butterfly. Read more
STEM Activity
1
2
3
4
5
2 reviews
When you think of wearable devices, Apple watches, VR headsets, and Fitbits may come to mind. What about something even more personal like a circuit directly on your skin? Using simple tools you can find at your local craft store, design your own light-up temporary tattoo. Read more
STEM Activity
1
2
3
4
5
53 reviews
Do you like arts and crafts projects like drawing, painting, cutting shapes out of construction paper, or origami? Instead of drawing that bright sun or lights in a house, imagine adding real lights to your artwork! This project will show you how, by introducing you to the world of electronics with "paper circuits." Paper circuits are made with just a few simple items; you can use a battery and some copper tape to add tiny lights to your project. The best part is that it is easy to do, and you… Read more
Top
Free science fair projects.