0% found this document useful (0 votes)
91 views52 pages

Summer Training On Arduino

This document provides a report on summer training conducted on Arduino. It includes an introduction, literature review, description of hardware components used including NodeMCU, ESP32CAM module, ultrasonic sensor, servo motor, motor driver and power supply. It also discusses the software used, interfacing of components, working and source code for the project. The report was submitted in partial fulfillment of requirements for a Bachelor of Technology degree in electronics and communication engineering.

Uploaded by

Aakriti
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)
91 views52 pages

Summer Training On Arduino

This document provides a report on summer training conducted on Arduino. It includes an introduction, literature review, description of hardware components used including NodeMCU, ESP32CAM module, ultrasonic sensor, servo motor, motor driver and power supply. It also discusses the software used, interfacing of components, working and source code for the project. The report was submitted in partial fulfillment of requirements for a Bachelor of Technology degree in electronics and communication engineering.

Uploaded by

Aakriti
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/ 52

SUMMER TRAINING ON ARDUINO

A Report submitted in partial fulfilment of the requirement for


award of degree of

Bachelor of Technology In

Electronics and Communication Engineering

Under the supervision of Meena Rao

Submitted by

Aakriti Raj (20515002819)

MAHARAJA SURAJMAL INSTITUTE OF TECHNOLOGY

C-4, Janakpuri, New Delhi-58

Affiliated to Guru Gobind Singh Indraprastha University

OCT 2021

I
CERTIFICATE

II
III
IV
ACKNOWLEDGEMENT

We take this opportunity to express our profound gratitude and deep regards to
our guide, Meena Rao for her exemplary guidance, monitoring and constant
encouragement throughout the course. The blessing, help and guidance given by
her time to time shall carry us a long way in the journey of life on which we are
about to embark.

We also take this opportunity to express a deep sense of gratitude for her cordial
support, valuable information and guidance, which helped us in completing this
task through various stages.

Lastly, we would like to thank almighty, our families and friends for their
constant encouragement without which this assignment would not be possible.

Aakriti Raj (20515002819)

V
INDEX

LIST OF FIGURES III


ABSTRACT IV
1. INTRODUCTION 1
1.1. THEORETICAL BACKGROUND 2
1.2. MOTIVATION 3
1.3. OBJECTIVES OF THE PROPOSED WORK 3
1.3.1. SECURITY REASONS 3
1.3.2. FUNCTIONAL FEATURES 3
1.3.3. WORKING RANGE 4
1.3.4. FREQUENCY RANGE 4
2. LITERATURE REVIEW 5
3. HARDWARE 8
3.1. NODEMCU (ESP8266) 8
3.1.1. FEATURES 9
3.2. ESP32CAM MODULE 10
3.2.1. FEATURES 10
3.2.2. ESP32-CAM PINOUT 11
3.3. ULTRASONIC SENSOR 12
3.3.1. TECHNICAL SPECIFICATIONS 13
3.4. SERVO MOTOR 13
3.5. L293D MOTOR DRIVER MODULE 14
3.6. PWM SIGNALS
3.7. POWER SUPPLY 14
3.7.1. RECTIFIED AND SMOOTHED POWER SUPPLY 15
3.7.2. LINEAR REGULATED POWER SUPPLY 15
3.7.3. SWITCH MODE POWER SUPPLY 15
4. SOFTWARE 17
4.1. ARDUINO IDE 17
4.2. BLYNK 18

VI
5. INTERFACING CAMERA 20
6. WORKING 23
7. SOURCE CODE 25
7.1. SKETCH FOR ESP32CAM MODULE 25
7.2. SKETCH FOR NODEMCU (WIFI MODULE) 30
8. CONCLUSION 38
9. FUTURE SCOPE 39
REFERENCES 40
APPENDICES 42
CAMERA_PINS.H 42
APP_HTTPD.CPP 44

VI
I
LIST OF FIGURES

VI
II
ABSTRACT

This is a project about Arduino board and programming environment. It


contains basic working of Arduino, different types of Arduino board. Interfacing
with Arduino programming environment, how to program, basic instructions
regarding that and interfacing of a few sensors is shown in the content.

Arduino is an open source platform that offers a clear and simple environment
for physical computing. It is now widely used in modern robotics and internet of
things applications, because of its low cost, ease of programming, and rapid
prototyping capabilities. We used the Arduino IDE to develop programs for the
Arduino boards.

In this project, we designed and built a Password Door Lock System using
Arduino. The need of safety can be achieved by making locks which can be
electrical or mechanical with one or a few keys, but for locking a big area many
locks are required. Technology based identity devices are used for automatic
door unlocking or locking. These locking systems are used to control the
movement of door and are functional without requiring a key to lock or unlock
the door. These locking systems are controlled by a keypad and are installed at
the side hedge of the door. The main objective of this project is to give safety at
every common places like home, public places. In this user would give a known
password.

For the computer interactive project we use programming language called


processing. Sensors and actuators can easy be connected to the analog and
digital I/O pins of an Arduino device, which features an on board
microcontroller programmed using the Arduino APL.

IX
CHAPTER 1:
INTRODUCTION

1.1 ARDUINO

Arduino comprises of both a physical programmable circuit board (commonly known as a


microcontroller) and a programming software, or IDE (Integrated Development
Environment) that can be run on a PC, used to compose and transfer PC code to the circuit
board.

Figure 1: Arduino UNO R3

It can be done by using the Arduino programming language (based on Wiring), and the
Arduino Software (IDE), based on Processing. Unlike other programmable circuit boards, the
Arduino does not require a different equipment (called a software engineer) to upload code to
the circuit board, one can essentially utilize a USB link. Also, the Arduino IDE utilizes a
rearranged rendition of C++, making it simpler to figure out how to program. In a word,
Arduino make the functions of the micro-controller into a more accessible package. The Uno

X
is one of the more prevalent boards in the Arduino family and an extraordinary option for the
beginners.

1.2 THEORITICAL BACKGROUND


The Arduino project began in 2005 as a tool for students at the Interaction Design
Institute Ivrea, Italy, aiming to provide a low-cost and easy way for novices and
professionals to create devices that interact with their environment using sensors and
actuators. Common examples of such devices intended for beginner hobbyists include
simple robots, thermostats and motion detectors.

The name Arduino comes from a bar in Ivrea, Italy, where some of the founders of
the project used to meet. The bar was named after Arduin of Ivrea, who was the
margrave of the March of Ivrea and King of Italy from 1002 to 1014.

1.3 OBJECTIVES

 To provide knowledge of different Smart System applications.

 To familiarize students with Arduino as IDE, programming language &


platform.

 To provide knowledge of Arduino boards and basic components.

 Develop skills to design and implement various smart system application.

1.4 FUNCTIONAL FEATURES

 The operating voltage is 5V

 The recommended input voltage will range from 7v to 12V

 The input voltage ranges from 6v to 20V

 Digital input/output pins are 14

XI
 Analog i/p pins are 6

 DC Current for each input/output pin is 40 mA

 DC Current for 3.3V Pin is 50 mA

 Flash Memory is 32 KB

 SRAM is 2 KB

 EEPROM is 1 KB

 CLK Speed is 16 MHz

1.5 BOARD DESCRIPTION

Figure 2: Arduino uno R3 board

XI
I
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 (1).

Power (Barrel Jack)

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

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.

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.

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 (5).

Pins (3.3, 5, GND, Vin)

 3.3V (6) − Supply 3.3 output volt

XI
II
 5V (7) − Supply 5 output volt

 Most of the components used with Arduino board works fine with 3.3 volt
and 5 volt.

 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.

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.

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.

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

XI
V
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.

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.

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 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.

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.

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.

X
V
CHAPTER 2:

HARDWARE

2.1 ARDUINO BOARDS

Arduino board was designed in the Ivrea Interaction Design Institute intended for students
without a background in electronics and programming concepts. This board started altering to
adapt to new requirements and challenges, separating its presence from simple 8-bit boards to
products for IoT (Internet of Things) applications, 3D printing, wearable, and embedded
surroundings. All boards are entirely open-source, allowing users to build them separately
and finally adapt them to their exact needs.

2.1.1 FUNCTIONS
The flexibility of the Arduino board is enormous so that one can do anything they imagine.
This board can be connected very easily to different modules such as obstacle sensors,
presence detectors, fire sensors, GSM Modules GPS modules, etc. The main function of the
Arduino board is to control electronics through reading inputs & changing it into outputs

X
VI
because this board works like a tool. This board is also used to make different electronics
projects in the field of electronics, electrical, robotics, etc.

2.1.2 TYPES
The list of Arduino boards includes the following such as:

 Arduino Uno

 Arduino Uno R3
 Arduino Uno R3 SMD

 Arduino nano

 Arduino Micro

 Arduino Due

 LilyPad Arduino Board

 LilyPad Arduino 328 main board


 LilyPad Arduino simple board
 LilyPad Arduino USB

 Arduino Bluetooth

 Arduino Diecimila

 RedBoard Arduino Board

 Arduino Mega Board

 Arduino Mega 2560 R3


 Arduino Mega Pro 3.3V
 Arduino Mega Pro 5V
 Arduino Mega Pro Mini 3.3V

 Arduino Leonardo Board

 Arduino Robot

 Arduino Esplora

 Arduino mini

X
VI
 Arduino Pro mini 3.3v/8mhz
 Arduino Pro mini 5v/16mhz

 Arduino Pro

 Arduino Pro 3.3v/8 MHz


 Arduino Pro 5V/16MHz

 Arduino Pro micro

 Pro micro 5V/16MHz


 Pro micro 3.3V/8MHz

 Arduino Ethernet

 Arduino Zero

 Fastest Arduino Board

2.1.3 FEATURES AND COMPARISION


The differences are based on the number of inputs and outputs (the number of sensors, LEDs,
and buttons you can use on a single board), speed, operating voltage, form factor etc. Some
boards are designed to be embedded and have no programming interface (hardware), which
you would need to buy separately. Some can run directly from a 3.7V battery, others need at
least 5V.

Arduino boards based on ATMEGA328 microcontroller

Board Name Operating Clock Digital Analog PWM UART Programming


Volt Speed i/o Inputs Interface

Arduino Uno R3 USB via


5V 16MHz 14 6 6 1
ATMega16U2

X
VI
Arduino Uno R3 USB via
5V 16MHz 14 6 6 1
SMD ATMega16U2

Red Board 5V 16MHz 14 6 6 1 USB via FTDI

Arduino Pro FTDI-


3.3v/8 MHz 3.3V 8MHz 14 6 6 1 Compatible
Header

Arduino Pro FTDI-


5V/16MHz 5V 16MHz 14 6 6 1 Compatible
Header

Arduino mini 05 FTDI-


5V 16MHz 14 8 6 1 Compatible
Header

Arduino Pro FTDI-


mini 3.3v/8mhz 3.3V 8MHz 14 8 6 1 Compatible
Header

Arduino Pro FTDI-


mini 5v/16mhz 5V 16MHz 14 8 6 1 Compatible
Header

Arduino FTDI-
Ethernet 5V 16MHz 14 6 6 1 Compatible
Header

FTDI-
Arduino Fio 3.3V 8MHz 14 8 6 1 Compatible
Header

LilyPad Arduino 3.3V 8MHz 14 6 6 1 FTDI-

XI
X
328 main board Compatible
Header

LilyPad Arduino FTDI-


simple board 3.3V 8MHz 9 4 5 0 Compatible
Header

Arduino boards based on ATMEGA32u4 microcontroller

Board Name Operating Clock Digital Analog PWM UART Programming


Volt Speed i/o Inputs Interface

Arduino Native USB


5V 16MHz 20 12 7 1
Leonardo

Pro micro Native USB


5V 16MHz 14 6 6 1
5V/16MHz

Pro micro Native USB


5V 16MHz 14 6 6 1
3.3V/8MHz

X
X
LilyPad Native USB
3.3V 8MHz 14 6 6 1
Arduino USB

Arduino boards based on ATMEGA2560 microcontroller

Board Operating Clock Digital Analog PWM UART Programming


Name Volt Speed i/o Inputs Interface

Arduino USB via


Mega 2560 5V 16MHz 54 16 14 4 ATMega16U2B
R3

Mega Pro FTDI-


3.3V 3.3V 8MHz 54 16 14 4 Compatible
Header

Mega Pro FTDI-


5V 5V 16MHz 54 16 14 4 Compatible
Header

Mega Pro FTDI-


Mini 3.3V 3.3V 8MHz 54 16 14 4 Compatible
Header

2.2 ARDUINO UNO R3


Arduino/Genuino Uno is a microcontroller board based on the ATmega328P. It consists of
14-digital I/O pins, where 6-pinscan be used as PWM (pulse width modulation outputs), 6-
analog inputs, a reset button, a power jack , a USB connection and more. It includes

X
XI
everything required to hold up the microcontroller; simply attach it to a PC with the help of a
USB cable and give the supply to get started with a AC-to-DC adapter or battery.

The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial
driver chip. Instead, it features an ATmega16U2 programmed as a USB-to-serial converter.
This auxiliary microcontroller has its own USB bootloader, which allows advanced users to
reprogram it.

2.2.1 Technical specifications:


 Microcontroller: Microchip ATmega328P

 Operating Voltage: 5 Volts

 Input Voltage: 7 to 20 Volts

 Digital I/O Pins: 14 (of which 6 can provide PWM output)

 PWM Pins: 6 (Pin # 3, 5, 6, 9, 10 and 11)

 UART: 1

 I2C: 1

 SPI: 1

 Analog Input Pins: 6

 DC Current per I/O Pin: 20 mA

 DC Current for 3.3V Pin: 50 mA

 Flash Memory: 32 KB of which 0.5 KB used by bootloader

 SRAM: 2 KB

 EEPROM: 1 KB

 Clock Speed: 16 MHz

 Length: 68.6 mm

 Width: 53.4 mm

 Weight: 25 g

 ICSP Header: Yes

 Power Sources: DC Power Jack & USB Port

X
XI
2.3 BREADBOARD
The breadboard is a white rectangular board with small embedded holes to insert electronic
components. It is commonly used in electronics projects. We can also say that breadboard is a
prototype that acts as a construction base of electronics.

Figure 3: Breadboard

A breadboard is also categorized as a Solderless board. It means that the component does not
require any soldering to fit into the board. Thus, we can say that breadboard can be reused.
We can easily fit the components by plugging their end terminal into the board. Hence, a
breadboard is often called a plugboard.

The top and bottom holes of a row in a breadboard are connected horizontally, and the center
part is connected vertically, as shown below:

X
XI
Figure 3: Breadboard Connections

It means a single horizontal line of a breadboard has the same connection. It is because the
metal strip underneath the breadboard at the top and bottom are connected horizontally.
Hence, it provides the same connection in a row. The two top and bottom parts of a
breadboard are generally used for power connections.

2.4 JUMP WIRE


A jump wire (also known as jumper, jumper wire, jumper cable, DuPont wire or cable) is an
electrical wire, or group of them in a cable, with a connector or pin at each end (or sometimes
without them – simply "tinned"), which is normally used to interconnect the components of a
breadboard or other prototype or test circuit, internally or with other equipment or
components, without soldering.

Figure 4: Jumper wires

X
XI
Individual jump wires are fitted by inserting their "end connectors" into the slots provided in
a breadboard, the header connector of a circuit board, or a piece of test equipment.

2.4.1 TYPES
 Solid tips – are used to connect on/with a breadboard or female header connector.
The arrangement of the elements and ease of insertion on a breadboard allows
increasing the mounting density of both components and jump wires without fear of
short-circuits. The jump wires vary in size and colour to distinguish the different
working signals.
 Male to Male jumper wires
 Male to Female jumper wires
 Female to Female jumper wires

 Crocodile clips – are used, among other applications, to temporarily bridge sensors,
buttons and other elements of prototypes with components or equipment that have
arbitrary connectors, wires, screw terminals, etc.

 Banana connectors – are commonly used on test equipment for DC and low-
frequency AC signals.

 Registered jack (RJnn) – are commonly used in telephone (RJ11) and computer
networking (RJ45).

 RCA connectors – are often used for audio, low-resolution composite video signals,
or other low-frequency applications requiring a shielded cable.

 RF connectors – are used to carry radio frequency signals between circuits, test
equipment, and antennas.

 RF jumper cables - Jumper cables is a smaller and more bendable corrugated cable
which is used to connect antennas and other components to network cabling. Jumpers
are also used in base stations to connect antennas to radio units. Usually the most
bendable jumper cable diameter is 1/2".

2.5 RESISTORS

X
X
A resistor is a passive two-terminal electrical component that implements electrical resistance
as a circuit element. In electronic circuits, resistors are used to reduce current flow, adjust
signal levels, to divide voltages, bias active elements, and terminate transmission lines,
among other uses. High-power resistors that can dissipate many watts of electrical power as
heat, may be used as part of motor controls, in power distribution systems, or as test loads for
generators. Fixed resistors have resistances that only change slightly with temperature, time
or operating voltage. Variable resistors can be used to adjust circuit elements (such as a
volume control or a lamp dimmer), or as sensing devices for heat, light, humidity, force, or
chemical activity.

TYPE: Passive
PRINCIPLE: Electric Resistance

SYMBOL:

Figure 5: Resistors

Resistors are common elements of electrical networks and electronic circuits and are
ubiquitous in electronic equipment. Practical resistors as discrete components can be
composed of various compounds and forms. Resistors are also implemented within integrated
circuits.

2.5.1 COLOUR CODE

X
X
Figure 6: Resistor Colour Code

2.6 LEDs

A light-emitting diode (LED) is a semiconductor light source that emits light when current
flows through it. Electrons in the semiconductor recombine with electron holes, releasing
energy in the form of photons. The color of the light (corresponding to the energy of the
photons) is determined by the energy required for electrons to cross the band gap of the
semiconductor.White light is obtained by using multiple semiconductors or a layer of light-
emitting phosphor on the semiconductor device.

2.6.1 WORKING

An electrical current passes through a microchip, which illuminates the tiny light sources we
call LEDs and the result is visible light. To prevent performance issues, the heat LEDs
produce is absorbed into a heat sink.

2.6.2 TYPES

X
X
Figure 7: LED Types

LEDs are produced in a variety of shapes and sizes. The color of the plastic lens is often the
same as the actual color of light emitted, but not always. For instance, purple plastic is often
used for infrared LEDs, and most blue devices have colorless housings. Modern high-power
LEDs such as those used for lighting and backlighting are generally found in surface-mount
technology (SMT) packages.

2.6.2 ADVANTAGES

 Color Quality
o 5 different requirements for color to ensure quality up front and over time
 Light Output
o Light output minimums to ensure you get enough light
o Light distribution requirements to ensure the light goes where you need it
o Guidelines for equivalency claims to take the guess-work out of replacement
 Peace of mind
o Verified compliance with more than 20 requirements to address performance and
labeling
o Long-term testing to back up lifetime claims
o Testing to stress the products in operating environments similar to how you will use the
product in your home
o 3-year minimum warranty requirement

2.7 POTENTIOMETER

X
X
A potentiometer is a three-terminal resistor with a sliding or rotating contact that forms an
adjustable voltage divider.

TYPE: Passive

SYMBOL:  (IECStandard)

 (ANSI Standard)

If only two terminals are used, one end and the wiper, it acts as a variable resistor or rheostat.
The measuring instrument called a potentiometer is essentially a voltage divider used for
measuring electric potential (voltage); the component is an implementation of the same
principle, hence its name.

Figure 8: Potentiometer

Potentiometers are commonly used to control electrical devices such as volume controls on
audio equipment. Potentiometers operated by a mechanism can be used as position
transducers, for example, in a joystick. Potentiometers are rarely used to directly control
significant power (more than a watt), since the power dissipated in the potentiometer would
be comparable to the power in the controlled load.

Potentiometers consist of a resistive element, a sliding contact (wiper) that moves along the
element, making good electrical contact with one part of it, electrical terminals at each end of
the element, a mechanism that moves the wiper from one end to the other, and a housing
containing the element and wiper.

X
XI
2.7.1 Theory of operation

Figure 9: Potentiometer with a resistive load

The potentiometer can be used as a voltage divider to obtain a manually adjustable output
voltage at the slider (wiper) from a fixed input voltage applied across the two ends of the
potentiometer. This is their most common use.

The voltage across RL can be calculated by:

If RL is large compared to the other resistances (like the input to an operational amplifier),
the output voltage can be approximated by the simpler equation.

2.7.2 APPLICATIONS

 AUDIO CONTROL: Low-power potentiometers, both slide and rotary, are used to
control audio equipment, changing loudness, frequency attenuation, and other
characteristics of audio signals.

X
X
 TELEVISION: Potentiometers were formerly used to control picture brightness,
contrast, and color response. A potentiometer was often used to adjust "vertical hold",
which affected the synchronization between the receiver's internal sweep circuit
(sometimes a multivibrator) and the received picture signal, along with other things
such as audio-video carrier offset, tuning frequency (for push-button sets) and so on.
It also helps in frequency modulation of waves.
 MOTION CONROL: Potentiometers can be used as position feedback devices in
order to create closed-loop control, such as in a servomechanism. This method of
motion control is the simplest method of measuring the angle or displacement.
 TRANSDUCERS: Potentiometers are also very widely used as a part of
displacement transducers because of the simplicity of construction and because they
can give a large output signal.
 COMPUTATION: In analog computers, high precision potentiometers are used to
scale intermediate results by desired constant factors, or to set initial conditions for a
calculation. A motor-driven potentiometer may be used as a function generator, using
a non-linear resistance card to supply approximations to trigonometric functions. For
example, the shaft rotation might represent an angle, and the voltage division ratio can
be made proportional to the cosine of the angle.

2.8 MOTOR

An electric motor is an electrical machine that converts electrical energy into mechanical
energy. Most electric motors operate through the interaction between the motor's magnetic
field and electric current in a wire winding to generate force in the form of torque applied on
the motor's shaft. Electric motors can be powered by direct current (DC) sources, such as
from batteries, or rectifiers, or by alternating current (AC) sources, such as a power grid,
inverters or electrical generators. An electric generator is mechanically identical to an electric
motor, but operates with a reversed flow of power, converting mechanical energy into
electrical energy.

2.8.1 TYPES

X
X
 DC MOTOR

A DC motor is any of a class of rotary electrical motors 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 in part of the
motor.

Figure 9: DC Motor

 CHARACTERISTICS
1. Rotation is unlimited
2. Rotation direction is clockwise and counter clockwise
3. Very difficult to precisely rotate to specific angle.
4. Extra driver required
5. Extra power supply required
6. Easy to control, just use voltage PMW single

 APPLICATIONS
Use to control something that needs to rotate continuously but the value of speed does not
need to be specific. For ex: Fan, pump, RC car.

X
X
 STEPPER MOTOR
A stepper motor, also known as step motor or stepping motor, is a brushless DC electric
motor that divides a full rotation into a number of equal steps. The motor's position can be
commanded to move and hold at one of these steps without any position sensor for
feedback (an open-loop controller), as long as the motor is correctly sized to the
application in respect to torque and speed.

Figure 10: Stepper Motor

 CHARACTERISTICS
1. Rotation is unlimited
2. Rotating direction clockwise and counter clockwise
3. Rotating speed can be controlled precisely.
4. Extra hardware driver required
5. Extra power supply required
6. Complicated to control. Beginners should use library

 APPLICATIONS
1. Automation and robotics
2. Printer , 3D printer, CNC
3. Cocktail machine

 SERVO MOTOR
A servomotor is a rotary actuator or linear actuator that allows for precise control of

X
X
angular or linear position, velocity and acceleration. It consists of a suitable motor
coupled to a sensor for position feedback. It also requires a relatively sophisticated
controller, often a dedicated module designed specifically for use with servomotors.

Figure 11: Servo Motor

The servo motor include two main types:180° servo motor and 360° servo motor. In fact
Most of the people understand implicity “Servo Motor” to “180°” servo motor.
360° servo motor is similar to DC motor except for no hardware driver is required.

 CHARACTERISTICS
180° servo motor
1. Rotation is limited between 0° and 180°.
2. Rotation direction clockwise and counter clock wise
3. Rotating position can be controlled to rotate to a specific angle between 0° and 180°.
4. Rotating speed can be controlled but not smooth.
5. Extra Hardware driver: Not required. Just control directly from an Arduino pin.
6. Extra power supply required
7. Easy to control just use PWM single

 APPLICATIONS
1. The servo motor is used in robotics to activate movements, giving the arm to its
precise angle.
2. The Servo motor is used to start, move and stop conveyor belts carrying the product
along with many stages. For instance, product labeling, bottling and packaging
3. The servo motor is built into the camera to correct a lens of the camera to improve out

X
X
of focus images.
4. The servo motor is used in robotic vehicle to control the robot wheels, producing
plenty torque to move, start and stop the vehicle and control its speed.

2.9 TRANSISTORS
A transistor is a semiconductor device used to amplify or switch electronic signals and
electrical power. It is composed of semiconductor material usually with at least three
terminals for connection to an external circuit. A voltage or current applied to one pair
of the transistor's terminals controls the current through another pair of terminals.
Because the controlled (output) power can be higher than the controlling (input) power,
a transistor can amplify a signal. Today, some transistors are packaged individually, but
many more are found embedded in integrated circuits.
There are three terminals for a transistor. They are:

 Base: This is used to activate the transistor.

 Collector: It is the positive lead of the transistor.

 Emitter: It is the negative lead of the transistor.

Figure 12: Transistor

2.9.1 TYPES
Transistors are broadly divided into three types:

 Bipolar transistors (bipolar junction transistors: BJTs)

 Field-effect transistors (FETs)

 Insulated-gate bipolar transistors (IGBTs).

2.9.2 ADVANTAGES

X
X
 Lower cost and smaller in size.

 Smaller mechanical sensitivity.

 Low operating voltage.

 Extremely long life.

 No power consumption.

 Fast switching.

 Better efficiency circuits can be developed.

 Used to develop a single integrated circuit.

2.9.3 APPLICATIONS
 Memory cards in mobile phones.

 Most of the parts of modern electronic devices like smartphones, smartwatches, etc
are all made up with transistors where they act as switches.

 Logic gates, flip-flops circuit.

 Microprocessors and Microcontrollers.

 Register circuits

2.10 SENSORS
The sensors are defined as a machine, module, or a device that detect changes in the
environment. The sensors transfer those changes to the electronic devices in the form of a
signal.

A sensor and electronic devices always work together. The output signal is easily
readable by humans.

X
X
Figure 13: Sensors

Nowadays, Sensors are used in daily lives. For example, controlling the brightness of the
lamp by touching its base, etc. The use of sensors is expanding with new technologies.

2.10.1 TYPES

 Light sensor
The light sensor is used to control the light. It is used with LDR (Light Dependent
Resistor) in Arduino
 Ultrasonic sensor
The ultrasonic sensor is used to determine the distance of the object using SONAR.
 Temperature sensor
The temperature sensor is used to detect the temperature around it.

 Water Level Sensor


It is used to measure the water or the depth of the water level. It is also used to detect
leaks in containers.
 Vibration Sensor
The vibration sensor is used to measure the vibrations.
 Pulse Sensor
The pulse sensor is used to measure the pulse rate.
 Capacitive soil moisture sensor

X
X
It is used to measure the moisture level of the soil.
 Microphone sensor
The microphone sensor in Arduino is used to detect the sound. The analog and digital are
the two outputs of this module. The digital output sends the high signal when the intensity
of sound reaches a certain threshold. We can adjust the sensitivity of a module with the
help of a potentiometer.
 Humidity sensor
The humidity sensor is used to monitor weather conditions.
 Motion sensor
The motion sensor detects the movement and occupancy from the human body with the
help of Infrared radiation.
 Vibration sensor
The vibration sensor is used to detect the vibrations.
 Sound sensor
The sound sensor is suitable to detect the sound of the environment.
 Pressure Sensor
The pressure sensor is used to measure the pressure. The sensor in Arduino measures the
pressure and displays it on the small LCD screen.

2.10.2 USES

The sensors are used to measure the physical quantities, such as pressure, temperature,
sound, humidity, and light, etc. An example of sensors is Fire Alarm, a detector present
on the fire alarm detects the smoke or heat. The signal generated from the detector is sent
to the alarming system, which produces an alert in the form of alarm. The types of
detectors are smoke detectors, heat detectors, carbon monoxide detectors, multi-sensors
detectors.

2.11 CAPACITORS
A capacitor is a device that stores electrical energy in an electric field. It is a passive
electronic component with two terminals.

X
X
Figure 14:Capacitors

The effect of a capacitor is known as capacitance. While some capacitance exists between
any two electrical conductors in proximity in a circuit, a capacitor is a component
designed to add capacitance to a circuit. The capacitor was originally known as a
condenser or condensator. This name and its cognates are still widely used in many
languages, but rarely in English, one notable exception being condenser microphones,
also called capacitor microphones.

2.11.1 THEORY OF OPERATION


An ideal capacitor is characterized by a constant capacitance C, in farads in the SI system
of units, defined as the ratio of the positive or negative charge Q on each conductor to the
voltage V between them:

A capacitance of one farad (F) means that one coulomb of charge on each conductor
causes a voltage of one volt across the device. Because the conductors (or plates) are
close together, the opposite charges on the conductors attract one another due to their
electric fields, allowing the capacitor to store more charge for a given voltage than when
the conductors are separated, yielding a larger capacitance.

In practical devices, charge build-up sometimes affects the capacitor mechanically,


causing its capacitance to vary. In this case, capacitance is defined in terms of incremental
changes:

2.11.2 APPLICATIONS
 Energy storage.

X
X
 Pulsed power and weapons.
 Power conditioning.
 Power factor correction.
 Suppression and coupling.
 Motor starters.
 Sensing.

 Oscillators.

2.11 PUSHBUTTON
A push-button (also spelled pushbutton) or simply button is a simple switch mechanism
to control some aspect of a machine or a process. Buttons are typically made out of hard
material, usually plastic or metal. The surface is usually flat or shaped to accommodate
the human finger or hand, so as to be easily depressed or pushed. Buttons are most often
biased switches, although many un-biased buttons (due to their physical nature) still
require a spring to return to their un-pushed state. Terms for the "pushing" of a button
include pressing, depressing, mashing, slapping, hitting, and punching.

Figure 15:Pushbutton

2.11.1 USES
The push button switch is usually used to turn on and off the control circuit, and it is a
kind of control switch appliance that is widely used. It is used in electrical automatic
control circuits to manually send control signals to control contactors, relays,
electromagnetic starters, etc.

2.12 BUZZER
A buzzer or beeper is an audio signaling device, which may be mechanical,
electromechanical, or piezoelectric (piezo for short). Typical uses of buzzers and beepers

X
L
include alarm devices, timers, and confirmation of user input such as a mouse click or
keystroke.

2.12.1 TYPES

 ACTIVE BUZZER
The active buzzer has an internal oscillating source, and the buzzer will sound as soon as
it is energized. The active buzzer is widely used in computers, printers, copiers, alarms,
electronic toys, automotive electronics, telephones, timers and other electronic products
for sounding devices.

Figure 16:Active Buzzer

 PASSIVE BUZZER
The passive buzzer does not have an internal oscillating source, and it has to be driven
with square wave and different frequency needed. It is like an electromagnetic speaker,
where a changing input signal produces the sound, rather than producing a tone
automatically.

Figure 17:Passive Buzzer

Active buzzer and passive buzzer, the main difference between them is whether there is
driving circuitry or not. Active buzzer which also called indicator with driving circuitry

X
LI
built into the device. That means only need a dc voltage is applied, the sound can be
produced. However, it can only get a continuous or pulsed audio signal since the
frequency is fixed. With no driving circuitry built in, by contrast, a transducer, also
called an passive buzzer gives you the flexibility to achieve a variety of sounds using
various frequencies or arbitrary wave shapes.

2.12.2 ADVANTAGES

A) The advantages of passive buzzer are:


 Cheaper
 The sound frequency is controllable and can emit different tone effects.
 In some special cases, a control port can be multiplexed with the LED.

B) The advantages of the active buzzer are


Program control is convenient, and direct DC power drive can sound.

CHAPTER 3:
SOFTWARE
A program for Arduino hardware may be written in any programming language with

X
LI
compilers that produce binary machine code for the target processor. Atmel provides a
development environment for their 8-bit AVR and 32-bit ARM Cortex-M based
microcontrollers: AVR Studio (older) and Atmel Studio (newer).

3.1 ARDUINO IDE

The Arduino integrated development environment (IDE) is a cross-platform application


(for Windows, macOS, and Linux) that is written in the Java programming language. It
originated from the IDE for the languages Processing and Wiring. It includes a code
editor with features such as text cutting and pasting, searching and replacing text,
automatic indenting, brace matching, and syntax highlighting, and provides simple one-
click mechanisms to compile and upload programs to an Arduino board. It also contains
a message area, a text console, a toolbar with buttons for common functions and a
hierarchy of operation menus. The source code for the IDE is released under the GNU
General Public License, version 2.

The Arduino IDE supports the languages C and C++ using special rules of code
structuring. The Arduino IDE supplies a software library from the Wiring project,
which provides many common input and output procedures. User-written code only
requires two basic functions, for starting the sketch and the main program loop, that are
compiled and linked with a program stub main() into an executable cyclic executive
program with the GNU toolchain, also included with the IDE distribution. The Arduino
IDE employs the program avrdude to convert the executable code into a text file in
hexadecimal encoding that is loaded into the Arduino board by a loader program in the
board's firmware.

The Arduino IDE largely consists of a code editor and a compiler but also has some
nifty features which makes it easy for the user to upload programs to their devices and
to read input sent back from the device trough a serial communication port.

3.1.1 FEATURES

X
LI
Developer(s) Arduino Software

Stable Release 1.8.16

Written in Java, C, C++

Operating system Windows, macOS, Linux

Platform IA-32, x86-64, ARM

Type Integrated Development Environment

License LGPL or GPL license

Website www.arduino.cc/en/Main/Software

3.1.2 BLINK EXAMPLE

Figure 18: Screenshot of Arduino IDE showing Blink program

Most Arduino boards contain a light-emitting diode (LED) and a current limiting resistor
connected between pin 13 and ground, which is a convenient feature for many tests and
program functions. A typical program used by beginners, akin to Hello, World!, is

X
LI
"blink", which repeatedly blinks the on-board LED integrated into the Arduino board.
This program uses the functions pinMode(), digitalWrite(), and delay(), which are
provided by the internal libraries included in the IDE environment. This program is
usually loaded into a new Arduino board by the manufacturer.

3.2 ARDUINO IDE 2.0

On October 18, 2019, Arduino Pro IDE (alpha preview) was released. Later, on March 1,
2021, the beta preview was released, renamed IDE 2.0. The system still uses Arduino CLI
(Command Line Interface), but improvements include a more professional development
environment, autocompletion support, and Git integration. The application frontend is
based on the Eclipse Theia Open Source IDE. The main features available in the new
release are:

 Modern, fully featured development environment


 Dual Mode, Classic Mode (identical to the Classic Arduino IDE) and Pro Mode
(File System view)
 New Board Manager
 New Library Manager
 Board List
 Basic Auto-Completion (Arm targets only)
 Git Integration
 Serial Monitor
 Dark Mode

3.3 SKETCH

X
L
A sketch is a program written with the Arduino IDE. Sketches are saved on the
development computer as text files with the file extension .ino. Arduino Software
(IDE) pre-1.0 saved sketches with the extension .pde.

Figure 19: Arduino Sketch

A minimal Arduino C/C++ program consists of only two functions:

 setup(): This function is called once when a sketch starts after power-up or
reset. It is used to initialize variables, input and output pin modes, and other
libraries needed in the sketch. It is analogous to the function main().
 loop(): After setup() function exits (ends), the loop() function is executed
repeatedly in the main program. It controls the board until the board is
powered off or is reset. It is analogous to the function while(1).

CHAPTER 4:

X
L
PROJECT ON
PASSWORD BASED DOOR LOCK SYSTEM

4.1 INTRODUCTION
Password Based Door Lock System is designed using ARDUINO UNO where in once the
correct code or password is entered, the door is opened and the concerned person is allowed
access to the secured area. Password Based Door Lock System using Arduino UNO is a
simple project where a secure password will act as a door unlocking system. Old fashioned
lock systems use mechanical locking and these can be replaced by new advanced techniques
of locking systems. These methods are a combination of mechanical and electronic devices
and are highly intelligent. One of the distinct features of these intelligent lock systems is their
simplicity and high efficiency. Such an automated lock system consists of electronic control
assembly, which controls the output load through a password. The example of this output
load can be a motor or a lamp or any other mechanical/electrical load.

Here, we made an electronic code lock system using Arduino UNO, which provides control
to the actuating the load. It is a simple embedded system with takes input from the keyboard
and the output being actuated accordingly. This system demonstrates a Password based Door
Lock.

System using Arduino UNO, wherein once the correct code or password is entered, the door
is opened and the concerned person is allowed access to the secured area. If another person
arrives, it will ask to enter the password again. If the password is wrong, then door would
remain locked, denying access to the person. Main idea behind this project is of a door-latch
opening using a password entered through keypad. As well as turning on the Buzzer when
passcode is entered wrong for multiple times. User can modify this password anytime he/she
wishes using a keypad. The main component in the circuit is Arduino UNO which is basically
used to send a text message to owner of the house about the breach of security.4*4 keypad is
used to enter the password. The entered password is compared with the known password. If it
is correct password, the system opens the door by servo motor and displays the status of door
on LCD. If the password is wrong then door remains closed and displays “WRONG
PASSWORD” on LCD.

X
L
4.2 COMPONENTS

 Arduino UNO

 Jump Wire

 Breadboard

 LCD

 Membrane Keypad

 Servo Motor

 Buzzer

 Potentiometer

4.2.1 ARDUINO UNO


This microcontroller is based on the ATmega328P. There are total of 20 pins (0-19) out of
which 6 are analog inputs, 14 are digital input output pins(6 pins provide PWM voltage)
which can also be used as general purpose pins, a ceramic resonator of frequency 16 MHz, an
USB connection, a power jack and a reset button. It has an operating voltage of 5V. It
contains everything needed to support a microcontroller.

Figure 20: Arduino UNO

X
L
4.2.2 JUMP WIRE
In our project the jump wire also known as the jumper wires is used to connect all the
components to the Arduino through breadboard.

Figure 21: Jump Wires

4.2.3 BREADBOARD
The breadboard is used as we make all the connections to the Arduino through this only and
wiring for projects with microcontroller boards.

Figure 22: Breadboard

4.2.4 LCD
Liquid Crystal Display, which we are using in our project is 16*2 LCD. This display consists
of 16 columns and 2 rows. This is programmed using the library <LiquidCrystal.h>

X
LI
Figure 23: LCD

4.2.5 MEMBRANE KEYPAD


In our project we will be using 4X3 matrix membrane keypad. This 12 button keypad will
provide user interface component for Arduino project. This is programmed using the library
<Keypad.h>.

Figure 24: Membrane Keypad

L
4.2.6 SERVO MOTOR
The servo motor used in the project is SG90 Micro Servo weighing about 9g. This is
programmed using the library <Servo.h>.

Figure 25: Servo Motor

4.2.7 BUZZER
In our project the buzzer is used for beep sound indicating the entry of wrong password.

Figure 26: Buzzer

4.2.8 POTENTIOMETER
In our project we have used a potentiometer of 10K ohm resistance in order to adjust the
contrast of the Liquid crystal display.

LI
Figure 27: Potentiometer

LI
I

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy