Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 24

Wireless speaking and moving system for physically disable people by using hand gestures

CHAPTER3

INTRODUCTION TO ARDUINO

3.1 SYSTEM
A system is a way of functioning, assembling or doing one or many tasks according to a
predetermined plan, program, or set of regulations. A system is also an arrangement in which all
its units connect and work together according to the plan or prearranged rules.
Consider a watch. It is a time-example system. Its parts are its hardware, needles and
battery with the alluring dial, frame and belt. These parts organize to show the real time every
second and continuously update the time every second.

3.2 EMBEDDED SYSTEMS


An embedded system is a system that has embedded software and computer hardware,
which makes it a system committed for a relevance or special part of an application part of a
bigger system. It can also be defined as “An Embedded System is a combination of computer
hardware and software, and perchance additionally mechanical parts or other parts, designed to
perform a special function”. A best example is a microwave oven. Almost every household has
one, and tens of billions of the embedded systems which are used every day, but very few people
realize that a processor and software were involved in their daily routine. Frequently, an
embedded system is an integral within some bigger system.
For example, present day cars and trucks contain many systems which involve embedded
process as their system. One embedded system controls the anti-lock brakes, other monitors and
controls the automobile outrush and a third displays information on the indicator panel. In some
cases, some sort of a communication network connected to these embedded systems, but that is
certainly not a fulfillment.

Department of ECE, SPEC Page 1


Wireless speaking and moving system for physically disable people by using hand gestures

Fig 3.1: Components of embedded system hardware.

An embedded system is a system that has three main components embedded into it:
1. It embeds hardware identical to a computer. Figure 3.1 shows the sections in the
hardware of an embedded system. As its software normally embeds in the ROM or flash
memory, it usually does not need a secondary hard disk or a CD memory as in a computer.

2. It embeds main application software. The application software may coincidently perform a
sequence of functions or processes or quests.

3. It embeds a real-time operating system [RTOS] that direct the application software running
on hardware and give standardize access to a resource according to the priorities of functions
in the system. It provides a procedure to let the processor run a process as programmable and
position-switch between the various processes.
Languages used in embedded systems are assembly language, embedded C language,
embedded java language.
Embedded systems are classified into three types
1. Small scale embedded systems.
2. Medium scale embedded systems.

3. Sophisticated embedded systems.

Department of ECE, SPEC Page 2


Wireless speaking and moving system for physically disable people by using hand gestures

3.2.1 Small scale embedded systems


Small scale embedded system are of 8 bit or 16 bit microprocessor. Languages used in
small scale were assembly level language and embedded C. Its cost and performance are low
compared to medium and sophisticated embedded systems.
3.2.2 Medium scale embedded systems
Medium scale embedded system are of 16 bit or 32 bit microprocessors. Languages used
in medium scale were embedded C and embedded java. Its cost and performance are better than
small scale embedded systems.
3.2.3 Sophisticated embedded systems
Sophisticated scale embedded systems are highly complex. Languages used in
sophisticated scale were RTOS. Its cost and performance are high when compared to small scale
and medium scale embedded systems.
An embedded system processor chip can be any one of the following:
1. General Purpose Processor

2. Application specific Instruction-set processor

3. Single purpose processor

4. Application specific system processor

5. Multicore processor or Multiprocessor

3.3 EMBEDDED SYSTEM ARCHITECTURE


Every embedded system consists of custom-built hardware built around a Central
Processing Unit (CPU). This hardware also contains memory chips onto which the software is
loaded. The software residing on the memory chip is also called the ‘firmware’. The embedded
system architecture can be represented as a layered architecture.

The figure 3.2 shows about the embedded system architecture in which the operating
software is embedded in hardware.

Department of ECE, SPEC Page 3


Wireless speaking and moving system for physically disable people by using hand gestures

Figure 3.2: Embedded system architecture.

An expansion of the embedded systems architectural structures is used to introduce the technical
concepts and fundamentals of an embedded device. The architecture of embedded systems shows
that all of them have a minimum one layer or all layers into which all the supplements fall. The
hardware layer consists of all the physical units placed on an embedded board. For small
appliances such as remote control units, air conditioners, toys etc., there is no need for an
operating system and you can write only the software specific to that application.

For applications involving complex processing, it is advisable to have an operating system. In


such a case, you need to integrate the application software with the operating system and then
transfer the entire software on to the memory chip. Once the software is transferred to the
memory chip, the software will continue to run for a long time you don’t need to reload new
software.

The layered approach allows readers to understand the parts of an embedded system and their
relationship internally. The hardware will acts like a base around the microprocessor or
microcontroller. The embedded system software is to do a particular task.

Now, let us see the details of the various building sections of the hardware of an embedded
system. As shown in Figure 3.3 the building sections are:

1. Central Processing Unit (CPU).

2. Memory (Read-only Memory and Random Access Memory).

Department of ECE, SPEC Page 4


Wireless speaking and moving system for physically disable people by using hand gestures

3. Input Devices.

4. Output devices.

5. Communication interfaces.

6. Application-specific circuitry.

Figure 3.3: Hardware architecture of an embedded system

The figure 3.3 shows the hardware architecture of the embedded system with input, outputs and
communication interferences. The CPU acts as an interface between input and the output
devices. It also consists of RAM and ROM memories, which will store the temporary and
permanent data respectively. Communication system acts as an interface between CPU and the
other systems. Application specific systems, they are the one that are used for special purposes
like water level sensor.

3.3.1Central processing unit (CPU)

The Central Processing unit or simply it can be called as a processor which is used in an
embedded system can be a microcontroller, microprocessor or DSP. A micro-controller is a low- cost

Department of ECE, SPEC Page 5


Wireless speaking and moving system for physically disable people by using hand gestures

processor. Its appeal is that it is the chip itself, and addition to it there will be many other units such as
memory, serial communication interface, ADC etc

For small operations, a micro-controller is best as the number of external units required is less.
On the other hand, microprocessors are very powerful, but many external components must be
used along with them. DSP is used mainly for applications in which signal processing is involved
such as audio, video and image processing.

3.3.2Memory

According to the storage type, the memories are classified as two types. They are
Random Access Memory (RAM) and Read Only Memory (ROM). If the power is switched off
to the chip the contents in the RAM will get erased. Whereas in the ROM the contents of the
memory will never be erase even if the power is switched off to the chip. The processor reads the
information from the ROM when the power is switched on again, then the program can be
executed.

3.3.3Input devices
Contrary to the desktops, the input devices in an embedded system have very limited
effectiveness. As there is neither keyboard nor a mouse, and hence collaborating with the
embedded system is not an easy task for a user. Several embedded systems will have a small
keypad when you press one key it gives a specialized command. A keypad may be used as input
for the display of digits, alphabets. As there is no input connection directly to the system, thus the
hardware in the embedded systems takes inputs from the sensors or transducers and produce
electrical signals that in turn fed to the other systems.
3.3.4Output devices
As like the input devices the output devices of the embedded systems are also having
very limited effectiveness. A few embedded systems will have a Light Emitting Diodes (LEDs)
to represent the current status of the system, or for optical expression of alarms. A small Liquid
Crystal Display (LCD) may also be used as an important parameter in the displaying the elements

Department of ECE, SPEC Page 6


Wireless speaking and moving system for physically disable people by using hand gestures

3.3.5Communication interfaces

The embedded systems must interact with the other embedded systems as they have to
transmit data from one desktop to other desktop. To simplify this problem, the embedded
systems are provided with some communication interfaces like Serial Peripheral Interface (SPI),
RS232, RS422, RS485, Universal Serial Bus (USB), IEEE 1394 and Ethernet to access with the
other desktop or users.

3.3.6Application specific circuitry

Sensors, transducers, special processing and control circuitry may be required for an
embedded system, depending on its application. This circuitry interacts with the processor to
carry out the necessary work. The entire hardware has to be given power supply either through
the 230 volts main supply or through a battery’

The figure 3.4 shows the application specific circuits of an embedded system. It consists of
wireless as well as wired communication networks. Even ADC, Lasers, Signal conditioners are
also the components of application specific circuitry of an embedded systems .Embedded
Systems plays a key role in our life. They are used as household appliances in microwave oven,
as well as in satellite applications

Department of ECE, SPEC Page 7


Wireless speaking and moving system for physically disable people by using hand gestures

Figure 3.4 Application specific circuits of embedded systems

3.4 ARDUINO UNO

The Arduino Uno is microcontroller board based on the ATmega328. It has 14digital pins, 6
analog pins, a 16 MHZ crystal oscillator, a USB connection, a power jack, an ICSP header, and a
reset button. It contains everything needed to support the microcontroller, simply connect it to a
computer with a USB cable or power it with a AC-to-DC adapter or battery to get started . The
Uno differs from all preceding boards in that it does not use the FTDI USB-TO serial driver chip.
it features the ATmega8U2 programmed as a USB-to-serial converter.

Uno means one in Italian and is named to mark the upcoming release of Arduino 1.0. The
Uno and version 1.0 will be the reference version of Arduino, moving forward. The Uno is the
latest in a series of USB Arduino boards, and the reference for the Arduino platform.

Department of ECE, SPEC Page 8


Wireless speaking and moving system for physically disable people by using hand gestures

3.5TECHNICAL SPECIFICATION

Microcontroller ATmega328
Operating Voltage 5V
Input Voltage 7-12V
Digital I/O pins 14
Analog input pins 6
DC Current per I/O pins 40mA
DC Current for 3.3V pin 50mA
Flash Memory 32KB of which 0.5 KB used by
bootloader
SRAM 2KB
EEPROM 1KB
Clock speed 16MHZ

Figure3.5 Arduino Uno technical diagram

Department of ECE, SPEC Page 9


Wireless speaking and moving system for physically disable people by using hand gestures

3.6POWER

The Arduino Uno powered via the USB connection or with an external power supply. The
power source is selected automatically.

External power can come either from an AC-to-DC adapter or battery. The adapter can be
connected by plugging a 2.1mm center-positive plug into the board’s power jack .Leads from a
battery can be interested in the Gnd and Vin pin headers of the POWER connector.

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V,
however, the 5V pin may supply less than five volts and the board may be unstable. If using
more than 12V, the voltage regulator may overheat and damage the board. The recommended
range is 7 to 12volts.

The power pins are

 VIN. The input voltage to the Arduino board when it’s using an external power source.
we can supply voltage via the power jack, access it through this pin.
 5V. the regulated power supply used to power the microcontroller and other components
on board. This can come either from Vin via an on-board regulator, or be supplied by
USB or another regulated 5V supply.
 3.3V. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is
50mA.
 GND. Ground pins

3.7MEMORY
The ATmega328 has 32KB of flash memory for storing code. It has also 2KB of SRAM
and 1KB of EEPROM
3.8INPUT AND OUTPUT
Each of the 14 digital pins on the Uno can be used as an input or output, using pinmode(),
digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or
receive a maximum if 40mA and has an internal pull-up resistor of 20-50 kOhms.some pins have
specialized functions.

Department of ECE, SPEC Page 10


Wireless speaking and moving system for physically disable people by using hand gestures

 Serial: 0(RX) AND 1(TX). Used to receive (RX) and transmit(TX) TTL serial data.
these pins are connected to the corresponding pins of the ATmega328 USB-to-TTL Serial
chip.
 External interrupts: 2 and 3. these pins can be configured to trigger an interrupt on
allow value, a rising or falling edge or a change in the value.
 PWM.3, 5, 6, 9, 10 and 11. Provide 8-bit PWM output with the analogWrite() function
 SPI: 10 (SS), 11(MOSI), 12(MISO), 13(SCK). These pins support SPI communication,
which, although provided by underlying hardware, is not currently included in the
Arduino language.
 LED: 13.There is a built-in LED connected to digital pin 13. When the pin is HIGH
value, the LED is on, When the pin is LOW, it’s off.
The Uno has 6 analog inputs, each of which provide 10 bits of resolution. By default the
measure from ground to 5 volts, through is it possible to change the upper end of their range
using the AREF pin. Additionally some pins have specialized functionality.
 I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the wire library

There are a couple of other pins on the board:


 AREF: Reference voltage for the analog inputs.
 Reset: Bring this line LOW to reset the microcontroller. Typically used to add a reset
button to shields which block the one on the board.

Department of ECE, SPEC Page 11


Wireless speaking and moving system for physically disable people by using hand gestures

CHAPTER4
MODULES AND COMPONENTS
4.1RF TRANSMITTER AND RECEIVER MODULE
This radio frequency (RF) transmission system employs Amplitude Shift Keying (ASK)
with transmitter/receiver (Tx/Rx) pair operating at 434KHZ. The transmitter module take serial
input and transmits these signal through RF. The transmitter signals are received by receiver
module placed away from the source of transmission
The system allows one way of communication between two nodes, namely, transmission
and reception. The RF module has been used in conjunction with a set of four channel
encoder/decoder ICs. Here HT12E & HT12D have been used as encoder and decoder
respectively. The encoder converts the parallel inputs into serial set of signals. These signals are
serially transferred through RF to the reception point. The decoder is used after the RF receiver
to decode the serial format and receive the original signals as outputs. These outputs can be
observed on corresponding LEDs.

Figure4.1RF Tx and Rx block diagram

Department of ECE, SPEC Page 12


Wireless speaking and moving system for physically disable people by using hand gestures

Encoder IC (HT12E) receives parallel data in the form of address bits and control bits.
The control signals from remote switches along with 8 address bits constitute a set of 12 parallel
signals. The encoder HT12E encodes these parallel signals into serial bits. Transmission is
enable by providing ground to pin 14 which is active low. The control signals are given at pins
10-13 of HT12E. the serial data is fed to the RF transmitter through pin 17 of HT12E.

Figure4.2HT12E block diagram

Department of ECE, SPEC Page 13


Wireless speaking and moving system for physically disable people by using hand gestures

Transmitter, upon receiving serial data from encoder IC (HT12E), transmits it wirelessly
to the RF receiver. The receiver, upon receiving these signals, sends them to the decoder
IC(HT12D) through pin2. The serial data is received at the data pin (DIN, pin14) of HT12D. The
decoder then retrieves the original parallel format from the received serial data.

Figure4.3HT12D block diagram

Department of ECE, SPEC Page 14


Wireless speaking and moving system for physically disable people by using hand gestures

When no signal is received at data pin of HT12D, it remains in standby mode and
consumes very less current for a voltage of 5V. When signal is received by receiver, it is given to
DIN pin(pin14) of HT12D. on reception of signal, oscillator of HT12D gets activated. IC
HT12D, then decodes the serial data and checks the address bits three times. If these bits match
with the local address pins (pins 1-8) of HT12D, then it puts the data bits on its data pins (pin 10-
13) and makes the VT pin high. An LED is connected to VT pin (pin17) of the decoder. This
LED works as an indicator to indicate a valid transmission. The corresponding output is thus
generated at the data pins of decoder IC.
A signal is sent by lowering any or all the pins 10-13 of HT12E and corresponding signal
is received at receiver’s end. Address bits are configured by using the first 8 pins of both encoder
and decoder ICs. To send a particular signal, address bits be same at encoder and decoder Ics. By
configuring the address bits properly, a single RF transmitter can also be used to control different
RF receivers of same frequency.
To summarize, on each transmission, 12 bits of data is transmitted consisting of 8 address
bits and 4 data bits. The signal is received at receiver’s end which is then fed into used to drive
the LEDs. The outputs from this system can either be used in negative logic or NOT gates can be
incorporated at data pins.

Department of ECE, SPEC Page 15


Wireless speaking and moving system for physically disable people by using hand gestures

Figure4.4RF Tx and Rx circuit diagram

Department of ECE, SPEC Page 16


Wireless speaking and moving system for physically disable people by using hand gestures

4.1.1HT12D DECODER

Figure4.5HT12D Decoder
HT12D IC comes from HolTek company. HT12D is a decoder integrated circuit that
belongs to 2 series of decoders. This series of decoders are mainly used for remote control
system applications, like burglar alarm, car door controller, security system etc. it is mainly
provided to interface RF and infrared circuits. They are paired with 2 series of encoders. The
chosen pair of encoder/decoder should have same number of address and data format.
In simple terms, HT12D converts the serial input into outputs. It decodes the serial
address and data received by, say, an RF receiver, into parallel data and sends them to output
data pins. The serial input data is compared with the local address three times continuously. The
input data code is decoded when no error or unmatched codes are found. A valid transmission in
indicated by a high signal at VT pin.
HT12D is capable of decoding 12 bits, of which 8 are address bits and 4 are data bits. The
data on 4bits latch type output pins remain unchanged until new is received.

Department of ECE, SPEC Page 17


Wireless speaking and moving system for physically disable people by using hand gestures

Figure4.6HT12D Pin Diagram

4.1.2HT12E ENCODER

figure4.7HT12E Encoder
HT12E is an encoder integrated circuit of 212 series of encoders. They are paired with
212 series of decoders for use in remote control system applications. It is mainly used in
interfacing RF and infrared circuits. The chosen pair of encoder/decoder should have same
number of addresses and data format.
Simply put, HT12E converts the parallel inputs into serial output. It encodes the 12 bit
parallel data into serial for transmission through an RF transmitter. These 12 bits are divided into
8 address bits and 4 data bits.
HT12E has a transmission enable pin which is active low. When a trigger signal is
received on TE pin, the programmed addresses/data are transmitted together with the header bits
via an RF or an infrared transmission medium. HT12E begins a 4-word transmission cycle upon
receipt of a transmission enable. This cycle is repeated as long as TE is kept low. As soon as TE

Department of ECE, SPEC Page 18


Wireless speaking and moving system for physically disable people by using hand gestures

returns to high, the encoder output completes its final cycle and then stops.

figure4.8HT12E Pin Diagram

4.2RF MODULES (434MHz)

Figure4.9RFmodules
The RF module, as the name suggests, operates at Radio Frequency. The corresponding
frequency range varies between 30 kHz & 300 GHz. In this RF system, the digital data is
represented as variations in the amplitude of carrier wave. This kind of modulation is known as
Amplitude Shift Keying (ASK).
Transmission through RF is better than IR (infrared) because of many reasons. Firstly,
signals through RF can travel through larger distances making it suitable for long range
applications. Also, while IR mostly operates in line-of-sight mode, RF signals can travel even
when there is an obstruction between transmitter & receiver. Next, RF transmission is more

Department of ECE, SPEC Page 19


Wireless speaking and moving system for physically disable people by using hand gestures

strong and reliable than IR transmission. RF communication uses a specific frequency unlike IR
signals which are affected by other IR emitting sources.
This RF module comprises of an RF Transmitter and an RF Receiver. The
transmitter/receiver (Tx/Rx) pair operates at a frequency of 434MHz. An RF transmitter receives
serial data and transmits it wirelessly through RF through its antenna connected at pin4. The
transmission occurs at the rate of 1Kbps - 10Kbps.The transmitted data is received by an RF
receiver operating at the same frequency as that of the transmitter.
The RF module is often used along with a pair of encoder/decoder. The encoder is used
for encoding parallel data for transmission feed while reception is decoded by a decoder.
HT12E-HT12D, HT640-HT648, etc. are some commonly used encoder/decoder pair ICs.

Department of ECE, SPEC Page 20


Wireless speaking and moving system for physically disable people by using hand gestures

4.3ISD1820 Voice Recorder


Voice Record Module is base on ISD1820, which a multiple‐message record/playback
device. It can offers true single‐chip voice recording, no‐volatile storage, and playback capability
for 8 to 20 seconds. The sample is 3.2k and the total 20s for the Recorder.
This module use is very easy which you could direct control by push button on board or
by Microcontroller such as Arduino, STM32, Chip Kit etc. Frome these, you can easy control
record, playback and repeat and so on.
4.3.1 FEATURES
 Push‐button interface, playback can be edge or level activated
 Automatic power‐down mode
 On‐chip 8Ω speaker driver
 Signal 3V Power Supply
 Can be controlled both manually or by MCU
 Sample rate and duration changable by replacing a single resistor
 Record up to 20 seconds of audio
 Dimensions: 37 x 54 mm
4.3.2APPLICATIONS

Figure typical schematic diagram

Department of ECE, SPEC Page 21


Wireless speaking and moving system for physically disable people by using hand gestures

If you want change record duration, an external resistor is necessary to select the record
duration and sampling frequency, which can range from 8 – 20 seconds (4‐12kHz sampling
frequency). The Voice Record Module of our provide default connect 100k resistor by short cap.
So the default record duration is 10s.

FigureISD1820 Recording module


1. VCC– 3.3V power supply
2. GND– Power ground
3. REC – The REC input is an active‐HIGH record signal. The module starts recording
whenever REC is HIGH. This pin must remain HIGH for the duration of the recording. REC
takes precedence over either playback(PLAYL or PLAYE) signal.
4. PLAYE – Playback, Edge‐activated: When a HIGH‐going transition is detected on continues
until an End‐of‐Message (EOM) marker is encountered or the end of the memory space is
reached.

Department of ECE, SPEC Page 22


Wireless speaking and moving system for physically disable people by using hand gestures

5. PLAYL – Playback, Level‐activated, when this input pin level transits for LOW to HIGH, a
playback cycle is initiated.
6. Speaker Outputs – The SP+ and SP‐ pins provide direct drive for loudspeakers with
impedances as low as 8Ω.
7. MIC – Microphone Input, the microphone input transfers its signals to the on‐chip
preamplifier.
8. FT – Feed Through: This mode enable the Microphone to drive the speaker directly.
9. P‐E – Play the records endlessly.
Record Operate Guide
1. Push REC button then the RECLED will light and keep push until record end.
2. Release the REC button
3. Select Playback mode: PLAYE, just need push one time, and will playback all of the record or
power down ; PLAYL, you need always push this button until you want to stop playback record
or end ; When short P‐E jumper the record will playback time a time until jumper off or power
down
4. FT mode, when short FT jumper, that means all of you speak to MIC will direct playback to
Speaker.
4.3.3POWER AMPLIFIER
If you want extern power amplifier circuit to Speakers, you can use LM386, D2283,
D2322, TA7368, MC34119 etc amplifier IC. Note, SP+ or SP‐ is you do not want to use, must
vacant, do not connect to GND. Used LM386 power amplifier circuit as

Department of ECE, SPEC Page 23


Wireless speaking and moving system for physically disable people by using hand gestures

Department of ECE, SPEC Page 24

You might also like