Every year on May 4th, people around the world celebrate Star Wars Day. The reason this day was selected is because May the 4th sounds like the famous Star Wars quote “May the Force”. In honor of Luke Skywalker and Darth Vader, we put together a fun light saber project based on the Return of the Jedi fight scene. This project uses the Hummingbird bit, micro:bit, servos, LEDs and craft supplies. This is a fun way to get kids excited about computer science and learning to code.
Materials Needed
In order to create this project, you will need the following items:
- Hummingbird Bit Controller w/ micro:bit
- Battery Holder (Requires 4xAA Batteries)
- (2) Tri-Color LEDs or (2) Single Color LEDs
- (2) Position Servos
- Cardboard Box
- Green & Red/Pink Straws
- Hot Glue
- Utility Knife or Cardboard Cutter
Note: All of the electronic parts of this project can be found in the Hummingbird Premium kit
Planning
When designing this project we started out with a sketch to see how the design would look. This helped take an idea and put on paper to see if the concepts would work. We use sketching as a way to explore multiple design options and identify those ideas that work, and importantly, those that don’t. Next time you start designing a project, consider starting with a sketch.
Cut and Paint The Box
The first step is to get a cardboard box and cut off two of the sides. In this project, we used a box that measured 12″x12″x12″. After you made the cuts to the box, paint the two side walls “Battleship” grey.
Cut The Cardboard Overlay
The next part is to work on the cardboard overlay for the “space window” feature in the back of the diorama. This cardboard was bought at a craft supply store and already came in a circle. You can also make a circle on cardboard by using a 6″ piece of string with a thumbtack. Tie one end of the string to a pencil and attach the other end using the thumbtack. This will help draw a perfect 12″ circle. Get creative with your design of the rectangles and triangles in the center of the overlay. A great tool for easy cutting is to use a Cricut Maker cutting machine. We’ve used them in the past and they work great!
Attach The Background & Overlay
The space graphic used in this project came from an image taken by the Hubble Space Telescope and was printed using an inkjet printer. The graphic was glued to a 12″ x 12″ piece of cardboard. You can also buy this type of paper at an arts supply store or simply paint the background black and add white dots of paint to illustrate the stars. Once the background is complete, paint the cardboard overlay grey and hot glue it on top of the space graphic.
Mount & Paint
Hot glue the 12″ x 12″ space window to the back of the box. Once this is complete, you can paint the corners grey.
Build The Battle Platform
Cut (5) strips of cardboard that measure 3″ x 12″ each. These will help form the base structure of the platform. Once cut, hot glue the 4 sides and center support in place. The center support should be located 5″ from the back. Now cut a 12″ x 12″ cardboard square to fit on top of the supports.
NOTE: Do NOT glue the cardboard square in place as this will need to be removed later.
Attach & Paint The Sides
Next it’s time to build the sides which will hold the Hummingbird and micro:bit boards. Cut (2) pieces of cardboard that measure 4″ x 12″ in length. Hot glue these pieces to both sides of the box. You will also need to cut (4) triangle shaped pieces of cardboard and glue these in place behind the sides. Once complete, paint both sides grey.
Create The Luke & Darth Cutouts
For this project, we used a stock image that depicted a LEGO version of Luke Skywalker and Darth Vader with light sabers. You can use any image as long as it fits in the dimensions of the platform. In our case, Luke and Darth measured approximately 5″ tall by 2-3″ wide. Once you print out the graphic, use a glue stick to adhere it to a piece of cardboard. Once the glue dries, cut out both characters from the cardboard.
Pro Tip – If you want to reinforce the cardboard, put hot glue around the edges and back. This will stiffen it and add rigidity to the cutouts.
Finally, hot glue the servo horns to the bottom of the cardboard. Make sure the horns are facing the correct direction before gluing them in place.
Attach The Hummingbird & Servos
Next we’re going to attach the Hummingbird Bit to the left side panel. Our recommended way of mounting this is by using Velcro on the back of the Hummingbird. This way it can be removed later for another project versus using hot glue which is more permanent.
Remove the 12″ x 12″ cardboard platform and flip it over to the back side. Determine where your Luke and Darth will be placed based on their layout and how large they are. In our case, we positioned them in the middle and to the side because of Darth Vader’s cape. Make sure there is enough room for them to spin freely. Place the position servo in the desired location and cut out 2 small rectangles. Make sure the cuts are slightly smaller than the overall size of the servo so it doesn’t fall through the hole. Hot glue brass brads to both sides of the servo and then attach a rubber band to secure it. When mounting the servos, make sure the wires are facing toward the side where the Hummingbird controller is located.
Run The LED and Servo Cables
If you ever wanted to be an electrician this next step will be good practice because it’s time to run wires. You will need to cut a hole in the left side of the platform supports and side of the box. You can use a razor blade but we found a drill bit was actually much quicker and easier in creating an opening through multiple layers of cardboard. Once your hole is created, push both servo wires and both LED wires through the opening.
NOTE: If your servo cable is not long enough, you can add an extension cable which we did in this case.
Connect The Wires To The Hummingbird
Cut or drill a hole in the side panel near the Hummingbird Bit. Once this hole is created, push through all 8 wires of the LED cable. The servo wires can be fed from the bottom of the side panel up to the board.
Servo Connection – Plug in the left servo (Luke) to port 1 & the right servo (Darth) goes into port 2. Make sure the black wire lines up with the (-) negative sign, red goes to (+) positive and white goes to (S) for Signal.
LED Connection – We’re using the tri-color LEDs so we will be using the port marked TRI-COLOR. Begin by inserting the (1) red wire into the “R” terminal in port 1. Press down on the tab and insert the wire at a 45 degree angle and then release the tab to secure it. Insert the green wire into the terminal marked “G” and the blue wire goes into “B”. The black wire will need to be inserted in the terminal marked with a (-) negative. Do the same with the other cluster of wires but put them into port 2.
NOTE: In this project we chose to use the RGB Tri-Color LEDs but you can easily swap them for a single green LED and a single red LED. If you chose that route you would need to plug them into the ports marked LEDS. Using the RGB LEDS allows you to do some fun color mixing if you chose to do so.
Mount the LEDs
Before you put the platform bottom back inside the box, you will need to cut a small hole behind each of the servos for the LEDs to fit through. Once these holes are cut, you can insert (1) LED through each hole. At this point you will need to make a hole in Luke and Darth at the bottom of their light saber and push the LEDs through these holes. Now you can connect each of the characters to their servos using the servo horns which you glued in place earlier.
Assemble The Light Saber
Now it’s time for you to become a light saber manufacturer. To do this, you will need to push the LED into one end of the straw. If the straw is too small in diameter, you can cut a 1″ slit on ONE side of the straw. This will allow the straw to accommodate the wider LED. Push the LED up the straw about 1.5″. At this point you will need to wrap the hilt or handle of the light saber with masking tape. Once it’s wrapped, you can use black sharpie to color it. Hot glue the light saber to the area where the hands are located.
Programming The LEDs, Servos & Music
Its time to get our programming on and make this project come alive. For this project, we used Microsoft’s MakeCode which is free to download and use.
- Insert the micro:bit into the Hummingbird Bit controller
- Connect the battery holder to the Hummingbird and turn it on
- Connect the USB cable from your computer to the micro:bit
- Go to https://makecode.microbit.org
- Click on “New Project”
- Give your project a name and click “Create”
- Download the “May The 4th Be With You” ZIP folder which contains (2) HEX files
- Drag the file named “microbit-may-the-fourth-be-with-you.hex” into the middle of the MakeCode work area
- Click the purple “Download” button on the bottom left of the screen
- The code should be sent to the micro:bit after a few seconds
- Pressing the “A” button on the micro:bit will start the program and “B” will stop it
OPTIONAL: If you would like to add the Star Wars theme song to this project you will need to add a second Hummingbird bit and micro:bit to the box. The photo in the next section shows the second Hummingbird added on the right side panel. This doesn’t require any wires and just needs a battery holder plugged in. To add the music, find the file in the previously downloaded ZIP folder named “microbit-star-wars-theme-song.hex” and download it to the second micro:bit. Press “A” to start the music and “B” will stop it. When you press B, it won’t immediately stop the music but will finish the program that’s running and then will stop. You can also just turn off the battery pack.
May The 4th Be With You !!
At this point, you should be able to turn on the battery pack and press A on the micro:bit to turn on the light sabers and make them move. If Luke and Darth are not moving exactly as they should, you can pull them off the servos and reposition them accordingly. Feel free to tweak the code as well. If you used the Tri-Color LEDs, you can change the colors of the light sabers. Try experimenting with the speed of rotation, make the light sabers flash faster etc. If you do end up changing the code, you will need to save the file and download it again to the micro:bit so it has the new code.
We hope you had fun with this project and MAY THE FORCE BE WITH YOU on future projects.
More Projects & Resources
If you end up making this project, we would love to see it. Tag us on X at @BirdBrainTech so we can share it with our community.
Looking for other Hummingbird Bit projects? Check out our Birdhouse Blog or our project pages for more inspiration and ideas.
Project Parts
If you’re looking to purchase the parts used in this project, make sure to check out our store to learn more about the Hummingbird Kit, Finch Robot and the other exciting products from BirdBrain Technologies.