Home » Apps » Wall-Etsii (DYOR UPV)

Login with your Social Account

Wall-Etsii (DYOR UPV)

  •  
  •  
  •  
  •  
  •  
  •  

1. Introduction

The next document collects the different parts of the documents, evidences and photos created to create and programme the robot.

This creation has different parts:

  • At the beginning, it was necessary to create a proposal to have an idea about the design and the tasks.
  • On the one hand, the next part consisted on build the robot body with 3D printer and adjust the pieces.
  • On the other hand, the electronics is the basis of the robot, it’s necessary to check each sensor separately with the code and the modification necessaries.
  • Another important part was the app, it’s important to connect the robot with the mobile to control it.
  • Finally, the electronics are assembled on the body and it is checked and adjusted to obtain the results wanted.

On the next points, we develop these different parts and talk about the problems that appear in everyone.

 

2. Robot Design Proposal

Initially, we must to have an idea about the robot to make up, the plans, the functions and the format of the app to create us robot Wall-Etsii.

This initial proposal provided to the teacher, excluding the student names, was the next information:

 

2.1. Robot’s name:

Wall-Etsii

 

2.2. Autonomous task 1:

Follow the line: the robot must follow any kind of line drawn on the floor.

 

2.3. Autonomous task 2:

Avoid obstacles and find an alternative road: the robot must detect the different objects and change the direction to avoid crash with them.

 

 

2.4. Mobile phone interface sketch:

2.5. List of materials:

 

Ítem Nombre Cantidad
1 ARDUINO NANO I/O SHIELD 1
2 SEGUILÍNEAS TCRT5000 1
3 MATRIZ LED 8×8 MAX7219 2
4 SENSOR ULTRASONIDOS HC-SR04 1
5 ALTAVOZ PASIVO (BUZZER) 1
6 PAR RUEDAS SERVO FS90R 2
7 SERVO ROTACION CONTINUA FS90R 2
8 20 CABLES DUPONT HEMBRA-HEMBRA 2
9 ARDUINO NANO v3 1
10 MODULO BLUETOOTH SPP-C 1

 

 

2.6. Electronic diagram:

 

2.7. 2D Design or 3D (if you have a 3d printer) or sketch of any other manufacturing method:

 

 

3. Design and assemble of the pieces

The initial proposal has some changes to adjust better the model and some initial pieces have problems with the build and time to print them.

In the next images, some of these changes could be appreciated with respect to the previous design:

In the next image, the new body robot in 3D view:

Some differences in relation to the initial proposal are: the arms (not printed), the eyes in brown are shorter than the proposal and the traction is with caterpillar.

4. Electronic Connections and programming

The electronic connections also are changed in comparison with the initial idea and proposal.

For example, the line follower is not installed on the robot for problems with the sensor. At the beginning, this sensor was installed, programmed and proved, but the robot fell down the table and it broken.

Another change is the Bluetooth connection, where initially was connected to the Rx and Tx pines, on the finally diagram, it is connected on the second and fourth pines.

The previous mentioned changes and another difference in relation to the first model can be contemplated on the next image:

In conclusion, the changes could be a little significant, the servos are included and some elements could be connected in other different initial pines.

But in general, the electronic connection is like the proposal independently the pines where the elements are connected, this only has influence on the programming code.

 

 

5. Mobile application (App)

The mobile app was created with three different screens: the select mode screen, the manual control mode and the obstacle avoid mode.

5.1. The menu

In this screen, it has two buttons to permit the selection mode or the exit button to close the app and return from the mobile.

The programming from this screen is the most singular and easy, where it only has three conditions and three actions:

 

5.2. Manual control mode

On the first mode of control, the user has the totally control of the robot and can control the robot with the mobile inclination.

The screen shows the buttons to connect the robot with the mobile, the start and stop buttons and the value of the accelerometer inclination from the ‘x’ and ‘y’ axes to have an idea about where the robot must be running.

In comparison with the previous and next screens, this is the most complex programming code on the app:

 

5.3. Obstacle avoid mode

The last screen shows, like the previous screen, the buttons to connect the robot and the mobile and the start and stop buttons.

The programming level from this screen is medium, with some code like the previous screen, but most simple.

 

6. Assembly, connection and results

The last chapter describes how the robot was assembled. The first step was connecting every components and assembling the pieces of Wall-ETSII. The connection and assembly can be seen in the following images:

dav

After that, the app and the algorithm were programmed with the app inventor 2 and the Arduino IDE software:

sdr

Finally, when the algorithm and the app had been transferred to the robot and the power source had been connected, Wall-ETSII was completed. The next images show the final robot’s appearance:

dav

 

 

7. Conclusion

To conclude the report, we are going to summarize the work done.

  • First of all, we may to mention the problems which have been arisen from the design of the robot to the final performance. For example, the line follower was broken, so we decided to delete the mode “Line follower”. As we can see, the important conclusion that we can extract is every problem was solved.

 

  • We have learned some technical knowledges about mobile robotic. In this field, we can include the knowledges related with sensors, microcontrollers and algorithms we can use for avoid obstacles, follow lines or reach a point.

 

  • We have learned too that every design has some defects or differences with the final performance. This is the case of the pieces of the Wall-ETSII’s body.

 

  • Another aspect that we have to learn was the programming. We learned to programme with app inventor 2 and IDE with some videos and with some help of internet.

 

  • We have noticed the importance of the good synchronization between the information the mobile phone send to the microcontroller and backwards.

 

  • Finally, to sum up, Wall-ETSII is a robot perfectly functional which can be handled manually with the mobile phone and which has an automatic mode where the robot avoid obstacles.

 

 

ANEXO I: YOUTUBE VIDEOS

 

YouTube Preview Image

 

YouTube Preview Image

 

YouTube Preview Image

 

YouTube Preview Image

 

 

ANEXO II: ARDUINO PROGRAM

 

#include “LedControlMS.h”
#include “binary.h”
#include <Servo.h>
#include <SoftwareSerial.h>

int speakerPin = 5;
int Pin_echo = 9;
int Pin_trig = 10;
int I=8;
int D=6;
int tones[ ] = {400,300,200};
int duracion, cm, modo;
int arranca, encendido, obstaculo, direccion;
LedControl lc1=LedControl(13,11,12,1); //(DataIn,CLK,LOAD,num matrices)
Servo ServoI;
Servo ServoD;
SoftwareSerial BT1(4,2); //Rx Tx

void setup() {
Serial.begin (9600);
BT1.begin(9600);
pinMode(speakerPin,OUTPUT);
pinMode(Pin_trig, OUTPUT);
pinMode(Pin_echo, INPUT);
ServoI.attach(I);
ServoD.attach(D);
for (int i=0; i< 1; i++){
lc1.shutdown(i,false);
lc1.setIntensity(i,8);
lc1.clearDisplay(i);
}
despertar(lc1);
allpinslow();
obstaculo=0;
}

void loop() {
while(1){
modo=BT1.parseInt();
if(modo==40) break;
if(modo==20) break;
}
if(modo==40){
while(1){
arranca=BT1.parseInt();
digitalWrite(Pin_trig, LOW);
delayMicroseconds(2);
digitalWrite(Pin_trig, HIGH);
delayMicroseconds(5);
digitalWrite(Pin_trig, LOW);
duracion = pulseIn(Pin_echo, HIGH);
cm = duracion / 29 / 2;
Serial.print(“Distancia:”);
Serial.print(cm);
Serial.println(” cm”);
encendido=Check_Protocol(arranca);
if(encendido==1){
if (cm>80){
ServoI.write(180);
ServoD.write(0);
parpadear(lc1);
obstaculo=0;
}
else if (cm<80){
if(cm>40){
ServoI.write(88);
ServoD.write(90);
if(obstaculo==0){
ruido();
obstaculo=1;
}
ServoI.write(180);
ServoD.write(180);
}
else if(cm<40){
chocar(lc1);
ServoI.write(0);
ServoD.write(180);
}
}
}
if(encendido==0){
ServoI.write(88);
ServoD.write(90);
}
if(arranca==100){
ServoI.write(88);
ServoD.write(90);
despertar(lc1);
break;
}
}
}
if(modo==20){
while(1){
direccion=BT1.parseInt();
if(direccion==200){
ServoI.write(88);
ServoD.write(90);
}
if(direccion==0){
ServoI.write(88);
ServoD.write(90);
}
if(direccion==1){
ServoI.write(180);
ServoD.write(180);
}
if(direccion==2){
ServoI.write(0);
ServoD.write(0);
}
if(direccion==5){
ServoI.write(0);
ServoD.write(180);
}
if(direccion==6){
ServoI.write(180);
ServoD.write(0);
}
if(direccion==100){
ServoI.write(88);
ServoD.write(90);
break;
}
}
}
}

 

void chocar(LedControl lc){
lc.setRow(0,0,B11000000);
lc.setRow(0,1,B00110000);
lc.setRow(0,2,B00001100);
lc.setRow(0,3,B00000011);
lc.setRow(0,4,B00000011);
lc.setRow(0,5,B00001100);
lc.setRow(0,6,B00110000);
lc.setRow(0,7,B11000000);
}

void despertar(LedControl lc){
lc.setRow(0,0,B00111100);
lc.setRow(0,1,B01000010);
lc.setRow(0,2,B10000001);
lc.setRow(0,3,B10011001);
lc.setRow(0,4,B10011001);
lc.setRow(0,5,B10000001);
lc.setRow(0,6,B01000010);
lc.setRow(0,7,B00111100);
}

void parpadear(LedControl lc){
lc.setRow(0,0,0×00);
lc.setRow(0,7,0×00);
lc.setRow(0,1,0xFF);
lc.setRow(0,6,0xFF);
delay(100);
lc.setRow(0,0,0×00);
lc.setRow(0,7,0×00);
lc.setRow(0,1,0×00);
lc.setRow(0,6,0×00);
lc.setRow(0,2,0xFF);
lc.setRow(0,5,0xFF);
delay(100);
lc.setRow(0,0,0×00);
lc.setRow(0,7,0×00);
lc.setRow(0,1,0×00);
lc.setRow(0,6,0×00);
lc.setRow(0,2,0×00);
lc.setRow(0,5,0×00);
lc.setRow(0,3,0xFF);
lc.setRow(0,4,0xFF);
delay(100);
lc.setRow(0,0,0×00);
lc.setRow(0,7,0×00);
lc.setRow(0,1,0×00);
lc.setRow(0,6,0×00);
lc.setRow(0,2,0xFF);
lc.setRow(0,5,0xFF);
lc.setRow(0,3,B10011001);
lc.setRow(0,4,B10011001);
delay(100);
lc.setRow(0,0,0×00);
lc.setRow(0,7,0×00);
lc.setRow(0,1,0xFF);
lc.setRow(0,6,0xFF);
lc.setRow(0,2,B10000001);
lc.setRow(0,5,B10000001);
delay(100);
lc.setRow(0,0,B00111100);
lc.setRow(0,7,B00111100);
lc.setRow(0,1,B01000010);
lc.setRow(0,6,B01000010);
}

void allpinslow(){
ServoD.write(90);
ServoI.write(88);
}

int Check_Protocol(int arranca){
if(arranca==40){
allpinslow();
arranca=0;
return 1;
}
if(arranca==200){
allpinslow();
arranca=0;
return 0;
}
}

void ruido(){
for (int i = 0; i < 3; i++){
tone(speakerPin,tones[i]);
delay(500);
}
noTone(speakerPin);
}

 

%d bloggers like this: