Thursday, October 16, 2014
On 9:06 AM by Anonymous
Overview
Want a project that will move you? This is the one!This project will help you get started building a BeagleBone robot.
The complexity and cost of a robot design can vary greatly. The objective here is to keep the example design simple and flexible. This project is a basic introduction to robots using a BeagleBone Black and a Relay Plus IO cape.
A robot project required a few basic building blocks.
- A project plan
- Chassis and drive system
- Power system
- Communication
- Control program
- Purpose/design role
What You Will Need
You may want to consider a BeagleBone Starter kit.
- BeagleBone Black
- BeagleBone expandable case Orange or Black (recommended)
- AC adapter 5 Volts, 2 Amp (recommended - during debug)
- Relay Plus IO cape and user manual
- Prototyping project parts kit (optional)
- USB Wireless WiFi Adapter with 4" Antenna (suggested)
- (1-2) Gearhead motor (such as this example)
- Servo Motor (optional)
- Power source (6V or 12V Battery and a 5V regulator)
- Wheels, nuts bolts, wires.
- Creative approach
Most of the fun and reward of building a robot comes from the journey of finding parts and coming up with a design. Be inspired and creative with the materials you may find around your home.
STEP 1 - Plan
Start by thinking about what you want your robot to do. What size? What is your budget? How long do you have to build it? What battery life do you need? For this project we will explore a simple design, on which you can build.STEP 2 - Drive System
One important design decision of a robot is the drive system. Consider:
- What motion is desired (forward/backward/turning radius) ?
- What surface will be traveled (carpet, smooth floor, grass, other)?
- How fast does it need to travel?
- How sturdy does it have to be (environment)?
Single Drive Motor with Servo Steering |
Dual Direct Drive with Caster Wheel |
A third drive system also uses two motors, but adds forward and reverse control using an 'H-bridge' (so-called because of the circuit layout of the drive electronics resembles the letter 'H'). (Electronic H-bridges are not covered in this project). Advantage: Better turning control. Disadvantage: Increased cost of electronics.
Bi-Directional control of a DC motor |
Bi-Directional Motor Control using Relay Cape |
Using a protective fuse in series with the battery is highly recommended.
Wiring Example - Reversing Motor control
Wiring Example - Dual Motor Control
Expandable BeagleBone Case with CBB-Relay cape installed and access to connection terminals |
Wheels
A larger wheel diameter will perform better on carpet and grass (4 inch / 10 cm is a good starting point). Omni-wheels are interesting options for smooth floors, but will quickly add costs to the project.If you want to direct drive the wheels from the motor output shaft, chose a motor geared for 100-200 RPM (using 4 inch/ 10cm wheel). Driving a motor in both directions (Clockwise/counter-Clockwise) can be achieved using two common approaches: a simple (electro-mechanical) relay or an H-Bridge electronic controller.
IMPORTANT NOTE: Mechanical systems that include gears and moving parts can present safety exposures (pinched fingers). Always take precaution and consider safety first when applying power or working on areas where potential mechanical, electrical or other dangers could result in injury.
Chassis
Every robot needs a chassis or base as a framework to hold all the pieces together. This can be as simple as a piece of wood, a PVC pipe frame or a piece of laser cut acrylic, all the way up to a welded aluminum frame. Be sure to consider the weight of the chassis. A heavier chassis will require more motor power, which will need a bigger battery. Tetrix makes modular pieces for constructing robots.STEP 3 - Power System
This can be a big topic, as there are many options and factors to consider. A simple tiny robot can use a few "AA" cells. A more substantial robot will need more power.How much power?
12V (SLA) Sealed-Lead-Acid batteries are common, simple and low-cost. These are heavier than LiPo cells, but in a robots, weight is not always as critical as in flying applications (drone/quads). Lithium (LiIon/LiPo) cells have better energy density but are trickier to charge. For simplicity, consider an SLA Battery for a first simple robot.
Batteries are rated in 'amp-hour'. A "4Ahr" battery will deliver 4 amperes for 1 hour, at which point the voltage drops below the operating voltage level (around 75-80%). The battery will last longer if you draw less current, and die earlier if you draw more current. (your gas mileage may vary!)
Speed-vs-power-vs-battery life trade-off
A heavy robot needs bigger motors to move it, bigger motors need bigger batteries, bigger batteries need a bigger robot which needs bigger motor... A robot that moves very fast needs more energy or results in short battery life. If you need a "race car" robot, pay close attention to the total weight!There are two main power needs for this robot: Power for the wheel motor and accessories and power for the BeagleBone. When the motor is turned on, this creates a bump in the power supply, which may disturb the computer. It is best to keep each power source separate.
We need 5V at 1-2 amps for the BeagleBone and 6-12V for the motor(s).
5V at 1Amp will be sufficient for the BeagleBone itself, however if a servo motor is also used, more current will be required from the 5V power source (2A suggested). Consider adding a large electrolytic capacitor (1000uF/ 16V) for the 5V supply, if you present a heavy load to the servo motor or experience large voltage dips that may cause the BeagleBone to reboot.
5Volts required for the BeagleBone and Relay Cape (DC barrel connector) |
See this example project using a battery powered BeagleBone.
Provide an easily accessible EMERGENCY OFF Switch !
(just in case your robot has a mind of its own)
STEP 4 - Communication System
There are two primary approaches to controlling the robot.In autonomous operation, the robot 'wanders' on its own, and may interact with its environment (bumping or sensing obstacle) and changing it behavior based on pre-programmed actions to take.
A second approach required input from an observer. Commands are sent over a wireless link.
This can be Wifi, Bluetooth, ZigBee or custom link.
USB WiFi adapter with 4 inch antenna |
A wifi link with extended range can be established with the UWN200 USB Wifi Adapter or for a more compact adapter the UWN100. The network connected BeagleBone can be controlled remotely over wifi. Tutorials including WiFi setup and troubleshooting
STEP 5 - Control Program
The control program will vary greatly, based on the function of the robot, the programming language and level of control required. Start with simple motion using the relay cape. Basic examples of controlling the relays are presented in the Relay Plus IO cape user manual.Add bumper switches, bells and whistle to create a unique design.
You can use other tutorials and projects as inspiration for your robot.
STEP 6 - Design Role, Function
Robots can be used for many tasks from the practical to the ridiculous. You could make a tail-waging BeagleBone using a servo for Halloween Fun or just to learn more about robots. Do you have a local robotics club? You can add accessories such as LEDs, or beepers using the four outputs of the Relay plus IO cape.The Relay Plus IO has more functions to explore (see user manual) |
Going Further
Get involved withor your local robotics club.