Introduction: BB-8 Emotional Companion With Tinkercad and Micro:bit
We have created a BB-8 emotional droid that helps students define their feelings and provides cheerful, droid-inspired advice. This project uses two micro:bit to control a neopixel strip, displaying vibrant light patterns depending on the emotion, and offers advice in the style of the beloved droid BB-8 from Star Wars. Normally, it will be orange, that we have chosen for its association with optimism and energy, reflecting BB-8's spirited and positive personality.
With the cheerful guidance of BB-8, the objective of the activity is to encourage emotional awareness and positivity.
Supplies
- micro:bit
- Neopixel strip (WS2812 LEDs)
- Tinkercad account
- micro:bit USB cable
- Battery pack for micro:bit
- (optional)
- Connecting wires
- 3D printer
- Filament for 3D printing
Step 1: Designing BB-8 in Tinkercad
Step 1: Setting up Tinkercad
Create a Tinkercad account:
- If you don't already have one, go to the Tinkercad website and sign up for a free account.
Start a new project:
- Log in to your Tinkercad account and click on “Create new design” to start a new project and choose "3D design".
Step 2: Designing the Body of BB-8
Create the main body (sphere):
- Select the sphere:
- From the right-hand side menu, find and drag a sphere shape onto the workplane.
- Resize the sphere:
- Adjust the size of the sphere to be a suitable size for BB-8’s body. Use the resize handles to make it around 50mm in diameter.
Add details to the body:
- Create circular panels:
- Drag a cylinder shape onto the workplane.
- Adjust the height to be very thin (about 1-2mm) and resize the diameter to be smaller than the sphere.
- Use the “Align” tool to position the cylinder on the surface of the sphere.
- Duplicate the cylinder and place multiple circular panels around the sphere to mimic BB-8’s design.
- Add other details:
- Use additional shapes like half-spheres, rectangles, and other basic shapes to add more detailed features and panels to BB-8’s body.
Step 3: Designing the head of BB-8
Create the head (half-sphere):
- Select the half-sphere:
- Drag a half-sphere shape onto the workplane.
- Resize the half-sphere:
- Adjust the size to be proportional to the body. Make it about 25mm in diameter.
- Position the head:
- Move the half-sphere above the main body sphere and align it so it sits on top of the body.
Add details to the head:
- Create the eye lens:
- Drag a smaller cylinder onto the workplane.
- Resize the diameter to be about 5mm and the height to be 2mm.
- Position the cylinder on the half-sphere to represent BB-8’s eye lens.
- Add antennae:
- Drag thin cylinders or rectangular shapes onto the workplane.
- Resize them to be thin and long to represent BB-8’s antennae.
- Position the antennae on top of the half-sphere head.
Step 4: Creating space for neopixels and micro:bit
Hollow out the sphere:
- Create a duplicate of the sphere used for the body.
- Resize the duplicate to be slightly smaller than the original sphere.
- Use the “Hole” feature to make the smaller sphere a hollow space.
- Position the hollow sphere inside the original sphere and group them together to create a hollow body for BB-8.
Create a compartment for the micro:bit:
- Use rectangular shapes to design a compartment inside the hollow sphere that can securely hold the micro:bit.
- Ensure the compartment has openings for the micro:bit’s display and buttons to remain accessible.
Create openings for wiring:
- Use the cylinder shape to create small holes where wires can pass through.
- Position the holes at the bottom of the sphere and where the head meets the body.
Step 5: assembling the droid
Group the body and head:
- Select all the parts of the body and head.
- Use the “Group” tool to combine them into one cohesive model.
Final adjustments:
- Rotate and move the model to ensure all parts are properly aligned and proportionate.
- Make any necessary adjustments to the size or position of individual components.
Step 6: Adding color and finishing touches
Apply color:
- Use the color tool to apply orange and white colors to BB-8’s body and head.
- Select the different parts of BB-8 and color them appropriately to match BB-8’s appearance in Star Wars.
Save and export:
- Once you are satisfied with your design, save your project.
- Export the design as an STL file for 3D printing.
BB-8 Emotional Companion
Step 2: 3D Printing BB-8
Step 1: Preparing for 3D printing
Import the STL file:
- Import the STL file into your 3D printer’s slicing software (e.g., Cura, PrusaSlicer).
Configure print settings:
- Adjust the print settings according to your 3D printer’s specifications.
- Ensure appropriate infill, layer height, and support settings for the model.
Step 2: Printing the model
Start the print:
- Load the filament into the 3D printer and start the print.
- Monitor the print to ensure it is progressing correctly.
Post-processing:
- Once the print is complete, remove any supports and clean up the model.
- Ensure the compartments for the neopixels and micro:bit are clear and accessible.
Step 3: Part 3: Integrating Electronics
Step 1: Setting up the electronics
Go to the code editor:
- Switch to the code editor Makeblock.
Write the program:
- Enter your code to define emotions and display advice in BB-8's cheerful style.
let strip = neopixel.create(DigitalPin.P0, 10, NeoPixelMode.RGB)
basic.forever(function () {
if (input.buttonIsPressed(Button.A)) {
strip.showColor(neopixel.colors(NeoPixelColors.Orange))
basic.showString("happy: Beep bop! Keep that smile!")
}
if (input.buttonIsPressed(Button.B)) {
strip.showColor(neopixel.colors(NeoPixelColors.Blue))
basic.showString("sad: Beep beep. Talk to a friend")
}
if (input.pinIsPressed(TouchPin.P0)) {
strip.showColor(neopixel.colors(NeoPixelColors.Red))
basic.showString("angry: Beep! Take deep breaths")
}
if (input.pinIsPressed(TouchPin.P1)) {
strip.showColor(neopixel.colors(NeoPixelColors.Violet))
basic.showString("anxious: Bloop beep. Try to meditate")
}
if (input.pinIsPressed(TouchPin.P2)) {
strip.showColor(neopixel.colors(NeoPixelColors.Yellow))
basic.showString("excited: Bleep bloop! Channel that energy!")
Test the circuit:
- Use Tinkercad's simulation feature to ensure the micro:bit and neopixels work as expected.
- Press button A to test the cheerful effect and advice display.
Step 2: Building the physical circuit
Assemble the circuit:
- Connect the micro:bit and neopixel strip according to the wiring diagram:
- Power Connection:
- Connect the VCC pin of the neopixel strip to the 3V pin on the F.
- Ground Connection:
- Connect the GND pin of the neopixel strip to the GND pin on the micro:bit.
- Data Connection:
- Connect the DIN (data in) pin of the neopixel strip to pin 0 (P0) on the micro:bit.
Insert the Neopixels and micro:bit into BB-8:
- Carefully insert the neopixel strip inside the hollow BB-8 body.
- Ensure that the wiring fits through the openings created earlier.
- Place the micro:bit in the designated compartment, ensuring the display and buttons are accessible.
Upload the Code:
- Use a micro:bit USB cable to upload the code from Tinkercad to the physical micro:bit.
Final Touches:
- Secure all components inside the BB-8 model.
- Add labels or instructions for students on how to use the device: Press button A to receive advice.