Introduction: Microbit Talking Robot
最初，我在Tinkercad进行了模拟，建立并探索了这个实验。投票率，我的模拟不像我预期的那样。我的下一步是我准备了使用Microsoft MakeCode的代码，因为我将使用连续伺服而不是Micro Servos，TinkerCad仅在电路中提供了微伺服。
For those who do not work yet with Microbit, please read the overview guide of Microbit in thislink.
For downloading the enclosure, clickCults3D.
I also attached the Microbit HEX Files.
Microsoft Makecode and Python Editor
PLA filament (Metal, blue, yellow, red, wood, and green)
Dremel rotary tool
2 Batteries of AAA + holder
Step 1: Make Simulation in Tinkercad
之前我们做一个原型,它是至关重要的a simulation in Tinkercad. By doing this simulation, we can play around with the electronic circuit, so we become aware and understand whether we make a mistake in our circuit or not. As I mentioned previously, Tinkercad only has micro servos in its library, while I would like to use continuous servos (because I have enough continuous servos in my inventory instead of micro servos). How to solve this problem? Well, I had to use another alternative, which is making the block code in another third party, such as Microsoft Makecode.
In this project, I used two continuous servos to rotate the hands.
The servo has three lines, which are signal lines (orange-1), electric power line positive (red-2), and negative/ground line (black-3).
- Signal lines, which are represented as blue and green wires in the circuit diagram above, in servos connected to pin 1 and 2 in Microbit, respectively.
- The positive line in both servos should connect to the positive pole of the battery, and so the negative line (ground) should connect to the negative pole of the battery.
Step 3: The LEDs
Connect the speaker to the Microbit as follows:
· Negative wire connects to Pin GND in Microbit
Step 5: The Code
In this code, if we press button A, it will show some images first and then, turn on the LED for the left eye, and rotate the left hand. It will have the same condition if we press button B, only this time for the right side.
Step 6: Advance Code for Making the Robot Talks and Understand the Code
In making the robot talks, it cannot be done with a coding block. To overcome this problem, we need to convert all the codes into Python. Here is the link for Python Editor foronlineandoffline(you need to download it first).
Before converting, try to convert all codes in Makecode by using the Python language. Turnout, the converting is not compatible with the Python editor. We need to change few codes, so Python can understand the code. Here is the偏好链接for Python codes.
For all the codes in Python, click thislink.
To rotate the servo in pin 1 in Microbit and pause 1000 milliseconds (1 second)
To turn on the LED eye in pin 1 in Microbit and pause 1000 milliseconds (1 second)
speech.say("Let's play with me.", speed=92, pitch=60, throat=190, mouth=190)
We want the robot to talk " Let's play with me." With speed, pitch, throat, and mouth as we desired. To know more about these parameters, click thispreference guide.
When we use "speech.pronounce", we use Phonemes as the parameter. For more information about phonemes, click thislink.
演说。张力（“Woh5oh3t Ahahr Yuhuh Duhuhihhnx Nnahah3uh5uh8”，Speed = 92，间距= 60，咽喉= 190，口= 190）
In the code above, we make the robot to talk, "What are you doing now?"
Just play around with the speech command as you desired.
Step 7: Enclosure
To make the enclosure for the robot, I made it in Tinkercad.
For download, clickCults3d.
We need to build the case for Microbit, so the Microbit could stand in place in the body of the robot. To make it, I used the simple shape of a box with dimension:
Length: 66 mm
Width: 21 mm
Height: 50 mm
Step 9: Body- Front Part
For the front body, drop a box in the work area. Make a hole in the cylinder on the top with the same measurement as the hole in the head. Make some holes for the speaker,
微钻头,届e servo. Add four placeholders for placing the screws on each corner.
Step 10: Body- Back Part
For the back part of the body, use two boxes, and stack them. The dimension should be the same as the front part of the body and the head. Group them together.
Step 11: Legs
For the legs, use a box and combine it with a wedge. For the dimension, see the images. Group them together.
Step 12: Hands
For making hand, drag and drop two roofs into the work area. Cut each roof with a box hole. Group them together. Duplicate the hands, so you have two hands now.
Step 13: Head
For the mouth, use a sphere and resize it as shown in the image.
Step 15: Tail
Make the same shape as a mouth for the tail, only it is wider.
Step 16: Prototype and Test
Step 17: Printing
Save each of the parts of the 3D Model into .stl files. Using Cura slicer, slice the .stl files and print them with the color of PLA filament as you desired. The printing settings are layer height 0.2 mm, infill 20%, using brim, and no support, except the Microbit case.
Step 18: After Printing
Remove the support in the Microbit case after printing.
Step 19: Drilling After Printing
Make holes for the eyes to the head casing. I use a Makita drill to make the holes. Drill two holes in the head and measure the holes for LED about a diameter of 5 mm. Also, drill five holes for bolting the body and drill two more holes for bolting the hands.
Step 20: Tidying the Speaker
Step 21: Assemble the Printing Parts
Glue the mouth to the front body. Glue the tail to the back part of the body. Assemble the legs to the body and finally, glue the head to the body.
Step 22: Build the Electrical Circuit
- Insert alligator clips to pin 0 (red), 1 (yellow), 2 (white), and Gnd (black).
- Connect all the alligator clip wires like in the previous prototype.
Step 23: Construct the Robot
- Upload the hex file to the Microbit.
- Put the Microbit and speaker inside the enclosure. Connect the Microbit with the batteries. Tidy up all the wires and secure them with electrical tape.
- Attach the hands with servos.
Step 24: Final Result and Test the Robot
Here is the final result of the Microbit Talking Robot.
Note: I installed Microbit upside down due to the tight enclosure, so the result would be the opposite of my previous code.
First Prize in the