Tag Archives: robot

Gearing, Speed, and Thrust for FIRST Robot Drivetrains


I’ve been a part of FIRST Robotics Team 3322 for some time now, and every year it seems I learn new things about how FIRST Robotics drivetrains should be designed. This is a guide for beginner and intermediate designers to learn a little about better drivetrain design.

What will be covered:

  • CIM Motor Basics
  • Gearing
  • Wheel Sizes
  • Thrust
  • Design Guidelines

So if you are ready, let’s jump right in.

The CIM Motor

We are going to start in by taking a careful look at a CIM motor, as almost all FIRST drivetrains are powered with 2,4, or 6 CIM motors. There are many layers to the complex issue of deciding what a motor will provide for any design, but we mostly want to answer the following question: What speed and torque can we count on? Keep in mind that on a FIRST robot there are 40A breakers behind each CIM motor.

If we examine the motor curve for a CIM we find that we can count on 100oz-in of torque from a CIM motor at 40A and free speeds above 5000rpm. Note that in practice, 40A breakers are heat-driven, and will allow current much greater than 40A for brief instances. Also be aware that it is unlikely that you are getting 12V from your 12V battery.

We are going to assume a 4500rpm free speed (which is a high assumption), and 100oz-in torque (which is low). In better units, this is 75rps (rotations per second) and 6.25lb-in of torque

CIM Motor Curve

For our purposes, gearing is any method to trade speed for torque or vice-versa (or speed for output thrust). If you don’t understand the basic principles of using different gear ratios to alter torques and speeds, read up on it right now. Most drivetrains start with a gearbox that gears the CIM motors down between 4:1 and 12:1.

Let’s have a look at how that works for the 2014 Kit of Parts drive system. I’m pretty sure the drive system uses a 8.45:1 gear ratio. This means that the motor spins 8.45 times to spin the output shaft of the gearbox once. Whenever you are gearing down, you can multiply the torque by the gear ratio, and divide the speed by the gear ratio. Note that there are actually some losses in gearing (which grease and good bearings help alleviate). While we calculate 52.8lb-in of torque, it is more likely that we are getting 50lb-in of torque.

6.25lb-in of torque x 8.45 = 52.8lb-in of torque

75 rotations/second /8.45 = 8.88 rotations/second

Note that sprocket ratios will also act as a form of gearing. If you were using a 16 tooth sprocket on the output shaft of your gearbox, and a 32 tooth sprocket on your wheels, you are getting a 32:16 or 2:1 gear ratio.

Choosing your Wheel Size

Like choosing a motor, choosing the right wheel size for your application can be complicated. To keep it simple, we want to answer the following questions: What speed will the wheels yield?How heavy are the wheels? Do the wheels geometrically fit in our design space?

Let’s have a look at the first question. How does wheel size effect robot speed? In the above example, our wheels move at 8.88 rotations per second.

4″ wheel -> circumference = pi*D = 4in*3.14 = 12.6in = 1.05ft

In other words, one rotation of a 4″ wheel equals 1.05ft of travel. Lets convert our 8.88rps to linear speed. A 4″ wheel connected at a 1:1 ratio (or directly on) our example gearbox will have the following speed:

4" wheel -> 1.05 ft/rotation * 8.88 rotations/second = 9.32 ft/second

6" wheel -> 1.57 ft/rotation * 8.88 rotations/second = 13.9ft/second

You can clearly see that larger wheels get us faster speeds at a proportional rate. What’s the downside? You lose thrust.

 What is Thrust?

Thrust is the amount of forward force that can accelerate our robot. In our above example, we have one CIM motor producing 6.25lb-in of torque through a 8.45:1 gearbox. That totals 52.8lb-in of torque. Let’s connect a couple wheel sizes to that and see what happens.

Remember that torque = force * radius to center of rotation

4" wheel -> force of thrust (Ft) = torque/radius = 52.8lb-in/2in = 26.4lb thrust

6" wheel -> Ft = 52.8lb-in/3in = 17.6lb thrust

A pair of CIM motors at our 8.45:1 drivetrain with 4″ wheels produces 52.8 lb of thrust (26.4lb per CIM). Lets put that in real terms – a 100lb robot will push with a maximum of 52.8lb of force and accelerate at roughly .5g, or 16ft/sec/sec. A 150lb robot will also push with a maximum of 52.8 lb of force, but accelerate at roughly .33g, or 11ft/sec/sec.

Designing for Balance

It should be fairly clear by now that you can use different wheel sizes, gearboxes and chain/belt sprockets to create a gearing that balances top speed versus thrust to accelerate or push other robots. Make a list of gearboxes, wheel sizes and sprocket ratios available to you. Use various combinations of these parts to get the right balance of speed and thrust for your design.

The Kit of Parts drivetrain is well designed and well balanced. With 4 CIM motors, it should produce about 100lb of thrust with a top speed around 9fps.

Shifting Gearboxes

Shifting gearboxes are awesome. Use a KOP drivetrain and slap shifting gearboxes on them to seriously upgrade your robot.

Shifting gearboxes allow teams to design for two separate gear ratios: One aimed at high thrust and one aimed at high speed – getting the best of both worlds. Typically, good teams will design a low gear that produces so much thrust that their wheel friction limits their pushing ability, and a high gear that targets a speed between 12-16fps (or sometimes higher).

Stay tuned and I will try to post some material on friction, wheel choices, and other drivetrain design topics.

Using a Raspberry Pi as a wireless robot controller

This is a step by step guide on how to configure a Raspberry Pi as I did for a wireless robot controller. Please note – some of the software versions may change over time.

Download/Install Raspbian:
If you already have your Pi installed and set up, skip this section

  1. Plug your SD card into your computer.
  2. Format the SD card with software here.
  3. Download NOOBS (offline and network install) here.
  4. Unpack the .zip file onto your SD card.
  5. Plug your SD card into your Pi.

Configure Raspbian

  1. Set up and power up your Raspberry Pi.
  2. If you are prompted to log in, use pi as the login, and raspberry as the password.
  3. Configure your keyboard – the Raspberry Pi keyboard file is located here: /etc/default/keyboard
    • Use nano command: nano /etc/default/keyboard
    • Change the line

      to the line

  4. Use reboot command: reboot 
  5. Once the Pi has rebooted and you have logged in again, remove the login prompt for the Raspberry Pi:
    • Change to superuser: sudo su
    • Use nano command: nano /etc/inittab
    • Comment out this line
      1:2345:respawn:/sbin/getty 38400 tty1

      by adding a # at the beginning

       #1:2345:respawn:/sbin/getty 38400 tty1
    • Add this line below
      1:2345:respawn:/bin/login -f root tty1 </dev/tty1 >/dev/tty1 2>&1
  6. Your Pi should be good to go. Test that the changes have worked by rebooting: reboot

Get Wireless Connected

  1. Plug in your Edimax EW-7811Un Wireless Adapter and reboot your Raspberry Pi: reboot
  2. Check that the Pi is reading the device: lsusb
  3. Check that the Pi has the right drivers: lsmod
  4. Change network interfaces: nano /etc/network/interfaces
    1. auto wlan0
      allow-hotplug wlan0
      iface wlan0 inet manual
      wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
  5. Add your wireless network to the end of your WPA supplicant: nano /etc/wpa_supplicant/wpa_supplicant.conf
    1. network={
      <see this link to configure for your network>
      <want to learn more on this?>
  6. Reboot your system: reboot
  7. Check your ip address: ifconfig or ifconfig wlan0

Install Python Tools

  1. Make sure your Raspberry Pi is connected to the internet.
  2. Enable easy_install from command line: python ez_setup.py
  3. Install cherrypy: easy_install cherrypy
  4. Install RPIO: easy_install -U RPIO

Get Files in Place

  1. Download raspberry_pi_robot_code onto your Raspberry Pi.
  2. Unzip and move files:
    • robot.py, command.py, and start_robot.py should all be placed on your desktop
    • robot_server should be moved to: /etc/init.d/
  3. Open a terminal.
  4. Make sure all files are owned by root user. If not: sudo chown root /root/desktop/* and sudo chown root /etc/init.d/robot_server
  5. Make robot_server executable: sudo chmod 755 /etc/init.d/robot_server
  6. Register the robot_server file with startup: sudo update-rc.d robot_server defaults

You should be able to reboot: reboot and the robot server should start right up. Open an internet browser on another computer in the local network and go to the Raspberry Pi’s IP address.

Wifi Robot Update

I’m back to work on the Wifi robot. Here’s a quick re-cap:

Goal: build a simple robot that can be controlled VIA website

  • Mechanical Build
    • Design: Done
    • CAD/Vector Files: Done
    • Parts: Done (fabricated and ordered)
    • Assembly: Done
  • Electrical Build:
    • Motor Controllers: Chips in hand, need to design/build
    • Circuit Design: Not Started
  • Raspberry Pi (brains)
    • Wifi: RTL8192 Installed – works on home network
    • Webserver/website: Used cherrypy and jquery – works, but has limitations
    • Command Logic: Python script written to interpret keystrokes from website into motor outputs – done
    • GPIO script: In process

I’m nearing completion, but I haven’t put enough time into this blog to update pictures and publish code.