Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Preface
About SunFounder SunFounder is a technology company focused on Raspberry Pi and Arduino open source community development. Committed to the promotion of open source culture, we strive to bring the fun of electronics making to people all around the world and enable everyone to be a maker.
Our products include learning kits, development boards, robots, sensor modules and development tools. In addition to high quality products, SunFounder also offers video tutorials to help you make your own project. If you have interest in open source or making something cool, welcome to join us!
About This Kit This cute learning kit utilize blocks and circuit driving connecting rod structure to command the robot to display different expressions. You can learn the knowledge of bricks, structure and circuit by applying this kit.
In this book, we will show you how to build the robot via description, illustrations of physical components in hardware respects.
You may visit our website www.sunfounder.com to download the related code and view the user manual on LEARN -> Get Tutorials and watch related videos under VIDEO.
Free Support If you have any TECHNICAL questions, add a topic under FORUM section on our website and we'll reply as soon as possible.
For NON-TECH questions like order and shipment issues, please send an email to [email protected]. You're also welcomed to share your projects on FORUM
Contents
I. Introduction ...................................................1
II. What you need .............................................2
III. Getting start with micro:bit ...................3
IV. Use makecode & sloth:bit block .........5
V. Assemble the robot ............................ 12
VI. Calibrate .............................................. 32
VII. Project .................................................. 37
1. Obstacle Avoidance example ..... 37
2. Voice example ................................ 38
VIII. What’s next .......................................... 40
1. Resources of boards ....................... 40
2. Set gestures ...................................... 40
3. Pins .................................................... 41
IX. Appendix ............................................. 43
FAQ .............................................................. 43
The problem of Bluetooth connection
............................................................... 43
Python code is not support ............... 43
Battery .................................................. 43
Voice sensor environmental thresholds
............................................................... 44
Abnormal of robot actions ................ 45
Contact us ........................................... 46
Javascript API ............................................. 46
PC use micro:bit ......................................... 46
1
I. Introduction
Sloth:bit is a programmable biped robot that use 9V
battery and controlled by BBC micro:bit to drive four
servos on driver circuits.
It’s easy programmable and convenient for
application. With BBC micro:bit, sloth:bit robot can be
applied by micro:bit app in Microsoft. The robot can
be controlled on pad or cellphone by visual
programming software; also, when downloading
program, you can connect Bluetooth without cables.
Different types of sensors are equipped with sloth:bit.
The micro:bit board is attached with acceleration,
terrestrial magnetism and temperature sensor,
infrared obstacle avoidance and voice sensor are
also attached inside.
Sloth:bit robot have reserved several extensibility
interfaces. Users can DIY hardware if needed and it is
convenient for modifying and extending functions.
2
II. What you need
Battery:
Pay attention to the battery type. The first three types
are accessible and the last one is unsuitable. Because
the last one is carbon-zinc battery, it can just apply in
low current.
Pad:
Ipad or mobile devices
of Andriod are all
suitable.
3
Application:
This app can be
searched at the App
store or Google Android
market.
III. Getting start with micro:bit
1.Search and install micro:bit application at the iPad
store.
2.Power on the micro:bit and the power light of the
board will be lighten up.(If the robot is not assembled,
micro USB wire cable can be used to supply power.)
4
3.Then open the Bluetooth on iPad and startup the
app that installed just now, the interface after
opening up is as shown below;
4. Follow the instruction of the software guide to
connect micro:bit with iPad.
5
IV. Use makecode & sloth:bit block
1. After connecting successfully, tap Home at the
upper left side to go back.
2. Click the second category Create Code.
6
This is the interface of the micro:bit visual
programming.
Drag the block and combine them together to
compile the program you need.
7
8
2.Click Advanced, then click Add Package:
9
Search sloth, you can see the package we provide.
Click on the package to add it to the project. After
the package is added, you’ll see the sloth on the left
side.
10
Program with sloth:
Combine these blocks with on start block:
After the program is complete, click Download and
then confirm to download.
11
Before downloading the program, you need to press
A and B at the same time, then press the Reset at the
back side until there display Paring at the matrix, and
release A and B to command the board to pair
Bluetooth.
12
Click flash on the app to flash the program:
Wait until it is complete:
V. Assemble the robot
Before assembling, it is recommended to check
whether the servo is normal. If there exist any
problems, you are welcomed to contact with us to
change. Do as the previous chapter to download
and burn the test program into micro:bit.
13
Afterwards, insert micro:bit into the long slot of the
driver PCB. Note the direction, if insert in reverse
direction, the micro:bit will not power on.
14
Assemble the battery. Prior to inserting battery, please
ensure the battery type is not carbon-zinc type. When
assembling, note the pin header in case of scratching
your hands.
Take out the servos from package:
Then connect servos with drive board. Insert the
yellow line of servo into the yellow pin and red into red,
brown into brown. Power on to check whether all the
servos can rotate normally.
If the servo is normal, then unplug servos and take out
battery and micro:bit to continue the assembling of
sloth:bit.
15
Do as shown in the following picture to assemble the
acrylic parts:
16
Take out all the acrylic parts and take off the
protective paper carefully.
Note the edge of these parts in case of incised wound.
Because these acrylic plates are cutting, there may
exist sharp edges cut your finger, so be careful.
Now assemble the rocker arms of servos.
Take out two Acrylic B and Rocker arm B,assemble
them with M1.2*4 screw.
Take out two Acrylic C1 and Rocker arm A, assemble
them with M1.2*4 screw.
17
Now we will assemble the robot from down to up.
First is the two feet. The parts used here are E, D1 and
D2. Fix part E and D1 by M3*10 cap screw and M3 nut.
It looks as shown below after assembling.
Fix part E and D2 by M3*10 cap screw and M3 nut.
18
After assembling, it looks as shown in the picture.
Afterwards, insert the hollow rivet into the D2 as shown
below.
19
Insert servo into the feet parts as shown below. When
assembling, note the servos direction, the servo cable
direction is at the same side with the edge of feet.
Fix servos by M2*8 screw and M2 nut.
When the left foot assembled already, it looks as
shown in the following picture.
20
Congratulation! You have assembled the left foot
successfully. Now, you can assemble the right foot
mirrored. Put the two feet together, it should looks as
shown in the picture below. If you find there are two
left feet or two right, the reason should be that part E
is on the reverse side, you need to flip it to the other
side.
Then assemble body part of the robot, that is electric
circuit and combining between body and feet.
Because there are servos in the robot, thus in the
21
following assembly, power on to calibrate is smoother.
Please follow the processes as shown below.
Assemble two servos into two parts A, note the servo
assembling direction. The side of long hole of part A is
the front side, the direction of servo cable face to the
side of the arrows.
Fix servos, then assemble them by M2*8 screw and M2
nut.
22
Then insert the support copper post into the acrylic
board and assembled by M3 copper standoff and M3
nut.
Assemble the drive circuit board as shown in the
picture. When assembling, note the direction of the
drive board. The IR should be toward the front side of
part A.
23
Then fix the circuit board by four M3*6 screws.
Insert the micro:bit into the slot of circuit board. Note
the direction of micro:bit control board. The LED
matrix side should be toward the front.
24
Install the battery now. When installing the battery, be
careful of the pin in case of scraping your finger.
Combine the four servo cables with the interfaces of
servo and drive board. The orange lines in the picture
below are the way recommended to twine.
25
Download a stand still program into micro:bit.
Power on it, if combining the servo well, it will stop at
the angle of 90. When installing rocker arms, the servo
need to be stop at the angle, so, keep the robot
power on is necessary. Next, assemble the part
between leg and foot as shown below and assemble
by M3*8 screw and M3 nut.
26
Combine the leg and foot part with leg servo.
Assemble the rocker arm with servo. Assemble the
rocker arm in the angle as shown below. There may
exist a little deviation between servo and rocker arm
when assembling finishes.
27
Fix rocker arm by rocker arm screw.
Assemble the bearing with hollow rivet, then
combining with acrylic plates.
28
This is what looks after assembling.
Combine the assemble parts together. When
assembling, it’s better to distinguish left and right foot
clearly, also the front and back side of the foot. One
of the rocker arm need to face the front side of part
A. As assembling before, the foot and the front side of
29
part A should be in 90 degree.
After the rocker arm and servo gear are combined,
power off the robot. Now rotate the feet, there will
appear the screw hole of rocker arm. Fasten the
rocker arm screw and fix the leg.
30
Assemble the other foot at the same way. Note: when
assembling the rocker arm gear, power it on and
keep the servo gear at the angle of 90. After
assembling, power the robot on and the picture
below is what is looks if stand still. If your robot stands
not straight, maybe you need to repeat the processes
of assembling rocker arms.
31
When all the processes are finishing, you need to
clean the servo lines and fix by ribbon.
Then paste the two feet with mats:
32
VI. Calibrate
After assembling the sloth:bit, now download
program to sloth:bit thus to command the robot do
various actions. Maybe the robot is a little strange, the
reason should be that there exist some deviations in
the gears. You can calibrate by adjustment. The left
one is the precise installation one and the right need
to be adjusted.
33
Download adjustment program into micro:bit.
34
There will display Cali on the LED. After the display, it
will come into calibrate mode.
When the LED is blinking, it means to choose the servo
that is to be adjusted. A, B is to change between
servo, and A+B is to ensure the choice.
35
After choosing one servo, press A and B at the same
time to ensure it, then it will come into adjustment
mode. A, B are the values of – and +; A and B is to
ensure the choice, then blink to display the
corresponding servo and the adjustment value.
Remember these values and fill them into the set
offset blocks.
A, B for -/+,
A+B for confirm
Right Leg
Right Foot
Left Leg
Left Foot
36
Choose the numbers of adjustment. Calibrate the
sloth:bit as straight as possible.
37
VII. Project
1. Obstacle Avoidance example
This is an example program of obstacle avoidance,
program according to the picture, then download it
into micro:bit.
When the sloth:bit goes forward and detect obstacles
in front, then the robot turn left for two times; after
turning, if no obstacles in front, the robot will goes
forward, and if there has obstacles, the robot will turn
left. Obstacle avoidance is realized by infrared, thus if
the size of the obstacle is too small or surface is
irregular, it may cause the obstacle undetected.
38
2. Voice example
This is an example program of voice, do as shown in
the picture, then download into micro:bit.
When hearing the voice, there will display the
expression of surprised and do the action of swinging
39
for one time; when there has no voice, the robot will
not move and display the expression of sleeping. If the
surrounding is too noisy, you can enlarge the value of
550 in the on heard over block.
40
VIII. What’s next
1. Resources of boards
Micro:bit board has many sensors. For more detailed
introduction, please refer to official website of
micro:bit: http://microbit.org/guide/features/
Light sensor,Temperature sensor,Accelerometer,
Compass,Radio,Bluetooth
These sensors are helpful to make the sloth:bit smarter
and complete more interesting programs. For
example, you will see the robot is in the state of felling
to the ground by means of acceleration sensor. When
the robot is felling to the ground, you can stop it and
even design the action of standing up again.
2. Set gestures
If these gestures are not enough, you can set new by
combine blocks. The program as shown below is to
define dance action:
41
When setting gestures, the most important is to set the
values of array on the left, one array for one action.
Here dance is designed as three actions, then define
a function to combine the three actions together in
order and time interval.
3. Pins
Sloth:bit PCB board has several reserved interfaces. It
can be extended for more functions and DIY
hardware by soldering attached pins inside. The
reserved pins interfaces have the functions as shown
below:
42
43
IX. Appendix
FAQ
The problem of Bluetooth connection
After using software mu of programming software
python in micro:bit, it may false the function of
Bluetooth download program. What you need to do
is to program on makecode, then download hex file
to send to the disc of micro:bit by USB, thus the
Bluetooth transmission can be used again.
Do not support python code
Micro:bit visual programming program compile is
encouraged to be used, surely, you can also use
Javascript. There still has no Python package in
sloth:bit by this moment.
Battery
There are different types 9V battery, because carbon-
zinc battery can’t supply high current thus not suitable
for robot. If you use this kind of battery may cause the
44
servo shake if the robot is doing actions.
Voice sensor environmental thresholds
Voice sensor is to return different voltage by means of
receiving sounds on cellphone. If the surrounding is
too noisy, you need to increase the threshold value of
sensors. Print out the received voice value by serial
write and then set the threshold value higher than
surrounding noise according to returned receive
values. When using the serial port, connect micro:bit
with computer by USB.
45
Abnormal of robot actions
If the robot can’t be startup, please check:
1. Whether the power is on, it must be on.
2. Whether the battery is full. C heck by multimeter, if
less than 7.5V, it means the battery is low.
3. Whether the micro:bit board is plugged in reverse
side, the LED should toward IR transmitting valve.
4. Whether the micro:bit board had downloaded
program. If not, download the program again.
46
Contact us
Javascript API
PC use micro:bit
By makecode to visual programming :
http://microbit.org/guide/quick/
Program by mu to micropython :
https://codewith.mu/
Micropython language help : https://microbit-
micropython.readthedocs.io/en/latest/