You are on page 1of 89

Is prepared and submitted by:

1- Ayat Ayoob Ahmed. 156068


2- Muna Khalil Youssef. 156054
3- Haneen Showqi Mahmood. 156059

Supervisor:
Dr. Awad Bawazir

Academic Year 2019-2020


CERTIFICATE

This is to certify that this project entitled:

Hand Gesture
Controlled Car

Is prepared and submitted by:

1- Ayat Ayoob Ahmed Wali. 156068


2- 2.Mona Khalil Youssef. 156054
3- Haneen Showqi Mahmoud. 156059

as a partial of fulfillment of requirement to the award of " Bachelor Degree in Electronics and
Communications Engineering final year students have ended graduation project work of faculty
of Engineering, is an authentic record of bona fide work carried out by them under our
supervision and guidance.

supervision and guidance

Dr. Awad Bawazir

Sing: Date:

ii
AKNOWLEDGEMENTS

First of all, we would like to thank Allah Almighty for giving me the courage, empowering us
with knowledge and confidence to fulfill this project. We like to express our deep gratitude to our
supervisor and guidance Dr. Awad Bawzir , Associate Professor for his supervision and constant
support. His constructive comments and suggestions throughout the thesis played a vital role in
fulfilling this project. We are really grateful for his kind behavior and encouraging attitude also
We want to say thanks to the head of the department Dr. ferial algaber and our families that
always stands by us no matter what happens for their courage which gives us strength to
overcome the hurdles in our research work. We wish to express our sincere thanks to our friends
for their help and encouragement without their support we wouldn’t be able to complete our
project. Last but certainly not least, we are also thankful to our parents for being constant source
of inspiration for us, giving us creative ideas and emotional support.

iii
ABSTRACT

Robots are an important technology in science to be used in uncertain conditions such as security
operations as they can be followed where the operator's instructions are followed and the task
performed. We have designed a car so that it is controlled by hand gesture, by using gyroscope. It
consists mainly of two parts, the first is the transmitter and the other is the receiving part. The
transmitter will transmit the signal according to the position of the gyroscope attached to the hand
and the receiver will receive the signal and make the vehicle moving in the certain direction. Here
the program was designed using Arduino. Any robot can be controlled using Arduino, not only
can we control it, but we can use it to do at least 256 different functions.

iv
CONTENTS
CERTIFICATE ........................................................................................................ii
AKNOWLEDGEMENTS ...................................................................................... iii
ABSTRACT ............................................................................................................. iv
CONTENTS .............................................................................................................. v
LIST OF TABLES................................................................................................... vi
LIST OF FIGUERS.................................................................................................. x

v
LIST OF TABLES

CHAPTER ONE ....................................................................................................... 1


INTRODICATION ............................................................................................... 1
1.1 Introduction:................................................................................................. 1
1.2 History ........................................................................................................... 2
1.2.1 Philco Mystery Control (1939)............................................................. 2
1.3 Technique ...................................................................................................... 3
1.3.2 Remote control devices are usually based upon one of two main
types of technology .......................................................................................... 3
1.3.2.1 infrared (IR) technology.................................................................. 3
1.3.2.2 Radio frequency (RF) technology .................................................. 5
1.4 Usage of remote control ............................................................................... 6
1.4.1 Industry: ................................................................................................. 6
1.4.2 Space........................................................................................................ 7
1.4.3 Photography ........................................................................................... 7
1.4.4 Remote air control ................................................................................. 8
1.4.5 Video Game ............................................................................................ 8
1.5 Benefits of Remote Control ....................................................................... 10
CHAPTER TWO .................................................................................................... 11
HAND GATURE CONTROLLED CAR .......................................................... 11
2.1 Application .................................................................................................. 12
2.2 Model Circuit Components ....................................................................... 12
2.2.1 Arduino UNO ....................................................................................... 13
2.2.1.1 Feature of Arduino Uno board ..................................................... 15
2.2.1.2 There are three types of memories ............................................... 16
2.2.1.3 Pins diagram................................................................................... 16
2.2.1.4 Communication .............................................................................. 19
vi
2.2.1.5 Programming ................................................................................. 20
2.2.1.6 Automatic (Software) Reset .......................................................... 20
2.2.1.7 USB Overcurrent Protection ........................................................ 21
2.2.1.8 Uno to ATmega328 Pin Mapping ................................................. 21
2.2.1.9 Physical characteristic ................................................................... 22
2.2.2- L298N DRIVER MOTOR ................................................................. 22
2.2.2.1 The L298N IC ................................................................................. 23
2.2.2.2 The L298N Motor Controller Board ........................................... 25
2.2.2.3 L298N Module Pin Configuration ............................................... 27
2.2.2.4 L298 Module Features & Specifications...................................... 28
2.2.2.5 Connecting a DC Motor to the L298N Board ............................. 28
2.2.2.6 Speed Control ................................................................................. 29
2.2.2.7 Using the L298N with Arduino..................................................... 30
2.2.3 RF Receiver .......................................................................................... 31
2.2.3.2 ASK – Amplitude Shift Keying .................................................... 31
2.2.4 33MHz RF Receiver Pin out ............................................................... 33
2.2.4.2 433 MHz Module Specifications:.................................................. 34
2.2.5 Motor ..................................................................................................... 35
2.2.6 Battery ................................................................................................... 35
2.2.7 Arduino Nano ....................................................................................... 36
2.2.7.2 Feature of Arduino Nano: ............................................................. 37
2.2.7.3 Arduino Nano Pin out Description............................................... 38
2.2.7.4 Pin Description ............................................................................... 38
2.2.7.5 Communication .............................................................................. 42
2.2.7.6 Programming ................................................................................. 42
2.2.7.7 Automatic (Software) Reset .......................................................... 43
2.2.8 Transmitter RF 344MHz..................................................................... 44

vii
2.2.8.2 433 MHz Module Specifications:.................................................. 44
2.2.8.3 433MHz RF Transmitter pin out ................................................. 45
2.2.9 Gyroscopes sensor ................................................................................ 46
2.2.9.2 Axis Gyroscope............................................................................... 47
2.2.9.3 Acceleration along the axes deflects the movable mass ............. 48
2.2.9.4 DMP (Digital Motion Processor) .................................................. 48
2.2.9.5 On-chip Temperature Sensor ....................................................... 48
2.2.9.6 Interfacing MPU6050 with Arduino ............................................ 50
2.2.9.7 MPU6050 Features ........................................................................ 50
2.2.9.8 What gestures will the robot recognize ....................................... 51
CHAPTER THREE ............................................................................................... 53
SIMULATION ..................................................................................................... 53
3.1 BUILDING THE CIRCUIT SIMULATION: ......................................... 53
3.2 Proteus ......................................................................................................... 53
3.2.1 Arduino Nano ....................................................................................... 55
3.2.2 Transmitter RF .................................................................................... 55
3.2.3 Pushbutton ............................................................................................ 56
3.2.4 Resistance.............................................................................................. 56
3.2.5 Arduino UNO ....................................................................................... 64
3.2.6 Receiver RF .......................................................................................... 65
3.2.7 L293 Driver motor ............................................................................... 65
3.2.8 Motor ..................................................................................................... 66
3.3 Hand Gesture simulation circuit .............................................................. 67
3.4 The Codding of Hand Gesture .................................................................. 68
CHAPTER FOUR .................................................................................................. 74
CIRCUIT DIGARAM......................................................................................... 74
4.1 Circuit diagram .......................................................................................... 74

viii
CONCLUSION ....................................................................................................... 76
REFERANCE ......................................................................................................... 77

ix
LIST OF FIGUERS
CHAPTER ONE ....................................................................................................... 1
INTRODICATION ............................................................................................... 1
Figure1.1: Single radio ...................................................................................... 4
Figure1.2: Single radio ...................................................................................... 6
Figure 1.3: Multi radio ...................................................................................... 6
Figure 1.4: Industry ........................................................................................... 7
Figure 1.5: Space ................................................................................................ 7
Figure 1.6: Photography .................................................................................... 8
Figure 1.7: Remote air ....................................................................................... 8
Figure 1.8: Wfii Remote .................................................................................... 9
Figure 1.9: Video Game Remote..................................................................... 10
CHAPTER TWO .................................................................................................... 11
HAND GATURE CONTROLLED CAR .......................................................... 11
Figure 2.1: Arduino Uno ................................................................................. 14
Figure 2.2: Arduino Uno backward ............................................................... 14
Figure 2.3: Pin description .............................................................................. 16
Figure 2.4: ATmega328 .................................................................................. 21
Figure 2.5: Physical characteristic ................................................................. 22
Figure 2.6: L298N............................................................................................. 22
Figure 2.7: H-bridge Schematic ...................................................................... 23
Figure 2.8: L298N IC ....................................................................................... 24
Figure 2.9: Circuit Diagram ............................................................................ 25
Figure 2.10: L298N Board ............................................................................... 26
Figure 2.11: Pin Configuration ....................................................................... 27
Figure 2.12: DC Motor .................................................................................... 28
Figure 2.13: L298N with Arduino .................................................................. 30

x
Figure 2.14: Receiver Diagram ....................................................................... 31
Figure 2.15: ASK .............................................................................................. 32
Figure 2.16: Receiver Pin out .......................................................................... 33
Figure 2.17: Motor ........................................................................................... 35
Figure 2.18: Battery ......................................................................................... 35
Figure 2.19: Arduino Nano Pin 0ut ................................................................ 38
Figure 2.20: Arduino Nano ............................................................................. 41
Figure 2.21: Transmitter diagram.................................................................. 44
Figure 2.22: Transmitter Pin out .................................................................... 45
Figure 2.23: Gyroscope .................................................................................... 46
Figure 2.24: 3Axis Gyroscope ......................................................................... 47
Figure 2.25: 3Axis Gyroscope ......................................................................... 48
Figure 2.26: Pin Description ........................................................................... 49
Figure 2.27: MPU6050 with Arduino ............................................................. 50
Figure 2.28: Right............................................................................................. 51
Figure 2.29: Left ............................................................................................... 51
Figure 2.30: Forward ....................................................................................... 52
Figure 2.31: Backward .................................................................................... 52
CHAPTER THREE ............................................................................................... 53
SIMULATION ..................................................................................................... 53
Figure 3.1: Proteus Simulation ....................................................................... 54
Fig.3.2: Arduino Nano ..................................................................................... 55
Fig. 3.3: Transmitter RF.................................................................................. 55
Fig .3.4: push button ........................................................................................ 56
Fig.3.5: Resistances .......................................................................................... 56
Figure. 3.6: hand circuit .................................................................................. 63
Figure 3.7: Arduino Uno ................................................................................. 64

xi
Figure 3.8: Modulo RX .................................................................................... 65
Figure 3.9: L298 Driver Motor ....................................................................... 65
Figure 3.10: Motor ........................................................................................... 66
Figure 3.11: Robot Circuit .............................................................................. 66
Figure 3.12: Hand Gesture circuit .................................................................. 67
CHAPTER FOUR .................................................................................................. 74
CIRCUIT DIGARAM......................................................................................... 74
Figure 4.1: Circuit Diagram ............................................................................ 74
Figure 4.2: Hand Gesture Controlled Car ..................................................... 75

xii
1.1 Introduction:
In electronics, a remote control is an electronic device used to operate another device from a
distance, usually wirelessly. For example: - in consumer electronics, a remote control can be
used to operate devices such as a television set, DVD player or other home appliance, from a
short distance. A remote control is primarily a convenience feature for the user, and can allow
operation of devices that are out of convenient reach for direct operation of controls. In some
cases, remote controls allow a person to operate a device that they otherwise would not be able to
reach, as when a garage door opener is triggered from outside or when a Digital Light Processing
projector that is mounted on a high ceiling is controlled by a person from the floor level.

Early television remote controls (1956–1977) used ultrasonic tones. Present-day remote controls
are commonly consumer infrared devices which send digitally-coded pulses of infrared radiation
to control functions such as power, volume, channels, playback, track change, heat, fan speed, or
other features varying from device to device. Remote controls for these devices are usually small
wireless handheld objects with an array of buttons for adjusting various settings such as
television channel, track number, and volume. For many devices, the remote control contains all
the function controls while the controlled device itself has only a handful of essential primary
controls. The remote-control code, and thus the required remote-control device, is usually
specific to a product line, but there are universal remotes, which emulate the remote control
made for most major brand devices.

Remote control in the 2000s includes Bluetooth connectivity, motion sensor-enabled capabilities
and voice control.

1
1.2 History:
In 1894, the first example of wirelessly controlling at a distance was during a demonstration by
the British physicist Oliver Lodge, in which he made use of a Branly's coherer to make a mirror
galvanometer move a beam of light when an electromagnetic wave was artificially generated. In
1895, Jagadish Chandra Bose demonstrated radio waves by triggering a gun and sounding a bell
using microwaves transmitted over a distance of 75 feet through intervening walls Radio
innovators Guglielmo Marconi and William Preece, at a demonstration on December 12, 1896, at
Toynbee Hall made a bell ring by pushing a button in a box that was not connected by any wires
In 1898 Nikola Tesla filed his patent, U.S. Patent 613,809, named Method of an Apparatus for
Controlling Mechanism of Moving Vehicle or Vehicles, which he publicly demonstrated by
radio-controlling a boat during an electrical exhibition at Madison Square Garden. Tesla called
his boat a "teleautomaton.

1.2.1 Philco Mystery Control (1939)


In 1903, Leonardo Torres Quevedo presented the Telekino at the Paris Academy of Science,
accompanied by a brief, and making an experimental demonstration. At the same time, he
obtained a patent in France, Spain, Great Britain, and the United States. The Telekino consisted
of a robot that executed commands transmitted by electromagnetic waves. With the Telekino,
Torres-Quevedo laid down modern wireless remote-control operation principles and was a
pioneer in the field of remote control. In 1906, in the presence of the king and before a great
crowd, Torres successfully demonstrated the invention in the port of Bilbao, guiding a boat from
the shore. Later, he would try to apply the Telekino to projectiles and torpedoes but had to
abandon the project for lack of financing. The first remote-controlled model airplane flew in
1932, and the use of remote-control technology for military purposes was worked intensively
during the Second World War, one result of this being the German Wasserfall missile.

By the late 1930s, several radio manufacturers offered remote controls for some of their higher-
end models. Most of these were connected to the set being controlled by wires, but the Philco
Mystery Control (1939) was a battery-operated low-frequency radio transmitter thus making it
the first wireless remote control for a consumer electronics device. Using pulse-count
modulation, this also was the first digital wireless remote control.

2
1.3 Technique:
The main technology used in home remote controls is infrared (IR) light. The signal between a
remote-control handset and the device it controls consists of pulses of infrared light, which is
invisible to the human eye but can be seen through a digital camera, video camera or a phone
camera. The transmitter in the remote-control handset sends out a stream of pulses of infrared
light when the user presses a button on the handset. A transmitter is often a light emitting diode
(LED) which is built into the pointing end of the remote-control handset. The infrared light
pulses form a pattern unique to that button. The receiver in the device recognizes the pattern and
causes the device to respond accordingly.

1.3.2 Remote control devices are usually based upon one of two main types of
technology: -
1.3.2.1 infrared (IR) technology
When it comes to televisions and home theater devices, the dominant technology tends to be
infrared. An IR remote (also called a transmitter) uses light to carry signals from the remote to
the device it controls. It emits pulses of invisible infrared light that correspond to specific binary
codes.

These codes represent commands, such as power on, volume up, or channel down. The
controlled device (also called the receiver) decodes the infrared pulses of light into binary code
that its internal microprocessor understands. Once the signal is decoded, the microprocessor
executes the commands.

IR remotes use LED lights to transmit their infrared signals. This results in a few limitations of
the technology. Since light is used to transmit the signal, IR remotes require line-of-sight, which
means you need an open path between the transmitter and receiver. This means that IR remotes
won't work through walls or around corners. They also have a limited range of about 30 feet.

3
Figure1.1: Single radio

- How does the TV understand that the controller instructs him to raise the
sound, not to keep it silent, or to change the station, not to turn off the screen?
When you press a button on the remote control, the binary light emitter, as mentioned above, will
emit infrared radiation for the duration of the press of the button. To distinguish between one
button and another, the dual light emitter - during the time you press the button - sends a series of
very fast flashes to the TV, as each button has its own different flashes. After the series of flashes
is captured by the infrared sensor on the TV interface, the TV translates that series of flashes into
Binary code, the language that the computer uses to display only one type of information. Both
the remote control and the TV are fluent in this language, since the presence of a short radiant
flash of the remote control means the number 1 for the TV, and the absence of any flash of the
remote control means the number 0 for the television.

For example, when you press the volume down button, the volume down command that has the
characteristic dual code (1000110) is already known to both the remote control and the TV. The
controller gives commands to the dual light emitter to send quick flashes of infrared light to
represent that code in the form of the following series (no flicker - flicker - flicker - no flicker -
no flicker - no flicker - flicker). This series of flashes travels through the air heading to the
television at the speed of light until it can be captured. This series of flashes is very fast, as the
binary light emitter can switch between “flash” and “no flicker” 38,000 times per second.

Now the infrared sensor on the TV picks up that series of flashes, and then turns it back into the
binary code (1000110), which the TV understands well as a sound reduction order, and this is
done.

4
Having known the way, the TV and the controller communicate, and the language used in this
communication, is it not possible for the string of flashes carrying the two codes to get lost?
Instead of being picked up by the TV, it is captured by another device such as a video or DVD
player.

This is not possible because, in the case of normal control devices, a short identifier of the
flashes is sent with the code of the command to be executed, since this identification code is
understood only by the device that came with the control. Of course, if you can define this
identification code for your TV, VCR and DVD player, you will be able to control all of these
devices with just one remote control. From here we can guess the working principle of Universal
Remote Control.

This device can accommodate the identification codes that are recognized and understood by
different devices, so that it can control the TV, CD player, video player and other device.

1.3.2.2 Radio frequency (RF) technology:


Radio waves have the energy that helps them to travel large distances without being lost,
allowing a greater distance between the controller and the machine to be controlled (toys,
household items, robots, and other devices). Radio waves are controlled by a device that
transmits signals carrying commands using the antenna in that device (this is the control device),
and another device that receives those commands via its own antenna (this is the device to be
controlled).

There are two types of controls that use radio waves:


1- Single-channel radio control: In this case, the remote-control acts as a switch on or off
for remote operation, such as turning off the kitchen lamp that you forgot to turn off in
your room. In this system, the controller consists of a low-power transmitter, while the
receiver consists of a radio wave receiver and a Relay that converts low-power radio
signals into an electric current that is large enough to power the machine.

5
Figure1.2: Single radio

2- Multi-channel radio control: In this case, the controller sends multiple commands more
complex than before. For example, if we want to control the remote-control car, there are
a large number of commands that we can send from the remote control of the car, and
these commands go beyond mere shutdown and operation. It may be speeding up or
slowing down a certain acceleration or deceleration to reach a certain speed, and perhaps
changing the direction at a specific angle. In this case, the controller sends a series of
flashes to be picked up by the device to be controlled and translated into binary code, and
then executes the command

Figure 1.3: Multi radio

1.4 Usage of remote control:


1.4.1 Industry:
A remote control is used for controlling substations, pump storage power stations and

HVDC-plants. For these systems often PLC-systems working in the long wave range are used.

6
Figure 1.4: Industry

1.4.2 Space:
In the winter of 1970, the Soviet Union explored the surface of the moon with the lunar vehicle
Lunokhod 1, the first roving remote-controlled robot to land on another celestial body. Remote
control technology is also used in space travel, for instance, the Soviet Lunokhod vehicles were
remote-controlled from the ground. Many space exploration rovers can be remotely controlled,
though vast distance to a vehicle results in a long-time delay between transmission and receipt of
a command.

Figure 1.5: Space

1.4.3 Photography:
Remote controls are used in photography, in particular to take long-exposure shots. Many action
cameras such as the Go Pros as well as standard DSLRs including Sony's Alpha series
incorporate Wi-Fi based remote control systems. These can often be accessed and even
controlled via cell-phones and other mobile devices.
7
Figure 1.6: Photography

1.4.4 Remote air control:


Most air conditioner remote controls rely on infrared technology (IR). A remote control emits
pulses of infrared light and those pulses are detected by a receiver, usually situated on the air
conditioning unit itself. The infrared beams of light are invisible to the naked eye.

Figure 1.7: Remote air

1.4.5 Video Game:


Video game consoles had not used wireless controllers until recently, mainly because of the
difficulty involved in playing the game while keeping the infrared transmitter pointed at the
console. Early wireless controllers were cumbersome and when powered on alkaline batteries,
lasted only a few hours before they needed replacement. Some wireless controllers were
produced by third parties, in most cases using a radio link instead of infrared. Even these were

8
very inconsistent, and in some cases, had transmission delays, making them virtually useless.
Some examples include the Double Player for NES, the Master System Remote Control System
and the Wireless Dual Shot for the PlayStation.

The first official wireless game controller made by a first party manufacturer was the CX-42 for
Atari 2600. The Philips CD-i 400 series also came with a remote control, the Wave Bird was also
produced for the GameCube. In the seventh generation of gaming consoles, wireless controllers
became standard. Some wireless controllers, such as those of the PlayStation 3 and Wii, use
Bluetooth. Others, like the Xbox 360, use proprietary wireless protocols.

Figure 1.8: Wfii Remote

9
Figure 1.9: Video Game Remote

1.5 Benefits of Remote Control:


The use of a wireless remote control eliminates the need for the operator to be in direct contact
with a running machine. This means the operator can position themselves in a safer manner,
farther away from moving parts, harmful dust, noise and vibration or falling debris that may
occur.

10
We have designed a simple Hand Gesture Controlled car using Arduino. This Hand Gesture
Controlled car is based on Arduino Nano, MPU6050, RF Transmitter-Receiver Pair and L298D
Motor Driver. Even though the title says it as a Hand Gestured Controlled Robot, technically this
robot is controlled by the tilt of the hand. Majority of the industrial robots are autonomous as
they are required to operate at high speed and with great accuracy. But some applications require
semi-autonomous or human controlled robots. Some of the most commonly used control systems
are voice recognition, tactile or touch controlled and motion controlled. One of the frequently
implemented motion-controlled robot is a Hand Gesture Controlled Robot. In this project, a hand
gesture-controlled robot is developed using MPU6050, which is a 3-axis Accelerometer and 3-
axis Gyroscope sensor and the controller part is Arduino Nano. Instead of using a remote control
with buttons or a joystick, the gestures of the hand are used to control the motion of the robot. 16
The project is based on wireless communication, where the data from the hand gestures is
transmitted to the robot over RF link (RF Transmitter – Receiver pair). The project is divided
into transmitter and receiver section. The circuit diagram and components are explained
separately for both transmitter and receiver sections. The Applications is Wireless controlled
robots are very useful in many applications like remote surveillance, military etc. Hand gesture-
controlled robot can be used by physically challenged in wheelchairs. Hand gesture controlled
industrial grade robotic arms can be developed

11
2.1 Application
The robot can be used for surveillance purpose. The robot can be applied in a wheelchair where
the wheelchair can be driven by the movements of rider’s hand. Wi-Fi can be used for
communication instead of RF to access it from a greater distance. Edge sensors can be
incorporated to it to prevent the robot from falling from any surface. Some camera can be
installed which can record and send data to the nearby computer or cell-phone. It can be
implemented on a watch, or in any home appliances like Room heater. Modern ARDUINO
chips support Intranet as well as Internet connections which can be utilized to a greater extent.
This robotic car can be enhanced to work in the military surveillance where it can be sent to
some enemy camps and track its activities via Internet. With a mind full of creation, the
possibilities are endless. In this paper, the design and implementation of Gesture Controlled
Robot is presented and developed using Arduino microcontroller.

2.2 Model Circuit Components


- Components of Robot:

1-Arduino UNO

2- L298 Driver Motor

3- Receiver RF

4- 4Motor

5- Battery

- Component of hand:

1- Arduino Nano

2-Transmitter RF

3- Gyroscope sensor

4- Battery

12
- Components of Robot:

2.2.1 Arduino UNO


•Arduino Uno is a microcontroller board developed by Arduino.cc which is an open-source
electronics platform mainly based on AVR microcontroller Atmega328.

•First Arduino project was started in Interaction Design Institute Ivrea in 2003 by David
Cuartielles and Massimo Banzi with the intention of providing a cheap and flexible way to
students and professional for controlling a number of devices in the real world.

•The current version of Arduino Uno comes with USB interface, 6 analog input pins, 14 I/O
digital ports that are used to connect with external electronic circuits. Out of 14 I/O ports, 6 pins
can be used for PWM output.

•It allows the designers to control and sense the external electronic devices in the real world.

•This board comes with all the features required to run the controller and can be directly
connected to the computer through USB cable that is used to transfer the code to the controller
using IDE (Integrated Development Environment) software, mainly developed to program
Arduino. IDE is equally compatible with Windows, MAC or Linux Systems; however, Windows
is preferable to use. Programming languages like C and C++ are used in IDE.

•Apart from USB, battery or AC to DC adopter can also be used to power the board.

•Arduino Uno boards are quite similar to other boards in Arduino family in terms of use and
functionality, however, Uno boards don’t come with FTDI USB to Serial driver chip.

•There are many versions of Uno boards available, however, Arduino Nano V3 and Arduino Uno
are the most official versions that come with Atmega328 8-bit AVR Atmel microcontroller
where RAM memory is 32KB.

•When nature and functionality of the task go complex, Micro SD card can be added in the
boards to make them store more information.

13
Figure 2.1: Arduino Uno

Figure 2.2: Arduino Uno backward

14
2.2.1.1 Feature of Arduino Uno board:

Microcontroller ATmega328P – 8 bit AVR family microcontroller

Operating Voltage 5V

Recommended Input Voltage 7-12V

Input Voltage Limits 6-20V

Analog Input Pins 6 (A0 – A5)

Digital I/O Pins 14 (Out of which 6 provide PWM output)

DC Current on I/O Pins 40 mA

DC Current on 3.3V Pin 50 mA

Flash Memory 32 KB (0.5 KB is used for Boot loader)

SRAM 2 KB

EEPROM 1 KB

Frequency (Clock Speed) 16 MHz

15
2.2.1.2 There are three types of memories:

1- Flash memory Flash memory size is 32 KB has taken a fraction of them up to 0.5 KB for
the boot loader

2- SRAM is memory that is temporarily disabled

3- EEPROM Memory We know that when the power is off the Arduino our RAM and I size it
in Arduino Uno 1kbThe processor speed is 16MHz

2.2.1.3 Pins diagram:

Figure 2.3: Pin description

16
1) Power USB

Arduino board can be powered by using the USB cable from your computer. All you need to do
is connect the USB cable to the USB connection

2) Power (Barrel Jack)

Arduino boards can be powered directly from the AC mains power supply by connecting it to the
Barrel Jack.

3) Voltage Regulator

The function of the voltage regulator is to control the voltage given to the Arduino board and
stabilize the DC voltages used by the processor and other elements.

4) Crystal Oscillator

The crystal oscillator helps Arduino in dealing with time issues. How does Arduino calculate
time? The answer is, by using the crystal oscillator. The number printed on top of the Arduino
crystal is 16.000H9H. It tells us that the frequency is 16,000,000 Hertz or 16 MHz.
5+7) Arduino Reset You

can reset your Arduino board, i.e., start your program from the beginning. You can reset the
UNO board in two ways. First, by using the reset button (17) on the board. Second, you can
connect an external reset button to the Arduino pin labelled RESET.

6+7+8+9) Pins (3.3, 5, GND, Vin)

➢ 3.3V (6) − Supply 3.3 output volt ➢ 5V (7) − Supply 5 output volt ➢ Most of the
components used with Arduino board works fine with 3.3 volt and 5 volts. ➢ GND (8) (Ground)
− There are several GND pins on the Arduino, any of which can be used to ground your circuit.
➢ Vin (9) − This pin also can be used to power the Arduino board from an external power
source, like AC mains power supply

17
10) Analog pins

The Arduino UNO board has six analog input pins A0 through A5. These pins can read the
signal from an analog sensor like the humidity sensor or temperature sensor and convert it into a
digital value that can be read by the microprocessor.

11) Main microcontroller

Each Arduino board has its own microcontroller (11). You can assume it as the brain of your
board. The main IC (integrated circuit) on the Arduino is slightly different from board to board.
The microcontrollers are usually of the ATMEL Company. You must know what IC your board
has before loading up a new program from the Arduino IDE. This information is available on the
top of the IC. For more details about the IC construction and functions, you can refer to the data
sheet.
12) ICSP pin

Mostly, ICSP (12) is an AVR, a tiny programming header for the Arduino consisting of MOSI,
MISO, SCK, RESET, VCC, and GND. It is often referred to as an SPI (Serial Peripheral
Interface), which could be considered as an "expansion" of the output. Actually, you are slaving
the output device to the master of the SPI bus.

13) Power LED indicator

This LED should light up when you plug your Arduino into a power source to indicate that your
board is powered up correctly. If this light does not turn on, then there is something wrong with
the connection.

14) TX and RX LEDs

On your board, you will find two labels: TX (transmit) and RX (receive). They appear in two
places on the Arduino UNO board. First, at the digital pins 0 and 1, to indicate the pins
responsible for serial communication. Second, the TX and RX led (13). The TX led flashes with

18
different speed while sending the serial data. The speed of flashing depends on the baud rate
used by the board. RX flashes during the receiving process.

15) Digital I/O

The Arduino UNO board has 14 digital I/O pins (15) (of which 6 provide PWM (Pulse Width
Modulation) output. These pins can be configured to work as input digital pins to read logic
values (0 or 1) or as digital output pins to drive different modules like LEDs, relays, etc. The
pins labeled can be used to generate PWM.

16) AREF
AREF stands for Analog Reference. It is sometimes, used to set an external reference voltage
(between 0 and 5 Volts) as the upper limit for the analog input pins

2.2.1.4 Communication
Arduino can be used to communicate with a computer, another Arduino board or other
microcontrollers. The ATmega328P microcontroller provides UART TTL (5V) serial
communication which can be done using digital pin 0 (Rx) and digital pin 1 (TX). An
ATmega16U2 on the board channels this serial communication over USB and appears as a
virtual com port to software on the computer. The ATmega16U2 firmware uses the standard
USB COM drivers, and no external driver is needed. However, on Windows, a .inf file is
required. The Arduino software includes a serial monitor which allows simple textual data to be
sent to and from the Arduino board. There are two RX and TX LEDs on the Arduino board
which will flash when data is being transmitted via the USB-to-serial chip and USB connection
to the computer (not for serial communication on pins 0 and 1). A Software Serial library allows
for serial communication on any of the Uno's digital pins. The ATmega328P also supports I2C
(TWI) and SPI communication. The Arduino software includes a Wire library to simplify use of
the I2C bus.

19
2.2.1.5 Programming
The Arduino Uno can be programmed with the Arduino software (download). Select "Arduino
Uno from the Tools > Board menu (according to the microcontroller on your board). For details,
see the reference and tutorials. The ATmega328 on the Arduino Uno comes preboned with a
boot loader that allows you to upload new code to it without the use of an external hardware
programmer. It communicates using the original STK500 protocol (reference, C header files).
You can also bypass the boot loader and program the microcontroller through the ICSP (In-
Circuit Serial Programming) header; see these instructions for details. The ATmega16U2 (or
8U2 in the rev1 and rev2 boards) firmware source code is available . The ATmega16U2/8U2 is
loaded with a DFU boot loader, which can be activated by: • On Rev1 boards: connecting the
solder jumper on the back of the board (near the map of Italy) and then resetting the 8U2. • On
Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to ground, making it
easier to put into DFU mode. You can then use Atmel's FLIP software (Windows) or the DFU
programmer (Mac OS X and Linux) to load a new firmware. Or you can use the ISP header with
an external programmer (overwriting the DFU boot loader). See this user-contributed tutorial for
more information.

2.2.1.6 Automatic (Software) Reset


Rather than requiring a physical press of the reset button before an upload, the Arduino Uno is
designed in a way that allows it to be reset by software running on a connected computer. One of
the hardware flow control lines (DTR) of the ATmega8U2/16U2 is connected to the reset line of
the ATmega328 via a 100 Nano farad capacitor. When this line is asserted (taken low), the reset
line drops long enough to reset the chip. The Arduino software uses this capability to allow you
to upload code by simply pressing the upload button in the Arduino environment. This means
that the boot loader can have a shorter timeout, as the lowering of DTR can be well-coordinated
with the start of the upload. This setup has other implications. When the Uno is connected to
either a computer running Mac OS X or Linux, it resets each time a connection is made to it from
software (via USB). For the following half second or so, the boot loader is running on the Uno.
While it is programmed to ignore malformed data (i.e. anything besides an upload of new code),
it will intercept the first few bytes of data sent to the board after a connection is opened. If a
sketch running on the board receives one-time configuration or other data when it first starts,

20
make sure that the software with which it communicates waits a second after opening the
connection and before sending this data. The Uno contains a trace that can be cut to disable the
auto-reset. The pads on either side of the trace can be soldered together to re-enable it. It's
labeled "RESET-EN". You may also be able to disable the auto-reset by connecting a 110-ohm
resistor from 5V to the reset line; see this forum thread for details.

2.2.1.7 USB Overcurrent Protection


The Arduino Uno has a resettable polypus that protects your computer's USB ports from shorts
and overcurrent. Although most computers provide their own internal protection, the fuse
provides an extra layer of protection. If more than 500 mA is applied to the USB port, the fuse
will automatically break the connection until the short or overload is removed.

2.2.1.8 Uno to ATmega328 Pin Mapping


When ATmega328 chip is used in place of Arduino Uno, or vice versa, the image below shows
the pin mapping between the two.

Figure 2.4: ATmega328

21
2.2.1.9 Physical characteristic
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the
USB connector and power jack extending beyond the former dimension. Three screw holes allow
the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8
is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins.

Figure 2.5: Physical characteristic

2.2.2- L298N DRIVER MOTOR


A motor driver is an integrated circuit chip which is usually used to control motors in
autonomous robots. Motor driver act as an interface between Arduino and the motors .

Figure 2.6: L298N


The L298N motor controller follows the H-bridge configuration, which is handy when
controlling the direction of rotation of a DC motor. An H-bridge schematic looks like this:

22
Figure 2.7: H-bridge Schematic

The other benefit of using an H-bridge is that you can provide a separate power supply to the
motors. This is very significant especially when using an Arduino board where the 5V power
source is simply not enough for two DC motors.

2.2.2.1 The L298N IC


The L298N is an integrated circuit that follows the H-bridge concept. It comes in two IC
packages: MultiWatt15 and PowerSO20. Here are the pinouts for each package:

23
Figure 2.8: L298N IC

This IC drives two motors through two channels, A and B. For example, if a motor is using
channel A, its terminals must be connected to pins Out 1 and Out 2. The Enable A pin must be
high to turn on the motor. To drive a motor to a direction, say, clockwise, the pin Input 1 must be
high while the pin Input 2 must be low. To drive the motor counter clockwise, the pin Input 1 is
low while the pin Input 2 is high.

24
Figure 2.9: Circuit Diagram
The diagram above shows an example diagram for using the L298N to drive one DC motor.

The most notable feature here is its high-power supply although its input pins follow lower
voltage levels. This means you can power high voltage motors while controlling them with
microcontrollers.

2.2.2.2 The L298N Motor Controller Board


As already mentioned, the L298N has four inputs corresponding to the four switches in the H-
bridge diagram above. All you need to do is apply signals to the inputs to make the motor(s)
rotate to a certain direction.

25
Figure 2.10: L298N Board
Using a breakout board is easier for prototyping compared to using the IC.

The controller board, shown above, has +12V and +5V terminals. The +12V pin is where the
motor power is attached. This pin can accept voltages from +7VDC to +35VDC.

When the +12V jumper is attached, the on-board voltage regulator is now enabled, and you can
source +5V from the +5V terminal. This means the +5V terminal is not for powering the board
but for connecting a device, say Arduino, that needs a 5V source.

You have Motor A inputs and Motor B inputs. These connect to the microcontroller. The motor
terminals connect to Motor Terminals 1, 2, 3, 4. Specifically, motor A connects to terminals 1
and 2 while Motor B connects to terminals 3 and 4.

There are also two other jumpers on the board, as shown. Remove these jumpers if you are using
DC motors and keep it for stepper motors. Speed control for Motor A and Motor B is achieved
via PWM on these pins.

26
Figure 2.11: Pin Configuration

2.2.2.3 L298N Module Pin Configuration:

Pin Name Description

IN1 & IN2 Motor A input pins. Used to control the spinning direction of Motor A

IN3 & IN4 Motor B input pins. Used to control the spinning direction of Motor B

ENA Enables PWM signal for Motor A

ENB Enables PWM signal for Motor B

OUT1 & OUT2 Output pins of Motor A

OUT3 & OUT4 Output pins of Motor B

12V 12V input from DC power Source

5V Supplies power for the switching logic circuitry inside L298N IC

GND Ground pin

27
2.2.2.4 L298 Module Features & Specifications:

- Driver Model: L298N 2A


- Driver Chip: Double H Bridge L298N
- Motor Supply Voltage (Maximum): 46V
- Motor Supply Current (Maximum): 2A
- Logic Voltage: 5V
- Driver Voltage: 5-35V
- Driver Current:2A
- Logical Current:0-36mA
- Maximum Power (W): 25W
- Current Sense for each motor
- Heatsink for better performance
- Power-On LED indicator

2.2.2.5 Connecting a DC Motor to the L298N Board


Here is a wiring diagram for connecting two DC motors to the L298N driver board.

Figure 2.12: DC Motor

28
Using the L298N if straightforward. If you want the left motor to rotate in one direction, apply a
high pulse to IN1 and a low pulse to IN2. To reverse the direction, reverse the pulses to IN1 and
IN2. The same applies to the right motor.

Here’s a table that summarizes the pins and corresponding motor direction. These assumes you
are following the same Frizzing diagram above.

2.2.2.6 Speed Control


Speed control is also possible with the L298N motor driver. All you need is feed PWM signals to
the motor enable pins. The speed of the motor will vary according to the width of the pulses. The
wider the pulses, the faster the motor rotates. How fast the motor rotates for a given pulse width
will vary from motor to motor even if they look exactly the same. Thus, the actual pulse width
must be derived through experiment.

29
2.2.2.7 Using the L298N with Arduino
An example diagram for connecting the L298N motor controller board to an Arduino is shown:

Figure 2.13: L298N with Arduino

You can attach the control pins to any digital (or even analog) pins. However, for motor speed
control, the motor enable pins must be attached to a PWM enabled pin. Here you see that the
motor enables pins connect to pin 10 and pin 5, both of which are PWM pins.

30
2.2.3 RF Receiver

Figure 2.14: Receiver Diagram

This one is a receiver module. Though it looks complex, it is as simple as the transmitter module.
It consists of a RF tuned circuit and a couple of OP Amps to amplify the received carrier wave
from the transmitter. The amplified signal is further fed to a PLL (Phase Lock Loop) which
enables the decoder to “lock” onto a stream of digital bits which gives better decoded output and
noise immunity.

2.2.3.2 ASK – Amplitude Shift Keying


As discussed above, for sending the digital data over radio, these modules use a technique
called Amplitude Shift Keying or ASK. In Amplitude Shift Keying the amplitude (i.e. the level)
of the carrier wave (in our case it’s a 433MHz signal) is changed in response to the incoming
data signal.

This is very similar to the analog technique of amplitude modulation which you might be
familiar with if you’re familiar with AM radio. It’s sometimes called binary amplitude shift
keying because there are only two levels we are concerned with. You can think of it as an
ON/OFF switch.

• For Digital 1 – This drives the carrier at full strength.

• For Digital 0 – This cuts the carrier off completely.

31
This is how the Amplitude modulation looks like:

Figure 2.15: ASK

Amplitude Shift keying has the advantage of being very simple to implement. It is quite simple
to design the decoder circuitry. Also ASK needs less bandwidth than other modulation
techniques like FSK (Frequency Shift Keying). This is one of the reasons for being inexpensive.

The disadvantage however is that ASK is susceptible to interference from other radio devices
and background noise. But as long as you keep your data transmission to a relatively slow speed
it can work reliably in most environments.

32
2.2.4 33MHz RF Receiver Pin out

Figure 2.16: Receiver Pin out

VCC supplies power for the receiver. Unlike the transmitter, supply voltage for receiver needs to
be 5V.

DATA pins output the digital data received. The two center pins are internally tied together, so
you can use either one for data out.

GND is a ground pin.

Antenna is a pin for external antenna which is often unmarked. It is the pad in the lower left of
the module, right next to the small coil. Again, you will want to solder a 17.3 cm piece of solid
wire to this pin for the improved range.

33
2.2.4.2 433 MHz Module Specifications:
• Wireless (RF) Simplex Transmitter and Receiver

• Transmitter Operating Voltage: +5V only

• Transmitter Operating current: 9mA to 40mA

• Operating frequency: 433 MHz

• Transmission Distance: 3 meters (without antenna) to 100 meters (maximum)

• Modulating Technique: ASK (Amplitude shift keying)

• Data Transmission speed: 10Kbps

• Circuit type: Saw resonator

• Low cost and small package

34
2.2.5 Motor

Figure 2.17: Motor

2.2.6 Battery

Figure 2.18: Battery

35
- Component of Hand:

2.2.7 Arduino Nano


• Arduino Nano is a small, compatible, flexible and breadboard friendly Microcontroller
board, developed by Arduino.cc in Italy, based on ATmega328p (Arduino Nano V3.x) /
Atmega168 ( Arduino Nano V3.x).

• It comes with exactly the same functionality as in Arduino UNO but quite in small size.

• It comes with an operating voltage of 5V; however, the input voltage can vary from 7 to
12V.

• Arduino Nano Pin out contains 14 digital pins, 8 analog Pins, 2 Reset Pins & 6 Power
Pins.

• Each of these Digital & Analog Pins are assigned with multiple functions but their main
function is to be configured as input or output.

• They are acted as input pins when they are interfaced with sensors, but if you are driving
some load then use them as output.

• Functions like pin Mode () and digital Write () are used to control the operations of
digital pins while analog Read () is used to control analog pins.

• The analog pins come with a total resolution of 10bits which measure the value from zero
to 5V.

• Arduino Nano comes with a crystal oscillator of frequency 16 MHz It is used to produce
a clock of precise frequency using constant voltage.

• There is one limitation using Arduino Nano i.e. it doesn’t come with DC power jack,
means you cannot supply external power source through a battery.

• This board doesn’t use standard USB for connection with a computer, instead, it comes
with Mini USB support.

• Tiny size and breadboard friendly nature make this device an ideal choice for most of the
applications where a size of the electronic components is of great concern.

36
• Flash memory is 16KB or 32KB that all depends on the at mega board i.e. Atmega168
comes with 16KB of flash memory while Atmega328 comes with a flash memory of
32KB. Flash memory is used for storing code. The 2KB of memory out of total flash
memory is used for a boot loader.

2.2.7.2 Feature of Arduino Nano:


Microcontroller ATmega328P – 8 bit AVR family microcontroller

Operating Voltage 5V

Recommended Input Voltage for Vin pin 7-12V

Analog Input Pins 6 (A0 – A5)

Digital I/O Pins 14 (Out of which 6 provide PWM output)

DC Current on I/O Pins 40 mA

DC Current on 3.3V Pin 50 mA

Flash Memory 32 KB (2 KB is used for Boot loader)

SRAM 2 KB

EEPROM 1 KB

Frequency (Clock Speed) 16 MHz

Communication IIC, SPI, USART

37
2.2.7.3 Arduino Nano Pin out Description:

Figure 2.19: Arduino Nano Pin 0ut

Each pin on the Nano board comes with a specific function associated with it.

We can see the analog pins that can be used as an analog to digital converter where A4 and A5
pins can also be used for I2C communication. Similarly, there are 14 digital pins, out of which 6
pins are used for generating PWM.

2.2.7.4 Pin Description


Vin. It is input power supply voltage to the board when using an external power source of 7 to 12
V.

38
5V. It is a regulated power supply voltage of the board that is used to power the controller and
other components placed on the board

3.3V. This is a minimum voltage generated by the voltage regulator on the board.

GND. These are the ground pins on the board. There are multiple ground pins on the board that
can be interfaced accordingly when more than one ground pin is required.

39
Reset. Reset pin is added on the board that resets the board. It is very helpful when running
program goes too complex and hangs up the board. LOW value to the reset pin will reset the
controller.

Analog Pins. There are 8 analog pins on the board marked as A0 - A7. These pins are used to
measure the analog voltage ranging between 0 to 5V.

Rx, Tx. These pins are used for serial communication where Tx represents the transmission of
data while Rx represents the data receiver.

40
13. This pin is used to turn on the built-in LED.AREF. This pin is used as a reference voltage for
the input voltage. PWM. Six pins 3,5,6,9,10, 11 can be used for providing 8-pit PWM (Pulse
Width Modulation) output. It is a method used for getting analog results with digital sources
SPI. Four pins 10(SS),11(MOSI),12(MISO),13(SCK) is used for SPI (Serial Peripheral
Interface). SPI is an interface bus and mainly used to transfer data
between microcontrollers and other peripherals like sensors, registers, and SD card External
Interrupts. Pin 2 and 3 are used as external interrupts which are used in case of emergency
when we need to stop the main program and call important instructions at that point. The main
program resumes once interrupt instruction is called and executed.I2C. I2C communication is
developed using A4 and A5 pins where A4 represents the serial data line (SDA) which carries
the data and A5 represents the serial clock line (SCL) which is a clock signal, generated by the
master device, used for data synchronization between the devices on an I2C bus.

Figure 2.20: Arduino Nano

41
2.2.7.5 Communication
The Arduino Nano has a number of facilities for communicating with a computer, another
Arduino, or other microcontrollers. The ATmega168 and ATmega328 provide UART TTL (5V)
serial communication, which is available on digital pins 0 (RX) and 1 (TX). An FTDI FT232RL
on the board channels this serial communication over USB and the FTDI drivers (included with
the Arduino software) provide a virtual com port to software on the computer. The Arduino
software includes a serial monitor which allows simple textual data to be sent to and from the
Arduino board. The RX and TX LEDs on the board will flash when data is being transmitted via
the FTDI chip and USB connection to the computer (but not for serial communication on pins 0
and 1). A Software Serial library allows for serial communication on any of the Nano's digital
pins. The ATmega168 and ATmega328 also support I2C (TWI) and SPI communication. The
Arduino software includes a Wire library to simplify use of the I2C bus; see the documentation
for details. To use the SPI communication, please see the ATmega168 or ATmega328 datasheet.

2.2.7.6 Programming
The Arduino Nano can be programmed with the Arduino software (download). Select "Arduino
Decimal, Duemilanove, or Nano w/ ATmega168" or "Arduino Duemilanove or Nano w/
ATmega328" from the Tools > Board menu (according to the microcontroller on your board).
For details, see the reference and tutorials. The ATmega168 or ATmega328 on the Arduino
Nano comes preboned with a boot loader that allows you to upload new code to it without the
use of an external hardware programmer. It communicates using the original STK500 protocol
(reference, C header files). You can also bypass the boot loader and program the microcontroller
through the ICSP (In-Circuit Serial Programming) header; see these instructions for details.

42
2.2.7.7 Automatic (Software) Reset
Rather than requiring a physical press of the reset button before an upload, the Arduino Nano is
designed in a way that allows it to be reset by software running on a connected computer. One of
the hardware flow control lines (DTR) of the FT232RL is connected to the reset line of the
ATmega168 or ATmega328 via a 100 Nano farad capacitor. When this line is asserted (taken
low), the reset line drops long enough to reset the chip. The Arduino software uses this capability
to allow you to upload code by simply pressing the upload button in the Arduino environment.
This means that the boot loader can have a shorter timeout, as the lowering of DTR can be well-
coordinated with the start of the upload. This setup has other implications. When the Nano is
connected to either a computer running Mac OS X or Linux, it resets each time a connection is
made to it from software (via USB). For the following half-second or so, the boot loader is
running on the Nano. While it is programmed to ignore malformed data (i.e. anything besides an
upload of new code), it will intercept the first few bytes of data sent to the board after a
connection is opened. If a sketch running on the board receives one-time configuration or other
data when it first starts, make sure that the software with which it communicates waits a second
after opening the connection and before sending this data.

43
2.2.8 Transmitter RF 344MHz

Figure 2.21: Transmitter diagram

This little module is a transmitter among two. It is really simple as it looks. The heart of the
module is the SAW resonator which is tuned for 433.xx MHz operation. There is a switching
transistor and a few passive components, that’s it.

When a logic HIGH is applied to the DATA input, the oscillator runs producing a constant RF
output carrier wave at 433.xx MHz and when the DATA input is taken to logic LOW, the
oscillator stops. This technique is known as Amplitude Shift Keying, which we will discuss in
detail shortly.

2.2.8.2 433 MHz Module Specifications:


• Wireless (RF) Simplex Transmitter and Receiver

• Transmitter Operating Voltage: +5V only

• Transmitter Operating current: 9mA to 40mA

• Operating frequency: 433 MHz

• Transmission Distance: 3 meters (without antenna) to 100 meters (maximum)

44
• Modulating Technique: ASK (Amplitude shift keying)

• Data Transmission speed: 10Kbps


• Circuit type: Saw resonator
• Low cost and small packag

2.2.8.3 433MHz RF Transmitter pin out


Let’s have a look at the pin out of 433MHz RF Transmitter and Receiver Modules.

Figure 2.22: Transmitter Pin out

DATA pin accepts digital data to be transmitted.

VCC supplies power for the transmitter. This can be any positive DC voltage between
3.5V to 12V. Note that the RF output is proportional to the supply voltage i.e. the higher
the Voltage, the greater the range will be.

GND is a ground pin.

Antenna is a pin for external antenna. As discussed earlier, you will want to solder a 17.3
cm piece of solid wire to this pin for the improved range.

45
2.2.9 Gyroscopes sensor
MPU6050 sensor module is complete 6-axis Motion Tracking Device. It combines 3-axis
Gyroscope, 3-axis Accelerometer and Digital Motion Processor all in small package. Also, it has
additional feature of on-chip Temperature sensor. It has I2C bus interface to communicate with
the microcontrollers.

It has Auxiliary I2C bus to communicate with other sensor devices like 3-axis Magnetometer,
Pressure sensor etc.

If 3-axis Magnetometer is connected to auxiliary I2C bus, then MPU6050 can provide complete
9-axis Motion Fusion output.

Figure 2.23: Gyroscope

46
2.2.9.2 Axis Gyroscope
The MPU6050 consist of 3-axis Gyroscope with Micro Electro Mechanical System (MEMS)
technology. It is used to detect rotational velocity along the X, Y, Z axes as shown in below
figure.

Figure 2.24: 3Axis Gyroscope


When the gyros are rotated about any of the sense axes, the Carioles Effect causes a vibration
that is detected by a MEM inside MPU6050.

- The resulting signal is amplified, demodulated, and filtered to produce a voltage that is
proportional to the angular rate.

- This voltage is digitized using 16-bit ADC to sample each axis.

- The full-scale range of output are +/- 250, +/- 500, +/- 1000, +/- 2000.

- It measures the angular velocity along each axis in degree per second unit.

3-Axis Accelerometer

The MPU6050 consist 3-axis Accelerometer with Micro Electro Mechanical (MEMs)
technology. It used to detect angle of tilt or inclination along the X, Y and Z axes as shown in
below figure.

47
Figure 2.25: 3Axis Gyroscope

2.2.9.3 Acceleration along the axes deflects the movable mass:


- This displacement of moving plate (mass) unbalances the differential capacitor which results in
sensor output. Output amplitude is proportional to acceleration.

- 16-bit ADC is used to get digitized output.

- The full-scale range of acceleration are +/- 2g, +/- 4g, +/- 8g, +/- 16g.

- It measured in g (gravity force) unit.

- When device placed on flat surface it will measure 0g on X and Y axis and +1g on Z axis.

2.2.9.4 DMP (Digital Motion Processor)


The embedded Digital Motion Processor (DMP) is used to compute motion processing
algorithms. It takes data from gyroscope, accelerometer and additional 3rd party sensor such as
magnetometer and processes the data. It provides motion data like roll, pitch, yaw angles,
landscape and portrait sense etc. It minimizes the processes of host in computing motion data.
The resulting data can be read from DMP registers.

2.2.9.5 On-chip Temperature Sensor


On-chip temperature sensor output is digitized using ADC. The reading from temperature sensor
can be read from sensor data register.

48
Figure 2.26: Pin Description

Pin Pin Name Description


Number

1 VCC Provides power for the module, can be +3V to +5V.


Typically +5V is used

2 Ground Connected to Ground of system

3 Serial Clock (SCL) Used for providing clock pulse for I2C Communication

4 Serial Data (SDA) Used for transferring Data through I2C communication

5 Auxiliary Serial Can be used to interface other I2C modules with


Data (XDA) MPU6050. It is optional

6 Auxiliary Serial Can be used to interface other I2C modules with


Clock (XCL) MPU6050. It is optional

7 AD0 If more than one MPU6050 is used a single MCU, then


this pin can be used to vary the address

8 Interrupt (INT) Interrupt pin to indicate that data is available for MCU
to read.

49
2.2.9.6 Interfacing MPU6050 with Arduino
It is very easy to interface the MPU6050 with Arduino, thanks to the library developed by
Jeff Romberg. You can download the library

Jeff Romberg MPU6050 Library for Arduino

Once you have added this library to you Arduino IDE, follow the below schematics to establish
an IIC connection between your Arduino and MPU6050.

Figure 2.27: MPU6050 with Arduino

2.2.9.7 MPU6050 Features


• MEMS 3-aixs accelerometer and 3-axis gyroscope values combined

• Power Supply: 3-5V

• Communication: I2C protocol

• Built-in 16-bit ADC provides high accuracy

• Built-in DMP provides high computational power

• Can be used to interface with other IIC devices like magnetometer

• Configurable IIC Address

• In-built Temperature sensor

50
2.2.9.8 What gestures will the robot recognize?
This robot is designed for recognizing five sets of gestures: forward, backward, left, right and
stop. You will get a better idea if you check the photos of the gestures given below.

Figure 2.28: Right

Figure 2.29: Left

51
Figure 2.30: Forward

Figure 2.31: Backward

52
3.1 BUILDING THE CIRCUIT SIMULATION:
To run the circuit that have been designed in chapter three we used Arduino requires code to do
the work, the code have been tested by simulation. Computer simulations have become a useful
part of mathematical modeling of many natural systems to observe their behavior. It allows the
engineer to test the design before it is built in the real situation. As mentioned earlier, the
simulations for this research were performed in PROTEUS program. These software applications
are widely used in control engineering for both simulation and design.

3.2 Proteus
The Proteus Design Suite is a proprietary software tool suite used primarily for electronic design
automation. The software is used mainly by electronic design engineers and technicians to create
schematics and electronic prints for manufacturing printed circuit boards. It was developed in
Yorkshire, England by Lab center Electronics Ltd and is available in English, French, Spanish
and Chinese languages.

53
Figure 3.1: Proteus Simulation

The simulation was divided into three stages:


- Stage one (Hand Circuit)

We open the new project window then we naming the file and choosing the path then do
the following steps:

Then from the P find components of hand circuit, the components are:

54
3.2.1 Arduino Nano

Fig.3.2: Arduino Nano

3.2.2 Transmitter RF

Fig. 3.3: Transmitter RF

55
3.2.3 Pushbutton

Fig .3.4: push button

3.2.4 Resistance

Fig.3.5: Resistances

56
We do not have the Arduino in the Proteus, so we have to download the Arduino library by the
following steps:

First, we go to Google to download the Arduino library

We open the pressure

We copy the files of the Arduino library

57
Then we go to the C drive

We show hidden files

we go to Lab Center Electronics

58
Then We paste the library files here

The Arduino has appeared in the proteus

we repeat the same steps to find a library of modulo RF


First, we go to Google to download the modulo rf library

59
Open the pressure

Copy the files of the modulo RF library

Then go to the C drive

60
We show hidden files

Then we go to

We paste the modulo rf library files here

61
Then we return to the Models file

Copy the file

Last step, paste it here

The modulo RF has appeared in the Proteus

62
After that connect the devices then Set the values of each of the components:
All Resistors= 10k

Then Connect Transmitter RF, resistance and push button pins with Arduino Nano by using
wires as it shown below

Figure. 3.6: hand circuit


-The transmitter has three ports, two ports positive and negative for segment feed, we connect
them with the power outlets in the Arduino and the data port we connect with the digital port on
the Arduino

63
-In our project, we have to connect the Arduino Nano to the gyroscope, but we do not have
gyroscope in the proteus, so we used virtual switches so that whenever a pressure is pressed it
will be one and when there is no pressure it will be zero this process is called active high.

After Writing the code of hand gesture then will be loaded to the file program in the Arduino
Nano as it shown below

- Stage two (Robot Circuit)

from the P find components of hand circuit, the components are:


3.2.5 Arduino UNO

Figure 3.7: Arduino Uno

64
3.2.6 Receiver RF

Figure 3.8: Modulo RX

3.2.7 L293 Driver motor

Figure 3.9: L298 Driver Motor

65
3.2.8 Motor

Figure 3.10: Motor

Then Connect the driver motor and receiver RF pins with Arduino Uno by using wires as it:

Figure 3.11: Robot Circuit

When the transmitter sends the data of the hand, the receiver on the robot takes the data to
the Arduino to decode the orders and the Arduino cannot control the motors because it
produces a small current and the motors have a large current, so we need mediator called
driver motor that is uses as amplifier processes that control amount of current and direction ,

66
connecting every two motors to one outlet, and we used virtual terminal that work as monitors
outlet RX,TX.

3.3 Hand Gesture simulation circuit


After that compound all the circuits that done above in one circuit to make the hand gesture
circuit simulation and its code to accomplish this project as is below

Figure 3.12: Hand Gesture circuit

67
3.4 The Codding of Hand Gesture
- Now write the code of gyroscope to simulate the circuit, then loading it to the program file
.))Connected ((scl to A5)).. ((sda to A4 //
>include<Wire.h#
>include<MPU6050.h#
;MPU6050 mpu
;int16_t ax,ay,az
;int16_t gx,gy,gz
{ )(void setup
;)Serial.begin(9600
;)"Serial.println("Initialize MPU
;)(mpu.initialize
}
{ )(void loop
;)mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz
;)Serial.println(ax//
;)Serial.println(az
}

Code of Motors
;int RF=5
;int RB=4
;int LF=6
;int LB=7
{ )(void setup
;)pinMode(LF,OUTPUT
;)pinMode(LB,OUTPUT
;)pinMode(RF,OUTPUT
;)pinMode(RB,OUTPUT
}
{ )(void loop

68
) if( ax > 6000
{
go to left//
;)digitalWrite(LB,HIGH
;)digitalWrite(LF,LOW
;)digitalWrite(RF,HIGH
;)digitalWrite(RB,LOW
}
) if( ax < -6000
{
go to right//
;)digitalWrite(LB,LOW
;)digitalWrite(LF,HIGH
;)digitalWrite(RF,LOW
;)digitalWrite(RB,HIGH
}
) if( ay > 7000
{
go to back//
;)digitalWrite(LB,HIGH
;)digitalWrite(LF,LOW
;)digitalWrite(RF,LOW
;)digitalWrite(RB,HIGH
}
) if( ay < -7000
{
go to forword//
;)digitalWrite(LB,LOW
;)digitalWrite(LF,HIGH
;)digitalWrite(RF,HIGH
;)digitalWrite(RB,LOW
}
}
69
Code of Remote
.))Connected ((scl to A5))..((sda to A4 //
>include<Wire.h#
>include<MPU6050.h#
;MPU6050 mpu
;int16_t ax,ay,az
;int16_t gx,gy,gz
connected data to 10//
>include <RH_ASK.h#
include <SPI.h> // Not actually used but needed to compile#
;RH_ASK driver
;int s=4
)(void setup
{
Serial.begin(9600); // Debugging only
;)pinMode(s,INPUT
))(if (!driver.init
;)"Serial.println("init failed
;)"Serial.println("Initialize MPU
;)(mpu.initialize
}
)(void loop
{
;)mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz
;)Serial.println(ay//
;)int Switch=digitalRead(s
) if( Switch == 0
{
;"****char *msg = "stop
;))driver.send((uint8_t *)msg, strlen(msg
;)(driver.waitPacketSent
};)delay(100
70
) if( Switch == 1
{
) if( ax > 6000
{
go to left//
;"**char *msg = "left
;))driver.send((uint8_t *)msg, strlen(msg
;)(driver.waitPacketSent
;)delay(100
}
) if( ax < -6000
{
go to right//
;"**char *msg = "right
;))driver.send((uint8_t *)msg, strlen(msg
;)(driver.waitPacketSent
;)delay(100
}
) if( ay > 7000
{
go to back//
;"**char *msg = "back
;))driver.send((uint8_t *)msg, strlen(msg
;)(driver.waitPacketSent
;)delay(100
}
) if( ay < -7000
{
go to forword//
;"**char *msg = "forword
;))driver.send((uint8_t *)msg, strlen(msg
;)(driver.waitPacketSent
;)delay(100
71
}
}
}
Code of Robot
if (driver. recv(buf, &buflen)) // Non-blocking
{
;int i
.Message with a good checksum received, dump it //
;)String data = ((char*)buf
;)" :Serial.print("Message
;)Serial.println(data
) "**if( data == "right
{
go to left//
;)digitalWrite(LB,HIGH
;)digitalWrite(LF,LOW
;)digitalWrite(RF,HIGH
;)digitalWrite(RB,LOW
}
) "**if( data == "left
{
go to right//
;)digitalWrite(LB,LOW
;)digitalWrite(LF,HIGH
;)digitalWrite(RF,LOW
;)digitalWrite(RB,HIGH
}
) "**if( data == "back
{
go to back//
;)digitalWrite(LB,HIGH
;)digitalWrite(LF,LOW
;)digitalWrite(RF,LOW
72
;)digitalWrite(RB,HIGH
}
) "****if( data == "stop
{
go to stop//
;)digitalWrite(LB,LOW
;)digital Write(LF,LOW
;)digital Write(RF,LOW
;)digital Write(RB,LOW
}
) "**if( data == "forward
{
go to forward//
;)digital Write(LB,LOW
;)digital Write(LF,HIGH
;)digital Write(RF,HIGH
;)digital Write(RB,LOW
}

73
4.1 Circuit diagram
The circuit diagram of the project which combine all of modulo RX, TX, gyroscope, Arduino
Nano, Uno, and driver motor

Figure 4.1: Circuit Diagram

74
Figure 4.2: Hand Gesture Controlled Car
We Can develop our project by replacing the RF433MHZ segment with the NRF24
segment

The nRF24L01 is a wireless transceiver module, meaning each module can both send
as well as receive data. They operate in the frequency of 2.4GHz, which falls under the
ISM band and hence it is legal to use in almost all countries for engineering
applications. The modules when operated efficiently can cover a distance of 100 meters
(200 feet) which makes it a great choice for all wireless remote controlled projects.

The module operates at 3.3V hence can be easily used with 3.2V systems or 5V
systems. Each module has an address range of 125 and each module can
communicate with 6 other modules hence it is possible to have multiple wireless units
communicating with each other in a particular area.

-If you want to control by an open period, use the Ethernet, the control will be very large.

75
CONCLUSION
- We talked about remote control , history, technology , types and uses.
- Hand Gesture controlled and component.
- The simulation was excellent in electronic circuit.
- Project worked and the percentage of error between them was 1%.
- The model has been designed and the software as well as the control circuit has been
implemented successfully. It demonstrates the working of the controlled by hand gesture.
- Advantages:
1-Operation of the system is simple.
2-The production cost of the robot is very low
3-Low Maintenance is Required
4-Operation is Completely Wireless.
5-Simple ,Fast and Easy Installation.
-Dis Advantage:
1-We need change the size of the robot if we want to use it in the real world, This robot
is only small as an example.
2-Need to add a hand for it to be more useful and change ht RF to another RF model to
be more ranged,
3-We need to change the source so that the robot can walk more time.

76
REFERANCE

https://www.teachmemicro.com/use-l298n-motor-driver/

https://create.arduino.cc/projecthub/mayooghgirish/hand-gesture-controlled-robot-4d7587#toc-
what-gestures-will-the-robot-recognize-7

https://lastminuteengineers.com/433mhz-rf-wireless-arduino-tutorial/

https://components101.com/microcontrollers/arduino-uno

http://repository.sustech.edu/handle/123456789/22171

https://components101.com/modules/l293n-motor-driver-module

https://www.electronicshub.org/hand-gesture-controlled-robot

https://create.arduino.cc/projecthub/mayooghgirish/hand-gesture-controlled-robot-4d7587

77

You might also like