Bus Bot

Project by Austin O'Connell and Brandon Lasater


Our project simulates a miniature version of an automated bus route. In cities or school systems, buses typically run the same route over and over. This means the route can easily be automated without assistance from an actual bus driver. The bus will be able to track it's location based on which bus stop it is at. If any obstacles obstruct its path, the bus will automatically stop, and a person can manually override the bus to put it back on its path.

This project does just that with the help of the Magician Chassis robot. The robot is programmed to move in a square representing a bus route with 4 stops (one at each corner). The bot will drive itself to a "bus stop," wait 5 seconds (for passengers to board), then turn and continue to the next stop.


The bot is equipped with an LCD screen that labels its location and offers a menu (controlled by pushbuttons) to remove or re-add some of the bus stops along its path.


Attached to the front of the robot is an IR Proximity Sensor that will detect if an object is in front of the bot. If so, the robot will immediately stop moving if it is in auto-pilot mode.

If an object does move in front of the bot, then auto-pilot mode will immediately stop, bringing the bot into manual drive mode. We use a Universal Remote to send signals to an IR Receiver attached to the bot. /media/uploads/coconnell7/philipsremote.jpg

The Universal Remote is set to transmit using the NEC Protocol at 38400 baud (38kHz).

The user can user the remote to bring the bot back to the "bus stop" that it was last heading towards. Buttons 2, 4, 6, and 8 are used to move the bot forward, left, right, and backwards, respectively. When the user wants to cancel manual driving, pressing the 1 button will put the bus back into auto-pilot mode.

The IR Receiver library includes ReceiverIR.cpp (from https://developer.mbed.org/users/shintamainjp/code/RemoteIR/), which recognizes data in three states: Received, Receiving, or Idle. The state resets to Idle after each time receiving a signal from the remote. In order to avoid changing the ReceiverIR source code, a wait of 0.1 seconds has been added to main.cpp after detecting an Idle state from the receiver. This small amount of time allows the motors to continue moving seamlessly without pausing between repeat signals from the remote controller. This allows the user to hold down a button (such as button 2 for forward) and keep moving continuously.

Here's a video showing the functionality with a remote. After pressing button 1, the robot begins its automated route, which is to move forward 2 feets, wait 5 seconds, turn right and move 1.5 feet, wait 5 seconds, and continue in this pattern. The end of the video shows the remote being disabled while in automated mode. When the push button is pressed, or when the IR proximity sensor detects an object in front of it, the robot will switch to manual mode again. Then the remote will function as it did at the beginning of the video.

IR Proximity Sensorhttps://www.sparkfun.com/products/242
LCD Screenhttp://developer.mbed.org/users/4180_1/notebook/ulcd-144-g2-128-by-128-color-lcd/
Parallax Pushbuttonshttps://developer.mbed.org/users/4180_1/notebook/pushbuttons/
Dual H-Bridge Breakout
IR Receiverhttps://www.sparkfun.com/products/8554
Magician Chassis Kithttps://www.sparkfun.com/products/12866

LCD Screen

LCD Pinmbed Pin

IR Proximity Sensor

IR Pinmbed Pin

Dual H-Bridge

H-Bridge Pinmbed PinBatteryRobot DC Motors
A01Left PWR (red)
A02Left GND (black)
B02Right GND (black)
B01Right PWR (red)

IR Receiver

IR Pinmbed Pin

Import programMenu4180

Intermittent 4180 project

Please log in to post comments.