LEARN.PARALLAX.COM
Published on LEARN.PARALLAX.COM (https://learn.parallax.com)
Home > Build your cyber:bot (Rev A or B)

Build your cyber:bot (Rev A or B)

This Tutorial is for Board Rev A or B

These instructions are for the cyber:bot board Rev A or B. If you have a Rev C board, follow these instructions instead. If you have a Rev A or B board, you are in the right place!

What it’s about

This tutorial will guide you through assembling the cyber:bot, step-by-step.  In each step, you will gather a few of the parts, and then assemble them so that they match the pictures.  Each picture has instructions that go with it; make sure to follow them carefully.

Before you start

You will need one of the following cyber:bot kit options:

  • cyber:bot robot kit with micro:bit (#32700)
  • cyber:bot robot kit NO micro:bit (#32705) + your own micro:bit module

If you have your own cyber:bot conversion kit (#32707) + your own built-up Boe-Bot or Shield-Bot, see this Convert to a cyber:bot instead, then continue with the main tutorial sequence starting with Navigation with the cyber:bot.

You will need to make sure your cyber:bot is ready for programming. Complete these tutorials first

  • Required: Software setup for micro:bit
  • Optional, but very highly recommended: Writing micro:bit programs
  • Required: Add modules to your micro:bit

After you finish

Once you are finished, you will be ready to work through the rest of the main cyber:bot tutorials.

 

Meet the cyber:bot board

Meet the cyber:bot board

The micro:bit attaches to the cyber:bot board, which is then mounted on the robot chassis.  Your micro:bit code communicates with a Propeller multicore microcontroller on the bottom of the cyber:bot board.  The Propeller controls the servo motors and interacts with sensor circuits you build on the white breadboard.  For a more complete reference, see the cyber:bot board guide.

cyber:bot board guide

  • Take a look at your cyber:bot board’s features.

Connect the micro:bit

Follow these steps to connect your micro:bit module to your cyber:bot board.

Parts needed

  • Insert a steel flat-head screw through an edge hole in the micro:bit, from the back (the labeled side).

  • Secure the flathead screw in place with a Nylon hex nut, from the front.

  • Repeat with the other edge hole in the micro:bit.

  • Place the micro:bit under the cyber:bot board so the screws come through the mounting holes.

  • Secure each screw with a black Nylon acorn nut.

 

Build the chassis

Next, it’s time to build the cyber:bot chassis.  In addition to your micro:bit on a cyber:bot board, you will need the parts in the pictures below. If anything is missing, contact sales@parallax.com (888-512-1024).  Set aside the bag of electronic components for now.

 

When you are done, you may have some pieces left over. That’s okay!

Add the Topside Hardware

Parts required

(1) robot chassis
(1) rubber grommet
(2) 1″ standoffs
(2) 1/4″ pan-head screws

  • Push the rubber grommet through the round hole in the chassis. A groove in the grommet fits over the edge of the metal, leaving a ring visible on both sides.
  • Attach a 1-inch standoff to each outer-most hole in the front of the robot chassis.  Use a 1/4-inch pan-head metal screw (these have a little dome on top with an x for the Philips-tip screwdriver). Insert the screw from underneath and twist the standoff on to it from the top.

Remove the Servo Horns

Parts List

  • (2) – Parallax continuous rotation servos.   

  • Use a Phillips screwdriver to remove the screws that hold the servo control horns on the output shafts.

  • Pull each horn upwards and off the servo output shaft.
  • Save the screws; you will need them again soon!

Install the Servos

Parts Needed

Robot chassis, partially assembled.
(2)  Parallax continuous rotation servos
(8)  pan-head screws, 3/8″ #4-40
(8)  Nylon core locknuts – OR – regular steel hex nuts

Tools Needed

Parallax screwdriver
Parallax wrench
masking tape (optional)
pen (optional)

  • Choose either regular steel hex nuts or Nylon locknuts.  Locknuts work best, because they don’t loosen easily with vibration. But, they take a little more force to install.
    • If you are using regular nuts, use the open end of the wrench.
    • If you are using locknuts, press the closed end of the wrench over the nut to hold it securely while working.

  • Insert the left servo into the chasis, so that its cable and the small hole in the case point towards the middle of the chassis.
  • Attach the servo using 3/’8″ pan-head screws, threaded from the outside of the chassis and secured with the nuts of your choice from the inside of the chassis.

  • If you like, use a piece of masking tape to label the left servo. This makes things easier when plugging them into the board later!
  • Repeat the process to install the right servo.

With both servos mounted, your chassis will look like this:

 

Note: You may mount the servos the other ways instead.

Mounting the servos with the servo shaft closer to the front of the robot is also possible. This design may cause some turning difficulty on “sticky” floor surfaces unless the front of the robot has increased weight. The benefit of mounting the servos this way is that the potentiometer hole in the servo case is more accessible (from the front of the robot). If the servos need to be re-centered, you would not need to remove them from the chassis.

You may also mount the servos with the tabs on the inside of the chassis for a narrower wheel base. This allows for the tightest turns pivoting on one wheel. But, it is easier to remove and replace the servos when they are mounted from the outside.

Throughout this tutorial you may see cyber:bot examples with different servo mounting positions.
 

Install the Battery Pack

Parts Needed

(2) – Nylon flat-head slotted screws, 3/8″ 4-40
(2) – 1″ standoffs
(1) – 5-cell battery pack with 2.1 mm center-positive plug

Instructions

  • Place the empty battery pack inside the chassis positioned as shown. The easiest way is to insert one side, then press down on the other side. The fit is snug, but it should snap into place with a tiny bit of force (below).

  • Insert the two Nylon flat-head screws through the inside of the battery pack and the chassis.  Use the outermost holes, shown by the arrows.

  • From the top of the chassis, thread a 1″ round standoff on each screw and tighten.
  • If you have not done so already, locate and install the rubber grommet in the center of the chassis. This will protect the power and servo cords.

 

  • Pull the battery pack’s power cord and servo lines through the rubber grommet hole in the center of the chassis

 

Attach the Wheels

Parts needed:

(1) Cotter pin
(1) tail wheel ball
(2) wheels
(2) O-ring tires
(2)  screws saved when removing the servo horns
needle-nose pliers – optional, not included

CAUTION – the ends of the cotter pin may be sharp! If you have needle-nose pliers, you can bend the cotter pin ends into a circle to tuck away the points. But be aware that this makes the cotter pin more difficult to remove in the future if you ever want to do that.

The robot’s tail wheel is merely a plastic ball with a hole through the center.  A cotter pin holds it to the chassis and functions as an axle for the wheel.

  • Hold the tail wheel ball in the arch in the back of the chassis, lining up the holes in the wheels with the chassis tabs’ holes.
  • Slide the cotter pin through a chassis mounting tab hole, through the tail wheel ball, and then through the other tab.
  • Bend the ends of the cotter pins outwards to secure it in place.

  • Fit an O-ring tire over each of the wheels, settling the ring into the groove.
  • Gently push the center of a wheel onto each servo shaft spline.
  • Secure each wheel to its servo with a black servo screw (you saved these from an earlier step).

Attach the cyber:bot Board

Parts needed:

Cyber:bot board with micro:bit installed, servos and battery pack unplugged!
(2) 1/4-inch pan-head screws
(2) 7/8-inch pan-head screws
(2) white Nylon washers
(2) 1/2-inch round aluminum spacers

  • Rest the cyber:bot board on top of the chassis’ four standoffs. The white breadboard should be near the front of the cyber:bot, NOT over the tail wheel ball.
  • Put a 1/4-inch screw through the each of the board’s rear mounting holes, and secure to the rear standoffs.
  • Slip a white Nylon washer, and then a ½” metal spacer, over each of the 7/8-inch screws, and secure to the front standoffs.

  • Reconnect the servos and battery pack:

When assembled, your cyber:bot should look like this from the top:

  • Make the loose wires tidy by pulling the slack back into the bottom of the robot. A zip tie could hold them tightly, or you may press them between the servos and chassis.

The cyber:bot system

To program your cyber:bot, you will write Python scripts and flash them to the micro:bit as usual. But the micro:bit won’t be working alone.  The cyber:bot has two key microcontroller chips that communicate via a pair of circuit lines, one for a common clock and one for data, called an I2C bus. 

  • The micro:bit module’s Nordic nRF51822 microcontroller executes your scripts when you flash them, and it is the “boss” of the cyber:bot system. 
  • The Propeller P8X32A microcontroller on the underside of the cyber:bot board is pre-programmed to be an “assistant” to the Nordic chip.

When your script uses functions from the cyberbot library module, the Nordic chip sends command codes to the Propeller, which then takes action based on the code it received. Using its digital input/output pins, labeled P0-P22, the Propeller controls the servo motors and interacts with circuits on the cyber:bot board.  If you have built sensor circuits on the breadboard, the Propeller may also send data back to the Nordic chip.  

  • Look over the diagram below for a visual overview.


 

Now that you have an idea of how the cyber:bot robot’s parts will work together, you are ready for the next tutorial, Navigation with the cyber:bot.

Center the Servos First

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

  • (1) Assembled cyber:bot board, with micro:bit module installed from prior step
  • (2) Continuous rotation servos
  • (1) Battery pack
  • (5) AA batteries
  • (1) USB A to microB cable

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!

  • If you have not done so already, download the cyber:bot library and add it to your micro:bit module’s file system.  Just follow the steps in Add modules to your micro:bit and then return here.

Connect the Servos

The servo cables plug into the 3-pin  P18 and P19 3-pin headers, sometimes called “servo ports,” that are above the white breadboard.

  • Align the cables so that the white wires are near the board edge, and the black wires are by the pins labeled GND
  • Plug the left servo cable onto the P18 port.
  • Plug the right servo onto the P19 port.

Voltage Selection Jumper

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.

  • 1.5V alkaline batteries: Use the 5V setting.  (1.5V x 5 batteries = 7.5V, which is too much.)
  • 1.2V NiMH rechargeable batteries. Use the VIN setting. (1.2V x 5 batteries = 6V, which is just right)
  • If needed, lift the shunt jumper off of the pins and place it back on again so it connects the center pin and the pin for the correct voltage for your type of batteries.

Missing a Voltage Selection Jumper? Replacements are available  – contact our sales department to order part #452-00043; there are three per board.

Add the Batteries

  • Plug the battery pack into the power jack on the cyber:bot board.
  • Add the 5AA batteries to the battery pack.

The 3-position Switch

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:

  • Position 0: ALWAYS use position 0 for building or modifying circuits on the breadboard or 3-pin/Servo ports. It is also good for flashing scripts. Position 0 turns off power to the whole cyber:bot board. If the micro:bit is plugged into USB, you can still flash and run non-robot scripts.
  • Position 1: Good for flashing scripts and powering breadboard circuits and the piezospeaker port.  Position 1 powers the Propeller system, the piezospeaker port, and sockets along the breadboard, but not the 3-pin/Servo ports, so your cyber:bot won’t roll away the moment you program it.   Position 1 also powers the micro:bit independent of its USB port.  
  • Position 2: ONLY use 2 when you are ready for your robot to move. NOT good for flashing scripts. Position 2 powers all the circuits on the board, including the 3-pin servo ports, and also the micro:bit independent of its USB port.

 

  • Connect the micro:bit to the computer with the USB cable, if it isn’t already connected.

Complete System, Ready!

Sending the Center Signals

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.

  • Make sure the cyberbot.py module is loaded on your micro:bit (see Add modules to your micro:bit [1]).
  • Enter and save left_servo_stay_still.py.
  • Make sure to include the line from cyberbot import *.
# left_servo_stay_still.py

from cyberbot import *
 
bot(18).servo_speed(0)

 

  • Flash left_servo_stay_still.py to your micro:bit.
  • Set the cyber:bot’s power switch to 2, to provide power to the servos.

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.

  • Use a screwdriver to gently adjust the potentiometer in the servo as shown below.  Don’t push too hard! Turn the potentiometer slowly in each direction to find the setting that makes the servo stop turning, humming, or vibrating.

This short video will assist you with the process of centering the servos:

]

 


Did you know?

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.


Your Turn – Center the Servo Connected to Pin 19

  • Repeat the process to center the servo on P19, using the script right_servo_stay_still.py.
# right_servo_stay_still.py
 
from cyberbot import *
bot(19).servo_speed(0)
  • NOW DISCONNECT YOUR SERVOS AND BATTERY PACK FROM THE BOARD!

 

 

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024


Source URL:https://learn.parallax.com/courses/build-your-cyberbot-rev-a-or-b/
Links