Sei sulla pagina 1di 7

DESCRIPCIÓN BREVE

El kit para armar robot seguidor de línea para


Arduino + Código es uno de los proyectos más
populares entre estudiantes y aficionados a la
robótica. Su misión es seguir una línea negra
marcada en un fondo blanco.

ROBOT SEGUIDOR
DE LINEA CON
ARDUINO
MATERIALES

NO. DE NOMBRE PRECIO DESCRIPCIÓN


PIEZAS
1 PLACA ARDUINO UNO + 200 PLACA INTELIGENTE,
CABLE PROGRAMABLE
60 CABLES DUPONT $50 CABLES DE CONEXIÓN DE
DISPOSITIVOS
2 PROTOBOARD 170 PUNTOS $40 PLACA DE INTERCONEXION
DE CIRCUITO
1 CHASIS ACRILICO $60 BASE DE ACRILICO DEL
SEGUIDOR DE LINEA
1 PORTA PILA AA X4 $20 CONTENEDOR DE PILLAS
AA PARA ALIMENTACIÓN
DEL PROTOTIPO
2 MOTORREDUCTORES $80 MOTORES DE CORRENTE
+ LLANTAS DIRECTA PARA EL
MOVIMIENTO DEL
SEGUIDOR
4 SENSOR ÓPTICO 40 SENSORES QUE DETECTAN
REFLECTIVO TCRT5000 LA RADIACIÓN OSCURA Y
BLANCA
1 RUEDA LOCA $30 RUEDA SIN TRACCIÓN,
PARA EL LIBRE
MOVIMIENTO DEL
SEGUIDOR.
1 INTERRUPTOR SWITCH $10 INTERRUPOR PARA
ENCENDIDO Y APAGADO
DEL PROTOTIPO
1 PUENTE H 25 DISPOSITIVO QUE
PERMIITE EL CAMBIO DEL
POLARIDAD PARA EL
MOVIMENTO DE LAS
RUEDAS
TOTAL $545
DIAGRAMA ESQUEMATICO
CÓDIGO DE SEGUIDOR DE LINEA

#include <Arduino.h> //Permite utilizar los comandos de Arduino


#include "Base_Robot.h"

void Base_Robot::Inicializar_Robot()
{
Motor_1.Inicializar_Motor();
Motor_2.Inicializar_Motor();
}

void Base_Robot::Atras(int Velocidad_1,int Velocidad_2)


{
Motor_1.Atras(Velocidad_1);
Motor_2.Atras(Velocidad_2);
}
void Base_Robot::Adelante(int Velocidad_1,int Velocidad_2)
{
Motor_1.Adelante(Velocidad_1);
Motor_2.Adelante(Velocidad_2);
}
void Base_Robot::Stop()
{
Motor_1.Stop();
Motor_2.Stop();
}

#include "Base_Robot.h"
#include "Sensor_TCRT5000.h"
class Robot_Seguidor
{
private:
Base_Robot Robot;
Sensor Sensor_1;
Sensor Sensor_2;
Sensor Sensor_3;
Sensor Sensor_4;
Sensor Sensor_5;
int sensor[5];
float Error=0, P=0, I=0, D=0, PID=0;
float Error_Anterior=0, Anteriror_I=0;

public:
Robot_Seguidor(int Pin_Motor_1A,
int Pin_Motor_1B,
int PWM_1,
int Pin_Motor_1C,
int Pin_Motor_1D,
int PWM_2,
int PinS1,
int PinS2,
int PinS3,
int PinS4,
int PinS5)
:Robot(Pin_Motor_1A, Pin_Motor_1B, PWM_1, Pin_Motor_1C, Pin_Motor_1D,
PWM_2),Sensor_1(PinS1),Sensor_2(PinS2),Sensor_3(PinS3),Sensor_4(PinS4),Sensor_5(PinS5){}
void Inicializar();
void Lectura_de_sensores();

INSTRUCTIVO
1) Solda los cables a los polos de los motores.  Es importante soldar de la misma
manera que se muestra en la imagen, de lo contrario los motores podrían girar hacia el
sentido opuesto.

2) Coloca los soportes de acrílico al chasis.


3) Coloca motores y tornillos en los soportes.

4) Coloca las ruedas y los encoders en los motores.

5) Coloca los separadores de 25mm a la rueda loca.

6) Monta el Arduino UNO al chasis.


7) Coloca el protoboard y Conecta el puente H tal como se muestra en el diagrama

8) Conecta los Cables dupont macho hembra de 20cm

Potrebbero piacerti anche