Report On Automated Blinds

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 58

Minor Project Report

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

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY


HYDERABAD
College of Engineering Hyderabad
Autonomous
(Kukatpally-Hyderabad-500085)
2019-2020
DEPARTMENT OF ELECTRONICS AND COMMUNICATIONS ENGINEERING
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
KUKATPALLY
HYDERABAD-500085

CERTIFICATE

This is to certify that the minor-project report titled “AUTOMATED CONTROLS IN


AUDITORIUM” being submitted by GOWTAMI VANGURI (16011P0405),
PRANATI ELENA B (16011U0404), SRUTHI SHAH (16011U0408) of the 2016-21
batch of Bachelor Of Technology Degree Programme students in partial fulfilment of the
requirements for the award of the degree to the Jawaharlal Nehru Technological
University of Hyderabad is a record of the bonafide work carried out by them under my
guidance and supervision.
The results embodied in this report have not been submitted to any other university or
institute for the award of any degree or diploma.

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

CERTIFICATE FROM THE HEAD OF THE DEPARTMENT

This is to certify that the minor-project report titled “AUTOMATED CONTROLS IN


AUDITORIUM” being submitted by GOWTAMI VANGURI (16011P0405),
PRANATI ELENA B (16011U0404), SRUTHI SHAH (16011U0408) of the 2016-21
batch of Bachelor Of Technology Degree Programme students in partial fulfilment of
the requirements for the award of the degree to the Jawaharlal Nehru Technological
University College of Engineering Hyderabad is a record of the bonafide work carried
out by them in the academic year 2019-20.

Head of the Department


Dr K. ANITHA SHEELA
Professor of E.C.E
JNTUH – CEH
DEPARTMENT OF ELECTRONICS AND COMMUNICATIONS ENGINEERING
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
KUKATPALLY
HYDERABAD-500085

DECLARATION FROM THE CANDIDATES

We, GOWTAMI VANGURI (16011P0405), PRANATI ELENA B (16011U0404),


SRUTHI SHAH (16011U0408) hereby declare that the minor project report titled
“AUTOMATED CONTROLS IN AUDITORIUM” undertaken by us under the
guidance of N. MANGALA GOURI is submitted in partial fulfilment of the
requirements for the award of the of Bachelor of Technology Degree Programme in
Electronics and Communications Engineering.
This is a record of bonafide work carried out by us and the results embodied in
this project have not been reproduced/copied from any source and have not been
submitted to any other university or institute for the award of any degree or diploma.

GOWTAMI VANGURI (16011P0405)

PRANATI ELENA B (16011U0404)

SRUTHI SHAH (16011U0408)


ABSTRACT

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.

GOWTAMI VANGURI 16011P0405


PRANATI ELENA B 16011U0404
SRUTHI SHAH 16011U0408
Table of Contents

CHAPTER 1 : INTRODUCTION ..................................................................................................1


1.1 AUTOMATION.........................................................................................................................1
1.2 AUDITORIUM ..........................................................................................................................1
1.3 ELECTRIC BLINDS ....................................................................................................................2
1.4 WIRELESS PRESENTER.............................................................................................................3
CHAPTER 2 : DESCRIPTION OF THE COMPONENTS ...................................................................4
2.1 NODE MCU ESP8266...............................................................................................................4
2.2 ARDUINO PRO MICRO ............................................................................................................6
2.3 L293D MOTOR DRIVER IC .......................................................................................................9
2.4 DC MOTOR ........................................................................................................................... 11
2.5 WEBSERVER ......................................................................................................................... 13
2.6 LED ....................................................................................................................................... 16
2.7 NINE VOLT BATTERY ............................................................................................................ 16
2.8 IR RECEIVER -TSOP1738 ....................................................................................................... 17
2.9 BREADBOARD ...................................................................................................................... 19
2.10 USB CONNECTOR ............................................................................................................... 19
CHAPTER 3 : AUTOMATED ELECTRIC BLINDS WIA WEB SERVER AND WIRELESS PRESENTER
USING ARDUINO CONTROLLER ............................................................................................. 21
3.1 AUTOMATED ELECTRIC BLINDS ........................................................................................... 21
3.1.1 INTRODUCTION ............................................................................................................ 21
3.1.2 BLOCK DIAGRAM .......................................................................................................... 22
3.1.3 CIRCUIT DIAGRAM: ....................................................................................................... 23
3.1.4 WORKING...................................................................................................................... 23
3.5 OPERATION ...................................................................................................................... 25
3.1.6 APPLICATIONS............................................................................................................... 26
3.2 WIRELESS PRESENTER.......................................................................................................... 26
3.2.1 INTRODUCTION ............................................................................................................ 26
3.2.2 BLOCK DIAGRAM .......................................................................................................... 27
3.2.3 CIRCUIT DIAGRAM: ....................................................................................................... 27
3.2.4 WORKING...................................................................................................................... 28
3.2.5 OPERATION ................................................................................................................... 28
3.2.6 APPLICATIONS............................................................................................................... 29
CHAPTER 4 : EXECUTION AND RESULTS ................................................................................. 30
4.1 AUDITORIUM DESIGN .......................................................................................................... 30
4.2 EXECUTION AND RESULTS ................................................................................................... 33
4.2.1 AUTOMATED ELECTRIC BLINDS .................................................................................. 33
4.2.2 WIRELESS PRESENTER................................................................................................... 35
CHAPTER 5 : CONCLUSION AND FUTURE SCOPE .................................................................... 38
5.1 CONCLUSION ....................................................................................................................... 38
5.2 FUTURE SCOPE..................................................................................................................... 38

Appendix…………………………………………………………………………………………………….3
8
References……………………………………………………………………………………………….46
LIST OF FIGURES

Fig 2.1 Node MCU ESP8266 pin diagram


Fig 2.2 Arduino Pro Micro
Fig 2.3 Arduino Pro Micro pin diagram

Fig 2.4 Internal circuit of L293d

Fig 2.5 L293D pin diagram

Fig 2.6 DC Motor Conceptual diagram

Fig 2.7 Working of a webserver

Fig 2.8 Web hosting

Fig 2.9 Apache webserver

Fig 2.10 IIS web server

Fig 2.11 Nginx webserver

Fig 2.12 LightSpeed web server

Fig 2.13 LED

Fig 2.14 Nine volt battery

Fig 2.15 IR Receiver

Fig 2.16 Breadboard

Fig 2.17 USB connector


Fig 3.1 Block diagram – Automated electric blinds

Fig 3.2 Circuit diagram – Automated electric blinds

Fig 3.3 Serial monitor showing HTML address


Fig 3.4 Webpage displayed in the client web browser
Fig 3.5 Block diagram –Wireless presenter
Fig 3.6 Circuit diagram –Wireless presenter
Fig 3.7 TV remote
LIST OF ACRONYMS

IDE - Integrated Development Environment


DC - Direct Current
RPM - Revolutions Per Minute
HID - Human Interface Device
USB - Universal Serial Bus
IR - Infra-Red
LED - Light Emitting Diode
GPIO - General Purpose Input/Output
PC - Personal Computer
AC - Air Conditioner
PWM - Pulse Width Modulation
CHAPTER 1

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

An auditorium is a room built to enable an audience to hear and watch performances at


venues such as theatres. For movie theatres, the number of auditoriums is expressed as

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.

1.3 ELECTRIC BLINDS


An electric blind is a motorized blind which is a type of window covering. It is a
piece of material fixed onto a wooden or metal roller that can be pulled down to cover
a window.

Benefits of using electric blinds

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

1.4 WIRELESS PRESENTER

A wireless presenter is basically a wireless keyboard with few selected keys. Wireless
presenters are simple USB plug-and-play devices.

Benefits of using a wireless presenter

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

 Remote control applications using smartphones- Smartphones can be used to


control presentations. The apps available in markets were created to replace the
presentation devices by just installing an application in smartphone and a small
service running in the presentation host computer, and using the wireless
connection (Wifi or Bluetooth) the application can communicate with PowerPoint
to remotely control the presentation slides.

These benefits of using a wireless presenter helps to give enhanced and effective
presentations.

3
CHAPTER 2

DESCRIPTION OF THE COMPONENTS

2.1 NODE MCU ESP8266

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

 Low cost, compact and powerful Wi-Fi Module


 Power Supply: +3.3V only
 Current Consumption: 100mA
 I/O Voltage: 3.6V (max)
 I/O source current: 12mA (max)
 Built-in low power 32-bit MCU @ 80MHz
 512kB Flash Memory
 Can be used as Station or Access Point or both combined
 Supports Deep sleep (<10uA)
 Supports serial communication hence compatible with many development
platforms like Arduino
 Can be programmed using Arduino IDE or AT-commands or Lua Script
Esp8266-01 Specifications

4
5
Fig 2.1 Node MCU ESP8266 pin diagram
2.2 ARDUINO PRO MICRO

Fig 2.2 Arduino Pro Micro


The Pro Micro is an Arduino-compatible microcontroller with an ATmega32U4 on
board. The USB transceiver inside the 32U4 allows us to add USB connectivity on-board
and do away with a bulky external USB interface. It consists of 4 channels of 10-bit
ADC, 5 PWM pins, 12 D I/O pins as well as hardware serial connections Rx and Tx.
There is a voltage regulator on board so it can accept voltage up to 12VDC. If you’re
supplying unregulated power to the board, be sure to connect to the ‘RAW’ pin and not
VCC.

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:

 ATmega32U4 running at 5V/16MHz.


 Supported under Arduino IDE v1.0.1.
 On-Board micro-USB connector for programming.
 4 x 10-bit ADC pins.
 12 x Digital I/Os (5 are PWM capable).
 Rx and Tx Hardware Serial Connections.

Fig 2.3 Arduino Pro Micro pin diagram

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.

2.3 L293D MOTOR DRIVER IC

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.

How to use L293D Motor Driver IC


Using this L293D motor driver IC is very simple. The IC works on the principle of Half
H-Bridge, let us not go too deep into what H-Bridge means, but for now just know that H
bridge is a setup which is used to run motors both in clockwise and anti-clockwise
direction.
All the Ground pins should be grounded. There are two power pins for this IC, one is the
Vss (Vcc1) which provides the voltage for the IC to work, this must be connected to +5V.
The other is Vs(Vcc2) which provides voltage for the motors to run, based on the
specification of your motor you can connect this pin to anywhere between 4.5V to 36V,
here I have connected to +12V.
The Enable pins (Enable 1,2 and Enable 3,4) are used to Enable Input pins for Motor 1
and Motor 2 respectively. Since in most cases we will be using both the motors both the
pins are held high by default by connecting to +5V supply. The input pins Input 1,2 are
used to control the motor 1 and Input pins 3,4 are used to control the Motor 2. The input
pins are connected to any Digital circuit or microcontroller to control the speed and
direction of the motor. You can toggle the input pins based on the following table to
control your motor.

9
Specifications

 Supply Voltage Range 4.5V to 36V


 600-mA Output current capability per driver
 Separate Input-logic supply
 It can drive small DC-geared motors, bipolar stepper motor.
 Pulsed Current 1.2-A Per Driver
 Thermal Shutdown
 Internal ESD Protection

Fig 2.4 Internal circuit of L293d

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.

The Basic DC Motor


The DC Motor or Direct Current Motor to give it its full title, is the most commonly used
actuator for producing continuous movement and whose speed of rotation can easily be
controlled, making them ideal for use in applications were speed control, servo type
control, and/or positioning is required. A DC motor consists of two parts, a "Stator"
which is the stationary part and a "Rotor" which is the rotating part. The result is that
there are three types of DC Motor available.

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.

Fig 2.6 DC Motor Conceptual diagram

12
2.5 WEBSERVER

Fig 2.7 Working of a webserver


Web server is a program that uses HTTP to serve files that create web pages to users in
response to their requests, which is sent by their computer’s HTTP connection. Any
server that delivers an XML document to another device can be a
web server. A better definition might be that a web server is an Internet server that
responds to HTTP requests to deliver content and services.
Consider, I can say if you are in front of your computer, browsing your web, and you get
a message from a friend saying, "I had just read a great article at the following URL
http://www.fastwebhost.in/blog
So, you will type that URL into your browser and press enter. And that’s it, no matter on
which web server the website is in the world, it displays the page on your computer
screen. Always a web server is connected to the internet. Every web server that connects
to the Internet will be having a unique address which contains a series of four numbers
between 0 and 255. A period (.) separates these numbers.
Also, web server enables the hosting providers to manage multiple domains(users) on a
single server.
A web host is a company that leases out space on a cluster of servers to empower people
to serve their own content & webpages.

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.

Fig 2.9 Apache webserver


2. Customization of Apache web server is easy as it contains a modular structure. It
is also an open-source which means that you can add your modules to the server
when to require and make modifications that suit your requirements. It is more
stable than any other web servers and is easier to solve administrative issues. It
can be installed on multiple platforms successfully. Recent apache releases
provide you with the feasibility of handling more requests when you compare to
its earlier versions.

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.

Fig 2.11 Nginx webserver

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.

5. LightSpeed web server


LiteSpeed (LSWS) is a high-performance Apache drop-in replacement. LSWS is
the 4th most popular web server on the internet and it is a commercial web server.

Fig 2.12 LightSpeed web server


Upgrading your webserver to LiteSpeed will improve performance and lower operating
costs. This is compatible with most common apache features, including mod_rewrite,
.htaccess, and mod_security. LSWS can load Apache configuration files directly and
works as a drop-in replacement apache with most of the hosting control panels. It
replaces apache in less than 15 minutes with zero downtime. Unlike other front-end
proxy solutions, LSWS replaces all Apache functions, simplifying

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

Fig 2.13 LED

2.7 NINE VOLT BATTERY

The nine-volt battery, or 9-volt battery, is a common size of battery that was introduced
for the early transistor radios. It has a rectangular prism shape with rounded edges and a
polarized snap connector at the top. This type is commonly used in walkie-
talkies, clocks and smoke detectors.
The nine-volt battery format is commonly available in primary carbon-zinc and alkaline
chemistry, in primary lithium iron disulfide, and 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

2.8 IR RECEIVER -TSOP1738

IR RECEIVER PINOUT

Fig 2.14 IR Receiver

17
Pin Configuration

Pin Number Pin Name Description

1 Ground Connected to the Ground of circuit

2 Vcc Typically connect to +5V, maximum of 6V can be given

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.

Fig 2.16 Breadboard

2.10 USB CONNECTOR

A universal serial bus (USB) connector is a connector between a computer and a


peripheral device such as a printer, monitor, scanner, mouse or keyboard. It is part of the
USB interface, which includes types of ports, cables and connectors.

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.

The USB connector is intentionally designed to be properly connected. It is impossible to


connect it upside-down. The USB icon is imprinted on the top side of the plug, making it
easy for visual alignment. Additionally, USB standards specify that a connector must
support a compliant extension cable or fit within size restrictions.

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.

Fig 2.17 USB connector

20
CHAPTER 3

AUTOMATED ELECTRIC BLINDS WIA WEB SERVER AND


WIRELESS PRESENTER USING ARDUINO CONTROLLER

3.1 AUTOMATED ELECTRIC BLINDS

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.

Purpose of L293d Motor driver:


To open and close a blinds, the DC motor needs to rotate in both the directions for which
L293d Motor driver is required.
Motor power consumption is 12 volts at 300 mA of current. Node MCU ESP8266 works on 3.3
volts TTL logic. We cannot power the dc motor directly through the Node MCU output pins. We
need extra power and an external circuit which can handle motor heavy power load. The
transistor is the best choice to control heavy load with microcontrollers. Transistors base takes
3.3 volts TTL microcontroller output signal and can drive heavy loads across its collector and
emitter side. Through transistor, we can also control the speed of the motor. But the problem
lies in direction control of the motor. Through a single transistor, it's not possible to alter the
direction of motor rotation. For altering the motor direction, we need a combination of
transistor known as H bridge driver. Through this H bridge circuit, we can easily change the
rotation direction of motor and effectively control the rotation speed of the dc motor. Making
an H bridge circuit makes a real messy circuit. It's also hard and time-consuming to select the
appropriate rated transistors or MOSFETS (H bridge can also be made with FET's) for the circuit
needs. Pre-assembled and manufactured H bridge circuits are available in the market and they
also came in IC's. L293d is popular half H bridge IC available in market.

Each L293d motor can supply two motors at a time without any parallel connections.

Effect of PWM on DC Motor speed


Pulse width modulation (PWM) is used to generate pulses with variable duty cycle rate.
The rapid rising and falling edges of PWM signal minimises the switching transition time
and the associated switching losses. The PWM duty cycle is used to vary the speed of the

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.

3.1.2 BLOCK DIAGRAM

Fig 3.1 Block diagram – Automated electric blinds

22
3.1.3 CIRCUIT DIAGRAM:

Fig 3.2 Circuit diagram – Automated electric blinds

3.1.4 WORKING

 Connections are made as per the circuit diagram


 We are using one motor and push switches, so we need four controls among
which two are used to alter the direction of the motor and the other two controls to
push switches. Node MCU five digital pins are used as controls. Connect

 GPIO-0 to push switch_1


 GPIO-1 to push switch_2
 GPIO-15 to Input-1 of L293d
 GPIO-13 to Input-2 of L293d
 GPIO-5 to Enable_1 of L293d

 Vss of l293d is supplied +5 volts. Vs of l293d is supplied the motor operating


voltage +9 volts in our case. Both the l293d and Node MCU grounds must be
common in order to work properly.

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

Fig 3.3 Serial monitor showing HTML address

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

Fig 3.4 Webpage displayed in the client web browser

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: Open blinds

Will open blinds by rotating the DC motor in clockwise direction

 Button: Close blinds

Will close the blinds by rotating the DC Motor in anti-clockwise direction by


changing the polarity of supply.

 Button: Stop

Will stop the motion of blinds by cutting supply to dc motor.

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 WIRELESS PRESENTER

3.2.1 INTRODUCTION

This section describes the design and working of Wireless presenter using Arduino Pro
Micro and IR Receiver.

Purpose of Arduino Pro Micro


Arduino Pro Micro is a small, but powerful microcontroller that uses the ATmega32U4
chip. This chip allows emulating of a keyboard. We can interface with this
microcontroller through a USB cable on any computer and it will emulate a keyboard
through the same USB port.
The ATmega32u4 microcontroller is an excellent choice for any Human Interface Device
(HID), such as a mouse, a joystick or a keyboard. There are three popular boards with
that microcontroller: Arduino Leonardo, Teensy 2.0 and Pro Micro. Arduino Leonardo is
too big for our needs. Teensy 2.0 is quite expensive whereas Pro Micro is cost reliable
compared to other two.

26
3.2.2 BLOCK DIAGRAM

Fig 3.5 Block diagram – Wireless presenter

3.2.3 CIRCUIT DIAGRAM:

Fig 3.6 Circuit diagram –Wireless presenter

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

Fig 3.7 TV remote

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

 The wireless presenters can be used effectively in conference halls and


seminar rooms.
 Wireless presenters are being widely used in home theatres and auditoriums.

29
CHAPTER 4

EXECUTION AND RESULTS

4.1 AUDITORIUM DESIGN

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

4.2.1 AUTOMATED ELECTRIC BLINDS

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:

Webpage accessed on mobile

Initial state

33
When Open blinds is clicked

When Close 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

When the forward arrow on the remote is pressed

35
When the backward arrow on the remote is pressed

Initial stage

36
When the down arrow on the remote is pressed

When the up arrow on the remote is pressed

37
CHAPTER 5

CONCLUSION AND FUTURE SCOPE

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.

5.2 FUTURE SCOPE

 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("");
}

WIRELESS PRESENTER USING ARDUINO CONTROLLER:


#include <Keyboard.h>
#include <IRremote.h>
/*
left FE1AE5 = 16653029
right FEDA25 = 16701989
pause FE5AA5 = 16669349
*/
int RECV_PIN = 8;
IRrecv irrecv(RECV_PIN);
decode_results results;

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

You might also like