Académique Documents
Professionnel Documents
Culture Documents
I
mar
n this project we are going to con- of your hand, and a microcontroller Nitin Ku
trol a robot wirelessly using hand gets different analogue values and
gestures. This is an easy, user- generates command signals to control
friendly way to interact with robotic the robot. This concept can be imple-
mented in a robotic arm used for bilities, 1kB EEPROM, 2kB SRAM,
welding or handling hazardous 23 general-purpose I/O lines, 32
materials, such as in nuclear general-purpose working registers,
plants. The author’s prototype three flexible timers/counters with
is shown in Fig. 1. compare modes, internal and exter-
nal interrupts, serial programmable
Circuit and working USART, a byte-oriented 2-wire serial
The block diagram of the wire- interface, SPI serial port, 10-bit A/D
less gesture-controlled robot converter, programmable watch-dog
is shown in Fig. 2. The circuit timer with an internal oscillator and
diagram of the transmitter sec- five software-selectable power-saving
tion of the wireless gesture- modes.
controlled robot is shown in Fig. The device operates between 1.8
3 and of the receiver section in and 5.5 volts. It achieves throughputs
Fig. 4. approaching one MIPS per MHz.
Fig. 1: Author’s prototype ATmega328. ATmega328 is An alternative to ATmega328 is AT-
a single-chip mi- mega328p.
crocontroller from ADXL335. This is a complete
ACCELERO− MICRO− 433MHz
METER CONTROLLER ENCODER
TRANSMITTER
Atmel and belongs three-axis acceleration measure-
HT12E
ADXL335 ATMEGA 328 MODULE to the mega AVR ment system. ADXL335 has a mini-
(A) : TRANSMITTER series. The Atmel mum measurement range of ±3g.
8-bit AVR RISC It contains a poly-silicon-surface
433MHz
DECODER
MOTOR based microcon- micro-machined sensor and signal-
RECEIVER DRIVER
MODULE
HT12D troller combines conditioning circuitry to implement
L293D
(B) : RECEIVER
32kB ISP Flash open-loop acceleration measure-
memory with read- ment architecture. Output signals
Fig. 2: Block diagram of the wireless gesture-controlled robot while-write capa- are analogue voltages that are pro-
portional to accelera-
IC1 3
tion. The accelerom-
1
7805 eter can measure the
R2 LM1117−33
2
10K 7 20
R3
750K 15 16 18 TP1 ANT.1
static acceleration of
Vcc AVcc
1
PC6/RESET AVREF 21 2
IC3 3 OSC2 OSC1 Vcc 1 gravity in tilt-sensing
A0
C3
0.1u
C4
0.33u
2
3
PD0/RXD PC5/SCL 28
27
17
DOUT
2
TP3 applications as well as
PD1/TXD PC4/SDA A1
4 PD2 IC2 PC3 26
1
14
TE 3
dynamic acceleration
5V A2
C5
S1 5
PD3 PC2
10u
25 GND resulting from motion,
POWER 6 PD4ATMEGA328PC1 24 TP2 13
AD11 A3
4
16V IC4 shock or vibration.
DATA
ON/OFF
GND
ANT
R1 9 23
Vcc
PB6/XTAL1 PC0
Y HT12E 5
1M 10 PB7/XTAL2 PB5/SCK 19 X 12
AD10
A4
1 2 3 4 The sensor is a po-
11 18 CON2 6
12
PD5 PB4/MISO
17 ADXL335
A5
TX1
ly-silicon-surface mi-
PD6 PB3/MOSI 11 7
CON1
9V PP3
X TAL1 13
PD7 PB2 16 AD9 A6
433MHz cro-machined structure
14 15 8
BATT.1 16MHz
8
PB0 PB1
22 10
AD8
A7 TRANSMITTER built on top of a sili-
GND AGND MODULE
C1 C2 GND
9
con wafer. Poly-silicon
22p 22p GND
TP0 springs suspend the
structure over the sur-
Fig. 3: Transmitter section of the wireless gesture-controlled robot face of the wafer and
3 15
15
IN4 GND 4
38kHz carrier for infra-red
DATA
DATA
A2 OSC2 10 IC6 5
GND
GND
GND
GND
systems.
ANT
IN3
Vcc
Vcc
7 GND 12
4 17 IN2 L293D
1 2 3 4 5 6 7 8 A3
IC5
VT 2
IN1 GND 13 Transmitter. The transmit-
5
A4
HT12D DIN
14 VCC2 VCC1 EN1 EN2
ter consists of ATmega328 mi-
S2 8 16 1 9
POWER
GND 6
A5 D11
13 crocontroller (IC2), ADXL335
ON/OFF 7
A6 D10
12 accelerometer, HT12E en-
8 11 R4 R5 R6 R7
coder (IC4) and 433MHz RF
TP6 A7 D9
CON3
9 10
220E 220E 220E 220E transmitter module (TX1).
4.5,1.5Ah GND D8
BATT.2 TP4 In this circuit, two analogue
LED1 LED2 LED3 LED4
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 sig-
Parts List nals are converted to
Table I digital signals through
Semiconductors:
IC1 - 7805, 5V regulator
Movement of Robot and Decoder Outputs the microcontroller.
IC2 - ATmega328 microcontroller
IC3 - LM1117-33, 3.3 voltage
Robot Input 1 Input 2 Input 3 Input 4 Digital outputs from
regulator
(accelerometer) (D11) (D10) (D9) (D8) pins 16, 17, 18 and 19
IC4 - HT12E, 212 series encoder Forward (-Y) 0 1 0 1 of the microcontroller
IC5 - HT12D, 212 series decoder
IC6 - L293D, dual H-bridge motor Backward (+Y) 1 0 1 0 are directly sent to
driver Right (+X) 1 0 0 1 pins 13, 12, 11 and 10
LED1-LED4 - 5mm LED
Resistors (all 1/4-watt, ±5% carbon): Left (-X) 0 1 1 0 of encoder IC4. This
R1 - 1-mega-ohm data is encoded and
R2 - 10-kilo-ohm
R3 - 750-kilo-ohm
amplitude is proportional to accelera- transmitted via RF module TX1.
R4-R7 - 220-ohm tion. Phase-sensitive demodulation Receiver. The receiver part con-
R8 - 47-kilo-ohm techniques are then used to deter- sists of 433MHz RF receiver module
Capacitors:
C1, C2 - 22pF ceramic disk mine the magnitude and direction of (RX1), HT12D decoder (IC5) and
C3 - 0.1µF ceramic disk the acceleration. L293D motor driver (IC6) to run the
C4 - 0.33µF ceramic disk
C5 - 10µF, 16V electrolytic L293D. This is a 16-pin DIP pack- motors. Here, receiver module RX1
Miscellaneous: age motor driver IC (IC6) having four receives the transmitted signal, which
CON1, CON3 - 2-pin connector input pins and four output pins. All is decoded by decoder IC to get the
CON2 - 6-pin connector
XTAL1 - 16MHz crystal four input pins are connected to out- same digital outputs. Four outputs
TX1 - 433MHz transmitter module put pins of the decoder IC (IC5) and of IC6 drive two motors. The robot
RX1 - 433MHz receiver module
M1, M2 - DC-geared motor, 100rpm the four output pins are connected to moves as per tilt direction of the ac-
S1, S2 - On/off switch DC motors of the robot. Enable pins celerometer in the transmitter. The
Batt.1 - 9V PP3 battery
Batt.2 - 4.5V, 1.5Ah lead-acid battery are used to enable input/output pins direction of the robot movement is as
ANT.1, ANT.2 - 17cm long single-strand wire on both sides of IC6. per logic listed in Table I.
antenna
Encoder (HT12E) and decoder
(HT12D) ICs. The 212 encoders are Software program
- ADXL335 3-axis
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.
tion forces. Deflection of the structure are capable of encoding information We programmed a fresh ATmega328
is measured using a differential ca- that consists of N address bits and microcontroller with the help of Ar-
pacitor 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.
the moving mass. states. Programmed addresses/data First, we have to load bootloader
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-sys-
eration 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
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