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).

/media/uploads/raj1995/angle.jpg

/media/uploads/raj1995/side.jpg

/media/uploads/raj1995/top.jpg

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

MBEDBluefruit
gndgnd
VU(5v)Vin
ncRTS
gndCTS
p9 (Serial TX)RXI
p10 (Serial RX)TXO

H-Bridge Hookup

MBEDH-Bridge
gndgnd
VoutVcc
p23PwmA
p24PwmB
p18AIN1
p17AIN2
p20BIN1
p19BIN2
VoutSTBY
VMOT(5v)
AO1 (DC Motor A +)
AO2 (DC Motor A -)
BO1 (DC Motor B -)
BO2 (DC Motor B +)

Left/Right Servo Hookup

MBEDL/R Servo
gndgnd
Vin (5v)
p21Control

Up/Down Servo Hookup

MBEDU/D Servo
gndgnd
Vin (5v)
p22Control

Sharp IR Distance Sensor Hookup

MBEDSharp IR Sensor
gndgnd
VoutVin + (3v3)
p15Control

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.