This repository contents the software elements to control a differential movie Robot with a Turbine Engine based on a ir-sensor array to follow a black line on a white surface.
The overall electronics setup except for the power, which was provided by a constant voltage battery Li-Po of 2 cells with a boost converter tunned at 12 VDC. We selected the an ATMEGA328P-AU clocked at 20 MHz from ATMEL as the slave controller given its small size, rapid prototyping and readily available community support. On the other hand a mbed LPC1768 microcontroller performs the master controller tasks such as: communications data recording and control algorithm. In these applications, the used micro motors, speed control unit and sensors are generally from Pololu company. The motors 10:1 Micro Metal Gearmotor HPCB 12V are brushed DC motor with a metal gearbox, 3000 RPM and 100 mA with no load, 4 oz-in (0.3 kg-cm) and 0.8 A at stall. The encoders use a magnetic disc and hall effect sensors to provide 12 counts per revolution of the motor shaft. The Dual Motor Driver Carrier DRV8833, can deliver 1.2 A per channel continuously (2 A peak) to a pair of DC motors. With an operating voltage range from 2.7 V to 10.8 V and built-in protection against reverse-voltage, under-voltage, over-current, and over-temperature, this driver is a great solution for powering small, low-voltage motors. The line sensor used was the QTR-8A Reflectance Sensor Array from Pololu, which has 8 IR LED/phototransistor pairs mounted. Finally in order to decrease the slip effects generated by at high speeds, agressive curves and friction reduction by dust, a suction EDF27 turbine was implemented on the robot. Although this turbine can reach 0.7 N of pushing force to improve the performance in curves, also the current consumption has a big increase reaching the 5.2 amperes, which has big negative impact on battery and the LFR autonomy. In this sense, a power activation equation in function of the LFR speed was tuned from experimental data.
- Circuit Design (schematic diagram and PCB)
- Source codes (Master and Slave devices)
/your_root - path
|--data /Folder where you can find the project data
|--PCB /Electronic design
|--src /Folder with source codes
|--master /Mbed codes C++
|--slave /Arduino code
|--Readme / Instructions to use the repository
- Mbed LPC178
- Atmega328p SMD
- Pololu DVR8833
- Pololu Motors 10:1
- BLE Sparkfun
- Sensors QTR8-A
- Encoder Pololu
- LiPo battery 2S
- Turbine
- MotherBoard, see
/yourPath/data/PCB/
- Mbed compiler
- Arduino IDE 1.6.1
- Load the file
/yourPath/src/slave/slave.ino
on the Arduino device - According to your interest load the .cpp file on your Mbed device:
- Load the file
/yourPath/src/master/Q_Learning
for Q-Learning control - Load the file
/yourPath/src/master/pd_simple.cpp
for simple PD controller - Load the file
/yourPath/src/master/guarantyControl.cpp
for PD controller with guaranty control algorithm - Load the file
/yourPath/src/master/cascade
for cascade controller
- Load the file
Notes:
- Remember you need to create an account on Mbed online site to program de Microcontroller.
- In case you need, change the controller constants Kp,Ki,Kd to tune the controllers.
- Connect the battery
- Load the desired controller on the Mbed device
- Press botton 2 and calibrate (move the sensors array from one side to other). When the leds ubicated under motors turn off, the turbine going to turn on
- Press botton 1 and wait during 3 seconds to start the robot, also you can start the robot from an IR remote control
Universidad de Ibagué - Ingeniería Electrónica Proyecto de Grado 2019/A