Introduction: Hagrid's Interactive Lantern and Magic Wand With Tinkercad Circuits and Micro:bit
Hagrid's lantern is an iconic prop from the Harry Potter series, and it has captured the imagination of fans worldwide. In the wizarding world, the lantern is used to light the way in dark, dangerous places, and it has become a symbol of courage and adventure.
Using 3D printing technology, micro:bit and Tinkercad software, year five and six students can now create their own Hagrid's lantern, bringing the magic of Harry Potter to life in their classrooms. This project allows students to explore the intersection of technology and creativity while also providing an opportunity to learn about the design thinking process, problem-solving, and teamwork.
By creating their own magic props, students can develop important skills in digital design and fabrication, and they can gain a deeper understanding and appreciation for the world of Harry Potter. Ultimately, the Hagrid's lantern project is an exciting and engaging way to inspire students' imaginations and foster a love of learning.
Supplies
- 3D printer + PLA filament
- 2x micro:bit
- A LED strip with 10 Neopixels
- 1x LED light
- Copper tape
Step 1: Prototype Your Design
Prototyping Hagrid's lantern in paper is a great way to quickly and easily visualize and test the design before creating a final product. Here's a step-by-step guide on how to create a paper prototype of Hagrid's lantern:
- Gather your materials. You will need paper, scissors, glue or tape, a ruler, and a pencil. If you have a cutting machine (Silhouette Cameo, Cricut Joy, Maker...), they can cut their prototypes directly there.
- Draw the lantern's shape on a piece of paper. Use a ruler to create straight lines and measure the dimensions of the lantern. Keep in mind that Hagrid's lantern is a rectangular prism with a tapered top and bottom, and it has a handle on the top.
- Cut out the paper lantern shape using scissors. Be sure to cut along the lines you drew, and take your time to make the edges as straight and neat as possible.
- Fold the paper along the edges of the lantern shape to create a 3D model. Start with the straight edges, folding them up or down to create the cylinder shape. Then, fold in the sides to create the tapered top and bottom of the lantern.
- Use glue or tape to hold the edges together. Apply glue or tape along the edges of the paper, making sure to hold the sides together tightly.
- Add the handle to the lantern. Cut a strip of paper for the handle and fold it in half. Attach the handle to the side of the lantern using glue or tape.
- Test the paper prototype. Check that the lantern is stable and that the handle is securely attached. You can also test how the lantern looks when a light source is placed inside it.
By following these steps, you can create a paper prototype of Hagrid's lantern quickly and easily. This prototype can be used to test the design and make adjustments before creating a final product using more durable materials such as plastic or metal.
Step 2: Design the Lantern in Tinkercad
By following these steps, you can create a 3D model of Hagrid's lantern in Tinkercad. This model can be printed using a 3D printer to create a physical version of the lantern.
- Open Tinkercad and create a new project. Choose the "Basic Shapes" option from the menu on the right-hand side of the screen.
- Select the cuboid shape from the Basic Shapes menu and drag it onto the workplane. Use the sizing handles to adjust the size of the cuboid to match the dimensions of Hagrid's lantern. The cylinder should be wider at the bottom and narrower at the top.
- Create the tapered top and bottom of the lantern. Use the "Hole" tool to create a cylinder shape that is slightly smaller than the base cylinder at the top and bottom of the lantern. Place these cylinders on top of the base cylinder and use the sizing handles to adjust their height.
- Add details to the lantern. Use the "Box" tool to create small rectangles that will serve as the metal brackets on the lantern. Place these boxes on the top and bottom of the lantern and use the sizing handles to adjust their size and position.
- Group the shapes together to create the final product. Select all of the shapes that make up the lantern and handle and use the "Group" tool to combine them into a single object.
- Export the file as an STL file. Once you are happy with the design, export the file as an STL file that can be used for 3D printing. To do this, select the object and click on the "Export" button in the top right corner of the screen. Select "STL" as the file format and save the file to your computer.
Step 3: Design the Interactive Magic Wand in Tinkercad
Here are the steps to create an Elder Wand for the micro:bit using Tinkercad:
- Open Tinkercad and create a new design.
- Click on the "Shapes" menu and select the "Box" shape. Drag and drop the box shape onto the workplane.
- Use the sizing handles to adjust the dimensions of the box to 80mm x 8mm x 8mm.
- Click on the "Holes" menu and select the "Cylinder" shape. Drag and drop the cylinder shape onto the workplane.
- Use the sizing handles to adjust the dimensions of the cylinder to 3mm x 3mm x 80mm.
- Place the cylinder in the center of the box and position it so that it is aligned with the center of the box on the x and y axis.
- With the cylinder selected, click on the "Hole" option in the properties panel to make it a hole in the box.
- Click on the "Shapes" menu and select the "Cone" shape. Drag and drop the cone shape onto the workplane.
- Use the sizing handles to adjust the dimensions of the cone to 20mm x 20mm x 50mm.
- Place the cone on top of the box, making sure that it is centered and aligned with the center of the box on the x and y axis.
- With the cone selected, click on the "Group" option in the properties panel to group it with the box.
- Click on the "Export" button and select ".stl" as the file format.
And that's it! You now have a 3D-printed Elder Wand.
Step 4: Test and Improve
Here are some steps to test and improve the design of Hagrid's lantern so that a micro:bit can be inside it:
- Check the size of the micro:bit: You can use the real-size micro:bit included in Tinkercad to measure and determine how much space you will need to make inside the lantern and the magic wand to fit the micro:bit.
- Modify the design: Using the measurements taken in step 1, modify the design of the lantern to accommodate the micro:bit. This may involve creating a new compartment or making adjustments to an existing one.
- Create a test print: It's a good idea to do a test print to ensure that the lantern looks and functions as expected. Print a small version of the lantern to check for any design flaws or issues that may arise during printing.
Step 5: Printing Hagrid's Lantern
Now it's the moment to print Hagrid's lantern in a 3D printer using a slicer program, like Cura or Prusa Slicer when we have the object ready in Tinkercad:
- Open the slicer software and import the STL file. To do this, click on the "Add" button in the top left corner of the screen and select the STL file from your computer.
- Orient the object for printing. In the 3D preview window, you can adjust the orientation of the object by clicking and dragging on it. Try to position it in a way that will minimize the need for support structures.
- Set the printing parameters. In the right panel of Prusa Slicer, you can set various parameters for the print, such as layer height, infill density, and printing speed. These settings will depend on the type of filament you are using, the complexity of the object, and your preferences.
- Generate the G-code file. Once you have set the printing parameters, click on the "Export G-code" button in the bottom right corner of the screen. Save the file to your computer.
- Load the G-code file onto the 3D printer. Connect your computer to the 3D printer using a USB cable or SD card. Load the G-code file onto the printer's memory.
- Start the print. Make sure the printer is level and has enough filament loaded. Start the print from the printer's interface and monitor the progress.
- Remove the printed object from the printer bed. Once the print is complete, carefully remove the object from the printer bed using a spatula or scraper. Clean up any support structures or excess filament as needed.
That's it! You have successfully printed Hagrid's lantern using Prusa Slicer and a 3D printer.
Step 6: Code the Micro:bits Using Tinkercad Circuits
Now we will use Tinkercad circuits to code our micro:bits using blocks.
We will use the radio feature to make the micro:bits talk to each other in order to code the micro:bit on the magic wand to send a radio number when shaken, and the micro:bit on the lantern will light up the 10 LED Neopixel strip when it receives the number. Additionally, we'll code the magic wand micro:bit to send a string that will make the lantern's micro:bit to turn off the Neopixel strip when it receives it.
- Open Tinkercad Circuitand create a new project.
- Add two micro:bits to the project by dragging them from the Components panel onto the work area.
- Click on the "Code" button for the first micro:bit and select "Blocks" as the programming language (Elder wand).
- Drag and drop the "On shake" block from the "Input" category to the workspace.
- Drag and drop the "Radio set group" block from the "Radio" category to the workspace and set the group number to any number between 0 and 255.
- Drag and drop the "Radio send number" block from the "Radio" category to the workspace and connect it to the "On shake" block.
- Set the number to 1 or any number you prefer.
- Drag and drop the "Digital write pin" block from the "Pins" category to the workspace and select pin P0.
- Set the value to HIGH.
- Connect the "Digital write pin" block to the "Radio send number" block.
- Click on the "Code" button for the second micro:bit and select "Blocks" as the programming language (Hagrid's lantern).
- Drag and drop the "Radio set group" block from the "Radio" category to the workspace and set the group number to the same number used in the first micro:bit.
- Drag and drop the "Radio on received number" block from the "Radio" category to the workspace.
- Drag and drop the "Set LED Neopixel" block from the "Neopixel" category to the workspace and connect it to the "Radio on received number" block.
- Set the pixel number to 0, the brightness to 100, and the colour to any colour you prefer.
- Drag and drop the "Radio on received string" block from the "Radio" category to the workspace.
- Drag and drop the "Clear LED Neopixel" block from the "Neopixel" category to the workspace and connect it to the "Radio on received string" block.
- Drag and drop the "Show icon" block from the "Basic" category to the workspace and select the "No" icon.
- Drag and drop the "On button pressed" block from the "Input" category to the workspace.
- Drag and drop the "Digital write pin" block from the "Pins" category to the workspace and select pin P0.
- Set the value to LOW.
- Connect the "Digital write pin" block to the "On button pressed" block.
- Save your code and run the simulation.
- Once you are ready, download the .hex file and upload into your micro:bit.
Now, when you shake the first micro:bit, it will send the number 1 to the second micro:bit over the radio. When the second micro:bit receives the number, it will light up the first pixel of the Neopixel strip in the colour you chose. If the second micro:bit receives a string over the radio, it will turn off the Neopixel strip and display the "No" icon.
Example code: Here attached is the .hex file with the code ready to install on both micro:bit.
Step 7: Test and Improve
- Test the micro:bit inside the lantern and the magic wand: Insert the micro:bit into the lantern and the magic wand and test its functions to ensure that it is working properly. You may want to test any buttons, sensors, or LEDs to make sure that they can still be accessed and used while inside the lantern.
- Make improvements: If necessary, make further improvements to the design to better accommodate the micro:bit or improve its functionality.
- Final print: Once you have made all the necessary improvements and tested the designs thoroughly, print the final version of the lantern and the magic wand and place the micro:bit inside them.
By following these steps, you can test and improve the design of Hagrid's lantern and the Elder magic wand to fit a micro:bit and ensure that it functions properly while inside the lantern.
... And now it's time to let the MAGIC begin!
Judges Prize in the
Block Code Contest
3 Comments
6 months ago
I think this project is very cool, good job 👍
7 months ago
SO neat! Thanks for sharing :D
Reply 7 months ago
Hi! Thanks a million!🥰✨