Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Chapter 1
INTRODUCTION
Opening and closing of shutter have been always a boring job, especially
in places where a person is always required to open the shutter. Here is a solution
to open and close the shutter. Here we use an Arduino Nano board, a Bluetooth
module and a proximity sensor to control the whole operation. Arduino Nano is a
compact and breadboard-friendly version board based on ATmega328 processor.
It is more or less same functionality as the Arduino UNO but in different package.
Instead of using the standard USB to connect to the computer, it uses the mini u s
b but without the power plug for external power source that built on Arduino
UNO. The dimension of Arduino Nano is only 43mm x 18mm, it comes with 6
PWM I/O from the total of 14 digitals I/O, 8 analogue inputs, 16Mhz clock speed
and 32kB of flash memory.
Transparent wireless serial connection setup. The HC-05 Bluetooth Module
can be used in a Master or Slave configuration, making it a great solution for
wireless communication. This serial port Bluetooth module is fully qualified
Bluetooth3Mbps Modulation with complete 2.4GHz radio transceiver and
baseband. It uses CSR Blue core 04‐External single chip Bluetooth system with
CMOS technology and with AFH (Adaptive Frequency Hopping Feature).The
slave modules cannot initiate a connection to another Bluetooth device, but can
accept connections. Master module can initiate a connection to other devices. The
user can use it simply for a serial port replacement to establish connection between
MCU and GPS, PC to your embedded project, etc. Just go through the datasheet
for more detail. A proximity sensor is a sensor able to detect the presence of
nearby objects without any physical contact.
It uses a motion-detecting sensor (PIR sensor) to open or close the door
which detects the infrared energy omitted from human's body. When someone
comes in front of the door, the infrared energy detected by the sensor changes and
it triggers the sensor to open the door whenever someone approaches the door.
2
The signal is further sent to arduino uno that controls the door. A proximity
sensor often emits an electromagnetic field or a beam of electromagnetic
radiation (infrared, for instance), and looks for changes the field or return
signal. The object being sensed is often referred to as the proximity sensor's target.
Different proximity sensor targets demanded different sensors. For example, a
capacitive Proximity sensor. Photoelectric be suitable for a plastic target;
inductive Proximity sensor requires a metal target.
Proximity sensors can have a high reliability and long functional life
because of the absence of mechanical parts and lack of physical contact between
the sensor and the sensed object.Proximity sensors are also used in machine
vibration monitoring to measure the variation in distance between a shaft and its
support bearing. This is common in large steam turbines, compressors, and motors
that use sleeve-types bearings
After the huge progress made in the field of electronics that touched
everything of our basic necessities, garage doors was not an exception. Several
garage doors are available that can be opened with remote control and they come
with various safety measures for the users. So the advantages and disadvantages
of various existing types of garage doors are observed and one model is selected
for further development in the project.
Chapter 2
BLOCK DIAGRAM
PROXIMITY
SENSOR
Fig 1
4
Chapter 3
DESIGN
Fig 2
5
Chapter 4
HARDWARE REQUIREMENT
Components Quantity
Arduino Nano 1
Bluetooth HC05 1
Motordriver L293D 1
Proximity sensor 1
Motor 5v 1
Stopper switch 1
Table. 1
Fig 3
Arduino Nano 2.3 (ATmega168): manual (pdf), Eagle files. Note: since the free
version of Eagle does not handle more than 2 layers, and this version of the Nano
is 4 layers, it is published here unrouted, so users can open and use it in the free
version of Eagle.
Specifications:
The Arduino Nano can be powered via the Mini-B USB connection, 6-20V
unregulated external power supply (pin 30), or 5V regulated external power
supply (pin 27). The power source is automatically selected to the highest voltage
source.
7
The FTDI FT232RL chip on the Nano is only powered if the board is being
powered over USB. As a result, when running on external (non-USB) power, the
3.3V output (which is supplied by the FTDI chip) is not available and the RX and
TX LEDs will flicker if digital pins 0 or 1 are high.
Memory
The cable has 16 KB of flash memory for storing code (of which 2 KB is used for
the bootloader); the ATmega328 has 32 KB, (also with 2 KB used for the
bootloader). The ATmega168 has 1 KB of SRAM and 512 bytes of EEPROM
(which can be read and written with the EEPROM library); the ATmega328 has
2 KB of SRAM and 1 KB of EEPROM.
Each of the 14 digital pins on the Nano can be used as an input or output, using
pin Mode(), digital Write(), and digitalRead() functions. They operate at 5 volts.
Each pin can provide or receive a maximum of 40 mA and has an internal pull-
up resistor (disconnected by default) of 20-50 kOhms. In addition, some pins have
specialized functions: Serial: 0 (RX) and 1 (TX). Used to receive (RX) and
transmit (TX) TTL serial data. These pins are connected to the corresponding pins
of the FTDI USB-to-TTL Serial chip. External Interrupts: 2 and 3. These pins can
be configured to trigger an interrupt on a low value, a rising or falling edge, or a
change in value. See the attach Interrupt() function for details.
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the
analogeWrite() function.
LED: 13. There is a built-in LED connected to digital pin 13. When the pin is
HIGH value, the LED is on, when the pin is LOW, it's off.
The Nano has 8 analog inputs, each of which provide 10 bits of resolution
(i.e. 1024 different values). By default they measure from ground to 5 volts,
8
though is it possible to change the upper end of their range using the
analogReference() function. Additionally, some pins have specialized
functionality:
I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the
Wire library (documentation on the Wiring website).
AREF. Reference voltage for the analog inputs. Used with analogReference().
Reset. Bring this line LOW to reset the microcontroller. Typically used to add a
reset button to shields which block the one on the board.
See also the mapping between Arduino pins and ATmega168 ports.
Communication
The ATmega168 and ATmega328 also support I2C (TWI) and SPI
communication. The Arduino software includes a Wire library to simplify use of
the I2C bus; see the documentation for details. To use the SPI communication,
please see the ATmega168 or ATmega328 datasheet.
9
Programming
Rather then requiring a physical press of the reset button before an upload,
the Arduino Nano is designed in a way that allows it to be reset by software
running on a connected computer. One of the hardware flow control lines (DTR)
of the FT232RL is connected to the reset line of the ATmega168 or ATmega328
via a 100 nano farad capacitor. When this line is asserted (taken low), the reset
line drops long enough to reset the chip. The Arduino software uses this capability
to allow you to upload code by simply pressing the upload button in the Arduino
environment. This means that the bootloader can have a shorter timeout, as the
lowering of DTR can be well-coordinated with the start of the upload.
This setup has other implications. When the Nano is connected to either a
computer running Mac OS X or Linux, it resets each time a connection is made to
it from software (via USB). For the following half-second or so, the bootloader is
running on the Nano. While it is programmed to ignore malformed data (i.e.
anything besides an upload of new code), it will intercept the first few bytes of
data sent to the board after a connection is opened. If a sketch running on the board
receives one-time configuration or other data when it first starts, make sure that
the software with which it communicates waits a second after opening the
connection and before sending this data.
10
4.2 Bluetooth HC 05
Hardware Features
Software Features
Slave default Baud rate: 9600, Data bits:8, Stop bit:1,Parity:No parity.
Auto‐connect to the last device on power as default.
Permit pairing device to connect as default.
Auto‐pairing PINCODE:”1234” as default.
Pin Description
The HC-05 Bluetooth Module has 6pins. They are as follows:
ENABLE:
When enable is pulled LOW, the module is disabled which means the
Fig 4
Hardware Connections
As we know that Vcc and Gnd of the module goes to Vcc and Gnd of Arduino.
The TXD pin goes to RXD pin of Arduino and RXD pin goes to TXD pin of
Arduino i.e.(digital pin 0 and 1).The user can use the on board Led. But here,LED
is connected to digital pin 12 externally for betterment of the process
13
Fig 5
beam of electromagnetic radiation (infrared, for instance), and looks for changes in
the field or return signal. The object being sensed is often referred to as the
proximity sensor's target. Different proximity sensor targets demanded different
sensors. For example, a capacitive Proximity sensor. Photoelectric be suitable for
a plastic target; inductive Proximity sensor requires a metal target.
Proximity sensors can have a high reliability and long functional life
because of the absence of mechanical parts and lack of physical contact between
the sensor and the sensed object. Proximity sensors are also used in machine
vibration monitoring to measure the variation in distance between a shaft and its
support bearing. This is common in large steam turbines, compressors, and motors
that use sleeve-types bearing.Proximity Sensor" includes all sensors that perform
non-contact detection in comparison to sensors, such as limit switches, that detect
objects by physically contacting them. Proximity Sensors convert information on
the movement or presence of an object into an electrical signal. There are three
types of detection systems that do this conversion: systems that use the eddy
currents that are generated in metallic sensing objects by electromagnetic
14
induction, systems that detect changes in electrical capacity when approaching the
sensing object, and systems that use magnets and reed switches.
The Japanese Industrial Standards (JIS) define Proximity Sensors in JIS C 8201-
5-2 (Low-voltage switchgear and control gear, Part 5: Control circuit devices and
switching elements, Section 2: Proximity switches), which conforms to the IEC
60947-5-2 definition of non-contact position detection switches.
JIS gives the generic name "proximity switch" to all sensors that provide non-
contact detection of target objects that are close by or within the general vicinity
of the sensor, and classifies them as inductive, capacitive, ultrasonic,
photoelectric,etc.
This Technical Explanation defines all inductive sensors that are used for
detecting metallic objects, capacitive sensors that are used for detecting metallic
or non-metallic objects, and sensors that utilize magnetic DC fields as Proximity
Sensors.
Features
1. Proximity Sensors detect an object without touching it, and they therefore do not cause
abrasion or damage to the object.
Devices such as limit switches detect an object by contacting it, but Proximity Sensors
are able to detect the presence of the object electrically, without having to touch it.
2. No contacts are used for output, so the Sensor has a longer service life (excluding
sensors that use magnets).
Proximity Sensors use semiconductor outputs, so there are no contacts to affect the
service life.
3. Unlike optical detection methods, Proximity Sensors are suitable for use in locations
where water or oil is used.
Detection takes place with almost no effect from dirt, oil, or water on the object being
detected. Models with fluorosis cases are also available for excellent chemical
resistance.
4. Proximity Sensors provide high-speed response, compared with switches that require
physical contact.
15
Proximity Sensors detect the physical changes of an object, so they are almost
completely unaffected by the object's surface colour.
7. Unlike switches, which rely on physical contact, Proximity Sensors are affected by
ambient temperatures, surrounding objects, and other Sensors.
Both Inductive and Capacitive Proximity Sensors are affected by interaction with other
Sensors. Because of this, care must be taken when installing them to prevent mutual
interference.
Care must also be taken to prevent the effects of surrounding metallic objects on
Inductive Proximity Sensors, and to prevent the effects of all surrounding objects on
Capacitive Proximity Sensors.
The power line and signal line are combined. If only the power line is wired, internal
elements may be damaged.
Always insert a load. (Refer to the Precautions for Safe Use in the Safety Precautions
for All Proximity Sensors.)
Operating Principles
Inductive Proximity Sensors detect magnetic loss due to eddy currents that are generated
on a conductive surface by an external magnetic field. An AC magnetic field is generated
on the detection coil, and changes in the impedance due to eddy currents generated on a
metallic object are detected.
Other methods include Aluminum-detecting Sensors, which detect the phase component
of the frequency, and All-metal Sensors, which use a working coil to detect only the
changed component of the impedance. There are also Pulse-response Sensors, which
generate an eddy current in pulses and detect the time change in the eddy current with
the voltage induced in the coil.
(Qualitative Explanation)
The sensing object and Sensor form what appears to be a transformer-like relationship.
16
Fig 6
Fig 7
Capacitive Proximity Sensors detect changes in the capacitance between the sensing
object and the Sensor. The amount of capacitance varies depending on the size and
distance of the sensing object. An ordinary Capacitive Proximity Sensor is similar to a
capacitor with two parallel plates, where the capacity of the two plates is detected. One
of the plates is the object being measured (with an imaginary ground), and the other is
the Sensor's sensing surface.
17
The changes in the capacity generated between these two poles are detected.
The objects that can be detected depend on their dielectric constant, but they include
resin and water in addition to metals.
The reed end of the switch is operated by a magnet. When the reed switch is turned ON,
the Sensor is turned ON.
Fig 8
Application
Parking sensors, systems mounted on car bumpers that sense distance to nearby
cars for parking
Ground proximity warning system for aviation safety
Vibration measurements of rotating shafts in machinery
18
Anti-aircraft warfare
Roller coasters
Conveyor systems
Beverage and food can making
Mobile devices
Touch screens that come in close proximity to the face
Attenuating radio power in close proximity to the body, in order to reduce.
Type of sensors
Capacitive
Capacitive displacement sensor
Doppler effect (sensor based on Doppler effect)
Eddy-current
Inductive
Magnetic, including magnetic proximity fuse
Optical
Photoelectric
Photocell (reflective)
Laser rangefinder
Passive (such as charge-coupled devices)
Passive thermal infrared
Radar
Fig 9
working
In a single L293D chip there are two h-Bridge circuit inside the IC which can rotate
two dc motor independently. Due its size it is very much used in robotic application
for controlling DC motors. Given below is the pin diagram of a L293D motor
controller. There are two Enable pins on l293d. Pin 1 and pin 9, for being able to drive
the motor, the pin 1 and 9 need to be high. For driving the motor with left H-bridge
you need to enable pin 1 to high. And for right H-Bridge you need to make the pin 9
to high. If anyone of the either pin1 or pin9 goes low then the motor in the
corresponding section will suspend working. It’s like a switch.
There are 4 input pins for l293d, pin 2,7 on the left and pin 15 ,10 on the right as
shown on the pin diagram. Left input pins will regulate the rotation of motor connected
across left side and right input for motor on the right-hand side. The motors are rotated
on the basis of the inputs provided across the input pins as
fig 10
Let’s consider a Motor connected on left side output pins (pin 3,6). For rotating the
motor in clockwise direction, the input pins have to be provided with Logic 1 and
Logic
21
Logic table
In a very similar way the motor can also operate across input pin 15,10 for
motor on the right hand side.
Voltage specification
VCC is the voltage that it needs for its own internal operation 5v; L293D
will not use this voltage for driving the motor. For driving the motors, it has a
separate provision to provide motor supply VSS (V supply). L293d will use this
to drive the motor. It means if you want to operate a motor at 9V then you need
to provide a Supply of 9V across VSS Motor supply.
The maximum voltage for VSS motor supply is 36V. It can supply a max
current of 600mA per channel. Since it can drive motors Up to 36v hence you can
drive pretty big motors with this l293d.
VCC pin 16 is the voltage for its own internal Operation. The maximum voltage
ranges from 5v and up to 36v.
TIP: Don’t Exceed the vmax Voltage of 36 volts or it will cause damage.
Fig 11
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 brushed 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 motor possible
4.7 PCB
PCBs require additional design effort to lay out the circuit, but manufacturing
and assembly can be automated. Specialized CAD software is available to do much of
the work of layout. Mass-producing circuits with PCBs is cheaper and faster than with
other wiring methods, as components are mounted and wired in one operation. Large
numbers of PCBs can be fabricated at the same time, and the layout only has to be
done once. PCBs can also be made manually in small quantities, with reduced benefits.
PCBs can be single-sided (one copper layer), double-sided (two copper layers on
both sides of one substrate layer), or multi-layer (outer and inner layers of copper,
alternating with layers of substrate). Multi-layer PCBs allow for much higher
component density, because circuit traces on the inner layers would otherwise take up
surface space between components. The rise in popularity of multilayer PCBs with
more than two, and especially with more than four, copper planes was concurrent with
the adoption of surface mount technology. However, multilayer PCBs make repair,
analysis, and field modification of circuits much more difficult and usually
impractical.
24
Chapter 5
SOFTWARE REQUIREMENT
PROGRAM
if (digitalRead(5)==HIGH)
{
25
digitalWrite(2, LOW);
digitalWrite(3, LOW);
}
else{
//donothing
}
if (digitalRead(7)==HIGH)
{
digitalWrite(8, HIGH);
}
else{
digitalWrite(8, LOW);
}
}
26
APPLICATION
Chapter 5
Chapter 6
RESULT
The use of automatic shutter opener with PIR sensor leads to reduce the
action of men at this area and the proximity sensor help sense a person still in
front of the shutter Opening and closing of shutter have been always a boring
job, especially in places where a person is always required to open the shutter.
Here is a solution to open and close the shutter. Here we use an Arduino Nano
board, a Bluetooth module and a proximity sensor to control the whole
operation. Arduino Nano is a compact and breadboard-friendly version board
based on ATmega328 processor. It is more or less same functionality as the
Arduino UNO but in different package. Instead of using the standard USB to
connect to the computer, it uses the mini u s b but without the power plug for
external power source that built on Arduino UNO. The dimension of Arduino
Nano is only 43mm x 18mm, it comes with 6 PWM I/O from the total of 14
digitals I/O, 8 analogue inputs, 16Mhz clock speed and 32kB of flash memory.
Transparent wireless serial connection setup. The HC-05 Bluetooth Module
can be used in a Master or Slave configuration, making it a great solution for
wireless communication. This serial port Bluetooth module is fully qualified
Bluetooth3Mbps Modulation with complete 2.4GHz radio transceiver and
baseband. It uses CSR Blue core 04‐External single chip Bluetooth system with
CMOS technology and with AFH (Adaptive Frequency Hopping Feature).The
slave modules cannot initiate a connection to another Bluetooth device, but can
accept connections. Master module can initiate a connection to other devices. The
user can use it simply for a serial port replacement to establish connection between
MCU and GPS, PC to your embedded project, etc. Just go through the datasheet
for more detail. A proximity sensor is a sensor able to detect the presence of
nearby objects without any physical contact.
28
Chapter 7
CONCLUSION
The system used in this project will help all of the new comers in the
department of home automation and sensing. This project increases our
knowledge and it build a strong mentality about home automation. Here we use
an Arduino Nano board, a Bluetooth module and a proximity sensor to control the
whole operation. Arduino Nano is a compact and breadboard-friendly version
board based on ATmega328 processor. It is more or less same functionality as the
Arduino UNO but in different package.
Instead of using the standard USB to connect to the computer, it uses the
mini u s b but without the power plug for external power source that built on
Arduino UNO. The dimension of Arduino Nano is only 43mm x 18mm, it comes
with 6 PWM I/O from the total of 14 digitals I/O, 8 analogue inputs, 16Mhz clock
speed and 32kB of flash memory. Transparent wireless serial connection setup.
The HC-05 Bluetooth Module can be used in a Master or Slave configuration,
making it a great solution for wireless communication. This serial port Bluetooth
module is fully qualified Bluetooth3Mbps Modulation with complete 2.4GHz
radio transceiver and baseband. It uses CSR Blue core 04‐External single chip
Bluetooth system with CMOS technology and with AFH (Adaptive Frequency
Hopping Feature).
29
Chapter 8
REFERENCE
https://store.arduino.cc/usa/arduino-uno-rev3
https://www.arduino.cc/
https://en.wikipedia.org/wiki/Arduino_Uno
https://www.trossenrobotics.com/p/arduino-uno.aspx
https://www.industrial.ai/bently-nevada/sensors/proximity-
sensors?gclid=EAIaIQobChMI7Nqrtu-
D4QIVlYqPCh1_dwujEAAYASAAEgJCgPD_BwE
https://en.wikipedia.org/wiki/Proximity_sensor
http://www.ia.omron.com/support/guide/41/introduction.html
https://www.mouser.in/Sensors/Proximity-Sensors/_/N-7h7mq
https://www.elprocus.com/simple-proximity-sensor-circuit-
and-working/
https://www.techopedia.com/definition/15003/proximity-sensor
https://www.keyence.com/ss/products/sensor/sensorbasics/prox
imity/info/