Rainbow Glow 3D Design

In this tutorial, you'll use the Rainbow Glow circuit assembly to create a 3D-printed butterfly light show!

The Rainbow Glow circuit assembly uses an Arduino Uno and a NeoPixel ring. We'll use the Rainbow Glow circuit assembly to light up the wings of a 3D-printed butterfly. Let's get started!

Note: This tutorial picks up from our lesson on programming the NeoPixel ring using an Arduino. If you haven't done this already, we recommend checking it out in the Circuits editor to learn more about the NeoPixel and how to program it!

Step 1: Finding Circuit Assemblies in the Shapes Panel

Circuit Assemblies can be found in their own category in the Shapes Panel.

Instructions

  1. Click the Shapes Panel dropdown and select Circuit Assemblies from the list.
  2. Notice how for each circuit assembly, there is a corresponding Cutout.
  3. Continue to the next step to explore the Rainbow Glow circuit assembly and Cutout.

Step 2: Rainbow Glow Circuit Assembly and Cutout

A few different parts make up the Rainbow Glow circuit assembly: a 3D printed holder (in red), an Arduino Uno, and a NeoPixel ring with 24 programmable lights. To power your Arduino, you'll also want to use a standard A-B USB cable, which should come with your Arduino Uno. Once you upload your rainbow glow code to the Arduino, your NeoPixel ring will cycle through a super-bright rainbow pattern that can illuminate any 3D printed design.

Look closely at the holder and you'll see a few key design elements. First, there are three holes that you'll use to wire the NeoPixel ring to the Arduino. You'll also find a snap at the center of the holder. You'll attach your design to this snap with the help of the Rainbow Glow cutout.

Like all other circuit assemblies, Rainbow Glow has a companion cutout that you use to create a design that fits snugly with the circuit assembly holder. The cutout has a socket so that when you group your design with the cutout, it'll create a hole that will perfectly fit over the snap on the holder!

Instructions

  1. Drag out the Rainbow Glow circuit assembly into the editor.
  2. Drag out the Rainbow Glow Cutout into the editor.
  3. Continue to the next step.

Step 3: Explore Rainbow Glow Circuit Assembly and Cutout

In this step, we'll align the Rainbow Glow circuit assembly and Cutout before grouping our cutout with the butterfly design.

Instructions

  1. Select both the Rainbow Glow Cutout and the Rainbow Glow circuit assembly and click the Align button. Center both on the workplane by clicking on the two middle dots along the workplane.
  2. Continue to the next step.

Step 4: Make the Butterfly Transparent

Let's make the Butterfly transparent to make it easier to see how the cutout and circuit assembly fit inside.

Instructions

  1. Select the Butterfly, click on the Solid color in the inspector, and check the transparent box.
  2. Continue to the next step.

Step 5: Hide the Cutout

At this stage, we're going to hide the cutout so we can better align the butterfly with the Rainbow Glow holder. Don't worry - we'll bring it back in just a bit!

  1. Click on the Cutout and click the Hide button in the inspector (it looks like a lightbulb).

    HINT:

    If you ever want to show all hidden components in your design, click on the lightbulb icon in the toolbar to "Show All"

  2. Continue to the next step.

Step 6: Applying the Cutout

Now we're ready to place the Butterfly and then apply the cutout to add the socket to its base. We'll use a workplace to make sure that the base of the butterfly is aligned with the holder.

Instructions

  1. Click the Workplace button or press "W" on your keyboard to begin defining a new workplane. Place the workplace on the flat surface of the holder in which the snap sits upon. You'll notice now that there is an orange plane placed at this location.
  2. Select the Butterfly and press "D" on your keyboard to drop the Butterfly on your newly-created workplace. This ensures that the Butterfly is placed at the right height.
  3. Click on the "Show All" button in the toolbar to reveal the Cutout.
  4. Click on the Top side of the View Cube to make it easier to position the Butterfly over the cutout.
  5. Now drag the butterfly so that its cylinder base is centered with the socket of the cutout.
  6. Select the butterfly and the Cutout and click the Group button (or press "ctrl+G" on your keyboard) to group them together and add the socket to the Butterfly base. Do not select the circuit assembly at this step - just the Cutout!
  7. Rotate the camera to check how the cutout has created a cavity in the Butterfly so it can fit onto the snap of the Rainbow Glow holder.
  8. Continue to the next step.

Step 7: 3D Print Your Design

When exporting your circuit assembly, you will want to export it separately from your design. In this step, we'll export the Rainbow Glow circuit assembly and Butterfly individually.

Instructions:

  1. Select the Rainbow Glow circuit assembly and click the Export button.
  2. Ensure that "The selected shape" is selected and click .STL to export the circuit assembly for 3D printing. Exporting the circuit assembly will only export the 3D-printable components (the holder) in the assembly. The electronic components will not be included.
  3. When you print the Rainbow Glow holder, we recommend printing right-side up with support material. This will ensure that it fits well over the Arduino.
  4. Select the Butterfly and click the Export button.
  5. Ensure that "The selected shape" is selected and select .STL to export the Butterfly for 3D printing.
  6. We recommend that you print the Butterfly upside-down to eliminate the need for support material. Additionally, the 3D printed design will have an even cooler light effect when printed on clear or white filament if you have access to it! Even if you don't have clear or white plastic to print with, the light will shine through the details on the butterfly wings.
  7. Continue to the next step.

Step 8: Gather Your Parts

After 3D printing your parts, you will need these electronic components to build your Rainbow Glow Circuit Assembly:

  1. An Arduino UNO with an A-B USB serial cable
  2. A NeoPixel Ring with 24 NeoPixels
  3. 3x Jumper cables

    Find all Rainbow Glow electronic components on Sparkfun

    You will be leaving Tinkercad and taken to an external site when you click the link above.

    You'll also need the following parts and tools:

    1. Soldering Iron + Solder
    2. Helping Hand (optional but handy for holding your parts in place while you solder!)
    3. Wire Strippers

    Instructions:

    1. Gather all your components, tools, and 3D-printed circuit assembly holder and Butterfly.
    2. Continue to the next step.

    Step 9: Attach the Holder and NeoPixel Ring to the Arduino

    The first step towards putting together your circuit assembly is to add the holder to the top of the Arduino. The holder should fit snugly around the headers of the Arduino Uno, where you usually plug in wires into the Arduino.

    Instructions

    1. Press fit the holder on top of the Arduino Uno so that it fits snugly around the headers (the sockets that you usually plug in wires into the Arduino).
    2. The NeoPixel Ring should fit around the holder with the PWR and GND pins of the NeoPixel facing the bottom of the holder, close to the + and - indicators on the holder.
    3. Continue to the next step.

    Step 10: Wiring the NeoPixel Ring

    Notice how your holder has three holes for connecting the NeoPixel ring to the Arduino. On one side, there are two holes for connecting power and ground, and on the other side is a hole for a data connection to Arduino pin 9. In this step, you'll add jumper wires to each of these holes that will then be soldered to the NeoPixel ring.

    Wire colors can be useful for distinguishing between different pins. We recommend you use one red jumper wire for the power connection, one black jumper wire for the ground connection, and one colored wire (anything other than red!) for your data connection. In this example, we'll use a green jumper for our data connection.

    Instructions

    1. Take the red jumper cable and insert one end into the + hole of the holder. Make sure it's fully inserted so that it makes a connection with the Arduino Uno 5V pin.
    2. Take the black jumper cable and insert one end into the - hole of the holder. Make sure it's fully inserted so that it makes a connection with the GND (Ground) pin of the Arduino.
    3. Take the last jumper cable and insert one end into the 9 hole of the holder. Make sure it's fully inserted so that it makes a connection with pin 9 of the Arduino.
    4. Continue to the next step.

    Step 11: Removing the Ends of the Jumper Cables

    To make it easier to solder to our Neopixel, we'll snip one end of each of the jumper cables.

    Instructions

    1. Using the wire strippers, snip the ends of each of the jumper cables (the loose end that is currently not connected to anything) to remove the plastic end.
    2. Now use the wire strippers to remove the insulation from the exposed end of each of the jumper cables. These are the ends that we'll solder directly to the NeoPixel.
    3. Continue to the next step, where you'll solder your connections to the NeoPixel ring!

    Step 12: Connect to the NeoPixel Ring

    Now let's connect the wires to the NeoPixel pins.

    Instructions

    1. Twist the wires at the exposed ends of the jumper to make it easier to insert into the NeoPixel holes.
    2. Take the red jumper cable connected to 5V pin of the Arduino and thread it through a PWR pin of the NeoPixel. Thread the wire through the top of the NeoPixel so that the NeoPixel can still sit flat in the holder. After threading the wire through the pin, bend the end of it 90 degrees to help hold the wire in place.
    3. Take the black jumper cable connected to the GND pin of the Arduino and thread it through the G pin of the NeoPixel, just as you did for by inserting the wire from the top of the NeoPixel to the bottom, bending the end after inserting.
    4. Repeat the same process for the last jumper cable to wire it to the IN pin of the NeoPixel.
    5. Continue to the next step.

    Step 13: Solder Your Connections

    In this step, you'll use a soldering iron to solder strong connections between the jumper cables and the NeoPixel ring! Soldering irons can get very hot, so make sure you get instruction on how to use a soldering iron safety before proceeding!

    Instructions

    1. Flip the entire assembly upside down and use the helping hand to hold it in place as you solder each wire to the corresponding NeoPixel pin.
    2. Continue to the next step.

    Step 14: Program the Arduino

    Now we're ready to program the Arduino with Rainbow Glow code!

    If you are following on from the previous lesson in the Circuits Editor, you learned how to export your Arduino code from the Circuits editor and should have an Arduino Sketch called Rainbow Glow.ino on your computer. If you didn't take the previous lesson, we recommend opening up the lesson HERE [include link] to learn how to program the circuit assembly before proceeding.

    Instructions

    1. Open up the Arduino IDE on your computer. (Follow the instructions on this page if you haven't downloaded the software before: https://www.arduino.cc/en/Main/Software).
    2. You'll need to add the NeoPixel library to the editor. Go to Sketch > Include Library > Manage Libraries... From there, search for "Adafruit NeoPixel" and click the Install button. Once it's installed, the library will now be available to use.
    3. Open up your Arduino sketch ("Rainbow Glow.ino").
    4. Plug in the Arduino to your computer using the USB cable.
    5. Under Tools > Board, select the Arduino/Genuino Uno from the list.
    6. Under Tools > Port, select the port for your Arduino.
    7. Click the Upload button (the right arrow) to upload your code to your Arduino. If you've wired everything successfully, your NeoPixel should now light up!

      HINT:

      You may need to debug your circuit if it is not lighting up as you expected. Double check that your jumper cables are fully connected to the Arduino and have strong solder connections to the NeoPixel.

    8. Continue to the next step.

    Step 15: Attach the Butterfly

    We can finally attach the Butterfly to our Circuit assembly holder!

    Instructions

    1. Your butterfly should snap directly to the holder. Press the butterfly lightly into place!
    2. Congratulations - you've mastered how to program an NeoPixel ring, solder connections, and construct a 3D design with a beautiful Rainbow Glow!
    3. Now try creating your own 3D design from scratch to fit around the Rainbow Glow circuit assembly. You can make anything you want to light up, like a 3D print of your name, a trophy, a crown....the possibilities are endless!

    Share

      Recommendations

      • Tape Contest

        Tape Contest
      • Arduino Contest 2019

        Arduino Contest 2019
      • Trash to Treasure

        Trash to Treasure

      Discussions