9. TO DO THAT,
YOU NEED TO PROGRAM YOUR
CONTROLLER BOARD.........
10. ARDUINO IS ONE SUCH BOARD TO LEARN NEW THINGS.
ANYONE - CHILDREN, HOBBYISTS, ARTISTS, PROGRAMMERS -
CAN START DEVELOPING OWN PROJECTS, JUST FOLLOWING THE STEP
BY STEP INSTRUCTIONS.
11. ARDUINO IS AN ELECTRONICS PLATFORM BASED ON EASY-TO-
USE HARDWARE AND SOFTWARE.
30. LCD THEORY
Vss (Ground) - Ground pin connected to system ground
Vdd (+5 Volt) - Powers the LCD with +5V (4.7V – 5.3V)
VE (Contrast V) - Decides the contrast level of display. Grounded
to get maximum contrast.
Register Select - Connected to Microcontroller to shift between
command/data register.
Read/Write - Used to read or write data. Normally grounded to
write data to LCD.
Enable - Connected to Microcontroller Pin and toggled between
1 and 0 for data acknowledgement.
31. LCD THEORY
Data pins 0 to 7 forms a 8-bit data line. They can be connected to
Microcontroller to send 8-bit data or 4 bit data.
Anode-Backlight LED pin positive terminal
Cathode - Backlight LED pin negative terminal
TYPES OF REGSISTER
The register select is used to switch from one register to other.
RS=0 for command register, whereas RS=1 for data register.
The command register stores the command instructions given to
the LCD.
The data register stores the data to be displayed on the LCD. The
data is the ASCII value of the character to be displayed on the LCD.
36. Using Motor Driver
A motor driver IC is an integrated circuit chip that controls motors in
autonomous robots and embedded circuits. L293D and ULN2003
Are the most commonly used motor Driver IC that is used in simple
robots and RC cars. A motor driver is unquestionably something that
causes the motor to move in accordance with the given instruction
or input(high or low). It listens to the low voltage from the
controller/processor and controls an actual motor that needs high
input voltage A motor driver IC, in simple terms, controls the
direction of the motor based on the commands or intructions
received from the controller.
38. DC Motor
A DC motor is an electrical machine that converts electrical energy
into mechanical energy. In a DC motor, the input electrical energy is
the direct current which is transformed into the mechanical rotation.
A coil of wire with a current running through it generates
an electromagnetic field aligned with the center of the coil. The
direction and magnitude of the magnetic field produced by the coil
can be changed with the direction and magnitude of the current
flowing through it.
40. A photoresistor or light-dependent resistor or photocell is a light
controlled variable resistor.
LDR that changes its resistance when different amount of light
fall on it. They work on the principle of photo conductivity where
it gives less resistance in high light intensity and high resistance
in low light intensity
LDR(Light Dependent Resistor)
42. IR Sensor ( Infrared sensor)
• IR sensor is an electronic device, that emits the light in order
to sense some object of the surroundings. An IR sensor can
measure the heat of an object as well as detects the motion.
Usually, In the infrared spectrum, all the objects radiate some
form of thermal radiation. These types of radiations are
invisible to our eyes, but infrared sensor can detect these
radiations.
43. • There are two types of IR sensors are available in market
• 1) Active infrared sensor
• 2) Passive Infrared sensor
• 1) Active infrared sensor :-
• Active infrared sensors consist of two elements: infrared source and infrared
detector. Infrared sources include the LED or infrared laser diode. Infrared detectors
include photodiodes or phototransistors. The energy emitted by the infrared source is
reflected by an object and falls on the infrared detector.
• 2) Passive Infrared Sensor :-
• Passive infrared sensors are basically Infrared detectors. Passive infrared sensors do
not use any infrared source and detector. They are of two types: quantum and
thermal. Thermal infrared sensors use infrared energy as the source of heat.
Thermocouples, pyroelectric detectors and bolometers are the common types of
thermal infrared detectors. Quantum type infrared sensors offer higher detection
performance. It is faster than thermal type infrared detectors. The photo sensitivity of
quantum type detectors is wavelength dependent.
44. IR Sensor Working Principle
An IR sensor consists of an IR LED and an IR Photodiode, together
they are called as PhotoCoupler or OptoCoupler.
1) IR Transmitter or IR LED :-
Infrared Transmitter is a light emitting diode (LED) which emits
infrared radiations called as IR LED’s. Even though an IR LED looks like
a normal LED, the radiation emitted by it is invisible to the human eye
IR - Transmetter
45. IR Sensor Working Principle
2) IR Receiver or Photodiode :-
Infrared receivers or infrared sensors detect the radiation from an IR
transmitter. IR receivers come in the form of photodiodes and
phototransistors. Infrared Photodiodes are different from normal
photo diodes as they detect only infrared radiation. Below image
shows the picture of an IR receiver or a photodiode.
Photodiode
48. Passive Infrared Sensor :-
Passive infrared sensors are basically Infrared detectors. Passive
infrared sensors do not use any infrared source and detector. They are
of two types: quantum and thermal. Thermal infrared sensors use
infrared energy as the source of heat. Thermocouples, pyroelectric
detectors and bolometers are the common types of thermal infrared
detectors. Quantum type infrared sensors offer higher detection
performance. It is faster than thermal type infrared detectors. The
photo sensitivity of quantum type detectors is wavelength dependent.
Indoor passive infrared: Detection distances range from 25 cm to 20
m. Indoor curtain type: The detection distance ranges from 25 cm to
20 m. Outdoor passive infrared: The detection distance ranges from 10
meters to 150 meters.
Motion Sensor (PIR)
51. Overview
• An HC-SR04 ultrasonic distance sensor actually consists of two
ultrasonic transducers.
• One acts as a transmitter that converts the electrical signal into 40
KHz ultrasonic sound pulses. The other acts as a receiver and listens
for the transmitted pulses.
• When the receiver receives these pulses, it produces an output pulse
whose width is proportional to the distance of the object in front.
• This sensor provides excellent non-contact range detection between 2
cm to 400 cm (~13 feet) with an accuracy of 3 mm.
• Since it operates on 5 volts, it can be connected directly to an Arduino
or any other 5V logic microcontroller
53. HC-SR04 Ultrasonic Sensor Pinout
HC-SR04 containing 4 pins :-
1) Vcc :- supplies power to the HC-SR04 ultrasonic sensor. You can
connect it to the 5V output from your Raspberry pi.
2) Trigger :- pin is used to trigger ultrasonic sound pulses. By setting
this pin to HIGH for 10µs, the sensor initiates an ultrasonic burst.
3) Echo pin :- pin goes high when the ultrasonic burst is transmitted
and remains high until the sensor receives an echo, after which it goes
low. By measuring the time the Echo pin stays high, the distance can
be calculated
4) Ground pin :- It is the ground pin. Connect it to the ground of the
Raspberry pi.
55. KEYPAD
• Keypads are an excellent starting point for adding key input to
a project because they are inexpensive and resistant to water.
• Keypads comes in a variety of sizes, the most common of
which are the 4x3keypad(12 keys) and the 4x4 keypad (16
keys).
• They have a layout similar to that of a standard telephone
keypad, making them easy to use
57. • If you peel the paper backing off the keypad, you can see how
it is made.
58. • In order to reduce the number of I/O connections, as you can
see, all rows and columns are wired together. If this were not
the case, interfacing 16 individual pushbuttons, for example,
would require 17 I/O pins, one for each pushbutton and one
for common ground.
• By connecting rows and columns, only 8 pins are required to
control the entire 4x4 keypad in 4x3 only 7 pins are required.
59. Working of Keypad
• The matrix keypad consists of pushbutton contacts that are
connected to the row and column lines. There is one pin for
each column and one pin for each row. So the 4x4 keypad has
4+4=8 pins, while the 4x3 keypad has 4+3=7 pins.
60. • When the button is pressed, one of the rows is connected to
one of the columns, allowing current to flow between them.
When the key “4” is pressed, for instance, column 1 and row 2
are connected.
• By identifying which column and row are connected, we can
determine which button has been pressed.
67. DHT Sensor
Temperature : degree of heat present in an object or in the
atmosphere
Humidity : The amount of water vapour present in the air.
The DHT sensors are made of two parts,
• a capacitive humidity sensor and
• a thermistor
There is also a very basic chip inside that does some analog to
digital conversion and gives out a digital signal with the
temperature and humidity.
68. MORE ABOUT DHT
The DHT11 is a basic, low-cost digital temperature and humidity
sensor. It uses a capacitive humidity sensor and a thermistor to
measure the surrounding air.
It's fairly simple to use, but requires careful timing to grab data.
The only real downside of this sensor is you can only get new
data from it once every 2 seconds, so when using our library,
sensor readings can be up to 2 seconds old.
Compared to the DHT11, DHT22 sensor is more precise, more
accurate and works in a bigger range of temperature/humidity,
but its larger and more expensive.
69. Specifications & DHT11 Vs DHT22
Parameter DHT11 DHT22
Temperature measurement
range 0 to 50 Deg.C -40 to 80 Deg.C
Temperature Accuracy +- 1 to 2 Deg.C +- 0.5 Deg.C
Relative Humidity Range 30% to 90% 0% to 100%
Relative Humidity Accuracy +- 4% to 5% +-2 to 5%
Operating Voltage 3.3V to 5V 3.3V to 5V
Resolution 8 bits 16 bits
Sampling period >=1 sec >=2 sec
72. Communication Process
When the Line is IDLE the microcontroller pulls it to a LOW for
18ms.
After this MCU pulls it HIGH for around 20 to 40us.
DHTxx will detect it as a START from the MCU and responds by
pulling the line LOW for 80us.
Next, DHTxx will pull it HIGH for 80us which indicates that it is
ready to send data or “get ready”.
Next it will send 40 bits of Data. Each bit starts with a 50us LOW
followed by 26-28us for a “0” or 70us for a “1”.
After communication ends, the Line is pulled HIGH by the pull-
up resistor and enters IDLE state
73. WORKING PRINCIPLE OF DHT
1st Byte: Relative Humidity Integral Data in (Integer Part)
2nd Byte: Relative Humidity Decimal Data in (Fractional Part) –
Zero for DHT11
3rd Byte: Temperature Integral in Degree Celsius (Integer Part)
4th Byte: Temperature in Decimal Data in (Fractional Part) –
Zero for DHT11
5th Byte: Checksum (Last 8 bits of {1st Byte + 2nd Byte + 3rd
Byte+ 4th Byte})
74. DHT 11 - Specifications
Ultra low cost
3 to 5V power and I/O
2.5mA max current use during conversion (while requesting data)
Good for 20-80% humidity readings with 5% accuracy
Good for 0-50°C temperature readings ±2°C accuracy
No more than 1 Hz sampling rate (once every second)
Body size 15.5mm x 12mm x 5.5mm
4 pins with 0.1" spacing