Professional Documents
Culture Documents
Introduo robtica
Locomoo
Single
Explorao
Locomoo
Mapeamento
Busca
Locomoo
Single
Explorao
Locomoo
Mapeamento
Busca
Terreno!
Rodas
Esteiras
Pernas/Patas
Outros
Locomoo
Locomoo
Single
Group
Explorao
Seguir o lider*
Mapeamento
Busca
Cooperao
Colaborao
Terreno!
Rodas
Esteiras
Pernas/Patas
Outros
Locomoo
Pernas/Patas
Motor cc
Motor de passo
Servomotor
Motor cc
Motor de passo
Servomotor
Outros
Introduo robtica: prof. Eduardo Bento Pereira
Motor cc
Controle de velocidade por tenso:
Motor cc
Controle de velocidade por tenso:
http://www.sabereletronica.com.br/secoes/leitura/343
Exemplo arduino:
Motor cc
Praticando:
Instalao do arduino
Download: http://arduino.cc/en/Main/Software
Arduino:
Estrutura bsica
1. Declarao de
variveis
2. void setup()
3. void loop()
Exemplo.:
Int LED = 13;
Int valor;
void setup()
{
pinMode(LED, OUTPUT);
}
void loop()
{
valor = HIGH
digitalWrite(LED,valor);
}
Arduino:
Estrutura bsica
1. Declarao de
variveis
2. void setup()
3. void loop()
Exemplo.:
Int LED = 13;
Int valor;
void setup()
{
pinMode(LED, OUTPUT);
}
void loop()
{
valor = HIGH
digitalWrite(LED,valor);
}
Praticando!
Setup
No arquivo
int E1 = 5;
int M1 = 4;
int E2 = 6;
int M2 = 7;
Setup
void setup()
{
pinMode(M1, OUTPUT);
pinMode(M2, OUTPUT);
}
Exemplo arduino
com shiled motor:
void loop()
{
int value;
for(value = 0 ; value <= 255; value+=5)
{
digitalWrite(M1,HIGH);
digitalWrite(M2, HIGH);
analogWrite(E1, value); //PWM Speed Control
analogWrite(E2, value); //PWM Speed Control
delay(30);
}
}
Exemplo arduino
com shiled motor:
void loop()
{
int value;
for(value = 0 ; value <= 255; value+=5)
{
digitalWrite(M1,HIGH);
digitalWrite(M2, HIGH);
analogWrite(E1, value); //PWM Speed Control
analogWrite(E2, value); //PWM Speed Control
delay(30);
}
}
Praticando!
Servomotor
Sinal de frequncia
Circuito de controle
Posio
Servo
motor
Sensor
Servomotor
Sinal de frequncia
Circuito de controle
Posio
Servo
motor
Sensor
http://labdegaragem.com/profiles/blogs/tut
orial-arduino-com-servomotor
Servomotor
Sinal de frequncia
PCM (Pulse Coded Modulation
Modulao por Impulso Codificado).
Circuito de controle
Posio
Servo
motor
Largura
Sensor
Exemplo arduino:
Servomotor
#include <Servo.h>
Servo myservo;
Praticando:
Download
http://playground.arduino.cc/ComponentLib/servo
void setup()
{
myservo.attach(9);
myservo.write(90);
}
void loop(){
}
Exemplo arduino:
http://playground.arduino.cc/ComponentLib/servo
Praticando:
void loop()
{
val = analogRead(potpin);
// reads the value of the potentiometer (value between 0 and 1023)
val = map(val, 0, 1023, 0, 179); // scale it to use it with the servo (value between 0 and 180)
myservo.write(val);
// sets the servo position according to the scaled value
delay(15);
// waits for the servo to get there
SoftwareServo::refresh();
}
Exemplo arduino:
http://playground.arduino.cc/ComponentLib/servo
Praticando:
Servomotor
#include <Servo.h>
Servo myservo;
void loop()
{
void 0setup()
val = analogRead(potpin);
// reads the value of the potentiometer (value between
and 1023)
{
val = map(val, 0, 1023, 0, 179); // scale it to use it with the servo (value between 0 and 180)
myservo.write(val);
// sets the servo position according to the scaled value myservo.attach(9);
}
delay(15);
// waits for the servo to get there
SoftwareServo::refresh();
}
Exemplo arduino:
http://playground.arduino.cc/ComponentLib/servo
Praticando:
void loop()
{
val = analogRead(potpin);
// reads the value of the potentiometer (value between 0 and 1023)
val = map(val, 0, 1023, 0, 179); // scale it to use it with the servo (value between 0 and 180)
myservo.write(val);
// sets the servo position according to the scaled value
delay(15);
// waits for the servo to get there
SoftwareServo::refresh();
}
Tarefas bsicas
Single
Sensores
Localizao
Cmeras
Sensor de cor
Sensor de luz
Sensor IR
Sensor ultrasnico
Tarefas bsicas
Localizao
Single
Group
Sensores
Troca de
informaes
Cmeras
Sensor de cor
Fuso de
sensores
Sensor de luz
Sensor IR
Sensor ultrasnico
Sensoreamento
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
}
Sensoreamento
Praticando:
void loop() {
sensorValue = analogRead(analogInPin); // read the analog in value:
outputValue = map(sensorValue, 0, 1023, 0, 255); // map it to the range of the analog out:
analogWrite(analogOutPin, outputValue); // change the analog out value:
// print the results to the serial monitor:
Serial.print("sensor = " );
Serial.print(sensorValue);
Serial.print("\t output = ");
Serial.println(outputValue);
// wait 2 milliseconds before the next loop
// for the analog-to-digital converter to settle
// after the last reading:
delay(2);
Tarefas bsicas
Single
Direta
Intervenso
Indireta
Tarefas bsicas
Single
Direta
Intervenso
Indireta
Group
Cooperao
Colaborao
Tarefas bsicas
Single
Direta
Intervenso
Indireta
Group
Cooperao
Colaborao
Objetivo!
Garra
(Efetuador)
Corpo*
Ferramenta
(Broco, p, laser)
Outros
Tarefas bsicas
Single
Manual
Programao
Automtica
Inteligncia*
Tarefas bsicas
Programao
Single
Group
Manual
IAD
Automtica
Inteligncia*
Agentes
inteligentes
Tarefas bsicas
Programao
Single
Group
Manual
IAD
Automtica
Inteligncia*
Agentes
inteligentes
Hardware
PC
Microntrolador
DSP
FPGA Avanado
Tarefas bsicas
Programao
Single
Group
Manual
IAD
Automtica
Inteligncia*
Agentes
inteligentes
Software
Assembly
Projetos:
Seguidor de linha
Explorador
Bibliografia
http://www.eletronica.org/arquivos/MotoresCC.pdf
http://iearp.blogspot.com.br/2012/08/eletronica-organica-umanova-fronteira.html
Bibliografia
http://www.eletronica.org/arquivos/MotoresCC.pdf
Bibliografia
http://playground.arduino.cc/ComponentLib/servo
http://labdegaragem.com/profiles/blogs/tutorial-arduino-com-servomotor
http://robomaniablog.blogspot.com.br/2012/10/arduino-tutorial-5usando-um-servomotor.html
http://www.robocore.net/modules.php?name=Forums&file=viewtopic&p
=36146
http://arduino.cc/en/reference/servo
Contato:
ebento@ufsj.edu.br
Face: uairobots
www.ppgel.net.br/cyros