0% found this document useful (0 votes)
2 views46 pages

Hand Gesture Controlled Robot

The document provides an overview of embedded systems, detailing their characteristics, applications, and the importance of reliability and debugging. It introduces a project on hand gesture-controlled robots, explaining the system design, objectives, working mechanism, advantages, and potential applications. Additionally, it discusses the software requirements, specifically the use of the Arduino IDE for programming.

Uploaded by

ramyajetti254
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views46 pages

Hand Gesture Controlled Robot

The document provides an overview of embedded systems, detailing their characteristics, applications, and the importance of reliability and debugging. It introduces a project on hand gesture-controlled robots, explaining the system design, objectives, working mechanism, advantages, and potential applications. Additionally, it discusses the software requirements, specifically the use of the Arduino IDE for programming.

Uploaded by

ramyajetti254
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 46

CHAPTER 1

INTRODUCTION TO EMBEDDED SYSTEMS

Embedded Technology is now in its prime and the wealth of knowledge available is
mind blowing. However, most embedded systems engineers have a common complaint.
There are no comprehensive resources available over the internet which deal with the various
design and implementation issues of this technology. Intellectual property regulations of
many corporations are partly to blame for this and also the tendency to keep technical know-
how within a restricted group of researchers.

An embedded computer is frequently a computer that is implemented for a particular


purpose. In contrast, an average PC computer usually serves a number of purposes: checking
email, surfing the internet, listening to music, word processing, etc... However, embedded
systems usually only have a single task, or a very small number of related tasks that they are
programmed to perform.

Every home has several examples of embedded computers. Any appliance that has a
digital clock, for instance, has a small embedded micro-controller that performs no other task
than to display the clock. Modern cars have embedded computers onboard that control such
things as ignition timing and anti-lock brakes using input from a number of different sensors.

Embedded computers rarely have a generic interface, however. Even if embedded


systems have a keypad and an LCD display, they are rarely capable of using many different
types of input or output. An example of an embedded system with I/O capability is a security
alarm with an LCD status display, and a keypad for entering a password.

An embedded system can be defined as a control system or computer system designed


to perform a specific task. Common examples of embedded systems include MP3 players,
navigation systems on aircraft and intruder alarm systems. An embedded system can also be
defined as a single purpose computer.

Most embedded systems are time critical applications meaning that the embedded
system is working in an environment where timing is very important: the results of an
operation are only relevant if they take place in a specific time frame. An autopilot in an
aircraft is a time critical embedded system. If the autopilot detects that the plane for some
reason is going into a stall then it should take steps to correct this within milliseconds or there
would be catastrophic results.
1.1APPLICATIONS OF EMBEDDED SYSTEM

Embedded systems are commonly found in consumer, cooking, industrial,


automotive, medical, commercial and military applications.

Telecommunications systems employ numerous embedded systems from telephone


switches for the network to cell phones at the end user. Computer networking uses
dedicated routers and network bridges to route data.

Consumer electronics include MP3 players, mobile phones, videogame


consoles, digital cameras, GPS receivers, and printers. Household appliances, such
as microwave ovens, washing machines and dishwashers, include embedded systems to
provide flexibility, efficiency and features. Advanced HVAC systems use
networked thermostats to more accurately and efficiently control temperature that can change
by time of day and season. Home automation uses wired- and wireless-networking that can
be used to control lights, climate, security, audio/visual, surveillance, etc., all of which use
embedded devices for sensing and controlling.

Transportation systems from flight to automobiles increasingly use embedded


systems. New airplanes contain advanced avionics such as inertial guidance
systems and GPS receivers that also have considerable safety requirements. Various electric
motors brushless DC motors, induction motors and DC motors use electric/electronic motor
controllers. Automobiles, electric vehicles, and hybrid vehicles increasingly use embedded
systems to maximize efficiency and reduce pollution. Other automotive safety systems
include anti-lock braking system (ABS), Electronic Stability Control (ESC/ESP), traction
control (TCS) and automatic four-wheel drive.

Medical equipment uses embedded systems for vital signs monitoring, electronic
stethoscopes for amplifying sounds, and various medical imaging (PET, SPECT, CT,
and MRI) for non-invasive internal inspections. Embedded systems within medical
equipment are often powered by industrial computers.[9]

Embedded systems are used in transportation, fire safety, safety and security, medical
applications and life critical systems, as these systems can be isolated from hacking and thus,
be more reliable. For fire safety, the systems can be designed to have greater ability to handle
higher temperatures and continue to operate. In dealing with security, the embedded systems
can be self-sufficient and be able to deal with cut electrical and communication systems.
1.2CHARACTERISTICS OF EMBEDDED SYSTEM

Embedded systems are designed to do some specific task, rather than be a general-
purpose computer for multiple tasks. Some also have real-time performance constraints that
must be met, for reasons such as safety and usability; others may have low or no performance
requirements, allowing the system hardware to be simplified to reduce costs.

Embedded systems are not always standalone devices. Many embedded systems consist
of small parts within a larger device that serves a more general purpose. For example,
the Gibson Robot Guitar features an embedded system for tuning the strings, but the overall
purpose of the Robot Guitar is, of course, to play music. Similarly, an embedded system in
an automobile provides a specific function as a subsystem of the car itself.

Embedded systems range from no user interface at all, in systems dedicated only to one
task, to complex graphical user interfaces that resemble modern computer desktop operating
systems. Simple embedded devices use buttons, LEDs, graphic or character LCDs (HD44780
LCD for example) with a simple menu system.

More sophisticated devices which use a graphical screen with touch sensing or screen-
edge buttons provide flexibility while minimizing space used: the meaning of the buttons can
change with the screen, and selection involves the natural behavior of pointing at what is
desired. Handheld systems often have a screen with a "joystick button" for a pointing device.

Some systems provide user interface remotely with the help of a serial (e.g. RS-
232, USB, I²C, etc.) or network (e.g. Ethernet) connection. This approach gives several
advantages: extends the capabilities of embedded system, avoids the cost of a display,
simplifies BSP and allows one to build a rich user interface on the PC. A good example of
this is the combination of an embedded web server running on an embedded device (such as
an IP camera) or a network router. The user interface is displayed in a web browser on a PC
connected to the device, therefore needing no software to be installed.

1.3PROCESSORS IN EMBEDDED SYSTEMS

Embedded processors can be broken into two broad categories. Ordinary microprocessors
Embedded processors can be broken into two broad categories. Ordinary microprocessors
(μP) use separate integrated circuits for memory and peripherals. Microcontrollers (μC) have
on-chip peripherals, thus reducing power consumption, size and cost. In contrast to the
personal computer market, many different basic CPU architectures are used, since software is
custom-developed for an application and is not a commodity product installed by the end
user. Both Von Neumann as well as various degrees of Harvard architectures are
used. RISC as well as non-RISC processors are found. Word lengths vary from 4-bit to 64-
bits and beyond, although the most typical remain 8/16-bit. Most architectures come in a
large number of different variants and shapes, many of which are also manufactured by
several different companies.

Numerous microcontrollers have been developed for embedded systems use. General-
purpose microprocessors are also used in embedded systems, but generally require more
support circuitry than microcontrollers.

(μP) use separate integrated circuits for memory and peripherals. Microcontrollers (μC)
have on-chip peripherals, thus reducing power consumption, size and cost. In contrast to the
personal computer market, many different basic CPU architectures are used, since software is
custom-developed for an application and is not a commodity product installed by the end
user. Both Von Neumann as well as various degrees of Harvard architectures are
used. RISC as well as non-RISC processors are found. Word lengths vary from 4-bit to 64-
bits and beyond, although the most typical remain 8/16-bit. Most architectures come in a
large number of different variants and shapes, many of which are also manufactured by
several different companies.

Numerous microcontrollers have been developed for embedded systems use. General-
purpose microprocessors are also used in embedded systems, but generally require more
support circuitry than microcontrollers.

1.4 DEBUGGING IN EMBEDDED SYSTEMS

Embedded debugging may be performed at different levels, depending on the


facilities available. The different metrics that characterize the different forms of embedded
debugging are: does it slow down the main application, how close is the debugged system or
application to the actual system or application, how expressive are the triggers that I can set
for debugging (e.g., I want to inspect the memory when a particular program counter value is
reached), and what can I inspect in the debugging process (such as, only memory, or memory
and registers, etc.).

From simplest to most sophisticated they can be roughly grouped into the following areas:
Interactive resident debugging, using the simple shell provided by the embedded
operating system (e.g. Forth and Basic)

External debugging using logging or serial port output to trace operation using either
a monitor in flash or using a debug server like the Remedy Debugger which even works for
heterogeneous multicore systems.

An in-circuit debugger (ICD), a hardware device that connects to the microprocessor


via a JTAG or Nexus interface. This allows the operation of the microprocessor to be
controlled externally, but is typically restricted to specific debugging capabilities in the
processor.

An in-circuit emulator (ICE) replaces the microprocessor with a simulated equivalent,


providing full control over all aspects of the microprocessor.

A complete emulator provides a simulation of all aspects of the hardware, allowing all
of it to be controlled and modified, and allowing debugging on a normal PC. The downsides
are expense and slow operation, in some cases up to 100 times slower than the final system.

For SoC designs, the typical approach is to verify and debug the design on an FPGA
prototype board. Tools such as Certus [11] are used to insert probes in the FPGA RTL that
make signals available for observation. This is used to debug hardware, firmware and
software interactions across multiple FPGA with capabilities similar to a logic analyzer.

Unless restricted to external debugging, the programmer can typically load and run
software through the tools, view the code running in the processor, and start or stop its
operation. The view of the code may be as HLL source-code, assembly code or mixture of
both.

Because an embedded system is often composed of a wide variety of elements, the


debugging strategy may vary. For instance, debugging a software- (and microprocessor-)
centric embedded system is different from debugging an embedded system where most of the
processing is performed by peripherals (DSP, FPGA, and co-processor). An increasing
number of embedded systems today use more than one single processor core. A common
problem with multi-core development is the proper synchronization of software execution. In
such a case, the embedded system design may wish to check the data traffic on the busses
between the processor cores, which requires very low-level debugging, at signal/bus level,
with a logic analyzer, for instance.

1.5 RELIABILITY

Embedded systems often reside in machines that are expected to run continuously for
years without errors, and in some cases recover by themselves if an error occurs. Therefore,
the software is usually developed and tested more carefully than that for personal computers,
and unreliable mechanical moving parts such as disk drives, switches or buttons are avoided.

Specific reliability issues may include:

 The system cannot safely be shut down for repair, or it is too inaccessible to repair.
Examples include space systems, undersea cables, navigational beacons, bore-hole
systems, and automobiles.
 The system must be kept running for safety reasons. "Limp modes" are less tolerable.
Often backups are selected by an operator. Examples include aircraft navigation, reactor
control systems, safety-critical chemical factory controls, train signals.
 The system will lose large amounts of money when shut down: Telephone switches,
factory controls, bridge and elevator controls, funds transfer and market making,
automated sales and service.

A variety of techniques are used, sometimes in combination, to recover from errors—


both software bugs such as memory leaks, and also soft errors in the hardware:

 watchdog timer that resets the computer unless the software periodically notifies the
watchdog subsystems with redundant spares that can be switched over to software "limp
modes" that provide partial function
 Designing with a Trusted Computing Base (TCB) architecture[12] ensures a highly secure
& reliable system environment
 A hypervisor designed for embedded systems, is able to provide secure encapsulation for
any subsystem component, so that a compromised software component cannot interfere
with other subsystems, or privileged-level system software. This encapsulation keeps
faults from propagating from one subsystem to another, improving reliability. This may
also allow a subsystem to be automatically shut down and restarted on fault detection.
 Immunity Aware Programming
1.6 TRACING

Real-time operating systems (RTOS) often supports tracing of operating system events. A
graphical view is presented by a host PC tool, based on a recording of the system behavior.
The trace recording can be performed in software, by the RTOS, or by special tracing
hardware. RTOS tracing allows developers to understand timing and performance issues of
the software system and gives a good understanding of the high-level system behaviors.
Commercial tools like RTXC Quadros or IAR Systems exists.

PROJECT MADE BY MUFA TECH SOLUTIONS (INDIA) PVT. LTD


CHAPTER 2
HAND GESTURE CONTROLLED ROBOT

INTRODUCTION

Hand gesture-controlled robots are an innovative advancement in robotics, allowing users to


control a robot using simple hand movements. This system utilizes an accelerometer to detect
gestures, an RF module for wireless communication, and a microcontroller to process signals
and drive motors accordingly. Such robots have applications in automation, assistive
technology, and gaming.

SYSTEM DESIGN

The system consists of two main units:

1. Transmitter Unit:

o Arduino Uno

o ADXL335 Accelerometer
o RF Transmitter

o HW Battery

2. Receiver Unit:

o RF Receiver

o Arduino Uno

o L298N Motor Driver

o Motors (MOTOR 1 and MOTOR 2)

o Li-ion Batteries

OBJECTIVES

 To develop a robotic system controlled using hand gestures.

 To enable remote control of a robot without physical contact.

 To implement a real-time wireless communication system.

 To integrate Arduino for easy programming and control.

 To enhance automation using gesture recognition.

WORKING

1. The user wears a hand-mounted ADXL335 accelerometer.

2. The accelerometer detects tilts and movements of the hand.

3. These signals are sent to an Arduino Uno, which processes the data.

4. The Arduino transmits the signals wirelessly through the RF transmitter.

5. The RF receiver at the robot end captures the transmitted signals.

6. The second Arduino Uno interprets these signals and controls the L298N motor driver
accordingly.
7. The motor driver regulates the speed and direction of the motors, moving the robot
based on hand gestures

ADVANTAGES

 Hands-free robot control.


 Wireless communication for remote operation.
 Easy to use and cost-effective.
 Can be used in hazardous environments.
 Efficient and reliable for real-time applications.

APPLICATIONS

 Assistive technology for disabled individuals.


 Industrial automation and material handling.
 Gaming and entertainment industry.
 Surveillance and military applications.
 Search and rescue operations in dangerous environments.

FUTURE SCOPE

 Integration with AI for improved gesture recognition.


 Bluetooth or WiFi-based communication for better range.
 Implementation in exoskeleton suits for medical rehabilitation.
 Advanced motion tracking for precise control.
 Use of ML algorithms for adaptive gesture learning.
BLOCK DIAGRAM
CHAPTER 3

SOFTWARE REQUIREMENTS

Software used in this project for uploading code onto Arduino is Arduino IDE.

3.1 INTRODUCTION TO ARDUINO IDE

IDE stands for Integrated Development Environment. Pretty fancy sounding, and
should make you feel smart any time you use it. The IDE is a text editor-like program that
allows you to write Arduino code. When you open the Arduino program, you are opening the
IDE. It is intentionally streamlined to keep things as simple and straightforward as possible.
When you save a file in Arduino, the file is called a sketch – a sketch is where you save the
computer code you have written. The coding language that Arduino uses is very much like
C++ (“see plus plus”), which is a common language in the world of computing. The code you
learn to write for Arduino will be very similar to the code you write in any other computer
language – all the basic concepts remain the same – it is just a matter of learning a new
dialect should you pursue other programming languages.

The code you write is “human readable”, that is, it will make sense to you
(sometimes), and will be organized for a human to follow. Part of the job of the IDE is to take
the human readable code and translate it into machine-readable code to be executed by the
Arduino. This process is called compiling. The process of compiling is seamless to the user.
All you have to do is press a button. If you have errors in your computer code, the compiler
will display an error message at the bottom of the IDE and highlight the line of code that
seems to be the issue. The error message is meant to help you identify what you might have
done wrong – sometimes the message is very explicit, like saying, “Hey – you forget a
semicolon”, sometimes the error message is vague. Why be concerned with a semicolon you
ask? A semicolon is part of the Arduino language syntax, the rules that govern how the code
is written. It is like grammar in writing. Say for example we didn’t use periods when we
wrote – everyone would have a heck of a time trying to figure out when sentences started and
ended. Or if we didn’t employ the comma, how would we convey a dramatic pause to the
reader?
And let me tell you, if you ever had an English teacher with an overactive red pen, the
compiler is ten times worse. In fact – your programs WILL NOT compile without perfect
syntax. This might drive you crazy at first because it is very natural to forget syntax. As you
gain experience programming you will learn to be assiduous about coding grammar.
3.1.1 THE SEMICOLON

A semicolon needs to follow every statement written in the Arduino programming


language. For example, …

Int LedPin=9;

In this statement, I am assigning a value to an integer variable (we will cover this
later), notice the semicolon at the end. This tells the compiler that you have finished a chunk
of code and are moving on to the next piece. A semicolon is to Arduino code, as a period is to
a sentence. It signifies a complete statement.

3.1.2 THE DOUBLE BACKSLASH FOR SINGLE LINE COMMENTS //

Comments are what you use to annotate code. Good code is commented well.
Comments are meant to inform you and anyone else who might stumble across your code,
what the heck you were thinking when you wrote it. A good comment would be something
like this…

Now, in 3 months when I review this program, I know where to stick my LED. Comments
will be ignored by the compiler – so you can write whatever you like in them. If you have a
lot you need to explain, you can use a multi-line comment, shown below…

//This is an example

Comments are like the footnotes of code, except far more prevalent and not at the bottom of
the page.

3.1.3 THE CURLY BRACES


Curly braces are used to enclose further instructions carried out by a function (we
discuss functions next). There is always an opening curly bracket and a closing curly bracket.
If you forget to close a curly bracket, the compiler will not like it and throw an error code .

Void loop (){

Remember – no curly brace may go unclosed!

3.1.4 FUNCTION ( )

Functions are pieces of code that are used so often that they are encapsulated in
certain keywords so that you can use them more easily. For example, a function could be the
following set of instructions…

This set of simple instructions could be encapsulated in a function that we call


WashDog. Every time we want to carry out all those instructions we just type WashDog and
voila – all the instructions are carried out. In Arduino, there are certain functions that are used
so often they have been built into the IDE. When you type them, the name of the function
will appear orange. The function pinMode(), for example, is a common function used to
designate the mode of an Arduino pin.

What’s the deal with the parentheses following the function pinMode? Many
functions require arguments to work. An argument is information the function uses when it
runs. For our WashDog function, the arguments might be dog name and soap type, or
temperature and size of a bucket.

pinMode(13, OUTPUT);

The argument 13 refers to pin 13, and OUTPUT is the mode in which you want the
pin to operate. When you enter these arguments the terminology is called passing. You pass
the necessary information to the functions. Not all functions require arguments, but opening
and closing parentheses will stay regardless though empty.

Notice that the word OUTPUT is blue. There are certain keywords in Arduino that are
used frequently and the color blue helps identify them. The IDE turns them blue
automatically. Now we won’t get into it here, but you can easily make your own functions in
Arduino, and you can even get the IDE to color them for you. We will, however, talk about
the two functions used in nearly EVERY Arduino program.

3.1.5 VOID SETUP ( )

The function, setup(), as the name implies, is used to set up the Arduino board. The Arduino
executes all the code that is contained between the curly braces of setup() only once. Typical
things that happen in setup() are setting the modes of pins, starting You might be wondering
what void means before the function setup(). Void means that the function does not return
information. Some functions do return values – our DogWash function might return the
number of buckets it required to clean the dog. The function analogRead() returns an integer
value between 0-1023. If this seems a bit odd now, don’t worry as we will cover every
common Arduino function in depth as we continue the course.

Let us review a couple things you should know about setup()…

1. setup() only runs once.

2. setup() needs to be the first function in your Arduino sketch.

3. setup() must have opening and closing curly braces.

3.1.6 VOID LOOP ( )

You have to love the Arduino developers because the function names are so telling.
As the name implies, all the code between the curly braces in loop() is repeated over and over
again – in a loop. The loop() function is where the body of your program will reside. As with
setup(), the function loop() does not return any values, therefore the word void precedes it.

Does it seem odd to you that the code runs in one big loop? This apparent lack of
variation is an illusion. Most of your code will have specific conditions laying in wait which
will trigger new actions.

If you have a temperature sensor connected to your Arduino for example, then when
the temperature gets to a predefined threshold you might have a fan kick on. The looping
code is constantly checking the temperature waiting to trigger the fan. So even though the
code loops over and over, not every piece of the code will be executed every iteration of the
loop.

3.2 INTRODUCTION ARDUINO LIBRARIES

Libraries are a collection of code that makes it easy for you to connect to a sensor,
display, module, etc. For example, the built-in LiquidCrystal library makes it easy to talk to
character LCD displays. There are hundreds of additional libraries available on the Internet
for download. The built-in libraries and some of these additional libraries are listed in the
reference. To use the additional libraries, you will need to install them.

Arduino libraries are managed in three different places: inside the IDE installation
folder, inside the core folder and in the libraries folder inside your sketchbook. The way
libraries are chosen during compilation is designed to allow the update of libraries present in
the distribution. This means that placing a library in the “libraries” folder in your sketchbook
overrides the other libraries versions.

The same happens for the libraries present in additional cores installations. It is also
important to note that the version of the library you put in your sketchbook may be lower
than the one in the distribution or core folders, nevertheless it will be the one used during
compilation. When you select a specific core for your board, the libraries present in the core’s
folder are used instead of the same libraries present in the IDE distribution folder.

Last, but not least important is the way the Arduino Software (IDE) upgrades itself:
all the files in Programs/Arduino (or the folder where you installed the IDE) are deleted and a
new folder is created with fresh content. This is why we recommend that you only install
libraries to the sketchbook folder so they are not deleted during the Arduino IDE update
process.

3.2.1 HOW TO INSTALL A LIBRARY

To install a new library into your Arduino IDE you can use the Library Manager
(available from IDE version 1.6.2). Open the IDE and click to the "Sketch" menu and
then Include Library > Manage Libraries.

Then the Library Manager will open and you will find a list of libraries that are
already installed or ready for installation. In this example we will install the Bridge library.
Scroll the list to find it, click on it, then select the version of the library you want to install.
Sometimes only one version of the library is available. If the version selection menu does not
appear, don't worry: it is normal.

Finally click on install and wait for the IDE to install the new library. Downloading
may take time depending on your connection speed. Once it has finished, an Installed tag
should appear next to the Bridge library. You can close the library manager. You can now
find the new library available in the Sketch > Include Library menu. If you want to add your
own library to Library Manager, follow these instructions.

3.3 HOW TO CONNECT ARDUINO BOARD

If you're using a serial board, power the board with an external power supply (6 to 25
volts DC, with the core of the connector positive). Connect the board to a serial port on your
computer. On the USB boards, the power source is selected by the jumper between the USB
and power plugs. To power the board from the USB port (good for controlling low power
devices like LEDs), place the jumper on the two pins closest to the USB plug. To power the
board from an external power supply (needed for motors and other high current devices),
place the jumper on the two pins closest to the power plug. Either way, connect the board to a
USB port on your computer. On Windows, the Add New Hardware wizard will open; tell it
you want to specify the location to search for drivers and point to the folder containing the
USB drivers you unzipped in the previous step.

The power LED should go on.

3.4 HOW TO UPLOAD A PROGRAM

The content of circuits and Arduino sketches can vary greatly. Before you get started,
there is one simple process for uploading a sketch to an Arduino board that you can refer
back to.

Follow these steps to upload your sketch:

1. Connect your Arduino using the USB cable.

The square end of the USB cable connects to your Arduino and the flat end connects to a
USB port on your computer.

2. Choose Tools→Board→Arduino Uno to find your board in the Arduino menu.

You can also find all boards through this menu, such as the Arduino MEGA 2560 and
Arduino Leonardo.

3. Choose the correct serial port for your board.

You find a list of all the available serial ports by choosing Tools→Serial Port→ comX or
/dev/tty.usbmodemXXXXX. X marks a sequentially or randomly assigned number. In
Windows, if you have just connected your Arduino, the COM port will normally be the
highest number, such as com 3 or com 15.

Many devices can be listed on the COM port list, and if you plug in multiple Arduinos, each
one will be assigned a new number. On Mac OS X, the /dev/tty.usbmodem number will be
randomly assigned and can vary in length, such as /dev/tty.usbmodem1421 or
/dev/tty.usbmodem262471. Unless you have another Arduino connected, it should be the only
one visible.

4. Click the Upload button.

This is the button that points to the right in the Arduino environment. You can also use the
keyboard shortcut Ctrl+U for Windows or Cmd+U for Mac OS X.

CHAPTER 4
HARDWARE REQUIREMENTS
Hardware Components of this project are

1. ARDUINO UNO
2. ADXL335 ACCELEROMETER
3. HW BATTERY
4. RF TRANSMITTER RECIEVER
5. L298N DRIVER
6. DC GEAR MOTOR
7. LI-ION BATTERY

4.1 INTRODUCTION TO ARDUINO UNO


Arduino is an open-source electronics platform based on easy-to-use hardware and
software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a
Twitter message - and turn it into an output - activating a motor, turning on an LED,
publishing something online. You can tell your board what to do by sending a set of
instructions to the microcontroller on the board. To do so you use the Arduino programming
language (based on Wiring), and the Arduino Software (IDE), based on Processing.

Over the years Arduino has been the brain of thousands of projects, from everyday
objects to complex scientific instruments. A worldwide community of makers - students,
hobbyists, artists, programmers, and professionals - has gathered around this open-source
platform, their contributions have added up to an incredible amount of accessible
knowledge that can be of great help to novices and experts alike.

Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast
prototyping, aimed at students without a background in electronics and programming. As
soon as it reached a wider community, the Arduino board started changing to adapt to new
needs and challenges, differentiating its offer from simple 8-bit boards to products
for IoT applications, wearable, 3D printing, and embedded environments. All Arduino boards
are completely open-source, empowering users to build them independently and eventually
adapt them to their particular needs. The software, too, is open-source, and it is growing
through the contributions of users worldwide.

4.1.1 WHY ARDUINO

Thanks to its simple and accessible user experience, Arduino has been used in
thousands of different projects and applications. The Arduino software is easy-to-use for
beginners, yet flexible enough for advanced users. It runs on Mac, Windows, and Linux.
Teachers and students use it to build low cost scientific instruments, to prove chemistry and
physics principles, or to get started with programming and robotics. Designers and architects
build interactive prototypes, musicians and artists use it for installations and to experiment
with new musical instruments. Makers, of course, use it to build many of the projects
exhibited at the Maker Faire, for example. Arduino is a key tool to learn new things. Anyone
- children, hobbyists, artists, programmers - can start tinkering just following the step by step
instructions of a kit, or sharing ideas online with other members of the Arduino community.

4.1.2 ADVANTAGES OF ARDUINO

 Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller


platforms. The least expensive version of the Arduino module can be assembled by hand, and
even the pre-assembled Arduino modules cost less than $50
 Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX, and
Linux operating systems. Most microcontroller systems are limited to Windows.
 Simple, clear programming environment - The Arduino Software (IDE) is easy-to-
use for beginners, yet flexible enough for advanced users to take advantage of as well. For
teachers, it's conveniently based on the Processing programming environment, so students
learning to program in that environment will be familiar with how the Arduino IDE works.
 Open source and extensible software - The Arduino software is published as open
source tools, available for extension by experienced programmers. The language can be
expanded through C++ libraries, and people wanting to understand the technical details can
make the leap from Arduino to the AVR C programming language on which it's based.
Similarly, you can add AVR-C code directly into your Arduino programs if you want to.
 Open source and extensible hardware - The plans of the Arduino boards are
published under a Creative Commons license, so experienced circuit designers can make their
own version of the module, extending it and improving it. Even relatively inexperienced
users can build the breadboard version of the module in order to understand how it works and
save money.

4.1.3 FEATURES OF ARDUINO UNO


The Arduino Uno is a microcontroller board based on the ATmega328. Arduino is an open-
source, prototyping platform and its simplicity makes it ideal for hobbyists to use as well as
professionals. The Arduino Uno has 14 digital input/output pins (of which 6 can be used as
PWM outputs), 6 analog inputs, 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.

Features of the Arduino UNO:

 Microcontroller: ATmega328
 Operating Voltage: 5V
 Input Voltage (recommended): 7-12V
 Input Voltage (limits): 6-20V
 Digital I/O Pins: 14 (of which 6 provide PWM output)
 Analog Input Pins: 6
 DC Current per I/O Pin: 40 mA
 DC Current for 3.3V Pin: 50 mA
 Flash Memory: 32 KB of which 0.5 KB used by bootloader
 SRAM: 2 KB (ATmega328)
 EEPROM: 1 KB (ATmega328)
 Clock Speed: 16 MHz
4.3 INTRODUCTION TO ADXL335 ACCELEROMETER

The ADXL335 is a small, thin, low power, complete 3-axis accelerometer with signal
conditioned voltage outputs. The product measures acceleration with a minimum full-scale
range of ±3 g. It can measure the static acceleration of gravity in tiltsensing applications, as
well as dynamic acceleration resulting from motion, shock, or vibration.

The user selects the bandwidth of the accelerometer using the CX, CY, and CZ capacitors at
the XOUT, YOUT, and ZOUT pins. Bandwidths can be selected to suit the application, with
a range of 0.5 Hz to 1600 Hz for X and Y axes, and a range of 0.5 Hz to 550 Hz for the Z
axis.
The ADXL335 is available in a small, low profile, 4 mm × 4 mm × 1.45 mm, 16-lead, plastic
lead frame chip scale package (LFCSP_LQ).

Applications

Cost sensitive, low power, motion- and tilt-sensing applications

Mobile devices

Gaming systems

Disk drive protection

Image stabilization

4.11 INTRODUCTION 9V BATTERY

The nine-volt battery, or 9-volt battery, is a common size of battery that was
introduced for the early transistor radios. It has a rectangular prism shape with rounded edges
and a polarized snap connector at the top. This type is commonly used in walkie-
talkies, clocks and smoke detectors.
The nine-volt battery format is commonly available in primary carbon-zinc and
alkaline chemistry, in primary lithium iron disulfide, and in rechargeable form in nickel-
cadmium, nickel-metal hydride and lithium-ion. Mercury-oxide batteries of this format, once
common, have not been manufactured in many years due to their mercury
content. Designations for this format include NEDA 1604 and IEC 6F22 (for zinc-carbon)
or MN1604 6LR61 (for alkaline). The size, regardless of chemistry, is commonly
designated PP3 - a designation originally reserved solely for carbon-zinc or in some
countries, E or E-block.

Most nine-volt alkaline batteries are constructed of six individual 1.5 V LR61 cells
enclosed in a wrapper. These cells are slightly smaller than LR8D425 AAAA cells and can be
used in their place for some devices, even though they are 3.5 mm shorter. Carbon-zinc types
are made with six flat cells in a stack, enclosed in a moisture-resistant wrapper to prevent
drying. Primary lithium types are made with three cells in series.

In 2007, 9-volt batteries accounted for 4% of alkaline primary battery sales in the US. In
Switzerland in 2008, 9-volt batteries totalled 2% of primary battery sales and 2% of
secondary battery sales

4.11.1 TECHNICAL SPECIFICATIONS

The most common type of 9V battery is commonly referred to simply as 9-volt,


although there are less common 9V batteries of different sizes. Codes for the usual size
include PP3 (for size and voltage, any technology), 6LR61 (IEC code for alkaline batteries),
and in Japan 006P.[1]

The PP3 size battery has height 48.5 mm, width 26.5 mm, depth 17.5 mm (or 1.9 in ×
1.0 in × 0.68 in). Both terminals are at one end and their centers are 1⁄2 inch (12.7 mm) apart.

Inside an alkaline or carbon-zinc 9-volt battery there are six cylindrical or flat cells connected
in series. Some brands use welded tabs internally to attach to the cells, others press foil strips
against the ends of the cells.

Rechargeable nickel–cadmium (NiCd) and Nickel–metal hydride (NiMH) batteries of


nominal 9V rating have between six and eight 1.2 volt cells. Lithium ion versions typically
use two cells (3.7-4.2V nominal each). There are also lithium polymer and low self-discharge
NiMHversions.

Mercury batteries were formerly made in this size. They had higher capacity than the
then-standard carbon-zinc types, a nominal voltage of 8.4 volts, and very stable voltage. Once
used in photographic and measuring instruments or long-life applications, they are no longer
manufactured as mercury is an environmental pollutant.

4.11.2 CONNECTORS

The battery has both terminals in a snap connector on one end. The smaller circular
(male) terminal is positive, and the larger hexagonal or octagonal (female) terminal is the
negative contact. The connectors on the battery are the same as on the connector itself; the
smaller one connects to the larger one and vice versa. The same snap-style connector is used
on other battery types in the Power Pack (PP) series. Battery polarization is normally obvious
since mechanical connection is usually only possible in one configuration. A problem with
this style of connector is that it is very easy to connect two batteries together in a short
circuit, which quickly discharges both batteries, generating heat and possibly a fire. Because
of this hazard, 9-volt batteries should be kept in the original packaging until they are going to
be used. An advantage is that several nine-volt batteries can be connected to each other in
series to provide higher voltages.
4.4 INTRODUCTION TO RF TRANSMITTER AND RECEIVER

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
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 434 MHz. 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.
Pin Description:

RF Transmitter

Pin
Function Name
No

1 Ground (0V) Ground

2 Serial data input pin Data

3 Supply voltage; 5V Vcc

4 Antenna output pin ANT

RF Receiver
Pin
Function Name
No

1 Ground (0V) Ground

2 Serial data output pin Data

3 Linear output pin; not connected NC

4 Supply voltage; 5V Vcc

5 Supply voltage; 5V Vcc

6 Ground (0V) Ground

7 Ground (0V) Ground

8 Antenna input pin ANT

4.4.1 RF PERFORMANCE

As with any other RF device, the performance of an RF module will depend on a


number of factors. For example, by increasing the transmitter power, a larger communication
distance will be achieved. However, this will also result in a higher electrical power drain on
the transmitter device, which will cause shorter operating life for battery powered devices.
Also, using a higher transmit power will make the system more prone to interference with
other RF devices, and may in fact possibly cause the device to become illegal depending on
the jurisdiction. Correspondingly, increasing the receiver sensitivity will also increase the
effective communication range, but will also potentially cause malfunction due to
interference from other RF devices.

The performance of the overall system may be improved by using matched antennas
at each end of the communication link, such as those described earlier.

Finally, the labelled remote distance of any particular system is normally measured in
an open-air line of sight configuration without any interference, but often there will be
obstacles such as walls, floors, or dense construction to absorb the radio wave signals, so the
effective operational distance will in most practical instances be less than specified.

4.4.2 TYPICAL APPLICATIONS


 Vehicle monitoring
 Remote control
 Telemetry
 Small-range wireless network
 Wireless meter reading
 Access control systems
 Wireless home security systems
 Area paging
 Industrial data acquisition system
 Radio tags reading
 RF contactless smart cards
 Wireless data terminals
 Wireless fire protection systems
 Biological signal acquisition
 Hydrological and meteorological monitoring
 Robot remote control
 Wireless data transmissions
 Digital video/audio transmission
 Digital home automation, such as remote light/switch

4.2 INTRODUCTION TO L293D MOTOR DRIVER

Dual Motor Controller Module 2A with Arduino. This allows you to control the speed
and direction of two DC motors, or control one bipolar stepper motor with ease. The
L298N H-bridge module can be used with motors that have a voltage of between 5 and 35V
DC.
There is also an onboard 5V regulator, so if your supply voltage is up to 12V you can also
source 5V from the board. These L298 H-bridge dual motor controller modules .
4.2.1 PIN DESCRIPTION

1. DC motor 1 "+" or stepper motor A+


2. DC motor 1 "-" or stepper motor A-
3. 12V jumper - remove this if using a supply voltage greater than 12V DC. This enables
power to the onboard 5V regulator
4. Connect your motor supply voltage here, maximum of 35V DC. Remove 12V jumper if
>12V DC
5. GND
6. 5V output if 12V jumper in place, ideal for powering your Arduino (etc)
7. DC motor 1 enable jumper. Leave this in place when using a stepper motor. Connect to
PWM output for DC motor speed control.
8. IN1
9. IN2
10. IN3
11. IN4
12. DC motor 2 enable jumper. Leave this in place when using a stepper motor. Connect to
PWM output for DC motor speed control.
13. DC motor 2 "+" or stepper motor B+
14. DC motor 2 "-" or stepper motor B-

4.2.2 CONTROLLING DC MOTOR


To control one or two DC motors is quite easy. First connect each motor to the A and
B connections on the L298N module. If you're using two motors for a robot (etc) ensure that
the polarity of the motors is the same on both inputs. Otherwise you may need to swap them
over when you set both motors to forward and one goes backwards!
Next, connect your power supply - the positive to pin 4 on the module and
negative/GND to pin 5. If you supply is up to 12V you can leave in the 12V jumper (point 3
in the image above) and 5V will be available from pin 6 on the module. This can be fed to
your Arduino's 5V pin to power it from the motors' power supply. Don't forget to connect
Arduino GND to pin 5 on the module as well to complete the circuit.

Now you will need six digital output pins on your Arduino, two of which need to be
PWM (pulse-width modulation) pins. PWM pins are denoted by the tilde ("~") next to the pin
number, for example: Finally, connect the Arduino digital output pins to the driver module.
In our example we have two DC motors, so digital pins D9, D8, D7 and D6 will be connected
to pins IN1, IN2, IN3 and IN4 respectively. Then connect D10 to module pin 7 (remove the
jumper first) and D5 to module pin 12 (again, remove the jumper).

The motor direction is controlled by sending a HIGH or LOW signal to the drive for
each motor (or channel). For example for motor one, a HIGH to IN1 and a LOW to IN2 will
cause it to turn in one direction, and a LOW and HIGH will cause it to turn in the other
direction. However the motors will not turn until a HIGH is set to the enable pin (7 for motor
one, 12 for motor two). And they can be turned off with a LOW to the same pin(s). However
if you need to control the speed of the motors, the PWM signal from the digital pin connected
to the enable pin can take care of it.

4.3 INTRODUCTION TO DC GEAR MOTOR

A DC motor is any of a class of rotary electrical machines that converts direct current
electrical energy into mechanical energy. The most common types rely on the forces
produced by magnetic fields. Nearly all types of DC motors have some internal mechanism,
either electromechanical or electronic, to periodically change the direction of current flow in
part of the motor.

DC motors were the first type widely used, since they could be powered from existing
direct-current lighting power distribution systems. A DC motor's speed can be controlled over
a wide range, using either a variable supply voltage or by changing the strength of current in
its field windings. Small DC motors are used in tools, toys, and appliances. The universal
motor can operate on direct current but is a lightweight motor used for portable power tools
and appliances. Larger DC motors are used in propulsion of electric vehicles, elevator and
hoists, or in drives for steel rolling mills. The advent of power electronics has made
replacement of DC motors with AC motors possible in many applications.

4.3.1 BRUSHED DC MOTOR

The brushed DC electric motor generates torque directly from DC power supplied to
the motor by using internal commutation, stationary magnets (permanent or electromagnets),
and rotating electrical magnets.

Advantages of a brushed DC motor include low initial cost, high reliability, and
simple control of motor speed. Disadvantages are high maintenance and low life-span for
high intensity uses. Maintenance involves regularly replacing the carbon brushes and springs
which carry the electric current, as well as cleaning or replacing the commutator. These
components are necessary for transferring electrical power from outside the motor to the
spinning wire windings of the rotor inside the motor. Brushes consist of conductors.

4.3.2 BRUSHLESS DC MOTOR


Typical brushless DC motors use one or more permanent magnets in the rotor
and electromagnets on the motor housing for the stator. A motor controller converts DC
to AC. This design is mechanically simpler than that of brushed motors because it eliminates
the complication of transferring power from outside the motor to the spinning rotor. The
motor controller can sense the rotor's position via Hall effect sensors or similar devices and
can precisely control the timing, phase, etc., of the current in the rotor coils to optimize
torque, conserve power, regulate speed, and even apply some braking. Advantages of
brushless motors include long life span, little or no maintenance, and high efficiency.
Disadvantages include high initial cost, and more complicated motor speed controllers. Some
such brushless motors are sometimes referred to as "synchronous motors" although they have
no external power supply to be synchronized with, as would be the case with normal AC
synchronous motors.

4.3.3 PERMANENT MAGNET STATOR

A PM motor does not have a field winding on the stator frame, instead relying on
PMs to provide the magnetic field against which the rotor field interacts to produce torque.
Compensating windings in series with the armature may be used on large motors to improve
commutation under load. Because this field is fixed, it cannot be adjusted for speed control.
PM fields (stators) are convenient in miniature motors to eliminate the power consumption of
the field winding. Most larger DC motors are of the "dynamo" type, which have stator
windings. Historically, PMs could not be made to retain high flux if they were disassembled;
field windings were more practical to obtain the needed amount of flux. However, large PMs
are costly, as well as dangerous and difficult to assemble; this favors wound fields for large
machines.

To minimize overall weight and size, miniature PM motors may use high energy
magnets made with neodymium or other strategic elements; most such are neodymium-iron-
boron alloy. With their higher flux density, electric machines with high-energy PMs are at
least competitive with all optimally designed singly fed synchronous and induction electric
machines. Miniature motors resemble the structure in the illustration, except that they have at
least three rotor poles (to ensure starting, regardless of rotor position) and their outer housing
is a steel tube that magnetically links the exteriors of the curved field magnets.
4.3.4 SERIES CONNECTION

A series DC motor connects the armature and field windings in series with
a common D.C. power source. The motor speed varies as a non-linear function of load torque
and armature current; current is common to both the stator and rotor yielding current squared
(I^2) behavior. A series motor has very high starting torque and is commonly used for
starting high inertia loads, such as trains, elevators or hoists. [2] This speed/torque
characteristic is useful in applications such as dragline excavators, where the digging tool
moves rapidly when unloaded but slowly when carrying a heavy load.

A series motor should never be started at no load. With no mechanical load on the
series motor, the current is low, the counter-EMF produced by the field winding is weak, and
so the armature must turn faster to produce sufficient counter-EMF to balance the supply
voltage. The motor can be damaged by overspeed. This is called a runaway condition.

Series motors called universal motors can be used on alternating current. Since the armature
voltage and the field direction reverse at the same time, torque continues to be produced in
the same direction. However they run at a lower speed with lower torque on AC supply when
compared to DC due to reactance voltage drop in AC which is not present in DC. [3]Since the
speed is not related to the line frequency, universal motors can develop higher-than-
synchronous speeds, making them lighter than induction motors of the same rated mechanical
output. This is a valuable characteristic for hand-held power tools. Universal motors for
commercial utility are usually of small capacity, not more than about 1 kW output. However,
much larger universal motors were used for electric locomotives, fed by special low-
frequency traction power networks to avoid problems with commutation under heavy and
varying loads.

4.3.5 SHUNT CONNECTION

A shunt DC motor connects the armature and field windings in parallel or shunt with
a common D.C. power source. This type of motor has good speed regulation even as the load
varies, but does not have the starting torque of a series DC motor. [4] It is typically used for
industrial, adjustable speed applications, such as machine tools, winding/unwinding machines
and tensioners.
4.6 INTRODUCTION TO 18650 BATTERY

A lithium-ion battery or Li-ion battery is a type of rechargeable battery in


which lithium ions move from the negative electrode through an electrolyte to the positive
electrode during discharge, and back when charging. Li-ion batteries use
an intercalated lithium compound as the material at the positive electrode and
typically graphite at the negative electrode.

Li-ion batteries have a high energy density, no memory effect (other than LFP cells)[9] and
low self-discharge. Cells can be manufactured to either prioritize energy or power
density. [10] They can however be a safety hazard since they contain flammable electrolytes,
and if damaged or incorrectly charged can lead to explosions and fires. Samsung was forced
to recall Galaxy Note 7 handsets following lithium-ion fires,[11] and there have been several
incidents involving batteries on Boeing 787s.
A prototype Li-ion battery was developed by Akira Yoshino in 1985, based on earlier
research by John Goodenough, M. Stanley Whittingham, Rachid Yazami and Koichi
Mizushima during the 1970s–1980s,[12][13][14] and then a commercial Li-ion battery was
developed by a Sony and Asahi Kasei team led by Yoshio Nishi in 1991.[15]

Lithium-ion batteries are commonly used for portable electronics and electric vehicles and
are growing in popularity for military and aerospace applications.[16]

Chemistry, performance, cost and safety characteristics vary across types of lithium-ion
batteries. Handheld electronics mostly use lithium polymer batteries (with a polymer gel as
electrolyte), a lithium cobalt oxide (LiCoO
3-based lithium rich layered materials, LMR-NMC), and lithium nickel manganese cobalt
oxide (LiNiMnCoO
2 or NMC) may offer longer lives and may have better rate capability. Such batteries are
widely used for electric tools, medical equipment, and other roles. NMC and its derivatives
are widely used in electric vehicles.

Research areas for lithium-ion batteries include extending lifetime, increasing energy density,
improving safety, reducing cost, and increasing charging speed, [19] among others. Research
has been under way in the area of non-flammable electrolytes as a pathway to increased
safety based on the flammability and volatility of the organic solvents used in the typical
electrolyte. Strategies include aqueous lithium-ion batteries, ceramic solid electrolytes,
polymer electrolytes, ionic liquids, and heavily fluorinated systems
CHAPTER 5

PROGRAM CODE

Transmitter Code (Gesture Sensing & RF Transmission)

#include <Wire.h>

#include <RF24.h>

int x, y, z;

RF24 radio(9, 10);

const byte address[6] = "00001";

void setup() {

pinMode(A0, INPUT);

pinMode(A1, INPUT);

pinMode(A2, INPUT);

radio.begin();

radio.openWritingPipe(address);

radio.setPALevel(RF24_PA_MIN);
radio.stopListening();

void loop() {

x = analogRead(A0);

y = analogRead(A1);

z = analogRead(A2);

int data[3] = {x, y, z};

radio.write(&data, sizeof(data));

delay(100);

Receiver Code (Motor Control)

#include <RF24.h>

RF24 radio(9, 10);

const byte address[6] = "00001";

int ENA = 5;

int IN1 = 6;

int IN2 = 7;

int ENB = 10;

int IN3 = 8;

int IN4 = 9;

void setup() {

pinMode(ENA, OUTPUT);

pinMode(IN1, OUTPUT);

pinMode(IN2, OUTPUT);

pinMode(ENB, OUTPUT);

pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);

radio.begin();

radio.openReadingPipe(0, address);

radio.setPALevel(RF24_PA_MIN);

radio.startListening();

void loop() {

int data[3];

if (radio.available()) {

radio.read(&data, sizeof(data));

if (data[1] > 600) {

digitalWrite(IN1, HIGH);

digitalWrite(IN2, LOW);

digitalWrite(IN3, HIGH);

digitalWrite(IN4, LOW);

} else if (data[1] < 400) {

digitalWrite(IN1, LOW);

digitalWrite(IN2, HIGH);

digitalWrite(IN3, LOW);

digitalWrite(IN4, HIGH);

} else {

digitalWrite(IN1, LOW);

digitalWrite(IN2, LOW);

digitalWrite(IN3, LOW);

digitalWrite(IN4, LOW);

}
}

CHAPTER 6
RESULT
CHAPTER 7
CONCLUSION

The hand gesture-controlled robot is an innovative solution for various applications,


providing an intuitive control mechanism without physical buttons or joysticks. With further
advancements in AI and IoT integration, these robots can become more efficient, intelligent,
and adaptable to different real-world scenarios.

You might also like