5. Nexus:bit expansion board
This doc does not contain Nexus:bit user manual.
See TCEA’s Nexus:bit user manual for details.
Power switch
USB charging port
6. Materials
• NexusBot robot body parts and wheels
• BBC micro:bit/micro USB cable x1
• Nexus:bit expansion board x1
• 18650 rechargeable lithium battery(2600 mAh) x1
• HC-SR04P ultrasonic module x1
• SG90 mini servo (orange-red-brown cables) x8
• DC motors in SG90 body (red-black cables) x2
• SG90 cone screws x4, small flat screws x2
• M3 screws x4
• Screwdriver x1
7. Caution!
• Younger children or children with no robot-
assembling experiences should be assisted
/supervised by parents.
• Operate the completed robot/car on flat
surface with low resistance. Be aware of your
safety in the surroundings.
• Recharge the robot/car after usage for some
time.
9. SG90 mini servo
• Servos are special motors which can be turned
to a specific degree (0~180) at a time on
command.
• They have 3 cables; not the same as DC
motors with only 2 cables which would run as
soon as you connect it to power.
10. SG90 mini servo
Orange- - signal
Red - power
Brown - ground
To 0 degreesTo 180 degrees
cone screws
small flat
screws
11. Servo indexes
• To make sure your robot can be configured
correctly as in our manual, the indexes (order)
of servos should be arranged as next page:
12. Servo indexes
1. left leg
2. right leg
3. left foot
4. Right foot
5. left arm
6. right arm
7. left hand
8. right hand
13. Servo pins
S: signal
+: power
-: ground
8 7 6 5 4 3 2 1 servo indexes
1. left leg
2. right leg
3. left foot
4. Right foot
5. left arm
6. right arm
7. left hand
8. right hand
14. Servo calibration
• There are two steps in servo calibration:
– Hardware calibration
– Software calibration
• Hardware calibration: use code to turn servos to
90 or other degrees, and try to install servos as
straight as possible. (It’s normal that servos may
not be able to line up perfectly.)
• Then we use software calibration to fine tune
servos.
• We will elaborate details in the following section.
16. Download extension
• Open the MakeCode editor, go to Advance ->
Extension… and enter “nexusbit”, “nexusbot”
or “TCEA” in the search box. Click the
extension to import it.
– MakeCode editor: https://makecode.microbit.org/
20. Enter nexusbit and import
It might take a while depending on Internet status.
You can also copy/paste the this link to search:
https://github.com/alankrantas/pxt-Nexusbit
23. Flash code to micro:bit
• Connect the micro:bit to your computer via
micro USB cable, and it would appear as a USB
device (name MICROBIT). Drag and release
the .hex file you just downloaded into the USB
device.
• Remove USB cable after flashing and make
sure Nexus:bit is powered off as well.
– Or use Web USB for direct download:
https://makecode.microbit.org/device/usb/webusb
24. • The code we just downloaded would turn all
servos on the robot to the default degrees.
(You’ll have to install micro:bit onto Nexus:bit.)
• We will use this code for hardware calibration
in the next section.
35. Calibrate first 4 servos
• Power up your Nexus:bit; micro:bit would turn
these 4 servos to default (90 degrees) and lock
in. Now install arm and leg parts and try to
make them as straight as possible, while
keeping Nexus:bit power on.
– See section 3 if you haven’t flash the calibration code.
– It’s ok if the parts cannot be installed straight or lined up;
we can fix that by software calibration later.
63. Wrap servo cables
Turn the upper body part several times to wrap cables.
Stuff the cables to the back of robot so they don’t get into the way of micro:bit.
64. Assembly completed
Combine two body parts and make sure the cables
of hand servos go through body side openings
cable through here
65. Add anti-slip mats (optional)
You can paste high-resistance materials (like sandpapers)
under feet to improve walking stability.
68. Use calibration block
Adjust default degrees of each servos
(plus or minus from default position)
Make all servos of robot turn to default
after calibration
69. The “preset stance”
• When you use the block without any
adjustment (all parameter to 0), the robot
should stand roughly straight with its hands
close to the body:
71. Default degrees of arms and
hands
• Servos can only turn 180 degrees. In order to
maximize arm/hand movements, arm/hand
servos are set close to their min or max
positions.
– The calibration block would automatically add or
subtract 90 degrees for arm/hand servos.
72. Calibration direction
Left leg: outward-, inward+
Right leg: outward+, inward-
Left foot: down+, up-
Right foot: down-, up+
Left arm: high-, low+
Right arm: high+, low-
Left hand: high+, low-
Right hand: high-, low+
Example:
Left leg -10
(Default position 90 – 10 = 80
degrees; turn outward 10 degrees)
Left leg default: 90
Right leg default: 90
Left foot default: 90
Right foot default: 90
Left arm default: 180
Right arm default: 0
Left hand default: 0
Right hand default: 180
75. Arms movement
Arm low Arm level Arm high
Actual movable degrees may be different depending on
servo models/specs
76. Hand movement
Hand low Hand out Hand high
Actual movable degrees may be different depending on
servo models/specs
77. Calibration tips
• It’s better if you can keep adjustments within
15 degrees. The extension would stop servos
turning to where it can’t, but if they are not
installed straight enough in the first place,
movable degrees would be limited (for
example, the hands cannot lift high enough).
– To reduce adjustment degrees, adjust servos’
installation positions.
• Each robot has different adjustment
parameters. Save the code for your future use.
80. Basic movements
• The extension has implemented 8 walking movements, which
utilize “servo graduate turning” to smooth the performance.
These movements only use the 4 legs/feet servos, so they are
applicable on robots without hands.
• The block would only do 1 cycle (for example, move each foot
once when walking forward), so you have to use loops to
create continuous movements.
81. Basic actions
The extension implemented 40 actions, which allow users to control various joints
of the robot. They would simply turn to position (no graduate turning), all positions
are pre-defined. However these are enough to be combined into gestures or dance
moves.
83. Tips on combining actions
• Servos would turn as soon as it receive singals;
however they would need a short time to
finish the turn. If you switch to next action too
quickly, servos may not be able to complete
the move.
• It is recommended to set delay between 100-
1000 ms between actions, so that actions can
be performed properly.
84. Other blocks
Robot stands still
(all servos to default position, adjusted or not)
If sound level is loud enough to trigger the onboard mic
(the mic block would stop detecting while you are using
movement or action blocks)
If the ultrasonic module detects objects in front of the
Robot (10 cm away)
Speed of servo graduate turning
(1-10, only effect walking movements)
85. Advanced servo control
• You can use blocks in the Nexus:bit toolbox for
more precise servo-degree controls with more
variety. See TCEA’s Nexus:bit manual for
details.
87. • The body of NexusBot can be converted into a
2WD car by installing 2 DC motors and wheels.
• You’ll need DC motors in SG90 body or
continuous rotation servos. In the manual we
use the DC motor version.
88. DC motors in SG90 body
It looks exactly the same as SG90 servos, but with
only 2 cables and would run whenever you connect it to DC power
89. Dismantle robot
• You’ll need to dismantle arm/hand and
leg/foot parts of the robot and remove all
servos.
• It is recommended to pry hand/foot servos
out with a flathead screwdriver.
• Put away screws properly in a box – don’t lose
them.
99. Car calibration
• Due to minor speed difference of each DC
motors, your car may not be able to run
completely straight forward.
• You can use Nexus:bit blocks to fine tune the
motor speeds. Check out TCEA’s Nexus:bit
user manual.