Report On Automated Blinds
Report On Automated Blinds
Report On Automated Blinds
On
AUTOMATED CONTROLS IN AUDITORIUM
Submitted in Partial fulfillment of the
Requirements for the award of the degree of Bachelor of Technology
In
ELECTRONICS AND COMMUNICATION ENGINEERING
By
GOWTAMI VANGURI (16011P0405)
PRANATI ELENA B (16011U0404)
SRUTHI SHAH (16011U0408)
Under the esteemed guidance of
N. MANGALA GOURI
Associate Professor of the E.C.E Department
CERTIFICATE
PROJECT SUPERVISOR
N. MANGALA GOURI
Associate Professor,
Department of E.C.E
JNTUH-CEH
DEPARTMENT OF ELECTRONICS AND COMMUNICATIONS ENGINEERING
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
KUKATPALLY
HYDERABAD-500085
This project profile proposes auditorium automation with embedded automation devices
and presents electric blinds controlled over a web page and wireless presenter using an
arduino controller. The Automated electric blinds are set up to raise and close the blinds
in an auditorium. The mechanism automatically opens and close the blinds based on the
commands given through the web page and also when actuated by two pushbuttons. The
Pulse Width Modulation (PWM) techniques are used to control the DC motor speed. The
PWM duty cycle is used to vary the speed of the motor by controlling the motor terminal
voltage. The motor once started will run for the duration required to open/close the
curtain fully and then stop.
The wireless presenter is used to emulate the keyboard forward, backward scrolling up/
down and pause or play buttons.
The solution is demonstrated and validated through a prototype presenting the
experiments and results analysis.
Keywords: Automation system, DC Motor, Electric blinds, PWM technique, duty cycle,
IR receiver, Keyboard emulation.
ACKNOWLEDGEMENT
We are grateful to Prof Dr. E. Sai Baba Reddy, Principal and Prof Dr K. Anitha
Sheela, Professor and Head of the Department of Electronics and Communication
Engineering, JNTUH college of engineering, Hyderabad for their guidance while
pursuing this project. We sincerely express our deep sense of gratitude to our project
guide Mrs N. Mangala Gouri, Associate Professor, ECE Department, JNTU College of
Engineering, Hyderabad, for her invaluable help, efficient guidance and encouragement
throughout the project.
We also owe a deep respect of gratitude to our parents and friends for their cheerful
encouragement and valuable suggestions, without whom this work would not have been
completed in this stipulated time.
We would like to articulate our heartfelt gratitude to the authorities of JNTU for their
help throughout our project work. A few lines of acknowledgement do not fully express
my gratitude and appreciation for all those who guided and supported us throughout this
project. Last but not in the least, we acknowledge the help received from many journals
and websites.
Finally, we thank one and all who helped us directly or indirectly throughout our project
work.
Appendix…………………………………………………………………………………………………….3
8
References……………………………………………………………………………………………….46
LIST OF FIGURES
INTRODUCTION
1.1 AUTOMATION
Automation is the technology by which a process or procedure is performed with
minimal human assistance. Automation or automatic control is the use of
various control systems for operating equipment such as machinery, processes in
factories, boilers and heat treating ovens, switching on telephone networks,
steering and stabilization of ships, aircraft and other applications and vehicles
with minimal or reduced human intervention. Some processes have been
completely automated, while others are semi-automated.
Automation covers applications ranging from a household thermostat controlling
a boiler, to a large industrial control system with tens of thousands of input
measurements and output control signals. In control complexity, it can range from
simple on-off control to multi-variable high-level algorithms.
In the simplest type of an automatic control loop, a controller compares a
measured value of a process with a desired set value, and processes the resulting
error signal to change some input to the process, in such a way that the process
stays at its set point despite disturbances. This closed-loop control is an
application of negative feedback to a system. The mathematical basis of control
theory was begun in the 18th century, and advanced rapidly in the 20th.
Automation has been achieved by various means including
mechanical, hydraulic, pneumatic, electrical, electronic devices and computers,
usually in combination. Complicated systems, such as modern
factories, aeroplanes and ships typically use all these combined techniques. The
benefits of automation include labour savings, savings in electricity costs, savings
in material costs, and improvements to quality, accuracy and precision.
The World Bank's World Development Report 2019 shows evidence that the new
industries and jobs in the technological sector outweigh the economic effects of
workers being displaced by automation.
The term automation, inspired by the earlier word automatic (coming
from automaton), was not widely used before 1947, when Ford established an
automation department. It was during this time that industry was rapidly
adopting feedback controllers, which were introduced in the 1930s.
1.2 AUDITORIUM
1
the number of screens. Auditoria can be found in entertainment venues, community halls,
and theatres, and may be used for rehearsal, presentation, performing arts productions, or
as a learning space.
AUDITORIUM STRUCTURE;
The audiences in a modern theatre are usually separated from the performers by the
proscenium arch, although other types of the stage are common.
The price charged for seats in each part of the auditorium (known in the industry as
the house) usually varies according to the quality of the view of the stage. The seating
areas can include some or all of the following:
Stalls, orchestra or arena: the lower flat area, usually below or at the same level as the
stage.
Balconies or galleries: one or more raised seating platforms towards the rear of the
auditorium. In larger theatres, multiple levels are stacked vertically above or behind
the stalls. The first level is usually called the dress circle or grand circle. The highest
platform or upper circle is sometimes known as the gods, especially in large opera
houses, where the seats can be very high and a long distance from the stage.
Boxes: generally placed immediately to the front, side and above the level of the
stage. They are often separate rooms with an open viewing area which generally seat
only a handful of people. These seats are generally considered the most prestigious of
the house. A state box or royal box is sometimes provided for dignitaries.
Seating arrangement: Seating arrangements in an auditorium seating layout (or
assembly space) will either be identified as "multiple-aisle" or "continental. These
terms are commonly found in design standards manuals, building codes, and similar
architectural reference documents. Each size is unique, with specific guidelines
governing row size, row spacing, and exit ways. A multiple-aisle arrangement will
have a maximum of 14–16 chairs per row with access to an aisle-way at both ends. In
a continental arrangement, all seats are located in a central section. Here the
maximum quantity of chairs per row can greatly exceed the limits established in a
multiple-aisle arrangement. To compensate for the greater length of rows allowed,
building codes will require wider row spacing, wider aisles, and strategically located
exit doors. Although it would seem like more space is called for, a continental seating
plan is often not any less efficient than a multiple-aisle arrangement. If it is carefully
planned, a continental arrangement can frequently accommodate more seating within
the same space.
2
Convenience-The ability to kick back and adjust every window covering with the
simple touch of a button.
Increased Security
Protect the Interior
Creates Ambiance and enhances the working environment
A wireless presenter is basically a wireless keyboard with few selected keys. Wireless
presenters are simple USB plug-and-play devices.
The presenter can move freely in the auditorium up to 50 feet or 15 meters range
and can interact with the audience.
Easy Installation- The presenter don’t need to install any software, simply
plugging the receiver into the USB port is required
Remote functions includes page up and page down (forward and backwards while
running it in a PowerPoint slideshow)
These benefits of using a wireless presenter helps to give enhanced and effective
presentations.
3
CHAPTER 2
The ESP8266 is a very user-friendly and low-cost device to provide internet connectivity
to your projects. The module can work both as an Access point (can create hotspot) and
as a station (can connect to Wi-Fi), hence it can easily fetch data and upload it to the
internet making Internet of Things as easy as possible. It can also fetch data from
internet using API's hence your project could access any information that is available on
the internet, thus making it smarter. Another exciting feature of this module is that it can
be programmed using the Arduino IDE which makes it a lot more user-friendly. However
this version of the module has only 2 GPIO pins (you can hack it to use up to 4) so you
have to use it along with another microcontroller like Arduino, else you can look into the
more standalone ESP-12 or ESP-32versions. So, if you are looking for a module to get
started with IoT or to provide internet connectivity to your project then this module is
the right choice for you. Node MCU is an open-source IoT platform. Which includes
firmware which runs on the ESP8266 Wi-Fi Module from Espressif Systems, and
hardware which is based on the ESP-12 module. The term “Node MCU” by default refers
to the firmware rather than the dev kits. Node MCU firmware was developed so that AT
commands can be replaced with Lua scripting making the life of developers easier. So, it
would be redundant to use AT commands again in Node MCU.
ESP8266-01 Features
4
5
Fig 2.1 Node MCU ESP8266 pin diagram
2.2 ARDUINO PRO MICRO
6
The Pro Micro is similar to the Pro Mini except with an ATmega32U4 on board. Like Pro
mini, the Pro micro also comes in two different models i.e, 3.3v and 5v. The Pro micro
3.3v model has 8MHz crystal oscillator in its board whereas the Pro micro 5v model has
16MHz oscillator which differentiates them.
Also, notice the backside of the board in which the model number is marked either 5v or
3.3v. If both of these signs are failed, check the jumper(J1) at the top left corner of the
board which is closed for 5V and open for 3.3V.
FEATURES:
Power Pins
There are a variety of power and power-related nets broken out:
RAW is the unregulated voltage input for the Pro Micro. If the board is powered
via USB, the voltage at this pin will be about 4.8V (USB’s 5V minus a Schottky
7
diode drop). On the other hand, if the board is powered externally, through this
pin, the applied voltage can be up to 12V.
VCC is the voltage supplied to the onboard ATmega32U4. This voltage will
depend on whether you're using a 3.3V/8MHz Pro Micro or a 5V/16MHz version,
it'll be either 3.3V or 5V respectively. This voltage is regulated by the voltage
applied to the RAW pin. If the board is powered through the ‘RAW’ pin (or
USB), this pin can be used as an output to supply other devices.
RST can be used to restart the Pro Micro. This pin is pulled high by a 10k&Ohm;
resistor on the board and is active-low, so it must be connected to ground to
initiate a reset. The Pro Micro will remain “off” until the reset line is pulled back
to high.
GND, of course, is the common, ground voltage (0V reference) for the system.
I/O Pins
The Pro Micro’s I/O pins – 18 in all – are multi-talented. Every pin can be used as
a digital input or output, for blinking LEDs or reading button presses. These pins are
referenced in the Arduino IDE via an integer value between 0 and 21. (The A0-A3 pins
can be referenced digitally using either their analog or digital pin number).
Nine pins feature analog to digital converters (ADCs) and can be used as analog inputs.
These are useful for reading potentiometers or other analog devices using
the analogRead([pin]) function.
There are five pins with pulse width modulation (PWM) functionality, which allows for a
form of analog output using the analogWrite([pin], [value]) function. These pins are
indicated on-board with a faint, white circle around them.
There are hardware UART (serial), I2C, and SPI pins available as well. These can be used
to interface with digital devices like serial LCDs, XBees, IMUs, and other serial sensors.
The Pro Micro has five external interrupts, which allow you to instantly trigger a function
when a pin goes either high or low (or both). If you attach an interrupt to an interrupt-
enabled pin, you’ll need to know the specific interrupt that pin triggers: pin 3 maps to
interrupt 0, pin 2 is interrupt 1, pin 0 is interrupt 2, pin 1 is interrupt 3, and pin 7 is
interrupt
On-Board LEDs
There are three LEDs on the Pro Micro. One green LED indicates whether power is
present.
The other two LEDs help indicate when data is transferring over USB. One LED
represents USB data coming into (RX) the Pro Micro, and the other LED indicates USB
data going out (TX).
How to Power the Pro Micro
As the Pro Micro’s main feature is its innate USB functionality, the most common way to
power it is via USB. In this setup, a 5V Pro Micro will be powered directly from the USB
bus. The other end of the USB cable can be connected to either a computer, USB hub, or
a USB wall adapter, which can (in most cases) provide more power.
Alternatively, if your Pro Micro is living out in the wild, out of reach of USB cables, it
can be powered through either the ‘RAW’ or ‘VCC’ pins. A supply going into
the ‘RAW’ pin will be regulated down to the correct operating voltage. To be safe, it
8
shouldn't be any higher than 12V, and it should be at least 1V more than the Pro Micro's
operating voltage (e.g. >6V for a 5V Pro Micro).
If you power the Pro Micro through the ‘VCC’ pin, keep in mind that this signal is
unregulated. Only use this if you have a clean, regulated 5V supply to connect to it.
L293D is a typical Motor driver or Motor Driver IC which allows DC motor to drive on
either direction. L293D is a 16-pin IC which can control a set of two DC motors
simultaneously in any direction. It means that you can control two DC motor with a
single L293D IC. Dual H-bridge Motor Driver integrated circuit.
It works on the concept of H-bridge. H-bridge is a circuit which allows the voltage to be
flown in either direction. As you know voltage need to change its direction for being able
to rotate the motor in clockwise or anticlockwise direction, Hence H-bridge IC are ideal
for driving a DC motor. In a single L293D chip there are two h-Bridge circuits inside the
IC which can rotate two dc motors independently. Due to its size, it is very much used in
a robotic application for controlling DC motors. Given below is the pin diagram of
L293D motor controller. 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 the motor on the right-hand side.
The motors are rotated based on the inputs provided across the input pins as LOGIC 0 or
LOGIC 1. In simple, you need to provide Logic 0 or 1 across the input pins for rotating
the motor.
9
Specifications
10
Fig 2.5 L293d pin diagram
2.4 DC MOTOR
Electrical DC Motors are continuous actuators that convert electrical energy into
mechanical energy. The DC motor achieves this by producing a continuous angular
rotation that can be used to rotate pumps, fans, compressors, wheels, etc.
As well as conventional rotary DC motors, linear motors are also available which are
capable of producing a continuous liner movement. There are three types of conventional
electrical motor available: AC type Motors, DC type Motors and Stepper Motors.
AC Motors are generally used in high power single or multi-phase industrial applications
were a constant rotational torque and speed is required to control large loads such as fans
or pumps.
In this tutorial on electrical motors, we will look only at simple light-duty DC
Motors and Stepper Motors which are used in many different types of electronic,
positional control, microprocessor, PIC and robotic type circuits.
11
Brushed Motor – This type of motor produces a magnetic field in a wound rotor
(the part that rotates) by passing an electrical current through a commutator and
carbon brush assembly, hence the term "Brushed". The stators (the stationary part)
magnetic field is produced by using either a wound stator field winding or by
permanent magnets. Generally, brushed DC motors are cheap, small and easily
controlled.
Brushless Motor – This type of motor produces a magnetic field in the rotor by
using permanent magnets attached to it and commutation is achieved
electronically. They are generally smaller but more expensive than conventional
brushed type DC motors because they use “Hall effect” switches in the stator to
produce the required stator field rotational sequence but they have better
torque/speed characteristics, are more efficient and have a longer operating life
than equivalent brushed types.
Servo Motor – This type of motor is a brushed DC motor with some form of
positional feedback control connected to the rotor shaft. They are connected to and
controlled by a PWM type controller and are mainly used in positional control
systems and radio-controlled models.
Normal DC motors have almost linear characteristics with their speed of rotation being
determined by the applied DC voltage and their output torque being determined by the
current flowing through the motor windings. The speed of rotation of any DC motor can
be varied from a few revolutions per minute (rpm) to many thousands of revolutions per
minute making them suitable for electronic, automotive or robotic applications. By
connecting them to gearboxes or gear-trains their output speed can be decreased while at
the same time increasing the torque output of the motor at a high speed.
12
2.5 WEBSERVER
13
Fig 2.8 Web hosting
Different types of web servers
In the open market there are different types of web servers available. Let's discuss about
the most popular web servers. Apache, IIS, Nginx and LiteSpeed are few of them.
1. Apache webserver
One of the most popular web servers in the world developed by the Apache Software
Foundation. Apache is an open-source software which supports almost all operating
systems including Linux, Unix, Windows, FreeBSD, Mac OS X and more. About
60% of machines run on Apache Web Server.
3. IIS webserver
IIS is a Microsoft product. This server has all the features just like apache. But it
is not an open-source and moreover adding personal modules is not easy and
modification becomes a little difficult job
14
Fig 2.10 IIS web server
Microsoft developed this product and they maintain, thus it works with all the
windows operating system platforms. Also, they provide good customer support
if it had any issues.
4. Nginx webserver
Another free open source web server is Nginx, it includes IMAP/POP3 proxy
server. Nginx is known for its high performance, stability, simple configuration
and low resource usage.
This web server doesn't use threads to handle requests rather a much more
scalable event-driven architecture which uses small and predictable amounts of
memory under load. It is getting popular in recent times and it is hosting about
7.5% of all domains worldwide. Most of the web hosting companies are using this
in recent times.
15
2.6 LED
In the simplest terms, a light-emitting diode (LED) is a semiconductor device that emits
light when an electric current is passed through it. Light is produced when the particles
that carry the current (known as electrons and holes) combine within the semiconductor
material.
Since light is generated within the solid semiconductor material, LEDs are described as
solid-state devices. The term solid-state lighting, which also encompasses organic LEDs
(OLEDs), distinguishes this lighting technology from other sources that use heated
filaments (incandescent and tungsten halogen lamps) or gas discharge (fluorescent
lamps).
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 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.
16
Fig 2.14 Nine volt battery
IR RECEIVER PINOUT
17
Pin Configuration
3 Signal The signal pin gives out the sequence based on the IR signal
detected
The TSOP1738 series are miniaturized receivers for infrared remote control systems. PIN
diode and preamplifier are assembled on lead frame, the epoxy package is designed as IR
filter. The demodulated output signal can directly be decoded by a microprocessor.
TSOP1738 is the standard IR remote control receiver series, supporting all major
transmission codes.
The sensor can be used for Proximity detection application along with an Infra-Red(IR)
led in robotics and security systems. It receives IR signal at 38khz frequency.
TSOP1738 Features:
• Photo detector and preamplifier in one package
• Internal filter for PCM frequency
• Improved shielding against electrical field disturbance
• TTL and CMOS compatibility
• Output active low
• Low power consumption
• High immunity against ambient light
• Continuous data transmission possible (up to 2400 bps)
• Suitable burst length 10 cycles/burst
Specifications:
• Supply Voltage: 5 V
• Power consumption: 0.4 to 1.0 mA
18
• Min. Ee irradiation: 0.35 mW/m2 type.
• Angle of detection: 90
• Dimensions of the casing (mm): 12.5 x 10 x Thickness 5.8
• Temperature range: -25 C to +85 C
2.9 BREADBOARD
A breadboard is a solderless device for a temporary prototype with electronics and test
circuit designs. Most electronic components in electronic circuits can be interconnected
by inserting their leads or terminals into the holes and then making connections through
wires where appropriate. The breadboard has strips of metal underneath the board and
connect the holes on the top of the board. The metal strips are laid out as shown below.
Note that the top and bottom rows of holes are connected horizontally and split in the
middle while the remaining holes are connected vertically.
The USB connector was developed to simplify the connection between computers and
peripheral devices. Before the USB interface, peripheral devices had a multitude of
19
connectors. The USB interface provides various benefits, including plug-and-play,
increased data transfer rate (DTR), reduced number of connectors, and addressing
usability issues with existing interfaces.
The USB interface was developed in the mid-1990s and is standardized by the USB
Implementers Forum (USB-IF). Originally, the standards defined two types of
connectors, known as A-type and B-type. Both types use 4 flat pins with the first pin (the
+5V supply voltage) and fourth pin (the supply ground) slightly longer to first connect
the power supply. This substantially lowers the possibility of the data connection
receiving voltages. In both types, the connection is held in place by friction.
A-Type connectors are used on devices that provide power, such as a computer, and have
a flat and rectangular interface. They provide a downstream connection. B-Type
connectors are used on devices receiving power such as a peripheral device. They have
slightly bevelled exterior corners on the top ends and are somewhat square in shape. They
provide an upstream connection. Although there have been several revisions of the USB
connector since the original standards were implemented, the majority of USB products
still use A and B connector interfaces.
There are several versions of USB connectors, which vary in their DTRs: USB 1.0 with
DTR of 1.5 Mbps and 12 Mbps, USB 2.0 with DTR of 480 Mbps, and USB 3.0, or
SuperSpeed, with DTR up to 5 Gbps.
The USB interface replaced a wide range of previous interfaces, such as serial and
parallel ports and individual power chargers for portable devices. USB connectors are
now commonly used with devices like network adapters and portable media players as
well as video game consoles and smartphones. USB connectors are also used for devices
requiring smaller USB connectors.
20
CHAPTER 3
3.1.1 INTRODUCTION
This section describes the design and working of Automated Electric blinds through a
web page using Node MCU ESP8266.
The Node MCU web server creates the webpage through which the user can control the
blinds, by opening the webpage remotely through any electronic device like laptop,
desktop and mobile.
The pulse width modulation (PWM) techniques are used to control the speed of the
motor.
These blinds can also be controlled electrically with help of two push switches.
Each L293d motor can supply two motors at a time without any parallel connections.
21
motor by controlling the motor terminal voltage. As the duty cycle increases, more
voltage is applied to the motor. This contributes to the stronger magnetic flux inside the
armature windings and the increase the RPM. There are many different ways to control
the speed of motors. Basically, three methods are employed for speed control, namely,
armature resistance, field flux and armature voltage. PWM is a simple method to control
the voltage
When a specific voltage is supplied to the motor, it rotates the output shaft at some speed.
The power applied to the motor can be controlled by varying the width of these applied
PWM pulses and thereby varying the average DC voltage applied to the motors terminals.
By changing or modulating the timing of these pulses the speed of the motor can be
controlled. The longer time the pulse is "ON", the faster the motor will rotate and
whereas, the shorter time the pulse is "ON" the slower the motor will rotate.
Microcontrollers have been used to control the DC motor speed due to the low cost and
also the use of extra hardware such as the use of a timer, RAM and ROM This
technology provides fast response in controlling of multiple parameters and these
parameters are field programmable by the user.
22
3.1.3 CIRCUIT DIAGRAM:
3.1.4 WORKING
Arduino code is to be written in Arduino IDE included with the library ESP8266
WiFi.h, which contains the Node MCU core initialization functions. The SSID
and Password of your Wi-Fi network should be entered.
const char* ssid = "Your SSID";
const char* password = "Your Wi-Fi Password";
23
Enter the SSID and Password in double quotations.
After SSID and Password, all the required pins are initialized. In the setup
function, Serial communication is started at 115200 bps baud rate. Then the input
and output pins are declared.
Node MCU requests your Wi-Fi router for an IP allotment. After IP allotment
Node MCU will start its server.
HTML code starts executing in the browser.
When Node MCU started its server. It started serving the web page. Connect the
circuit and upload the code in your Node MCU.
Open the Arduino serial monitor from your Arduino ide. In Arduino serial
monitor you will see the Node MCU requesting the Wi-Fi router for IP allotment
and then starts its server. When server is fully operational Node MCU will output
the server address on Arduino serial monitor. This address is the HTML address
of the motor controls web page. One has to enter this address in browser of his
device (mobile, desktop or laptop). the serial monitor is shown below.
NOTE: To make communication between two modules they must be on the same
network. Both the server (Node MCU esp8266) and client (mobile, laptop and desktop)
must be connected to the same Wi-Fi. If anyone of them is on a different network they
cannot see access the webpage.
24
3.5 OPERATION
The above page will be displayed in the client web browser. The user can now open/close
and stop blinds via webserver webpage through Node MCU ESP8266.
When the user gives the following commands the corresponding actions performed are:
Button: Stop
When the webpage cannot be accessed the blinds can be controlled electrically with the
help of switch buttons as follows
25
Push switch_1: When this switch is pressed blinds are opened as the DC motor rotates in
clockwise direction
Push switch_2: When this switch is pressed blinds are closed as the DC motor rotates in
anti-clockwise direction
In loop function Node MCU is waiting for any request from the client. If request is made
Node MCU performs the desired function in the client request.
The blinds are designed to take inputs from both webpage and push switches at the same
time.
3.1.6 APPLICATIONS
1. The Automated blinds can be used effectively at conference halls, offices and
seminar rooms
2. Automated blinds are being widely used in home theatres and auditoriums
3.2.1 INTRODUCTION
This section describes the design and working of Wireless presenter using Arduino Pro
Micro and IR Receiver.
26
3.2.2 BLOCK DIAGRAM
27
3.2.4 WORKING
We are using one IR receiver (TSOP1738) and Arduino Pro Micro, so we need
one control pin that is the signal pin of IR receiver to be connected to Arduino Pro
Micro.
Connect ADC-11 to Vout.
Vs pin of TSOP1738 is supplied with +5V from Vcc pin of Pro Micro.
Both TSOP1738 and Arduino Pro Micro grounds must be common in order to
work properly.
Upload the default decoder sketch available in Arduino IDE which gives a
decoded value when a button is pressed on the remote controller.
Arduino code is to be written in Arduino IDE included with the libraries
IRremote.h and Keyboard.h.
The Arduino code is programmed to send the equivalent keyboard button presses
to the computer, whenever it receives one of the decoded signals from the remote
controller.
3.2.5 OPERATION
28
The actions performed by the presenter are as follows:
>
When this button is pressed it emulates right arrow of the keyboard
<
When this button is pressed it emulates left arrow of the keyboard
OK
When this button is pressed it emulates space bar of the keyboard
^
When this button is pressed it emulates up arrow of the keyboard
v
When this button is pressed it emulates down arrow of the keyboard
3.2.6 APPLICATIONS
29
CHAPTER 4
Auditorium Dimensions
The auditorium contains 29 horizontal blocks and 24 vertical blocks of tiles.
Each block measures 40 x 40 sq-centimetres.
Podium measures 3.6 x 2.8 sq-metres
Each bench is kept in a dimension of 1.2 x 1.2 sq-metre block
Entire auditorium measures 11.6 x 9.6 sq-metres.
Auditorium capacity
It has 4 rows of benches and 7 columns for seating arrangement.
2-joined columns are on either ends in the auditorium and 3-joined columns are
placed in the centre.
One bench can hold 3 members which makes a total capacity of 84 seats in the
auditorium.
If there is more requirement of seating, 4 People can be accommodated in one
bench with Total capacity of 112.
Auditorium structure
The structure of the auditorium is based on the symmetric design which is
symmetric about a vertical centre line.
It includes 3 elevated steps one above the other.
An 80cm row is left at the end of the auditorium as a walking path for the
audience
30
Auditorium layout
31
32
4.2 EXECUTION AND RESULTS
Execution:
Connections are made as per the circuit and local server is used for the webserver.
Automated electric blinds to raise and close the curtain using DC motor is
implemented and the results are shown below.
Result:
Initial state
33
When Open blinds is clicked
34
4.2.2 WIRELESS PRESENTER
Execution:
Connections are made as per the circuit and specific keyboard keys are emulated
using remote buttons.
The results obtained are as shown below.
Result:
Initial state
35
When the backward arrow on the remote is pressed
Initial stage
36
When the down arrow on the remote is pressed
37
CHAPTER 5
5.1 CONCLUSION
The effect of the PWM on the motor voltage and speed has been studied. Automated
electric blinds working with a required speed using PWM technique is developed and the
blinds are designed to take inputs from both webpage and push switches at the same time.
A wireless presenter using a TV remote is developed to emulate the specific keyboard
keys.
Blinds can be made automated based on the status of Projector which can be
achieved by using an LDR sensor near the projector projection area.
Automation of Lights, Air conditioner, Projector over webpage can be achieved.
Some of the features like a laser pointer, low battery indicator, timer and
stopwatch can be included in the wireless presenter.
38
APPENDIX
AUTOMATED ELECTRIC BLINDS VIA WEB SERVER CODE:
#include <ESP8266WiFi.h>
const char* ssid = "SS";
const char* password = "87654321";
uint8_t Pwm = D1; //Nodemcu PWM pin Gpio-5 to enable-1 of L293D (D1)
int a1 = D3; //Gpio-0 of nodemcu esp8266 to switch-1 (D3)
int a2 = D4; //Gpio-2 of nodemcu esp8266 to stop switch(D4)
int x1 = D7; //Gpio-13 of nodemcu esp8266 to L239D (D8)
int x2 = D8; //Gpio-15 of nodemcu esp8266 to L293D (D7)
int Ms=0,dir=0,Pw=0;
WiFiServer server(80);
void setup()
{
Serial.begin(115200);
delay(10);
//Declaring switches as input
pinMode(a1, INPUT);
pinMode(a2, INPUT);
//Declaring L293D control pins as Output
pinMode(x1, OUTPUT);
pinMode(x2, OUTPUT);
// Connect to WiFi network
Serial.println();
39
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
// Start the server
server.begin();
Serial.println("Server started");
// Print the IP address on serial monitor
Serial.print("Use this URL to connect: ");
Serial.print("http://"); //URL IP to be typed in mobile/desktop browser
Serial.print(WiFi.localIP());
Serial.println("/");
}
void loop() {
// Check if a client has connected
WiFiClient client = server.available();
analogWrite(Pwm, 767); //Pwm duty cycle 75%
Pw=1;
int sw1 = digitalRead(a1);
int sw2 = digitalRead(a2);
if(sw1==0) {
40
digitalWrite(x1, HIGH); //Start motor
digitalWrite(x2, LOW);
Ms=1;
dir=1;
delay(100);
digitalWrite(x1, LOW); //Stop motor
digitalWrite(x2, LOW);
}
else if(sw2==0) {
digitalWrite(x1, LOW); //revrse motor
digitalWrite(x2, HIGH);
Ms=1;
dir=0;
delay(100);
digitalWrite(x1, LOW); //Stop motor
digitalWrite(x2, LOW);
}
if (!client)
{
return;
}
// Wait until the client sends some data
Serial.println("new client");
while(!client.available())
{
delay(1);
41
}
// Read the first line of the request
String request = client.readStringUntil('\r');
Serial.println(request);
client.flush();
// Match the request
if (request.indexOf("/open=1") != -1)
{
digitalWrite(x1, HIGH); //Start motor
digitalWrite(x2, LOW);
Ms=1;
dir=1;
Ms=0;
}
if (request.indexOf("/stop=1") != -1)
{
digitalWrite(x1, LOW); //Stop motor
digitalWrite(x2, LOW);
Ms=0;
}
if (request.indexOf("/close=1") != -1)
{
digitalWrite(x1, LOW); //Change motor rotation direction
digitalWrite(x2, HIGH);
Ms=1;
dir=0;
Ms=0;
42
}
// Return the response
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println(""); // do not forget this one
client.println("<!DOCTYPE HTML>");
client.println("<html>");
client.println("<head><meta name=\"viewport\" content=\"width=device-width, initial-
scale=1\">");
client.println("<link rel=\"icon\" href=\"data:,\">");
// CSS to style the buttons
client.println("<style>html{font-family: Times New Roman; display: inline-block;
margin: 0px auto; text-align: center;}</style></head>");
client.println("<h1 align=center>Blinds Control over Wi-Fi</h1><br><br>");
client.println("<br>");
client.println("<a href=\"/open=1\"\"><button>Open Blinds </button></a><br/>");
client.println("<br>");
client.println("<a href=\"/close=1\"\"><button>Close Blinds </button></a><br/>");
client.println("<br>");
client.println("<a href=\"/stop=1\"\"><button>Stop</button></a><br/>");
client.println("<br>");
if(Ms==1){
client.println("Motor Powered Working<br/>" );
}
else
client.println("Motor at Halt<br/>" );
if(dir==1)
{
43
client.println("Motor rotating in forward direction<br/>" );
}
else
client.println("Motor rotating in backward direction<br/>" );
client.println("</html>");
delay(1);
Serial.println("Client disconnected");
Serial.println("");
}
void setup()
{
irrecv.enableIRIn(); // Start the receiver
Keyboard.begin();
44
Serial.begin(9600);
}
void loop()
{
if (irrecv.decode(&results))
{
switch (results.value) {
case 16653029:
Serial.println("forward");
Keyboard.press(KEY_LEFT_ARROW);
break;
case 16701989:
Serial.println("backward");
Keyboard.press(KEY_RIGHT_ARROW);
break;
case 16669349:
Serial.println("pause/play");
Keyboard.press((char) 32);
break;
case 16677509 :
Serial.println(" page up");
Keyboard.press(KEY_UP_ARROW);
break;
case 16673429:
Serial.println("page down");
Keyboard.press(KEY_DOWN_ARROW);
45
break;
//default:
// break;
}
//delay(70);
Keyboard.releaseAll(); //release the key, you don't need it continuously pressed
//delay(10);
irrecv.resume(); // Receive the next value
}
}
46
REFERENCES
1. http://ijsrtm.in
2. http://osoyoo.com/2018/06/25/osoyoo-pro-micro-board/
3. https://components101.com/tsop1738-ir-receiver
4. randomtutorials.com– Webserver using Nodemcu.
5. microcontroller-project.com– L293d working.
6. components101.com– Pinout of ESP8266.
7. elprocus.com- Infrared IR sensor circuit and working.
8. Arduino Workshop: A Hands-On Introduction by John Boxall.
9. Digital Circuits by Morris Mano.
10. Exploring Arduino by Jeremy Blum.
47