Bluetooth Controlled Wifi Monitoring Robot

/media/uploads/ihl396/img_20160316_112201.jpg Picture of board setup

Project Overview

This project allows the user to control the robot via bluetooth control which measures accelerometer data and pushes it to a http server. This robot also uses PID control in the backend to make the robot traverse a straight path.

Note

For further information on controlling a robot via wifi, please look at this guide here: https://developer.mbed.org/users/electromotivated/notebook/wifi-pid-redbot-robot-webserver/

Information

To setup your ESP8266 or configure it, please follow the guide here: https://developer.mbed.org/users/4180_1/notebook/using-the-esp8266-with-the-mbed-lpc1768/

Information

To configure your computer into a hotspot for Windows 10, please follow this guide here: http://lifehacker.com/turn-your-windows-10-computer-into-a-wi-fi-hotspot-1724762931

Pin Connections

mBedESP8266
p26Reset
p13Rx
p14Tx
Vcc -> 3.3v
GND -> gnd
mBedAdafruit BLE
GND -> gnd
VU (5v)Vin
ncRTS
GNDCTS
p27TXO
p28RXI
mBedLSM9DS1
GNDGND
VccVOUT
p9SDA
p10SCL
mBedTB6612
p24PWMA
p17Ain2
p18Ain1
STBY -> 3.3v (100k ohm pull-up resistor)
p20Bin1
p19Bin2
p25PWMB
AO1 -> Left Motor (+)
AO2 -> Left Motor (-)
BO2 -> Right Motor (+)
BO1 -> Right Motor (-)
VMOT -> 5v
Vcc -> 3.3v
GND -> gnd
mBedLeft Encoder
p22Output
Vcc -> 3.3v
GND -> gnd
mBedRight Encoder
p21Output
Vcc -> 3.3v
GND -> gnd

Setup

For initialization, the wifi module first connects to a hotspot via your computer which then runs the setup code to make an http server. After this, the code will initialize the accelerometer and then runs the main code logic. The main code logic listens for a bluetooth input and then sets the working setpoint variable which controls the speed to 50, which will move the robot until the set sample time is met. After the sample time is met, it turns off the setpoint (working_setpoint = 0) and finalizes the data by pushing it to the webserver.

Code

Import program4180_lab4_project

Bluetooth app controlled robot

Project Demo Video

As the robot is commanded to move, it collects acceleration data which then it uses a sampling average to calculate velocity. Since it does this, there is a likely change for error accumulation and so the velocity readings can get far off.


Please log in to post comments.