Return to Robotics Tutorials
C2Bot Robot Project
C2Bot is an ongoing robotics project intended as a learning opportunity in exploring various robot technologies and methods.
What can C2Bot do?
The following lists some of the features that are currently implemented:
- ZigBee telemetry Remote control - XBee Pro S1
ZigBee wireless control allows two-way communication with the robot from a custom telemetry controller. The two-way controller provides joystick control over the robot and also visualization of the sensors and modes in the robot.
- RC Remote control - Turnigy 9X
9 channel 2.4GHz RC transmitter is intended for controlling the robot drive, robot arm movement and overall operating modes (manual vs autonomous). Of the 9 channels, there are two dual-axis joysticks, two rotary knobs, a 3-position switch and numerous on/off switches. With the stock 100mW power output, range is currently untested, but is expected to be approx 50m-1000m. An ATtiny167 (Digispark Pro) is used to convert the RC PWM signal into an I2C interface for the robot CPU.
- PS2 Remote control - Lynxmotion PS2
As an alternate control scheme, C2Bot supports operation via a PS2 controller. Controller provides two thumb joysticks and 8 digital input buttons.
- 4WD Robot Platform - Lynxmotion A4WD2 Rover
Solid robot platform built with aluminum and lexan, supports approximately 5 lbs of payload. Lexan is lightweight yet extremely strong. Multiple add-on levels to house the sensors and control circuitry.
- 6 DoF Robot Arm
A six degree-of-freedom arm with base rotate allows the robot to grab and manipulate objects nearby. The servo motors are sized according to the required torque at each joint. In the future, I plan to convert these servos to provide positional feedback so that the robot arm can have closed-loop control.
- First-Person Video (FPV) - Raspberry Pi Camera & Boscam
A pair of cameras are mounted on the robot. A Raspberry Pi Camera is mounted in a fixed position on the front of the robot, intended to be used for on-board robot vision (using OpenCV). This camera also streams video over WiFi to any web browser. A second camera is mounted in the robot's head allowing high-quality low-latency remote control operation. A 5.8GHz A/V transmitter and receiver pair can support long-range control over the robot from a remote LCD display. The 5.8GHz camera system is currently in development.
- High torque motors - Pololu 12v 30:1 gear motors (64 CPR)
These strong motors provide enough torque (8kg-cm) to drive the robot over some inclines and easily skid-steer on thick carpet. Integrated quadrature encoders (64 counts per motor rotation) enable basic odometry robot positioning. Dual motor controller provides differential drive with PID closed-loop control to maintain precise wheel speed.
- 9-axis Inertial Measurement - InvenSense MPU-9255
A MEMS device integrating 3-axis angular rate sensors (gyros), 3-axis accelerometer and 3-axis digital compass. Sensor fusion combines these inputs to assist with general robot orientation and turn management.
- GPS positioning - uBLOX NEO-M8N GPS
Satellite positioning provides general navigation assist for long-range waypoint planning. Onboard ATtiny extracts the position, speed and heading from the GPS via UART.
- LIDAR laser range-finding - Neato XV-11 LIDAR
A scanning LIDAR sensor has recently been added to assist in mapping and obstacle avoidance.
- Ultrasonic ranging - HC-SR04
A set of ultrasonic sensors provide medium-range distance measurement for navigation.
- Infra-Red ranging - Sharp IR sensors
A set of infra-red sensors provide close-range distance measurement for obstacle avoidance.
- Wireless Access Point
C2Bot provides its own wireless access point so that I can connect to it with my iPhone outside of my home wireless LAN.
- Speech synthesis
C2Bot can speak using text-to-speech. On-board 3W audio amplifier is mated with an 8ohm speaker.
- LED Matrix eyes
To add some personality to the robot for my young son, I added some animated eyes with a pair of 8x8 LED matrices. The LED eyes look around and blink according to the robot's activity. The head can be controlled remotely with a pan and tilt servo. The head was later replaced by a FPV camera.
- 2017/04/25: Testing of computer vision system, plans for object tracking and road/path following.
- 2017/02/05: First time driving robot around block using GPS and FPV remote video.
- 2016/12/24: Released GUIslice open source embedded graphics library for Raspberry Pi & Arduino, used in the telemetry controller.
- 2016/10/03: Initial testing of scanning LIDAR sensor, next step is to implement collision avoidance algorithm based on the lidar point cloud.
- 2016/09/18: Telemetry controller visualizes IR sensor data. Initial attempts at simple wheel speed odometry (robot positioning) using motor controller input over time (wheel encoders would be next).
- 2016/09/14: Robot movement now driven by telemetry controller. Zigbee link bandwidth increased.
- 2016/08/20: Robot telemetry controller prototype with ZigBee and touchscreen TFT LCD.
- 2016/08/17: Write SDL GUI library in C to control TFT touchscreen (PiTFT)
- ZigBee wireless
- Debug intermittent data transmission errors
- Robot Positioning
- Add Arduino processor for real-time quadrature encoder measruement and perform odometry calculations
- Add GPS waypoint navigation mode (convert current and destination positions to heading and distance)
- Add 10uF bypass capacitors to Sharp IR sensors to reduce noise. Currently a large amount of averaging is required to produces stable distance measurements.
- Rewire robot to use new power distribution system (increase maximum current draw)
- Replace prototype breadboards with more permanent wiring layouts. Later print a custom PCB
- Robot Vision
- Learn OpenCV and implement basic color / object tracking
- Learn 3D printing and build housing for robot head. The robot head contains LED matrices and FPV camera above a Pan & Tilt servo mechanism.
- Use 3D printing to build telemetry controller frame. Start by replacing the prototype foam board with Sintra sheets
C2Bot Bus Architecture
The following diagram describes the way in which the I2C, SPI and UART buses are connected together, linking a Raspberry Pi to multiple AVR / Arduino "coprocessors" and the sensors.
Click on the diagram to load a full-size version.
C2Bot Power Distribution
The following diagram describes the way in which the 3 NiMH batteries are connected up to the robot's various processors, controllers and sensors.
- 12v NiMH 2800mAh - Main battery source powers the 4 drive motors (via the dual-channel 2x15A RoboClaw motor driver). This battery is also used to power the other 12v devices (audio amplifier, 12v LEDs via relay, the 5.8GHz FPV camera and the 5.8GHz A/V transmitter).
- 6v NiMH 2800mAh - This battery powers the high current 6v and 5v peripherals. A high current BEC (Battery Eliminator Circuit) steps down the voltage to 5v for the LED Matrix and the InfraRed (IR) sensors.
- 6v NiMH 1600mAh - A separate 6v battery is used to drive the Raspberry Pi CPU and the low-current peripherals that are attached to the 5v and 3.3v GPIO power rails.
Click on the diagram to load a full-size version.
What processors power C2Bot?
C2Bot incorporates a number of microcontrollers that communicate with each other, leveraging the strengths of each processor.
- Raspberry Pi - Primary application processor
The Pi runs the high-level application code (in C), which is responsible for WiFi connectivity, remote command interface, autonomous navigation, etc. I plan to replace the existing Raspberry Pi B+ with a Raspberry Pi 3 shortly.
- Raspberry Pi - Remote telemetry controller
Another Raspberry Pi runs the touchscreen TFT LCD and ZigBee transceivers.
- Digispark Pro / ATtiny167 - RC Receiver interface
- Digispark / ATtiny85 - Motor control watchdog timer
- RoboClaw 2x15A - Dual channel Motor controller. Reponsible for PID closed-loop / feedback control over the drive wheel speed.