Bluetooth Robot with Accelerometer Actuated Dual Servo Sensor
Description
This project involved the creation of a robot capable of movement and obstacle detection. The base robot chassis contains two DC motors, and the obstacle detection capability uses a pair of servos attached together to achieve pan and tilt motion. The Adafruit Bluefruit LE module is used to achieve Bluetooth connectivity, and the demonstration video used the iOS Bluefruit LE application developed by Adafruit for the Bluefruit module. In the application, the directional arrows control the robot's movement and the accelerometer readings control the servo pair's pan and tilt positioning. The distance sensor checks for any objects within six inches, and if an object is detected, the forward movement is temporarily disabled. Four AA batteries power the MBED module and all peripherals (DC motors, H-Bridge, servos, distance sensor, and the Bluetooth module).
Hookup Guide
Components and pin hookups needed. Motor A is on the right side of the robot and Motor B is on the left (from robot's perspective).
Components
- (1) MBED
- (1) Adafruit Bluefruit Bluetooth Module
- (1) H-Bridge
- (2) DC Motors
- (2) Servos
- (1) Sharp IR Distance Sensor
Pin Hookups
Bluetooth Hookup
MBED | Bluefruit |
---|---|
gnd | gnd |
VU(5v) | Vin |
nc | RTS |
gnd | CTS |
p9 (Serial TX) | RXI |
p10 (Serial RX) | TXO |
H-Bridge Hookup
MBED | H-Bridge |
---|---|
gnd | gnd |
Vout | Vcc |
p23 | PwmA |
p24 | PwmB |
p18 | AIN1 |
p17 | AIN2 |
p20 | BIN1 |
p19 | BIN2 |
Vout | STBY |
VMOT(5v) | |
AO1 (DC Motor A +) | |
AO2 (DC Motor A -) | |
BO1 (DC Motor B -) | |
BO2 (DC Motor B +) |
Left/Right Servo Hookup
MBED | L/R Servo |
---|---|
gnd | gnd |
Vin (5v) | |
p21 | Control |
Up/Down Servo Hookup
MBED | U/D Servo |
---|---|
gnd | gnd |
Vin (5v) | |
p22 | Control |
Sharp IR Distance Sensor Hookup
MBED | Sharp IR Sensor |
---|---|
gnd | gnd |
Vout | Vin + (3v3) |
p15 | Control |
Program Code
Import program4180_Lab_4_Basic
Final Version.
Download this code to your MBED and give it a try!
Demo YouTube Video
Please log in to post comments.