Mbed ECE 4180 Smart Collison Robot
Authors
Daniel Chase and Joshua Salajan
Objective
The objective of this project is to use a Robot with a LIDAR sensor to detect objects within 400 mm and stop the robot. Use of hardware and software is combined to build and control the robot to implement the necessary functions.
Parts List
- Shadow Robot Kit
- Two motors and an H-bridge motor driver
- Servo
- UART Bluetooth Module
- LIDAR sensor
- External RGB LED
- 1 180 Ohm and 2 100 Ohm resistors
- Barrel Jack adapter
- Battery pack with 4 1.5V AA batteries
- Rechargable pack
- Bracket Mount
- 2 2/56 Screws
- 4 Nylon Washers
- 5 Male to Female Cables
- Breadboard
The battery packs are essential for power to use for the motors and the Servo. The Mbed will power the Bluetooth module, LIDAR Sensor, and the RGB LED. The LIDAR sensor needs to be mounted on a bracket using 7/16 drill bit holes and 2 2/56 screws to attach the LIDAR to the bracket. Before screwing in the LIDAR to the bracket, use nylon washers to prevent the possibility of a shortage. Put the washers in between the screw and the LIDAR sensor. The male to female cables are necessary to connect the LIDAR to the breadboard.
Building Robot
This youtube video will show how to assemble the chassis for the Shadow Robot Kit.
Two motors/H-bridge
The two motors are controlled from the H-bridge. The two motors connect to the output from the H-bridge, which is connected to the Mbed. The external battery pack will power the H-bridge.
Mbed | H-bridge | Motor |
---|---|---|
p21 | PWMA | |
p22 | PWMB | |
GND | GND | |
p15 | AIN1 | |
p16 | BIN1 | |
p18 | BIN2 | |
p19 | AIN2 | |
3.3V | STBY/VCC | |
A01 | Left Motor(Red) | |
A02 | Left Motor(Black) | |
B01 | Right Motor(Red) | |
B02 | Right Motor(Black) | |
VM | Use the 5V from the battery pack |
Servo
The Servo is used to do a linear sweep with the LIDAR to collect data from its surroundings. Use the external battery pack to power the Servo.
Mbed | Servo | External DC Supply |
---|---|---|
GND | GND (black) | GND |
Power(red) | +4.8V to 6V | |
p23 | PWM signal input(yellow) |
UART Bluetooth Module
The Bluetooth Module will control the two motors. It will also enable the linear sweep with the Servo and the LIDAR sensor. An app from Bluefruit is used to move forward, backward, turn left, and turn right. Android: https://play.google.com/store/apps/details?id=com.adafruit.bluefruit.le.connect iOS: https://itunes.apple.com/us/app/adafruit-bluefruit-le-connect/id830125974?mt=8'
Mbed | Adafruit BLE |
---|---|
GND | GND |
VU(5v) | Vin (3.3-16V) |
nc | RTS |
GND | CTS |
p13 (Serial RX) | TXO |
p14 (Serial TX) | RXI |
LIDAR Sensor
If an object is detected within 400 mm, the LIDAR will point in that direction and the robot will back up. Once it has reached a distance greater than 400 mm, the LIDAR will return to its original position.
Mbed | VL53L0X |
---|---|
GND | GND |
3.3V | VIN |
p28 | SDA |
p27 | SCL |
p29 | SHDN |
External RGB LED
The external LED is used to show the state of the robot. Blue indicates the beginning of the program, which then turns to green. Green indicates that the robot is ready for normal operation. When the LIDAR detects an object within 400 mm, the robot backs up and the LED turns red. Use the resistors in series from the PWM pins to GND. Connect the 180 ohm to the red LED output pin and use the 100 ohm resistors for the other output pins.
Mbed | RGB LED |
---|---|
p26 | R1 |
GND | R2 |
p25 | R3 |
p24 | R4 |
Code
Import programFinal_Project
Bluetooth controlled Robot with Smart Collision Detection for ECE 4180 Final Project
Finished Product
Please log in to post comments.