WIRELESS VOICE-CONTROLLED WHEEL CHAIR USING STM32
Rubayet Binte Kabir
1606164
1
MD. Rohan Islam
1606189
Asmiya Hasan
1606191
Sadik Yasir Tauki
1606194
Submitted by – Group C.11
C
EEE 416 – Microprocessor and Embedded Systems Laboratory
Jan 2020 Level-4 Term-I Section A
Final Project Demonstration
Department of Electrical and Electronics Engineering
Bangladesh University of Engineering and Technology
Outline
Wireless voice-controlled wheel chair using STM32
2
EEE 416 (2020) – Final Project Group C.11
Summary
Wireless voice-controlled wheel chair using STM32
3
EEE 416 (2020) – Final Project Group C.11
Background
Wireless voice-controlled wheel chair using STM32
4
EEE 416 (2020) – Final Project Group C.11
Components
Wireless voice-controlled wheel chair using STM32
5
EEE 416 (2020) – Final Project Group C.11
Stm32 Bluepill
HC-05 bluetooth module
l298n motor driver
St link V2
DC motor
Flow Chart
Wireless voice-controlled wheel chair using STM32
6
EEE 416 (2020) – Final Project Group C.11
Android App
Phone
Bluetooth
Left & Right
DC Motors
L298n Motor
Driver
STM32
Blue pill
HC-05
bluetooth
Transmitter Section:
Receiver Section:
Circuit Diagram
Wireless voice-controlled wheel chair using STM32
7
EEE 416 (2020) – Final Project Group C.11
Experimental Demonstration
Wireless voice-controlled wheel chair using STM32
8
EEE 416 (2020) – Final Project Group C.11
Photo Gallery
Wireless voice-controlled wheel chair using STM32
9
EEE 416 (2020) – Final Project Group C.11
Future Outlook
Wireless voice-controlled wheel chair using STM32
10
EEE 416 (2020) – Final Project Group C.11
Conclusion
Project is like a bridge between theoretical and practical working. First of all we would like to thank the supreme power of the Almighty Allah who has always guided us to work on the right path and without His grace, this project could not be performed properly in this pandemic. We are sincerely thankful to our course teachers for giving us the opportunity to work in this project. We are also thankful to all our teammates for their relentless effort to perform this project.
By this project, we think we can lessen the sufferings of the disabled people of our community. The whole system will not be difficult to use by any person.
Wireless voice-controlled wheel chair using STM32
11
EEE 416 (2020) – Final Project Group C.11
ADDITIONAL SLIDES
12
C
EEE 416 – Microprocessor and Embedded Systems Laboratory
Jan 2020 Level-4 Term-I Section A
Final Project Demonstration
Department of Electrical and Electronics Engineering
Bangladesh University of Engineering and Technology
References
Datasheets and manuals used:
Wireless voice-controlled wheel chair using STM32
13
EEE 416 (2020) – Final Project Group C.11
Bill of Materials
Wireless voice-controlled wheel chair using STM32
14
EEE 416 (2020) – Final Project Group C.11
Component | Quantity | Price (Tk) |
1 | 260 | |
ST-Link V2 Programmer | 1 | 486 |
L298N Motor Driver (Red) | 1 | 198 |
HC-05 Bluetooth Breakout Board | 1 | 350 |
Wheel | 2 | 126 |
Gear Motor | 2 | 128 |
Lipo Battery | 1 | 1700 |
Ball Caster | 1 | 80 |
Jumper Cables | 20 | 52 |
Breadboard | 2 | 94 |
Total | - | 3474 |
Detailed Methods
Softwares and tools used:
Tutorials:
Wireless voice-controlled wheel chair using STM32
15
EEE 416 (2020) – Final Project Group C.11
Source Codes
#define left_motor_B PA0
#define left_motor_F PA1
#define right_motor_B PA2
#define right_motor_F PA3
#define speed_left PA6
#define speed_right PA7
#define greenLED PB11 //indicates motion
#define redLED PB10 //indicates acceptance of voice command
String instruction; //voice command
int k = 0; //indicates direction of robot; 0 = forward, 1 = back
int motor_speed;
void setup() {
Serial1.begin(9600); //Serial communication with bluetooth module
//defining all pins as output
pinMode(left_motor_F, OUTPUT);
pinMode(left_motor_B, OUTPUT);
pinMode(right_motor_F, OUTPUT);
pinMode(right_motor_B, OUTPUT);
pinMode(speed_left, OUTPUT);
pinMode(speed_right, OUTPUT);
pinMode(greenLED, OUTPUT);
pinMode(redLED, OUTPUT);
motor_speed = 75;
stop_motor();
blink_redLED();
}
void loop() {
//receiving data from mobile app
while (Serial1.available()) {
delay(10);
char c = Serial1.read(); //reading each character serially from app
if (c == '#') break;
instruction += c;
}
analogWrite(speed_left, motor_speed); //speed of motor
analogWrite(speed_right, motor_speed);
Wireless voice-controlled wheel chair using STM32
16
EEE 416 (2020) – Final Project Group C.11
Source Codes
if (instruction.length() > 0) {
//instructions
if (instruction == "*forward") forward();
else if (instruction == "*back") backward();
else if (instruction == "*left") left(k);
else if (instruction == "*right") right(k);
else if (instruction == "*stop") stop_motor();
}
instruction = "";
}
// FUNCTIONS FOR MOTION
//Move forward
void forward() {
blink_redLED();
digitalWrite(left_motor_F, HIGH);
digitalWrite(left_motor_B, LOW);
digitalWrite(right_motor_F, HIGH);
digitalWrite(right_motor_B, LOW);
digitalWrite(greenLED, HIGH);
k = 0;
}
//Move backward
void backward() {
blink_redLED();
digitalWrite(left_motor_F, LOW);
digitalWrite(left_motor_B, HIGH);
digitalWrite(right_motor_F, LOW);
digitalWrite(right_motor_B, HIGH);
digitalWrite(greenLED, HIGH);
k = 1;
}
//Stop
void stop_motor() {
blink_redLED();
digitalWrite(left_motor_F, LOW);
digitalWrite(left_motor_B, LOW);
digitalWrite(right_motor_F, LOW);
digitalWrite(right_motor_B, LOW);
digitalWrite(greenLED, LOW);
k = 0;
}
Wireless voice-controlled wheel chair using STM32
17
EEE 416 (2020) – Final Project Group C.11
Source Codes
void right(int k) {
blink_redLED();
//turn right while moving backwards
if (k) {
digitalWrite(left_motor_F, LOW);
digitalWrite(left_motor_B, HIGH);
digitalWrite(right_motor_F, LOW);
digitalWrite(right_motor_B, LOW);
digitalWrite(greenLED, HIGH);
delay(600); //delay needed for 90 degree turn
backward();
}
else {
//turn right while moving forward
digitalWrite(left_motor_F, HIGH);
digitalWrite(left_motor_B, LOW);
digitalWrite(right_motor_F, LOW);
digitalWrite(right_motor_B, LOW);
digitalWrite(greenLED, HIGH);
delay(600);
forward();
}
}
void left(int k) {
blink_redLED();
if (k) {
//turn left while moving backwards
digitalWrite(left_motor_F, LOW);
digitalWrite(left_motor_B, LOW);
digitalWrite(right_motor_F, LOW);
digitalWrite(right_motor_B, HIGH);
digitalWrite(greenLED, HIGH);
analogWrite(speed_left, motor_speed);
analogWrite(speed_right, motor_speed);
delay(600);
backward();
}
Wireless voice-controlled wheel chair using STM32
18
EEE 416 (2020) – Final Project Group C.11
Source Codes
else {
//turn left while moving forward
digitalWrite(left_motor_F, LOW);
digitalWrite(left_motor_B, LOW);
digitalWrite(right_motor_F, HIGH);
digitalWrite(right_motor_B, LOW);
digitalWrite(greenLED, HIGH);
digitalWrite(redLED, LOW);
analogWrite(speed_left, motor_speed);
analogWrite(speed_right, motor_speed);
delay(600);
forward();
}
}
void blink_redLED() {
digitalWrite(redLED, HIGH);
delay(100);
digitalWrite(redLED, LOW);
delay(200);
digitalWrite(redLED, HIGH);
delay(100);
digitalWrite(redLED, LOW);
}
Wireless voice-controlled wheel chair using STM32
19
EEE 416 (2020) – Final Project Group C.11
Difficulties
Wireless voice-controlled wheel chair using STM32
20
EEE 416 (2020) – Final Project Group C.11
Thank You
Wireless voice-controlled wheel chair using STM32
21
EEE 416 (2020) – Final Project Group C.11
Questions?