Professional Documents
Culture Documents
ABSTRACT 1. OBJECTIVES
In this article, we present the development of a scale vehicle that General Objective
follows a track and is able to avoid obstacles that may arise
during the course of the track. This project is carryout in order Develop an autonomous vehicle at scale capable of following a
to demonstrate the operation of a normal vehicle, but this path and at the same time avoid obstacles that can be presented
vehicle is made in scale with the help of analog and digital on the track.
electronics. Specific Objectives
For the development of this vehicle several programming Design and build the body of a vehicle to scale with
software’s are used that allow the generation of algorithms that
their respective measures to be later implemented in
are in charge of the correct operation of the vehicle, in regard to
the chassis that covers all electronic components.
programming, several software are used among them: Arduino,
LabView and Proteus. Analyze and identify the operation of each of the
components that can be used for vehicle programming.
With respect to the Arduino software, it is the program in which Perform the programming of each of the vehicle
the programming and the generation of algorithms are carried components through the Arduino software.
out in order to achieve that the vehicle at scale complies with Implement a PCB board developed with the Proteus
the objectives proposed in the beginning.
Software throughout the vehicle circuit.
In the LabView software, the programming is in a graphical way Develop the respective programming in LabView with
that allows to see the information that the vehicle receives and the help of Arduino to be able to observe all the
sends through the Arduino software. To carry out the information received and issued by the vehicle.
communication between the LabView and Arduino software, a Verify that the vehicle at scale works in the same way
Bluetooth is used and this is done so that the lights of the vehicle as a daily vehicle when dodging obstacles or following
can be turned on or off at scale from the computer or computer. an established route.
Regarding the Proteus software, it is essential to design and
simulate the circuit, in the same way for the PCB board 2. INTRODUCTION
development.
The use of electronic today has become a fundamental pillar for
The vehicle is made to scale and for that reason, it must be vehicle manufacturers worldwide, as electronics facilitate and
designed and built with the measures that have been proposed automate movements that were made manually several years
and for its construction has been chosen to use automotive putty. ago. Vehicle manufacturers are committed to electronics and
provide a better product to their customers and what better than
providing the greatest possible comfort to have in the vehicle
that all its operation is automatic.
Keywords:
The use of electronic components in the automotive sector has
Autonomous, Electronic, Scale, Programming, Vehicle. contributed much to both the design and the development of
vehicles.
The electronics have been evolving a lot with the passing of
time and especially in the automotive sector since it has gone
from small sensors to autonomous vehicles, this has been
evolving due to the need of each of the vehicle manufacturers to
become the market leader. These vehicles may cost a large
amount of money; however, everything is due to the functions
and elements of the vehicle ranging from security systems to
intelligent systems.
Arduino Mega
3. DEVELOPMENT Shield Motor
BODY DESIGN Sharp sensor
QTR – 8a sensor
For the development of the body has been choose to take as a
Integrated 555
reference a truck DAKAR competition. (Figure 1)
Bluetooth HC – 05
Lights, Protboard cables, etc.
Each of these elements that are part of the scale vehicle come to
fulfill a specific function within the programming of the vehicle
and for this reason it is necessary to use each of these in an ideal
position on the chassis of the vehicle.
Automotive putty
Fiberglass
Tape
Painting
Advance or Rewind
Perform movements (Turn Right - Turn Left)
Turn on and off operating lights
Avoid obstacles
In the image you can see the programming to avoid the obstacles
that appear in the track, you have to turn both the left and the
right will only work the engines on the opposite side to the turn,
this can be done by modifying each of the speeds of the
respective motors. (Figure 5)
In the image, you can see the programming of the distance range
that the cart will detect in order to avoid obstacles that may
appear in the path of the track. (Figure 4) This distance can be
modified according to the track that has been proposed so that
the vehicle can function in the best possible way.
PROGRAMMING IN LABVIEW
In the same way you have a program that allows you to see the
distance to which the next obstacle is located, therefore, for this
you must work on the data generated by the Sharp sensor. This
is done in order to be able to visualize the approach of the
vehicle with respect to the obstacles that appear in the track.
VEHICLE OPERATION
4. CONCLUSIONS
int distance=0;
const int Motor1 = 11; //izquierda
unsigned long currentMillis = 0;
const int Motor2 = 10; //derecha
const long interval = 300;
const int DI = 25; //izquierda
void setup()
const int DD = 24; //derecha
{
Serial.begin(9600);
String inputString = ""; // a string to hold incoming data
inputString.reserve(200);
boolean stringComplete = false;
manual_calibration();
#define _UMBRAL_ 200 //Umbral de los sensores
set_motors(0,0);
#define sharp A10
pinMode(3, INPUT);
pinMode(4, INPUT);
#define KP 0.1
#define KD 4
pinMode(A0, INPUT);
pinMode(A1, INPUT);
#define M1 150
pinMode(A2, INPUT);
#define M2 150
pinMode(A3, INPUT);
#define M1_MAX_SPEED 200
pinMode(A4, INPUT);
#define M2_MAX_SPEED 200
pinMode(A5, INPUT);
pinMode(A6, INPUT);
#define NUM_SENSORS 8
pinMode(A7, INPUT);
#define TIMEOUT 2500
#define EMITTER_PIN 2
//LUCESS
//analogWrite(7, 220);
//distancia obstaculos
// analogWrite(6, 10);
int dist_max=6;
currentMillis = millis();
int dist_min=2;
}
void loop() char inChar = (char)Serial.read();
} stringComplete = true;
if (stringComplete) { }
// Serial.println(inputString); }
if (inputString.indexOf("a")>-1 ) }
analogWrite(6, 220);
analogWrite(6, 0); {
if (inputString.indexOf("c")>-1) //IZQUIERDA
analogWrite(7, 0);
} digitalWrite(DD,LOW);
digitalWrite(DI,HIGH);
if (Distancia()==1) set_motors(m2Speed,m1Speed);
else{ delay(1400);
digitalWrite(DD,LOW);
digitalWrite(DI,LOW); //RECTO
} m1Speed = 70;
} m2Speed = 70;
digitalWrite(DD,LOW);
//VELOCIDAD MOTOR {
void manual_calibration() {
int Distancia() delay(500);
{ pinMode(13, OUTPUT);
float volts = analogRead(sharp)*0.0048828125; // (5/1024) digitalWrite(13, HIGH);
distance = 13*pow(volts, -1); for (int i = 0; i < 400; i++)
//Serial.println(distance); {
if (distance >= dist_max || distance <= dist_min) qtrrc.calibrate();
return 0; }
else digitalWrite(13, LOW);
return 1; Serial.begin(9600);
} for (int i = 0; i < NUM_SENSORS; i++)
void Control() {
{ Serial.print(qtrrc.calibratedMinimumOn[i]);
int position = qtrrc.readLine(sensorValues); Serial.print(' ');
//Serial.println(position); }
int error = position - 3000; Serial.println();
int motorSpeed = KP * error + KD * (error - lastError); for (int i = 0; i < NUM_SENSORS; i++)
lastError = error; {
//Serial.println(motorSpeed); Serial.print(qtrrc.calibratedMaximumOn[i]);
motorSpeed = map(motorSpeed, -30, 40, -60, 90); Serial.print(' ');
int m1Speed = M1 + motorSpeed; }
int m2Speed = M2 - motorSpeed; Serial.println();
set_motors(m2Speed,m1Speed); delay(1000);
} }