The cyber:bot robot's drive motors are Parallax Continuous Rotation Servos. Rotation speed and direction are controlled by sending very specific patterns of high/low voltage signals to the servos.
In this activity, you will temporarily attach the servos to the cyber:bot board. Then you will run a script that sends a “stay still” signal to the servo motors. With a screwdriver, you will adjust each servo so it will actually stay still when receiving this signal. This is called "centering" the servos. After this adjustment is done, you will proceed to build the cyber:bot and run test scripts that will turn the servos clockwise and counterclockwise at various speeds.
Parts Required
Tool Required
You’ll need a Parallax screwdriver, or a different Phillips #1 point screwdriver with a 1/8″ (3.18 mm) or smaller shaft.
cyber:bot Library Required!
The servo cables plug into the 3-pin P18 and P19 3-pin headers, sometimes called "servo ports," that are above the white breadboard.
There is a smaller 3-pin header to the left of the servo ports. A shunt jumper connects two pins on it, selecting the voltage source supplied to the servos. The 5V setting limits the voltage to 5V, regardless of the input voltage. The VIN setting supplies the servo with whatever voltage level is connected to the board.
The Continuous Rotation Servos need 4 to 6 VDC to operate. So, the setting you should use depends on the kind of batteries you have.
Missing a Voltage Selection Jumper? Replacements are available - contact our sales department [2] to order part #452-00043; there are three per board.
The cyber:bot board has a three-position switch, which allows you to choose whether or not to power the servos when you power the rest of the board. Here are guidelines:
If a servo has not yet been centered, it may turn, vibrate, or make a humming noise when it receives the “stay-still” signal. Once you’ve assembled the cyber:bot, the servos must be removed to be centered again, making this step critical.
# left_servo_stay_still.py from cyberbot import * bot(18).servo_speed(0)
On the side of the servo is a small access hole. Inside the hole is what appears to be a small screw. This is a plastic potentiometer adjustment knob.
This short video will assist you with the process of centering the servos:
A potentiometer is an electrical device that provides variable electrical resistance. Some potentiometers have a knob for adjusting the resistance, like these servos, while others may have a sliding bar. Either way, the schematic symbol for a potentiometer is the same.
# right_servo_stay_still.py from cyberbot import * bot(19).servo_speed(0)
Links
[1] https://learn.parallax.com/tutorials/robot/cyberbot/add-modules-your-microbit
[2] https://www.parallax.com/sales/contact-sales/