VOICE CONTROLLED TEMPERATURE SENSING ROBOT
Our main idea was to develop a Voice-controlled robot using the Easy-VR voice recognition and synthesis module. The robot used was a sparkfun ROB-10825 Magician Robot that came with a basic chassis, motor driven wheels and plenty of space to fit in additional modules. For voice recognition driven commands given to the bot, we used the system inbuilt commands provided within the EasyVR module. We also used the temperature and humidity sensor- SHT15 to measure the temperature and read it out on an LCD as well as the speakers.
The components we used to build this project-
- Sparkfun ROB-10825 Magician Chassis
- Mbed chip
- Sparkfun SHT15 Humidity and Temperature sensor Breakout board
- EasyVR Voice recognition and synthesis module
- H-bridge circuit breakout
- LCD board
The wiring table is as follows:
#include "mbed.h" #include "motordriver.h" #include "SHTx/sht15.hpp" #include "TextLCD.h" DigitalOut led1(LED1); DigitalOut led2(LED2); DigitalOut led3(LED3); DigitalOut led4(LED4); Motor m_left(p21, p6, p5); // pwm, fwd, rev Motor m_right(p22, p8, p7); // pwm, fwd, rev Serial listen(p9, p10); // tx, rx of Easy VR SHTx::SHT15 sensor(p28, p27); //sda,scl for temperature ensor TextLCD lcd(p15, p16, p17, p18, p19, p20); int main() { char rchar=0; float left, right;// initComp, diff, finalComp; sensor.reset(); //clears all the registers sensor.setOTPReload(true); //calibration data is uploaded to each register before each measurement sensor.setResolution(false); //wake up device - needs more work and a timeout listen.putc('b'); while (listen.getc()!='o') { listen.putc('b'); led1 = 1; wait(0.2); } led2=1; while (1) { listen.putc('i'); //Start Recognition listen.putc('C'); //Use Wordset 3 - the numbers 1..10 while (listen.readable()!=0) {} if (listen.getc()=='s') { listen.putc(' '); rchar=listen.getc(); //command for left if (rchar=='A') { while (1) { left=0.6; right=0.3; m_left.speed(left); m_right.speed(right); led1=!led1; listen.putc('i'); listen.putc('B'); while (listen.readable()!=0) {} if (listen.getc()=='s') { listen.putc(' '); rchar=listen.getc(); if (rchar=='G') { led1=led2=led3=led4=1; m_left.stop(0.0); m_right.stop(0.0); sensor.update(); // Temperature in celcius sensor.setScale(false); lcd.printf("temp [ %3.2f C ]\r\n", sensor.getTemperature() ); wait(5); // Temperature in fahrenheit sensor.setScale(true); lcd.printf("temp [ %3.2f F ]\r\n", sensor.getTemperature()); break; } } } } //command for right if (rchar=='B') { while (1) { left=0.3; right=0.6; m_left.speed(left); m_right.speed(right); led2=!led2; listen.putc('i'); listen.putc('B'); while (listen.readable()!=0) {} if (listen.getc()=='s') { listen.putc(' '); rchar=listen.getc(); if (rchar=='G') { led1=led2=led3=led4=1; m_left.stop(0.0); m_right.stop(0.0); sensor.update(); // Temperature in celcius sensor.setScale(false); lcd.printf("temp [ %3.2f C ]\r\n", sensor.getTemperature() ); wait(5); // Temperature in fahrenheit sensor.setScale(true); lcd.printf("temp [ %3.2f F ]\r\n", sensor.getTemperature()); break; } } } } // command for forward if (rchar=='E') { while (1) { led3=!led3; left=0.6; right=0.6; m_left.speed(left); m_right.speed(right); listen.putc('i'); listen.putc('B'); while (listen.readable()!=0) {} if (listen.getc()=='s') { listen.putc(' '); rchar=listen.getc(); if (rchar=='G') { led1=led2=led3=led4=1; m_left.stop(0.0); m_right.stop(0.0); sensor.update(); // Temperature in celcius sensor.setScale(false); lcd.printf("temp [ %3.2f C ]\r\n", sensor.getTemperature() ); wait(5); // Temperature in fahrenheit sensor.setScale(true); lcd.printf("temp [ %3.2f F ]\r\n", sensor.getTemperature()); break; } } // rchar=0; } } //command for backward. if (rchar=='F') { while (1) { led4=!led4; left=-0.6; right=-0.6; m_left.speed(left); m_right.speed(right); listen.putc('i'); listen.putc('B'); while (listen.readable()!=0) {} if (listen.getc()=='s') { listen.putc(' '); rchar=listen.getc(); if (rchar=='G') { led1=led2=led3=led4=1; m_left.stop(0.0); m_right.stop(0.0); sensor.update(); // Temperature in celcius sensor.setScale(false); lcd.printf("temp [ %3.2f C ]\r\n", sensor.getTemperature() ); wait(5); // Temperature in fahrenheit sensor.setScale(true); lcd.printf("temp [ %3.2f F ]\r\n", sensor.getTemperature()); break; } } // rchar=0; } } } } }
Here are some photographs of our completed Robot:
The video Demonstration:
1 comment on VOICE CONTROLLED TEMPERATURE SENSING ROBOT:
Please log in to post comments.
Its movement is very fast