sekotājs robots

A

arash_micro

Guest
Sveiki
Man bija veikt "gaismas sekotājs robots" ar analog elementi
Tagad es gribu darīt to ar PIC un steper mehānisko
Tas ir labi izmantot == POT komandu == pamata valodā vai / D
((POT komanda skan vērtība rezistors bet litle lēna))
ja jums ir labas saite var parādīt man.
Pateicība

 
What do you mean gaismas sekotājs?Robots, kas seko gaismas avots?

 
glenjoy wrote:

What do you mean gaismas sekotājs?
Robots, kas seko gaismas avots?
 
, not LightTikai Line, ne
vieglie

Great site:
http://www.kmitl.ac.th/ ~ kswichit / LFrobot / LFrobot.htm

Izmēģiniet Google meklēšanu codeword: "Līnijas Sekotājam" vai "Line Tracer"
Labu veiksmi

 
arash_micro wrote:



Tas ir galvas un pārvērst to gaismas avots
 
I use 4 FOTOCELL un pārklāj tos ar tumšu papre
Tas darbs ir
Vai es varu izmantot tos šajā jaunajā projektā vai nē.kāpēc?

 
[quote = "glenjoy"] [quote = "arash_micro"] Nē
Tas ir galvas un pārvērst to gaismas avots [/ quote]

Tad jums ir nepieciešams labs Fotoelements ar ļoti augstu dinamisko diapazonu, jo lielākā daļa PHOTOTRANSISTOR piesātinātās ļoti ātri. [/ Quote]

AGC var likvidēt šīs sekas, ja pašreizējā trhough PHOTOTRANSISTOR attieksies melodija.

 
arash_micro wrote:

I use 4 FOTOCELL un pārklāj tos ar tumšu papre

Tas darbs ir

Vai es varu izmantot tos šajā jaunajā projektā vai nē.
kāpēc?
 
Cita iespēja ir izmantot šīs proporcionāls signālam no gaismas elementiem, paplašināt un izmantot, ir tieši vada servo motoru pagriezt galvu pretī brightes vietas.
Tas var būt diezgan interesanta pieeja ..tik ..
Padomājiet par to ..

 
Sveiki

Man ir izveidojuši savu Line Sekotājam Robot, es uzrakstīju programmu PIC izmantojot PICBasic Pro.

Kods:

'************************************************* ***************
"* Vārds: Path Finder Robot.BAS *
"* Autors: Omar Udai Shacker *
"* Notice: Copyright (c) 2005 *
"* Datums: 3/27/2005 *
"* Version: 1.8 *
'************************************************* ***************
'************************************************* ***************
'*************** Speciālos reģistros Setup ***************
'************************************************* ***************

@ DEVICE XT_OSC, WDT_ON, PWRT_OFF, PROTECT_OFF

"RA0 & RA1 Vai Inputs, RA2-RA4 Vai Outputs
TRISA =% 00000011
"RB0-RB3 Vai Inputs, RB4-RB7 Vai Outputs
TRISB =% 00001111
"PortB Pull-ups ir invalīdi, Interrupt par Rising Edge at RB0
OPTION_REG =% 11000000

'************************************************* ***************
'*********************** External Interrupt *****************
'********************* Iestatījumu PICBasic Pro ****************
'************************************************* ***************

"Globālās Interrupt Enable, RB0 External Interrupt Enabled
INTCON =% 10010000

'************************************************* ***************
'***************** Global Mainīgie & Conts **************
'************************************************* ***************

YES CON 0 "Line Atrasts, vai radīt šķēršļus Atrasts
NO CON 1 'No Line Atrasts, vai nav nekādu šķēršļu Atrasts

'************************************************* ***************

'Pārslēgties ON pogas Rutīnas For PortA.1
SW_ON VAR PORTA.1

'************************************************* ***************

"Photodiode Receiver mainīgie" Bit Sized "
L_RX VAR PORTB.1
M_RX VAR PORTB.2
R_RX VAR PORTB.3

'************************************************* ***************

"Direction Monitor LED Varibles" Bit lieluma "
L_LED VAR PORTA.2
M_LED VAR PORTA.3
R_LED VAR PORTA.4
GoSub LED_INIT

'************************************************* ***************

"L293 Motor Driver mainīgie" Bit Sized "
MOTOR_1A_PLUS VAR PORTB.7
MOTOR_2A_MINUS VAR PORTB.6
STEER_3A_PLUS VAR PORTB.5
STEER_4A_MINUS VAR PORTB.4
GoSub MOTOR_INIT

'************************************************* ***************
'************************************************* ***************
'************************************************* ***************
'********************* Main Program *****************
'************************************************* ***************
'************************************************* ***************
'************************************************* ***************'************************************************* ***************
'*************** Enable Interrupts in PBPro ***************
'***************** Switch ON Regulārā ********************
'************************************************* ***************

'Enable Interrupt in PICBasic Pro
PAR Interrupt Goto SW_OFF
SWITCH_ON:
IF SW_ON == 0 then SWITCH_ON

'************************************************* ***************
'**************** Mainīgie inicializācijas **************
'************************************************* ***************

"General Mainīgs inicializācijas
MAIN:
GoSub MOTOR_INIT
GoSub LED_INIT

'************************************************* ***************
'****************** Line Sekotājam Regulārā ***************
'************************************************* ***************

"Line Sekotājam Photodiode Check Parasta
LINE_FOLLOWER:
IF (L_RX == NO) AND (M_RX == NO) AND (R_RX == NO) Tad ERROR
IF (L_RX == NO) AND (M_RX == NO) AND (R_RX == YES) tad TIESĪBAS
IF (L_RX == NO) AND (M_RX == JĀ) UN (R_RX == NO) Tad FORWARD
IF (L_RX == NO) AND (M_RX == JĀ) UN (R_RX == YES) tad TIESĪBAS
IF (L_RX == JĀ) UN (M_RX == NO) AND (R_RX == NO) Tad LEFT
IF (L_RX == JĀ) UN (M_RX == NO) AND (R_RX == YES) tad ERROR
IF (L_RX == JĀ) UN (M_RX == JĀ) UN (R_RX == NO) Tad LEFT
IF (L_RX == JĀ) UN (M_RX == JĀ) UN (R_RX == YES) tad FORWARD

'************************************************* ***************
'********************* Pārsūtīt Regulāra ******************
'************************************************* ***************

"Forward Parasta
FORWARD:
L_LED = L_RX
M_LED = M_RX
R_LED = R_RX
LOW MOTOR_2A_MINUS
LOW STEER_3A_PLUS
LOW STEER_4A_MINUS
PWM MOTOR_1A_PLUS, 122, 1
LOW MOTOR_1A_PLUS
IF (L_RX == NO) AND (M_RX == JĀ) UN (R_RX == NO) Tad FORWARD
IF (L_RX == JĀ) UN (M_RX == JĀ) UN (R_RX == YES) tad FORWARD
IF (L_RX == NO) AND (M_RX == NO) AND (R_RX == NO) Tad FORWARD
Goto GALVENĀ

'************************************************* ***************
'********************** Right Regulāra *******************
'************************************************* ***************

"Turn Right Parasta
Tiesības:
L_LED = L_RX
M_LED = M_RX
R_LED = R_RX
LOW MOTOR_2A_MINUS
HIGH STEER_3A_PLUS
LOW STEER_4A_MINUS
PWM MOTOR_1A_PLUS, 126, 2
LOW MOTOR_1A_PLUS
IF (L_RX == NO) AND (M_RX == NO) AND (R_RX == YES) tad TIESĪBAS
IF (L_RX == NO) AND (M_RX == JĀ) UN (R_RX == YES) tad TIESĪBAS
IF (L_RX == NO) AND (M_RX == NO) AND (R_RX == NO) Tad pa labi
Goto GALVENĀ

'************************************************* ***************
'********************** Left Regulāra ********************
'************************************************* ***************

"Turn Left Parasta
LEFT:
L_LED = L_RX
M_LED = M_RX
R_LED = R_RX
LOW MOTOR_2A_MINUS
LOW STEER_3A_PLUS
HIGH STEER_4A_MINUS
PWM MOTOR_1A_PLUS, 126, 2
LOW MOTOR_1A_PLUS
IF (L_RX == JĀ) UN (M_RX == NO) AND (R_RX == NO) Tad LEFT
IF (L_RX == JĀ) UN (M_RX == JĀ) UN (R_RX == NO) Tad LEFT
IF (L_RX == NO) AND (M_RX == NO) AND (R_RX == NO) Tad pa kreisi
Goto GALVENĀ

'************************************************* ***************
'********************** Kļūda Regulāra *******************
'************************************************* ***************

'Kļūda Parasta
ERROR:
L_LED = L_RX
M_LED = M_RX
R_LED = R_RX
LOW MOTOR_2A_MINUS
LOW STEER_3A_PLUS
LOW STEER_4A_MINUS
PWM MOTOR_1A_PLUS, 122, 1
LOW MOTOR_1A_PLUS
Goto GALVENĀ

'************************************************* ***************
'***************** MOTOR Initailization ******************
'************************************************* ***************

MOTOR_INIT:
"L293 Motor Driver inicializācijas
LOW MOTOR_1A_PLUS
LOW MOTOR_2A_MINUS
LOW STEER_3A_PLUS
LOW STEER_4A_MINUS
Atpakaļ

'************************************************* ***************
'************** LED Direction Initailization *************
'************************************************* ***************

LED_INIT:
HIGH L_LED
HIGH M_LED
HIGH R_LED
Atpakaļ

'************************************************* ***************
'****************** Interrupt Handler Regulārā *****************
'************************************************* ***************

Sakropļot
SW_OFF:
GoSub MOTOR_INIT
GoSub LED_INIT
INTCON.1 = 0
Resume SWITCH_ON
Sekmēt

'************************************************* ***************
'********************* End *******************
'************************************************* ***************

Beigas
Atvainojiet, bet jums ir nepieciešams autorizēties, lai skatītu šo pielikumu

 
metāla wrote:

SveikiMan ir izveidojuši savu Line Sekotājam Robot, es uzrakstīju programmu PIC izmantojot PICBasic Pro.Kods:'************************************************* ***************

"* Vārds: Path Finder Robot.BAS *

"* Autors: Omar Udai Shacker *

"* Notice: Copyright (c) 2005 *

"* Datums: 3/27/2005 *

"* Version: 1.8 *

'************************************************* ***************

'************************************************* ***************

'*************** Speciālos reģistros Setup ***************

'************************************************* ***************@ DEVICE XT_OSC, WDT_ON, PWRT_OFF, PROTECT_OFF"RA0 & RA1 Vai Inputs, RA2-RA4 Vai Outputs

TRISA =% 00000011

"RB0-RB3 Vai Inputs, RB4-RB7 Vai Outputs

TRISB =% 00001111

"PortB Pull-ups ir invalīdi, Interrupt par Rising Edge at RB0

OPTION_REG =% 11000000'************************************************* ***************

'*********************** External Interrupt *****************

'********************* Iestatījumu PICBasic Pro ****************

'************************************************* ***************"Globālās Interrupt Enable, RB0 External Interrupt Enabled

INTCON =% 10010000'************************************************* ***************

'***************** Global Mainīgie & Conts **************

'************************************************* ***************YES CON 0 "Line Atrasts, vai radīt šķēršļus Atrasts

NO CON 1 'No Line Atrasts, vai nav nekādu šķēršļu Atrasts'************************************************* ***************'Pārslēgties ON pogas Rutīnas For PortA.1

SW_ON VAR PORTA.1'************************************************* ***************"Photodiode Receiver mainīgie" Bit Sized "

L_RX VAR PORTB.1

M_RX VAR PORTB.2

R_RX VAR PORTB.3'************************************************* ***************"Direction Monitor LED Varibles" Bit lieluma "

L_LED VAR PORTA.2

M_LED VAR PORTA.3

R_LED VAR PORTA.4

GoSub LED_INIT'************************************************* ***************"L293 Motor Driver mainīgie" Bit Sized "

MOTOR_1A_PLUS VAR PORTB.7

MOTOR_2A_MINUS VAR PORTB.6

STEER_3A_PLUS VAR PORTB.5

STEER_4A_MINUS VAR PORTB.4

GoSub MOTOR_INIT'************************************************* ***************

'************************************************* ***************

'************************************************* ***************

'********************* Main Program *****************

'************************************************* ***************

'************************************************* ***************

'************************************************* ***************
'************************************************* ***************

'*************** Enable Interrupts in PBPro ***************

'***************** Switch ON Regulārā ********************

'************************************************* ***************'Enable Interrupt in PICBasic Pro

PAR Interrupt Goto SW_OFF

SWITCH_ON:

IF SW_ON == 0 then SWITCH_ON'************************************************* ***************

'**************** Mainīgie inicializācijas **************

'************************************************* ***************"General Mainīgs inicializācijas

MAIN:

GoSub MOTOR_INIT

GoSub LED_INIT'************************************************* ***************

'****************** Line Sekotājam Regulārā ***************

'************************************************* ***************"Line Sekotājam Photodiode Check Parasta

LINE_FOLLOWER:

IF (L_RX == NO) AND (M_RX == NO) AND (R_RX == NO) Tad ERROR

IF (L_RX == NO) AND (M_RX == NO) AND (R_RX == YES) tad TIESĪBAS

IF (L_RX == NO) AND (M_RX == JĀ) UN (R_RX == NO) Tad FORWARD

IF (L_RX == NO) AND (M_RX == JĀ) UN (R_RX == YES) tad TIESĪBAS

IF (L_RX == JĀ) UN (M_RX == NO) AND (R_RX == NO) Tad LEFT

IF (L_RX == JĀ) UN (M_RX == NO) AND (R_RX == YES) tad ERROR

IF (L_RX == JĀ) UN (M_RX == JĀ) UN (R_RX == NO) Tad LEFT

IF (L_RX == JĀ) UN (M_RX == JĀ) UN (R_RX == YES) tad FORWARD'************************************************* ***************

'********************* Pārsūtīt Regulāra ******************

'************************************************* ***************"Forward Parasta

FORWARD:

L_LED = L_RX

M_LED = M_RX

R_LED = R_RX

LOW MOTOR_2A_MINUS

LOW STEER_3A_PLUS

LOW STEER_4A_MINUS

PWM MOTOR_1A_PLUS, 122, 1

LOW MOTOR_1A_PLUS

IF (L_RX == NO) AND (M_RX == JĀ) UN (R_RX == NO) Tad FORWARD

IF (L_RX == JĀ) UN (M_RX == JĀ) UN (R_RX == YES) tad FORWARD

IF (L_RX == NO) AND (M_RX == NO) AND (R_RX == NO) Tad FORWARD

Goto GALVENĀ'************************************************* ***************

'********************** Right Regulāra *******************

'************************************************* ***************"Turn Right Parasta

Tiesības:

L_LED = L_RX

M_LED = M_RX

R_LED = R_RX

LOW MOTOR_2A_MINUS

HIGH STEER_3A_PLUS

LOW STEER_4A_MINUS

PWM MOTOR_1A_PLUS, 126, 2

LOW MOTOR_1A_PLUS

IF (L_RX == NO) AND (M_RX == NO) AND (R_RX == YES) tad TIESĪBAS

IF (L_RX == NO) AND (M_RX == JĀ) UN (R_RX == YES) tad TIESĪBAS

IF (L_RX == NO) AND (M_RX == NO) AND (R_RX == NO) Tad pa labi

Goto GALVENĀ'************************************************* ***************

'********************** Left Regulāra ********************

'************************************************* ***************"Turn Left Parasta

LEFT:

L_LED = L_RX

M_LED = M_RX

R_LED = R_RX

LOW MOTOR_2A_MINUS

LOW STEER_3A_PLUS

HIGH STEER_4A_MINUS

PWM MOTOR_1A_PLUS, 126, 2

LOW MOTOR_1A_PLUS

IF (L_RX == JĀ) UN (M_RX == NO) AND (R_RX == NO) Tad LEFT

IF (L_RX == JĀ) UN (M_RX == JĀ) UN (R_RX == NO) Tad LEFT

IF (L_RX == NO) AND (M_RX == NO) AND (R_RX == NO) Tad pa kreisi

Goto GALVENĀ'************************************************* ***************

'********************** Kļūda Regulāra *******************

'************************************************* ***************'Kļūda Parasta

ERROR:

L_LED = L_RX

M_LED = M_RX

R_LED = R_RX

LOW MOTOR_2A_MINUS

LOW STEER_3A_PLUS

LOW STEER_4A_MINUS

PWM MOTOR_1A_PLUS, 122, 1

LOW MOTOR_1A_PLUS

Goto GALVENĀ'************************************************* ***************

'***************** MOTOR Initailization ******************

'************************************************* ***************MOTOR_INIT:

"L293 Motor Driver inicializācijas

LOW MOTOR_1A_PLUS

LOW MOTOR_2A_MINUS

LOW STEER_3A_PLUS

LOW STEER_4A_MINUS

Atpakaļ'************************************************* ***************

'************** LED Direction Initailization *************

'************************************************* ***************LED_INIT:

HIGH L_LED

HIGH M_LED

HIGH R_LED

Atpakaļ'************************************************* ***************

'****************** Interrupt Handler Regulārā *****************

'************************************************* ***************Sakropļot

SW_OFF:

GoSub MOTOR_INIT

GoSub LED_INIT

INTCON.1 = 0

Resume SWITCH_ON

Sekmēt'************************************************* ***************

'********************* End *******************

'************************************************* ***************Beigas
 
Hello glenjoy

Vai atbilde uz labad punktu vākšanu, viegls veids.

Šis projekts bija man mēnešu smaga darba, tad jums bija teikts, ka Tās līnijas sekotājs, gaismas sekotājs vajadzīgs.

 
THANKS metāla jūsu kodu un glenjoy jūsu aizstāvis
bet man nav saņēmis manu atbildi vēl
manas robots griezties pie cilvēka
Pamati neapstrīd
sorry for my angļu

 
what do you mean "vēršas pie cilvēka" tās sifi quistion ro jūs vēlaties, lai jūs izsekotu un sekot cilvēku.

 
Čau,

arash_micro wrote:

THANKS metāla jūsu kodu un glenjoy jūsu aizstāvis

bet man nav saņēmis manu atbildi vēl

manas robots griezties pie cilvēka

Pamati neapstrīd

sorry for my angļu
 
Hi gidimiz
paldies par jūsu guid
bet man ir jādara tās visas analogās

 
Čau,

arash_micro wrote:

Hi gidimiz

paldies par jūsu guid

bet man ir jādara tās visas analogās
 
Sveiki

Jūs varat izmantot pasīvas Infra Red sensori sekot homans, bet tādā gadījumā tas būs jāievēro visiem priekšmetiem, kas izstaro infrasarkano sarkana, ieskaitot gaismas spuldzes

<img src="http://www.edaboard.com/images/smiles/icon_wink.gif" alt="Piemiedz ar aci" border="0" />Any thing else jums need you are welcome.

 

Welcome to EDABoard.com

Sponsor

Back
Top