Robotics 101

This page’s objective is to give a brief overview of what a CRC Robotics Competition robot is made of.

Psst… Want to see robot examples? Go through our Facebook page for past competition pictures and our Youtube Channel for the annual highlight videos!

Anatomy of a robot

In the bigger picture, all robots are made of the following, whether they are made by NASA, ACME or Degrassi High School:

  1. A brain, that controls the robot actions

  2. Electrical circuits, that power the components

  3. Mechanisms, that move the robot and make it physically interact with the outside world

  4. A frame, that holds it all together.

Electrical circuits

To better understand how the CrcDuino (robot brain) works, let’s look at the components making the 12V power circuit and the 5V control circuit, that are the two parts of the electrical system:

Power circuit (12V)

Battery: Powers the robot

Fuse: Protects the robot from short circuit damages

Emergency-Stop: Shuts down the whole robot power if needed

Power wires: Thicker cables (handling higher currents) connecting power components

Power motors: Moves big mechanisms

 

Control circuit (5V)

Standard type servos: Moves small mechanisms by reaching an angular position.

Continuous type servos: Moves small mechanisms by turning without restrictions.

Sensor: Measures something

Control wires: Thinner cables (handling lower currents) connecting control components.

 

Components part of both circuits

Brain: Powered by 12V, but controls the robot through the 5V circuit.

Motor controller: Translates a 5V control signal into a 12V power signal powering a power motor.

 

What does a robot brain do?

A robot really is something really basic at its core. It’s a machine that continuously does the same thing over and over again, as many times per seconds as possible:

  1. Gathers information about its surroundings

  2. Analyses it

  3. Acts accordingly

 

Robot sensors and remote controller: gathering information

Just like a human body with its senses, a robot needs to figure out what’s going on around it. It needs brain inputs: sensors and the remote controller.

Robot sensors

They measure something and feedbacks that measurement to the brain. They are part of the 5V control circuit.

There are 2 main sensor types:

Sensor type

Measured phenomenon

Popular sensor type examples

Sensor type

Measured phenomenon

Popular sensor type examples

Digital

Binary (YES or NO)

Limit switches, buttons, hall effect, motor encoder*

Analog

Ranging (between a high a low limit)

Ultrasonic (distance), reflectance (line tracker)

But there are three ways for sensors to feedback its measurement to be brain:

Communication medium

Used by

Feedbacks to the brain

Occurrence in CRC

Communication medium

Used by

Feedbacks to the brain

Occurrence in CRC

Digital electrical signal

Digital sensors

5V or GND

Common

Analog electrical signal

Analog sensors

0 to 7.5V

Less common

Communication protocol

Analog & dig. sensors

A coded signal

Rare

Limit switch

Button

Ultrasonic distance sensor

*Motor encoders are a type of sensor that uses a set of 2 “flashing” digital electrical signal to measure the angular displacement of a motor shaft. Signals are sent so fast that they need to be read by a special type of brain input called “interrupt-capable digital input”.

Remote controller

It’s a way for a human to directly interact with the robot: It sends the state of its button (pressed or not pressed - a digital signal) and its joystick (an x-axis and y-axis position - an analog signal) to the brain over a wireless link provided by a CrcConnect module. Some robots are not externally controlled: they are called autonomous robots.

 

Robot program: deciding what to do

The robot program is a set of code lines that is executed by the brain. These lines of code are written into a .ino file using a computer software called Arduino IDE, and then uploaded into the robot brain from the computer. Once powered up, the brain executes these lines sequentially and repeatedly ad vitam aeternam.

The robot brain is called a CrcDuino: it is a custom Arduino board designed by Crc Robotics that is very similar to the standard Arduino Mega2560 board. Arduino is a very popular ecosystem of electronics board meant for rapid prototyping.

The lines of code must respect a certain syntax to be understood by the brain. The syntax used is called the C/C++ programming language. The robot program uses functions to perform tasks. There are three types of functions that can be used:

  • CrcLib functions, written by CRC Robotics especially for the CrcDuino and detailed in this wiki

  • Native Arduino functions (also called Arduino programming language), written by the Arduino collective.

  • Custom functions, written by yourself in the .ino file, if needed

Robot motors and servos: executing the decisions

Just like a human body with its muscles, a robot needs to interact with its surroundings. It needs brain outputs: 12V motors, 5V servos and other actuators. An actuator is a device that moves a mechanism.

12V motors

They are made of a fast rotating electrical motor coupled with a gearbox. Since they run on 12V power current coming from the main battery, but the robot brain only delivers 5V control signals, they need a motor controller to be able to run.

A motor controller is a “PWM device” and requires two wires to be connected to the robot brain: a PWM signal wire and a GND wire.

5V servos

Servos are small rotating actuators that are divided in two categories:

  • Standard type servos: Their rotation is bounded to a minimum and a maximum angle (usually 0° to 180°), and the signal sends to them represents the angle were we want it to position itself.

  • Continuous type servos: Their rotation is not bounded. Instead of an angular position, the signal sent to them represents the desired rotation speed and direction.

Both servo types are “PWM devices” and requires three wires to be connected to the robot brain: a PWM signal wire, a 5V supply wire and a GND wire.

Other actuators

Other actuators can be used on a robot like electromagnets, LEDs, lights, buzzers, etc. These are ON-OFF actuators, meaning that they are activated when a 5V voltage supply is fed to them, and not activated when no voltage is given to them.

These other actuators are “ON-OFF devices” and require two wires to be connected to the robot brain: a SIG wire providing either 5V or 0V and a GND wire

In a nutshell…