Sie sind auf Seite 1von 3

CONSTRUCTION

RF-based Dual-mode Robot ROBIN C


HALANA

VIVEK PANCHABHAIYA ANT.2


RF RECEIVER

ere is a dual-mode robot that

H
ANT.1

can be operated manually us- RF TRANSMITTER HT12D


DECODER
ing an RF-based remote con- M1 M2

PIC16F877A
trol and can also move automatically SWITCHES HT12E
ENCODER OBSTACLE
avoiding all the obstacles. The robot DETECTOR L293D
MOTOR
has some inbuilt intelligence to avoid 9V
DRIVER

obstacles by changing its path. It can POWER SUPPLY


POWER SUPPLY
EH IXUWKHU PRGLÀHG IRU DSSOLFDWLRQV
like automatic vacuum cleaner. In such REMOTE ROBOT
an application the vacuum cleaner will Fig. 1: Block diagram for PIC-based dual-mode robot
DXWRPDWLFDOO\ FOHDQ WKH ÁRRU RU \RX
can direct it using the RF remote while 6DQG6DUHLQWHUIDFHGZLWK$'
TP1 R1 750K
sitting relaxed on your sofa. TX1RF TX
ANT.1 WKURXJK$'RIHQFRGHU,&IRU
IRUZDUG ):'  UHYHUVH 5(9 
DATA
VCC
GND

ANT

18 16 15
Circuit and working 1 VCC OSC1 OSC2 TP2
1 2 3 4
BATT.1
left (LEFT) and right (RIGHT)
A0 9V
Fig. 1 shows the block diagram for 2
D
17
OUT PRWLRQVUHVSHFWLYHO\5HVLVWRU5
A1
PIC-based dual-mode robot. When a 14 is connected between oscillator
3 TE
EXWWRQ LV SUHVVHG LQ WKH UHPRWH WKH A2
S4 RIGHT pins 15 and 16 to set the transmit-
4 13
corresponding code is transmitted A3
IC1 AD11 ter frequency. IC1 is permanently
through RF transmitter. At the re- 5
A4 HT12E S3 LEFT enabled for transmission by con-
12
FHLYHU HQG WKLV WUDQVPLWWHG VLJQDO LV 6
A5
AD10
necting its TE pin to ground.
received and decoded. The MCU unit 7 11
S2 REV
:KHQ DQ\ VZLWFK VD\ 6 LV
A6 AD9

8
SUHVVHG WKH FRUUHVSRQGLQJ GDWD
S1 FWD
PARTS LIST
A7
AD8
10 LV VHULDOO\ WUDQVPLWWHG IURP 'OUT
9
Semiconductors:
GND S1−S4 = pin through the RF transmitter
IC1 - HT12E encoder TACTILE SWITCH TP0
PRGXOH $ 9 EDWWHU\ LV XVHG WR
,&  +7'GHFRGHU GND
,&  3,&)$PLFURFRQWUROOHU
TP0−TP2 = TEST POINT power the circuit.
,&  9UHJXODWRU Fig. 2: Circuit of remote control Robot. It comprises an RF
,&  /0RSHUDWLRQDODPSOLÀHU UHFHLYHU PRGXOH 5;  GHFRGHU
,&  /'PRWRUGULYHU
,57;,57;  ,5WUDQVPLWWHU +7' ,&  PLFURFRQWUROOHU 3,&-
,55;,55;  ,5UHFHLYHU Test Points of Transmitter )$ ,&  RSHUDWLRQDO DPSOL-
/('/('  PP/('
'  1UHFWLÀHUGLRGH Test point Details ÀHU/0 ,& PRWRUGULYHU/'
TX1 - ASK transmitter module
TP0 Ground (GND)
,&  UHJXODWRU  ,&  DQG D IHZ
RX1 - ASK receiver module
GLVFUHWHFRPSRQHQWV'DWDWUDQVPLWWHG
Resistors (all ¼-watt, ±5% carbon): TP1 9V
5  NLORRKP
from the remote is received by the RF
TP2 Serial encoded data
R2 - 33-kilo-ohm receiver module and further decoded
555  NLORRKP compares the received code and drives E\ ,& 'HFRGHG GDWD LV IHG WR SLQV
5555 RKP
55  RKP the motors corresponding to the code 5$ WKURXJK 5$ RI PLFURFRQWUROOHU
9595  NLORRKPSUHVHW received. Obstacle detectors detect IC3. Identical addresses are selected for
Capacitors: any object in the way and intimate the the encoder and the decoder by short-
&&&  —)FHUDPLFGLVN
&&  S)FHUDPLFGLVN microcontroller. LQJWKHPWRJURXQG2XWSXWSLQV5'
Miscellaneous: Figs 2 and 3 show the circuits of WKURXJK5'RIWKHPLFURFRQWUROOHUDUH
666  3XVKWRRQWDFWLOHVZLWFK UHPRWHFRQWURODQGURERWUHVSHFWLYHO\ IHGWR,1WKURXJK,1RIGULYHU,&WR
S5 - On/off switch
00  9USPJHDUHGPRWRU Remote control. It is built around GULYHPRWRUV0DQG0UHVSHFWLYHO\
%$77  9EDWWHU\ 33 HQFRGHU ,& +7( ,&  0+] 5) Enable pins EN1 (pin 1) and EN2 (pin
%$77  9$KEDWWHU\
XTAL1  0+]FU\VWDO
transmitter module (TX1) and a few 9) are kept high for always-enabled
GLVFUHWHFRPSRQHQWV6ZLWFKHV66 output.

96 MARCH 2013 | ELECTRONICS FOR YOU WWW.EFYMAG.COM


CONSTRUCTION

ANT.2 R6 R8
RF RX R3
DATA
DATA
100E 10K
GND

GND
GND
VCC 10K

VCC

ANT
TP2 11 32
8 7 6 5 RX1 4 3 2 1 SIGNAL
1 VDD VDD IRTX1 IRRX1
LED1 MCLR 40
C1 2 RB7 LEFT

RESET
RA0 39
0.1u RB6
R2 C2 3 RA1 RB5 38
33K 0.1u 4 RA2 RB4 37
18 16 15 5 RB3 36
RA3
RB2 35 RIGHT

S6
VCC OSC1 OSC2 6 RA4
1 34
A0 7 RB1 IRTX2 IRRX2
17 RA5
VT
8
IC3 RB0 33
2
A1
R4 RE0 RD7 30
14 330E 9 RE1 PIC16F877A RD6 29 R7
3 D IN 28
R9
A2 10 RE2 RD5 100E
27 10K
15 RD4
4 13 RC0 26
A3 D11 RC7
IC2 16 RC1 25
RC6
5 17 24
A4 RC2 RC5
HT12D 12
18 RC4 23
D10 RC3
6 22
A5 19 RD0 RD3
20 RD2 21 R10
7 11 RD1 330E
A6 D9 VSS VSS OSC1 OSC2
8 31 12 13 14 TP6 R11
A7
10 XTAL1 330E
D8 TP4
9 C5
GND TP3 C4
22p 22p LED3 LED4
RIGHT LEFT
BATT.2 GND
LED2
12V M2 TP5
10
15

C3 POWER
2
7

100RPM 11
S5 0.1u R5
IN1
IN2
IN3
IN4
ON/OFF

GND
11
OUT3

D1 2 330E
VREF

8 OUT3 OUT2 7
8

1N4007 IN3 IN2


7805
14
OUT4

9 6 VR2
TP8
16

1
VCC

IC4 3
IN3
IC5 IN2 10K
IC6 10 5
LM324
OUT2

L293D IN4 IN1


6
EN1
1

12 3

XTAL1= 4MHz TP1 13 IN4 IN1 2


OUT1
EN2

S6 = TACTILE SWITCH
9

VR1
GND
GND
GND
GND

14 OUT4 OUT1 1
VCC 10K
TP0−TP8 = TEST POINT
M1 4
M1−M2 = 12V DC GEARED MOTOR
13
12

TP0
5
4

100RPM TP7

Fig. 3: Circuit of robot

5HJXODWRU ,& SURYLGHV 9 UHJX- responding to the data received from Working of the system is simple.
ODWHG VXSSO\ 9 EDWWHU\ VXSSO\ LV the transmitter and obstacle detection The robot is in manual mode by
GLUHFWO\ FRQQHFWHG WR SLQ  RI PRWRU system. GHIDXOW ,Q PDQXDO PRGH LW FDQ EH
driver IC6. Two IR transmitter-receiver directed by the remote. For each direc-
pairs are used for obstacle detection. Test Points of Receiver tion there is a dedicated button on the
3UHVHWV 95 DQG 95 DUH XVHG WR VHW remote. When the robot encounters
Test point Details
the reference voltage for the two op- DQ\REVWDFOHLWVWRSVPRYLQJIRUZDUG
HUDWLRQDODPSOLÀHUVLQ,& TP0 Ground (GND) 7KH URERW ZLOO KRZHYHU EH DEOH WR
When the robot reaches close to TP1 5V move in the rest of the directions.
DQ REVWDFOH WKH UHÁHFWHG ,5 EHDP LV TP2 Reset To make the robot work in auto-
GHWHFWHG9ROWDJHDWWKHLQYHUWLQJSLQV TP3 Input for pin 2 of IC6 PDWLFPRGHSUHVV6DQG6VLPXOWD-
RI RSHUDWLRQDO DPSOLÀHUV JRHV ORZHU TP4 Input for pin 7 of IC6 QHRXVO\,QDXWRPDWLFPRGHWKHURERW
than the reference voltage and their TP5 Input for pin10 of IC6 will move in forward direction. If it
outputs go high. The same is indicated TP6 Input for pin 15 of IC6 HQFRXQWHUV DQ\ REVWDFOH LW ZLOO VWRS
E\/('DQG/('2XWSXWSLQVDQG TP7 Reference voltage for obstacle 7R DYRLG WKH REVWDFOH WKH URERW ZLOO
 RI ,& DUH FRQQHFWHG WR SLQV 5& detection DXWRPDWLFDOO\PRYHDOLWWOHEDFNWXUQ
DQG 5& RI PLFURFRQWUROOHU ,& 7KH TP8 Reference voltage for obstacle WR WKH ULJKW E\  GHJUHHV PRYH IRU-
detection
microcontroller controls the motor cor- ZDUGWKHQWXUQOHIW$IWHUWKHREVWDFOH

WWW.EFYMAG.COM ELECTRONICS FOR YOU | MARCH 2013 97


CONSTRUCTION

Fig. 4: Actual-size, single-side PCB for the


remote

Fig. 6: Actual-size, single-side PCB for the robot

Fig. 5: Component layout for the PCB in Fig. 4

LV DYRLGHG WKH URERW ZLOO FRQWLQXH


moving forward.
7R WXUQ RII WKH DXWRPDWLF PRGH
SUHVV 6 DQG 6 VLPXOWDQHRXVO\ 7KLV
DOJRULWKP FDQ EH IXUWKHU UHÀQHG IRU
different applications.
Software. The source code for
the robot is written in ‘C’ language Fig. 7: Component layout for the PCB in Fig. 6
DQG FRPSLOHG XVLQJ 03/$% ,'(
It is designed to run on Windows. connectors are provided on both the correct power supply to the robot at
Source program ‘pic_rf.c’ is used for 3&%VWRLQWHUIDFHPRWRUV5)PRGXOHV 73ZLWK UHVSHFW WR 733URSHU UHVHW
the microcontroller. The program is and power supplies. WR WKH PLFURFRQWUROOHU FDQ EH YHULÀHG
well commented and easy to under- Testing of remote section. Check at TP2. Press any switch and check
VWDQG 7KH SLFBUIF ÀOH LV FRQYHUWHG the correct input supply at TP1 with ZKHWKHU/('LVJORZLQJRUQRW&KHFN
into hex code using the MPLAB UHVSHFW WR 73 3UHVV DQ\ VZLWFK DQG WKHYROWDJHDW737373DQG73
compiler. The hex code is burnt into monitor the changes at TP2 using an WRFRQÀUPZKHWKHUFRUUHFWDFWLRQVDUH
the microcontroller using a suitable oscilloscope. initiated by the microcontroller after
programmer. Testing of robot section. 9HULI\ UHFHLYLQJ WKH FRGH /(' DQG /('
will glow if any obstacle comes in
Construction and testing front of the robot. Reference voltage
EFY Note
$Q DFWXDOVL]H VLQJOHVLGH 3&% IRU for the obstacle detection system can
The source code of this project is
WKH UHPRWH LV VKRZQ LQ )LJ  DQG LWV EH FKHFNHG DQG DGMXVWHG DW 73 DQG
included in this month’s EFY DVD
component layout in Fig. 5. PCB for 73z
and is also available for free down-
the robot is shown in Fig. 6 and its The author is a BE in electronics and telecommu-
load on www.efymag.com website.
FRPSRQHQW OD\RXW LQ )LJ  6XLWDEOH nication from RGPV University, Gwalior

98 MARCH 2013 | ELECTRONICS FOR YOU WWW.EFYMAG.COM

Das könnte Ihnen auch gefallen