Servo Driver For Microbit User Manual en
Servo Driver For Microbit User Manual en
OVERVIRE
This Servo Driver board is an PWM/servo expansion board for micro:bit. Use
PCA9685 chip, expands up to 16 channels and support 12-bits resolution for each
channel. Using I2C interface. This board also integrates 5V regulator, up to 3A output
current, can be powered from battery through VIN terminal. It could be used to for
Robot applications.
FEATURES
➢ Servo voltage: 5V
➢ Driver: PCA9685
HARDWARE
You can connect battery to the green socket VIN on the left for power supply, for
VIM, voltage range 6V~12V. 5V regulator on board could output 3A (MAX) current.
You can also connect 5V power supply to the POWER interface on the right, and it
GPIOs on top are interfaces of servo. Black pins are connected to GND (mostly
connect to brown wire of servo). Red pins are VCC pin connected to 5V. Yellow GPIOs
are signal wires of PWM, channel 0~15 supports 16 servos connected at the same
time.
【Note】
1. If you only connect 5V power supply to USB interface, servo cannot be driven.
3. Make sure servo are connected properly, otherwise they will not move.
Servo Driver for Micro:bit
HOW TO USE
Then click Advanced->Add Package In the pop-up dialog box, click the search field
After adding, you can see that Servo block class appears to block area. In the class,
500 ------- 0°
You can control servo just by setting channel, degree and pulse, it is simple.
DEMO CODES
We provide three demo codes (HEX file) for this module. You can copy them to
micro:bit for testing. Drag HEX file to the web page directly could get details
MICROBIT-SERVO
This demo code is used to rotate 16 servos in range 0~180 all the time
Servo Driver for Micro:bit
Flag: step length for every change. Positive value stands for co-rotating, and negative
After running the code, you can see that 16 servos turn from 0° to 180°, then turn 0°
again all the time, you can adjust its speed by change the pause on code.
MICROBIT-SERVO-KEY
This demo uses A and B keys to control rotation of servo 0. It moves forward when A
MICROBIT-SERVO-BLUETOOTH
microbit-Servo-Bluetooth, the function of this code is to rotate four servos 0~4 via
Bluetooth. If you assemble servo to robot arm, it could control robot ram via
Bluetooth.
Servo Driver for Micro:bit
This is the Bluetooth remote control code. pos0~pos3 are current degrees of channel
When command are received by micro:bit from app, micro:bit will change the step as
received to control servo. If step is not equal to 0, change the pos and let servo move.
To use this demo code, you should first install APP for Bluetooth communication.
Open APP, click Settings on the right top, uncheck Filter unpaired micro:bit from scan
results?.
Scanning BBCC micro:bit device and connect it. After connecting, you can enter the
There are 8 buttons, could be used t control servos from channel0 to channel3.
Servo Driver for Micro:bit
Note: If you want to create new Bluetooth project, don’t forget to setting project
MICROBIT-SERVO-RADIO
This code we use 2.4Ghz RF function of micro:bit. To test this code, you need two
micro:bit, one is connected to Joystick for mciro:bit as sender, and another connected
Code if sender:
Servo Driver for Micro:bit
Code of receiver:
Similar to Bluetooth code, pos0~pos3 are current degree of servos from channel 0 to
You should flash sender code to micro:bit which connect Joystick module and flash
receiver one to servo module. Then you can control servo by module Joystick for
micro:bit.
Servo Driver for Micro:bit
For more details about Bluetooth and 2.4G, you can refer to the user guide of KitiBot
for micro:bit:
https://www.waveshare.com/wiki/Chapter_8_of_KitiBot-Microbit
https://www.waveshare.com/wiki/Chapter_9_of_KitiBot-Microbit