Você está na página 1de 3

do-it-yourself

Wireless Gesture-Controlled Robot

n this project we are going to control a robot wirelessly using hand


gestures. This is an easy, userfriendly way to interact with robotic

systems and robots. An accelerometer


is used to detect the tilting position
of your hand, and a microcontroller
gets different analogue values and
generates command signals to control
the robot. This concept can be implemented in a robotic arm used for
welding or handling hazardous
materials, such as in nuclear
plants. The authors prototype
is shown in Fig. 1.

mar

Nitin Ku

Circuit and working


The block diagram of the wireless gesture-controlled robot
is shown in Fig. 2. The circuit
diagram of the transmitter section of the wireless gesturecontrolled robot is shown in Fig.
3 and of the receiver section in
Fig. 4.
ATmega328. ATmega328 is
Fig. 1: Authors prototype
a single-chip microcontroller from
ACCELERO
MICRO
433MHz
ENCODER
Atmel and belongs
METER
CONTROLLER
TRANSMITTER
HT12E
ADXL335
ATMEGA 328
MODULE
to the mega AVR
series. The Atmel
(A) : TRANSMITTER
8-bit AVR RISC
433MHz
MOTOR
based microconDECODER
RECEIVER
DRIVER
HT12D
troller combines
MODULE
L293D
32kB ISP Flash
(B) : RECEIVER
memory with readFig. 2: Block diagram of the wireless gesture-controlled robot
while-write capa1

IC1
7805

R2
10K

AVcc

20

AVREF

21

PD0/RXD

PC5/SCL

28

PD1/TXD

PC4/SDA

27

PD2

PC3

26

PD3

PC2

25

PB6/XTAL1

PC0

23

10

PB7/XTAL2

PB5/SCK

19

PD5

PB4/MISO

18

PD6

PB3/MOSI

17

PD7

PB2

16

PB1

15

AGND

22

C3
0.1u

C4
0.33u

R1
1M

11
12

CON1
9V PP3
BATT.1

X TAL1
16MHz
C1
22p

C2
22p

PC6/RESET

IC2

LM111733
2

13
14
8

PB0
GND

16

18
Vcc
A0

DOUT
A1

14

5V
GND

13
Y
X

12

CON2
ADXL335

TE
AD11

A2

IC4
HT12E

A3
A4

AD10
A5

11

10

AD9

A6
A7

AD8
GND

Fig. 3: Transmitter section of the wireless gesture-controlled robot


January 2015 | Electronics For You

15

OSC2 OSC1
17

TP0

78

R3
750K
3

IC3

C5
10u
6 PD4ATMEGA328PC1 24 TP2
16V
5

S1
POWER
ON/OFF

Vcc

GND

1
2
3
4
5
6
7
8
9

bilities, 1kB EEPROM, 2kB SRAM,


23 general-purpose I/O lines, 32
general-purpose working registers,
three flexible timers/counters with
compare modes, internal and external interrupts, serial programmable
USART, a byte-oriented 2-wire serial
interface, SPI serial port, 10-bit A/D
converter, programmable watch-dog
timer with an internal oscillator and
five software-selectable power-saving
modes.
The device operates between 1.8
and 5.5 volts. It achieves throughputs
approaching one MIPS per MHz.
An alternative to ATmega328 is ATmega328p.
ADXL335. This is a complete
three-axis acceleration measurement system. ADXL335 has a minimum measurement range of 3g.
It contains a poly-silicon-surface
micro-machined sensor and signalconditioning circuitry to implement
open-loop acceleration measurement architecture. Output signals
are analogue voltages that are proportional to acceleration. The accelerometer can measure the
static acceleration of
TP1
ANT.1
gravity in tilt-sensing
TP3
applications as well as
dynamic acceleration
resulting from motion,
shock or vibration.
The sensor is a po1 2 3 4
ly-silicon-surface
miTX1
cro-machined
structure
433MHz
TRANSMITTER
built on top of a siliMODULE
con wafer. Poly-silicon
springs suspend the
structure over the surface of the wafer and
GND
DATA
Vcc
ANT

aquib javed khan

www.efymag.com

do-it-yourself

www.efymag.com

Vcc
DATA
DATA
GND

GND
Vcc

ANT
GND

ger on HT12D decoder further


enhances the application flexLEFT
RIGHT
RX1
TP5
ibility of 212 series of encoders.
433MHz RECEIVER
1
18
M1
M2
A0
ANT.2
Vcc
11
14
6
3
R8
MODULE
The HT12D also provides a
2
16
47K
OUT3
OUT4
OUT2
OUT1
A1
OSC1
15
4
GND
38kHz carrier for infra-red
IN4
3
15
10
5
A2
OSC2
GND
IC6
IN3
systems.
7
GND 12
IN2
4
17
L293D
A3
VT
5 6 7 8
1 2 3 4
2
13
Transmitter. The transmitGND
IC5
IN1
5
14
EN1
EN2
VCC2 VCC1
A4
DIN
ter
consists
of ATmega328 miHT12D
S2
8
16
1
9
6
13
GND
crocontroller
(IC2), ADXL335
A5
D11
POWER
ON/OFF
7
12
accelerometer,
HT12E enA6
D10
coder
(IC4)
and
433MHz RF
8
11
R4
R6
R7
R5
A7
D9
TP6
220E
CON3
220E
220E
220E
transmitter
module
(TX1).
9
10
GND
D8
4.5,1.5Ah
In
this
circuit,
two
analogue
TP4
BATT.2
LED4
LED2
LED3
LED1
outputs from ADXL335 pins
(x, y) are connected with
Fig. 4: Receiver section of the wireless gesture-controlled robot
input pins (23, 24) of the
microcontroller. Analogue signals are converted to
Parts List
Table I
digital signals through
Semiconductors:
Movement of Robot and Decoder Outputs the microcontroller.
IC1
- 7805, 5V regulator
IC2
- ATmega328 microcontroller
Robot
Input 1
Input 2
Input 3
Input 4
Digital outputs from
IC3
- LM1117-33, 3.3 voltage
(accelerometer) (D11)
(D10)
(D9)
(D8)
pins 16, 17, 18 and 19
regulator
IC4
- HT12E, 212 series encoder
Forward
(-Y)
0 1 0 1
of the microcontroller
IC5
- HT12D, 212 series decoder
are directly sent to
Backward (+Y)
1 0 1 0
IC6
- L293D, dual H-bridge motor
driver
pins 13, 12, 11 and 10
Right (+X) 1 0 0 1
LED1-LED4 - 5mm LED
of encoder IC4. This
Left (-X) 0 1 1 0
Resistors (all 1/4-watt, 5% carbon):
R1
- 1-mega-ohm
data is encoded and
R2
- 10-kilo-ohm
transmitted
via
RF module TX1.
amplitude
is
proportional
to
acceleraR3
- 750-kilo-ohm
Receiver.
The
receiver part contion.
Phase-sensitive
demodulation
R4-R7
- 220-ohm
R8
- 47-kilo-ohm
techniques are then used to deter- sists of 433MHz RF receiver module
Capacitors:
mine the magnitude and direction of (RX1), HT12D decoder (IC5) and
C1, C2
- 22pF ceramic disk
C3
- 0.1F ceramic disk
L293D motor driver (IC6) to run the
the acceleration.
C4
- 0.33F ceramic disk
motors. Here, receiver module RX1
L293D.
This
is
a
16-pin
DIP
packC5
- 10F, 16V electrolytic
receives the transmitted signal, which
age
motor
driver
IC
(IC6)
having
four
Miscellaneous:
CON1, CON3 - 2-pin connector
input pins and four output pins. All is decoded by decoder IC to get the
CON2
- 6-pin connector
four input pins are connected to out- same digital outputs. Four outputs
- 16MHz crystal
XTAL1
TX1
- 433MHz transmitter module
put pins of the decoder IC (IC5) and of IC6 drive two motors. The robot
RX1
- 433MHz receiver module
moves as per tilt direction of the acthe four output pins are connected to
M1, M2
- DC-geared motor, 100rpm
S1, S2
- On/off switch
DC motors of the robot. Enable pins celerometer in the transmitter. The
Batt.1
- 9V PP3 battery
are used to enable input/output pins direction of the robot movement is as
Batt.2
- 4.5V, 1.5Ah lead-acid battery
ANT.1, ANT.2 - 17cm long single-strand wire
per logic listed in Table I.
on both sides of IC6.
antenna
Encoder
(HT12E)
and
decoder

- ADXL335 3-axis
(HT12D) ICs. The 212 encoders are Software program
accelerometer
a series of CMOS LSIs for remote- The software program is written in
provide resistance against accelera- control system applications. These Arduino programming language.
are capable of encoding information We programmed a fresh ATmega328
tion forces. Deflection of the structure
is measured using a differential ca- that consists of N address bits and microcontroller with the help of Arpacitor that consists of independent 12 N data bits. Each address/data duino IDE 1.0.5 and an Arduino Uno
fixed plates and plates attached to input can be set to one of two logic board.
states. Programmed addresses/data
First, we have to load bootloader
the moving mass.
Fixed plates are driven by 180 are transmitted together with header code into the microcontroller. For
out-of-phase square waves. Accel- bits via an RF or infra-red transmis- that, we used Arduino Uno for in-syseration deflects the moving mass and sion medium upon receipt of a trigger tem programming (ISP) given in the
unbalances the differential capacitor, signal. The capability to select a TE IDE, by selecting File Examples
resulting in a sensor output whose trigger on HT12E or a data (DIN) trig- Arduino ISP. Once the bootloader
Electronics For You | January 2015

79

do-it-yourself

Fig. 5: An actual-size PCB layout of the transmitter circuit

Fig. 7: An actual-size PCB layout of the receiver circuit

Fig. 6: Component layout of the transmitter circuit

Fig. 8: Component layout of the receiver circuit

Table II

Test Points
Test point

Details

TP0

0V (GND)

TP1 5V
TP2 3.3V
TP3

Train of pulses

TP4

0V (GND)

TP5 4.5V
TP6

Train of pulses

efy Note
The source code of this project is
included in this months EFY DVD
and is also available for free download at source.efymag.com

is uploaded into the microcontroller,


gesture.ino code of this project can be
uploaded.

Construction and testing


An actual-size, single-side PCB layout
of the transmitter circuit is shown
in Fig. 5 and its component layout
80

January 2015 | Electronics For You

in Fig. 6. An actual-size, single-side


PCB layout of the receiver circuit is
shown in Fig. 7 and its component
layout in Fig. 8.
The transmitter section can be
held in your palm or on the other
side (refer Fig. 9). The receiver module is mounted on the robot.
Mount all components on the
PCBs shown here to minimise assembly errors. Fix the receiver PCB
and 4.5V battery on the chassis of
the robot. Fix two motors, along with
wheels, at the rear side of the robot
and a castor wheel on the front. After uploading the main code into the
microcontroller, remove it from the
Arduino Uno board and insert it into
the populated transmitter PCB.
Now, switch-on the power supplies in the transmitter as well as receiver circuits. Attach the transmitter
circuit to your hand and move your
hand forwards, backwards and sideways. Directions of the robot movement are given in Table I. The robot
will stop if you keep your palm hori-

Fig. 9: Transmitter module mounted on the back


of the palm

zontal, parallel to the Earths surface.


For troubleshooting, first verify
that voltages at various test points
are as per Table II.
Aquib Javed Khan is
pursuing B.Tech from
Orissa Engineering College,
Bhubaneswar. He is
interested in mechatronics
systems
www.efymag.com

Você também pode gostar