You are on page 1of 38

IOT(Internet of Thing)

The Internet of Things (IoT) is the network of physical objects that


contain embedded technology to communicate and sense or interact with
their internal states or the external environment.

The Internet of Things (IoT) refers to the ever-growing network of


physical objects that feature an IP address for internet connectivity, and
the communication that occurs between these objects and other Internet-
enabled devices and systems.

The Internet of Things (IoT) is the network of physical objects or


"things" embedded with electronics, software, sensors, and network
connectivity, which enables these objects to collect and exchange
data.[1] The Internet of Things allows objects to be sensed and
controlled remotely across existing network infrastructure,[2] creating
opportunities for more direct integration between the physical world and
computer-based systems, and resulting in improved efficiency, accuracy
and economic benefit
HOME AUTOMATION USING IOT

By connecting devices, we are gaining more control than we have ever had before.
We can adjust the thermostat from the office, check the security cameras from the
movie theater, or turn the lights off or close the garage door from just about
anywherewhether youre next door or across the world.
The ability to open an app on your smartphone and control devices from anywhere
is great, but gets more and more confusing as you begin to open one app for your
thermostat, another for your light bulbs, another for your security, another for your
TV, another for your vacuum
IOT not only simplifies your control over these devices, but it actually connects these
devices to each other as well, no matter the brand. With a single app from your
smartphone you can control everything. And the real magic happens when you
program these devices to perform a function based on the actions or location of
another device. Simply getting out of bed in the morning can trigger your music to
begin playing and your coffee maker to brew coffee. Closing the garage door on
your way to work can arm your security system and make sure all the lights and
TVs are off in the house. And returning home at night can turn on the lights, unlock
the door and turn to your favorite TV channel right as you walk in the door.

PROJECT DESCRIPTION
The main aim of the project is to control multiple electrical loads remotely over
internet falling under the basic principles of Internet of Things-IOT. For this real-
time scenario we use an Android app on any smart cell phone with user configurable
front end (GUI).
The data sent from the cell phone upon touch commands are sent through allotted IP
fed to it, to any nearby wireless modem which is then received by a Wi-Fi module
interfaced to a microcontroller of 8051 series, under TCP IP via networked wireless
modem environment.
Relays are then driven as per the command received at the controller end to handle
electrical loads. The real time data is also seen at the sending end upon a LCD display
interfaced to the microcontroller that displays the status of the loads too.
The power supply consists of a step down transformer 230/12V, which steps down
the voltage to 12V AC. This is converted to DC using a Bridge rectifier and it is then
regulated to +5V using a voltage regulator 7805 which is required for the operation
of the microcontroller , 3.3 volt for the Wi-Fi unit and other components
ADVANTAGES AND DISADVANTAGES OF UNDERGROUND OF
INTERNET OF THINGS

Advantages
Communication IoT encourages the communication between devices, also
famously known as Machine-to-Machine (M2M) communication. Because of
this, the physical devices are able to stay connected and hence the total
transparency is available with lesser inefficiencies and greater quality.

Automation and Control Due to physical objects getting connected and


controlled digitally and centrally with wireless infrastructure, there is a large
amount of automation and control in the workings. Without human
intervention, the machines are able to communicate with each other leading to
faster and timely output.

Information it is obvious that having more information helps making


better decisions. Whether it is mundane decisions as needing to know what to
buy at the grocery store or if your company has enough widgets and supplies,
knowledge is power and more knowledge is better.

Monitor The second most obvious advantage of IoT is monitoring. Knowing


the exact quantity of supplies or the air quality in your home, can further
provide more information that could not have previously been collected easily.
For instance, knowing that you are low on milk or printer ink could save you
another trip to the store in the near future. Furthermore, monitoring the
expiration of products can and will improve safety.

Time As hinted in the previous examples, the amount of time saved because
of IoT could be quite large. And in todays modern life, we all could use more
time.

Money The biggest advantage of IoT is saving money. If the price of the
tagging and monitoring equipment is less than the amount of money saved,
then the Internet of Things will be very widely adopted. IoT fundamentally
proves to be very helpful to people in their daily routines by making the
appliances communicate to each other in an effective manner thereby saving
and conserving energy and cost. Allowing the data to be communicated and
shared between devices and then translating it into our required way, it makes
our systems efficient.

Automation of daily tasks leads to better monitoring of devices The


IoT allows you to automate and control the tasks that are done on a daily
basis, avoiding human intervention. Machine-to-machine communication
helps to maintain transparency in the processes. It also leads to uniformity in
the tasks. It can also maintain the quality of service. We can also take
necessary action in case of emergencies.

Efficient and Saves Time The machine-to-machine interaction provides


better efficiency, hence; accurate results can be obtained fast. This results in
saving valuable time. Instead of repeating the same tasks every day, it enables
people to do other creative jobs.

Saves Money Optimum utilization of energy and resources can be achieved


by adopting this technology and keeping the devices under surveillance. We
can be alerted in case of possible bottlenecks, breakdowns, and damages to the
system. Hence, we can save money by using this technology.

Better Quality of Life All the applications of this technology culminate in


increased comfort, convenience, and better management, thereby improving
the quality of life.
The Disadvantages of IoT
Compatibility: Currently, there is no international standard of compatibility
for the tagging and monitoring equipment. I believe this disadvantage is the
most easy to overcome. The manufacturing companies of these equipment just
need to agree to a standard, such as Bluetooth, USB, etc. This is nothing new
or innovative needed.

Complexity:As with all complex systems, there are more opportunities of


failure. With the Internet of Things, failures could sky rocket. For instance,
lets say that both you and your spouse each get a message saying that your
milk has expired, and both of you stop at a store on your way home, and you
both purchase milk. As a result, you and your spouse have purchased twice the
amount that you both need. Or maybe a bug in the software ends up
automatically ordering a new ink cartridge for your printer each and every
hour for a few days, or at least after each power failure, when you only need a
single replacement.

Privacy/Security:With all of this IoT data being transmitted, the risk of


losing privacy increases. For instance, how well encrypted will the data be kept
and transmitted with? Do you want your neighbors or employers to know
what medications that you are taking or your financial situation?
Safety:Imagine if a notorious hacker changes your prescription. Or if a store
automatically ships you an equivalent product that you are allergic to, or a
flavor that you do not like, or a product that is already expired. As a result,
safety is ultimately in the hands of the consumer to verify any and all
automation.
As all the household appliances, industrial machinery, public sector services
like water supply and transport, and many other devices all are connected to
the Internet, a lot of information is available on it. This information is prone
to attack by hackers. It would be very disastrous if private and confidential
information is accessed by unauthorized intruders.
Compatibility As devices from different manufacturers will be
interconnected, the issue of compatibility in tagging and monitoring crops up.
Although this disadvantage may drop off if all the manufacturers agree to a
common standard, even after that, technical issues will persist. Today, we
have Bluetooth-enabled devices and compatibility problems exist even in this
technology! Compatibility issues may result in people buying appliances from
a certain manufacturer, leading to its monopoly in the market.

Complexity The IoT is a diverse and complex network. Any failure or bugs
in the software or hardware will have serious consequences. Even power
failure can cause a lot of inconvenience.

Lesser Employment of Menial Staff The unskilled workers and helpers


may end up losing their jobs in the effect of automation of daily activities. This
can lead to unemployment issues in the society. This is a problem with the
advent of any technology and can be overcome with education.With daily
activities getting automated, naturally, there will be fewer requirements of
human resources, primarily, workers and less educated staff. This may create
Unemployment issue in the society.

Technology Takes Control of Life Our lives will be increasingly


controlled by technology, and will be dependent on it. The younger generation
is already addicted to technology for every little thing. We have to decide how
much of our daily lives are we willing to mechanize and be controlled by
technology.
Software and hardware required

Software required

Keil u Vision 3

Keil is a German based Software development company. Keil Software provides


you with software development tools for the 8051 family of microcontrollers. With
these tools, you can generate embedded applications for the multitude of 8051
derivatives. It provides several development tools like:
IDE (Integrated Development environment)
Project Manager
Simulator
Debugger
C Cross Compiler, Cross Assembler, Locator/Linker

The keil 8051 tool kit includes three main tools, assembler, compiler and linker.
An assembler is used to assemble your 8051 assembly program. A compiler is used
to compile your C source code into an object file. A linker is used to create an
absolute object module suitable for your in-circuit emulator.

Flash Magic

Flash Magic is a PC tool for programming flash based microcontrollers from NXP
using a serial or Ethernet protocol while in the target hardware. Flash Magic is an
application developed by Embedded Systems Academy to allow you to easily
access the features of a microcontroller device. With this program you can erase
individual blocks or the entire Flash memory of the microcontroller.

ORCAD

OrCAD is a proprietary software tool suite used primarily for electronic design
automation. The software is used mainly by electronic design engineers and
electronic technicians to create electronic schematics and electronic prints for
manufacturing printed circuit boards.
Hardware required

Microcontroller board with processor


Make: Robosoft Labs
Model: RL8051DEV
Controller: Phillips 89v51RD2

Regulated DC power supply


Make: Aplab
Model no: LD 3205
Range Current: 0 A 5 A, Voltage: 0 V 32 V

Multimeter
Make: Fluke
Model no: 115
Range: 0.00001%
Breadboard
Steel honeycombed, closed cell general purpose breadboard.

Relay
Make: Obsidian
Model: SKUOSDN6134267
Type: 8 pin DPDT PCB type 5 V

Analog to Digital Converter


Make: National Semiconductor
Model: ADC0808
Resolution: 8 bits
Overview

Fig1: Block Diagram


Microcontroller AT89C51RD2

Features
Compatible with MCS-51 Products
4K Bytes of In-System Reprogrammable Flash Memory
Endurance: 1,000 Write/Erase Cycles
Fully Static Operation: 0 Hz to 24 MHz
Three-level Program Memory Lock
128 x 8-bit Internal RAM
32 Programmable I/O Lines
Two 16-bit Timer/Counters
Six Interrupt Sources
Programmable Serial Channel
Low-power Idle and Power-down Modes
The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with
4K bytes of Flash programmable and erasable read only memory (PEROM). The
device is manufactured using Atmels high-density nonvolatile memory
technology and is compatible with the industry-standard MCS-51 instruction set
and pinout. The on-chip Flash allows the program memory to be reprogrammed in-
system or by a conventional nonvolatile memory programmer. By combining a
versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a
powerful microcomputer which provides a highly-flexible and cost-effective
solution to many embedded control applications.
The AT89C51 provides the following standard features: 4K bytes of Flash, 128
bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level
interrupt architecture, full duplex serial port, on-chip oscillator and clock circuitry.
In addition, the AT89C51 is designed with static logic for operation down to zero
frequency and supports two software selectable power saving modes. The Idle
Mode stops the CPU while allowing the RAM, timer/counters, serial port and
interrupt system to continue functioning. The Power-down Mode saves the RAM
contents but freezes the oscillator disabling all other chip functions until the next
hardware reset.
Transistor 2N2222

It is NPN switching transistor in a TO-18 metal package. It has applications in


linear amplification and switching.
It is designed for low to medium current, low power, medium voltage, and can
operate at moderately high speeds. It is made in the TO-18 metal can.
The 2N2222 is considered a very common transistor, and is used as an exemplar of
an NPN transistor. It is frequently used as a small-signal transistor, and it remains a
small general purpose transistor of enduring popularity.

Fig4: 2N2222 transistor

Features of 2N2222

High current (max. 800 mA)


Low voltage (max. 40V)
Relay

A relay is an electrically operated switch. Many relays use an electromagnet


to operate a switching mechanism mechanically, but other operating principles are
also used. Relays are used where it is necessary to control a circuit by a low-power
signal (with complete electrical isolation between control and controlled circuits), or
where several circuits must be controlled by one signal.

Fig5: Relays

A relay is an electrically operated switch. Current flowing through the coil of


the relay creates a magnetic field which attracts a lever and changes the switch
contacts. The coil current can be on or off so relays have two switch positions and
most have double throw (changeover) switch contacts as shown in the diagram.

Fig6: Relay interior

Relays allow one circuit to switch a second circuit which can be completely
separate from the first. For example a low voltage battery circuit can use a relay
to switch a 230V AC mains circuit. There is no electrical connection inside the relay
between the two circuits; the link is magnetic and mechanical.
The coil of a relay passes a relatively large current, typically 30mA for a 12V
relay, but it can be as much as 100mA for relays designed to operate from lower
voltages. Most ICs (chips) cannot provide this current and a transistor is usually used
to amplify the small IC current to the larger value required for the relay coil. The
maximum output current for the popular 555 timer IC is 200mA so these devices
can supply relay coils directly without amplification.
Relays are usually SPDT or DPDT but they can have many more sets of
switch contacts, for example relays with 4 sets of changeover contacts are readily
available. For further information about switch contacts and the terms used to
describe them please see the page on switches.
Most relays are designed for PCB mounting but you can solder wires directly
to the pins providing you take care to avoid melting the plastic case of the relay.

Relay coils produce brief high voltage 'spikes' when they are switched off and
this can destroy transistors and ICs in the circuit. To prevent damage, connect a
protection diode across the relay coil.
The figure shows a relay with its coil and switch contacts. You can see a lever
on the left being attracted by magnetism when the coil is switched on. This lever
moves the switch contacts.
Fig7: Relay circuit

There is one set of contacts (SPDT) in the foreground and another behind them,
making the relay DPDT.
The relay's switch connections are usually labelled COM, NC and NO:
COM = Common, always connect to this; it is the moving part of the switch.
NC = Normally Closed, COM is connected to this when the relay coil is off.
NO = Normally Open, COM is connected to this when the relay coil is on.

Applications of relays

Control a high-voltage circuit with a low-voltage signal, as in some types of


modems or audio amplifiers.
Control a high-current circuit with a low-current signal, as in the starter
solenoid of an automobile.
Detect and isolate faults on transmission and distribution lines by opening and
closing circuit breakers.
Time delay functions. Relays can be modified to delay opening or delay
closing a set of contacts. A very short (a fraction of a second) delay would use
a copper disk between the armature and moving blade assembly. Current
flowing in the disk maintains magnetic field for a short time, lengthening
release time. For a slightly longer (up to a minute) delay, a dashpot is used.

A dashpot is a piston filled with fluid that is allowed to escape slowly. The
time period can be varied by increasing or decreasing the flow rate. For longer
time periods, a mechanical clockwork timer is installed.
MICROPHONE

A microphone, colloquially mic or mike is an acoustic-to-


electric transducer or sensor that converts sound into an electrical signal.
Electromagnetic transducers facilitate the conversion of acoustic signals into
electrical signals.[2] Microphones are used in many applications such
as telephones, hearing aids, public address systems for concert halls and public
events, motion picture production, live and recorded audio engineering,two-way
radios, megaphones, radio and television broadcasting, and in computers for
recording voice, speech recognition, VoIP, and for non-acoustic purposes such as
ultrasonic checking or knock sensors.
Most microphones today use electromagnetic induction (dynamic microphones),
capacitance change (condenser microphones) or piezoelectricity (piezoelectric
microphones) to produce an electrical signal from air pressure variations.
Microphones typically need to be connected to a preamplifier before the signal can
be amplified with an audio power amplifier and a speaker or recorded.
Resistors
A resistor is a two-terminal electronic component designed to oppose an electric
current by producing a voltage drop between its terminals in proportion to the
current, that is, in accordance with Ohm's law:
V = IR
Resistors are used as part of electrical networks and electronic circuits. They are
extremely commonplace in most electronic equipment. Practical resistors can be
made of various compounds and films, as well as resistance wire (wire made of a
high-resistivity alloy, such as nickel/chrome).
The primary characteristics of resistors are their resistance and the power
they can dissipate. Other characteristics include temperature coefficient, noise, and
inductance. Less well-known is critical resistance, the value below which power
dissipation limits the maximum permitted current flow, and above which the limit is
applied voltage. Critical resistance depends upon the materials constituting the
resistor as well as its physical dimensions; it's determined by design.
Resistors can be integrated into hybrid and printed circuits, as well as
integrated circuits. Size, and position of leads (or terminals) are relevant to
equipment designers; resistors must be physically large enough not to overheat when
dissipating their power.

Fig8: Resistors
A resistor is a two-terminalpassiveelectronic component which implements
electrical resistance as a circuit element. When a voltage V is applied across the
terminals of a resistor, a current I will flow through the resistor in direct proportion
to that voltage. The reciprocal of the constant of proportionality is known as the
resistance R, since, with a given voltage V, a larger value of R further "resists" the
flow of current I as given by Ohm's law:

Resistors are common elements of electrical networks and electronic circuits


and are ubiquitous in most electronic equipment. Practical resistors can be made of
various compounds and films, as well as resistance wire (wire made of a high-
resistivity alloy, such as nickel-chrome). Resistors are also implemented within
integrated circuits, particularly analog devices, and can also be integrated into hybrid
and printed circuits.
The electrical functionality of a resistor is specified by its resistance: common
commercial resistors are manufactured over a range of more than 9 orders of
magnitude. When specifying that resistance in an electronic design, the required
precision of the resistance may require attention to the manufacturing tolerance of
the chosen resistor, according to its specific application. The temperature coefficient
of the resistance may also be of concern in some precision applications. Practical
resistors are also specified as having a maximum power rating which must exceed
the anticipated power dissipation of that resistor in a particular circuit: this is mainly
of concern in power electronics applications. Resistors with higher power ratings are
physically larger and may require heat sinking. In a high voltage circuit, attention
must sometimes be paid to the rated maximum working voltage of the resistor.
The series inductance of a practical resistor causes its behavior to depart from
ohms law; this specification can be important in some high-frequency applications
for smaller values of resistance. In a low-noise amplifier or pre-amp the noise
characteristics of a resistor may be an issue. The unwanted inductance,

excess noise, and temperature coefficient are mainly dependent on the technology
used in manufacturing the resistor. They are not normally specified individually for
a particular family of resistors manufactured using a particular technology. A family
of discrete resistors is also characterized according to its form factor, that is, the size
of the device and position of its leads (or terminals) which is relevant in the practical
manufacturing of circuits using them.

Capacitors

A capacitor or condenser is a passive electronic component consisting of a pair of


conductors separated by a dielectric. When a voltage potential difference exists
between the conductors, an electric field is present in the dielectric. This field stores
energy and produces a mechanical force between the plates. The effect is greatest
between wide, flat, parallel, narrowly separated conductors.
An ideal capacitor is characterized by a single constant value, capacitance,
which is measured in farads. This is the ratio of the electric charge on each conductor
to the potential difference between them. In practice, the dielectric between the
plates passes a small amount of leakage current. The conductors and leads introduce
an equivalent series resistance and the dielectric has an electric field strength limit
resulting in a breakdown voltage.
The properties of capacitors in a circuit may determine the resonant
frequency and quality factor of a resonant circuit, power dissipation and operating
frequency in a digital logic circuit, energy capacity in a high-power system, and
many other important aspects.

Fig9: Ceramic Capacitors Fig10: Electrolytic Capacitors


A capacitor (formerly known as condenser) is a device for storing electric
charge. The forms of practical capacitors vary widely, but all contain at least two
conductors separated by a non-conductor. Capacitors used as parts of electrical
systems, for example, consist of metal foils separated by a layer of insulating film.
Capacitors are widely used in electronic circuits for blocking direct current
while allowing alternating current to pass, in filter networks, for smoothing the
output of power supplies, in the resonant circuits that tune radios to particular
frequencies and for many other purposes.
A capacitor is a passiveelectronic component consisting of a pair of
conductors separated by a dielectric (insulator). When there is a potential difference
(voltage) across the conductors, a static electric field develops in the dielectric that
stores energy and produces a mechanical force between the conductors. An ideal
capacitor is characterized by a single constant value, capacitance, measured in
farads. This is the ratio of the electric charge on each conductor to the potential
difference between them.
LCD (LIQUID CRYSTAL DISPLAY)
Certain organic large size molecule types of liquids possess properties, which
cause them to interfere with light passage in them. One type, called the twisted
nematic type, is becoming more useful in todays LCDs. In this, the liquid crystals
have thread-like shapes: the units join head to tail for million molecules to form
lengthy chains. Moreover each plane is twisted a few degrees from the next. Some
of the recent chemicals of this variety are made of pyrimidines, phenyl
cyclohexanes, bicyclohexane and 4-(4 methoxy benzylidine) -n-butylaniline. They
exhibit a crystalline structure even in liquid form at ordinary temperatures.
When a voltage is applied between the plates, the molecules move with the dipoles
aligned in the cell axis. Thus those regions under the segments, which have the
electric field, have a contrasty appearance when viewed in light, while other
unexcite segments are invisible.
The voltage needed is preferable 2-20 V A.C. The cathode (or front plane) voltage
input to the LCD goes through an analog switch that is on at any time so that a.c.
voltage is applied to the appropriate segment. The anode (back plane) receives the
a.c. supply. The display driving switches are from a set of MOSFET switches,
which also form part of Integrated circuit. For eg. C 1200 clock LSI I.C. chip from
Computer Syst. Inc, USA, is a digital clock chip with the LCD display driver. Turn
on time for the LCD displays vary form 0.2-100 millisecs, depending on voltage
applied. Turn of time is 30-100ms. So these displays are not suitable for very fast
changing numbers. The power consumption is 1to 10 micro watt/cm2. The voltage
threshold for watch type LCD display is 1 to 2V. The operating a.c. frequency is
50-100 KHz.
Pin
Function Name
No
1 Ground (0V) Ground
2 Supply voltage; 5V (4.7V 5.3V) Vcc
3 Contrast adjustment; through a variable resistor VEE
4 Selects command register when low; and data register Register
when high Select
5 Low to write to the register; High to read from the register Read/write
6 Sends data to data pins when a high to low pulse is given Enable
7 DB0
8 DB1
9 DB2
10 DB3
8-bit data pins
11 DB4
12 DB5
13 DB6
14 DB7
15 Backlight VCC (5V) Led+
16 Backlight Ground (0V) Led-
CRYSTAL OSCILLATORS

Crystal oscillators are oscillators where the primary frequency


determining element is a quartz crystal. Because of the inherent
characteristics of the quartz crystal the crystal oscillator may be held to
extreme accuracy of frequency stability. Temperature compensation may
be applied to crystal oscillators to improve thermal stability of the
crystal oscillator.
Crystal oscillators are usually, fixed frequency oscillators where stability
and accuracy are the primary considerations. For example it is almost
impossible to design a stable and accurate LC oscillator for the upper HF
and higher frequencies without resorting to some sort of crystal control.
Hence the reason for crystal oscillators.
The frequency of older FT-243 crystals can be moved upward by crystal
grinding.
VOLTAGE REGULATOR

7805 is a voltage regulator integrated circuit. It is a member of


78xx series of fixed linear voltage regulator ICs. The voltage
source in a circuit may have fluctuations and would not give the
fixed voltage output. The voltage regulator IC maintains the output
voltage at a constant value. The xx in 78xx indicates the fixed
output voltage it is designed to provide. 7805 provides +5V
regulated power supply. Capacitors of suitable values can be
connected at input and output pins depending upon the respective
voltage levels.
Pin Description:
Pin No Function Name
1 Input voltage (5V-18V) Input
2 Ground (0V) Ground
3 Regulated output; 5V (4.8V-5.2V) Output

LD117 FOR 8266


Ah the esteemed LD1117, who amongst us has not used this popular low
drop voltage regulator? This big chunky regulator will help you get your
4-15V battery or wall adapter down to a nice clean 3.3V with 1%
regulation. Perfect for just about all electronics! This is the TO-220
version, with up to 800mA current capability, and has internal current
limiting + thermal shut-down protection which makes it sturdy and
pretty much indestructible - at least electronics-wise (we're pretty sure a
hammer might work...)

This regulator has a ~1V linear drop-out, better than the 780X series'
2V. That means you must give it at least 4.3V to get a clean 3.3V out.
This regulator is often used to get a 5V power supply to a a clean 3.3V.
There is a constant 'quiescent' current draw of 5mA.

This regulator can provide up to 800 mA as long as it has proper heat-


sinking. The higher your input voltage and output current, the more heat
it will generate. Without an extra heatsink, you can burn off up to 2W.
We like this calculator for determining your heat sink requirements It's a
TO-220 package, so use 62.5C/Watt junction thermal resistance. The
wattage of your set up is = (InputVoltage - 3.3V) *
AverageCurrentInAmps. E.g. a 9V power plug and 0.5 Amp of average
output current means the regulator is burning off (9 - 3.3)*0.5 = 2.85
Watts! This setup would need a heat sink Or you could use a 5V power
supply for (5-3.3)*0.5 = 0.85W which would not require a heatsink.

This regulator requires at least 10uF electrolytic capacitors on both input


and output for stability

CLAPP CIRCUIT

Required Components
1K, 4.7K, 47K,
330 and 470 ohm resistors
Electric Condenser mic
Two BC547 transistors
LED
555 timer
9V Battery
10F and 2 100nF capacitors

This circuit (As shown below) is made with the help of Sound activated
sensor, which senses the sound of Clap as input and processes it to the
circuit in order to give the Output. When sound is given as the input to
the Electric Condenser Mic, it is changed into the Electrical Energy as
the LED turns on. LED turns ON, as we give sound input and it turns
OFF automatically after few seconds. Turn-On LED timer can be
changed by varying the value of 100mF capacitor as it is connected with
555 timer whose main purpose is to generate the pulse.

Although the name of the circuit is the Clap Switch, but you are not
restricted to give input as the Clap only. It can be any sound, having
same pitch as of Clap so this can also be called as Sound Operated
Switch. This circuit is mainly based on transistors, because the negative
terminal of Mic is directly connected with the transistor. In this circuit,
we havent used any Electronic Switch to turn on/off the circuit, so
when you are connecting the battery with the circuit, it means your
circuit is now turned ON and it will take the inputs in the form of Sound
Energy. You can modify this circuit by using Relay as Electronic Switch
to turn the circuit ON or OFF.

As soon as we give the sound input to the circuit, it amplifies the sound
signals and proceeds them to the 555 timers which generates the pulse to
the LED, making it turn ON. You are to make sure, that the negative
side of the Condenser mic is connected with the amplifier or the circuit
will heat-up and may not working with different models of transistors
etc. You cannot increase the sensitivity of the Condenser mic for long
usage, it has short range by default. It is also applicable for the LAMP,
so this circuit has many opportunities for modification

1. It can used to turn ON and OFF the LED or LAMP simply, by


clapping your hands.
2. We can also remove LEDs and place a FAN or any other electric
component on the output in order to get desired result.
3. The Condenser Mic used in this circuit has the short range as a
default, which cannot be varied.
4. Clap Switch is not restricted to turn the LEDs ON and OFF, but it
can be used in any electric appliances such as Tube Light, Fan,
Radio or any other basic circuit which you want to turn ON by a
Sound.
STEP DOWN TRANSFORMER

step down transformer: is one whose secondary voltage is less than its
primary voltage. It is designed to reduce the voltage from the primary
winding to the secondary winding. This kind of transformer steps
down the voltage applied to it.
As a step-down unit, the transformer converts high-voltage, low-current
power into low-voltage, high-current power. The larger-gauge wire used
in the secondary winding is necessary due to the increase in current. The
primary winding, which doesnt have to conduct as much current, may
be made of smaller-gauge wire.

It is possible to operate either of these transformer types backwards


(powering the secondary winding with an AC source and letting the
primary winding power a load) to perform the opposite function: a step-
up can function as a step-down and visa-versa. One convention used in
the electric power industry is the use of H designations for the higher-
voltage winding (the primary winding in a step-down unit; the secondary
winding in a step-up) and X designations for the lower-voltage
winding.
One of the most important considerations to increase transformer
efficiency and reduce heat is choosing the metal type of the windings.
Copper windings are much more efficient than aluminum and many
other winding metal choices, but it also costs more. Transformers with
copper windings cost more to purchase initially, but save on electrical
cost over time as the efficiency more than makes up for the initial cost.
Hyperterminal

Communication from or to a computer has become almost essential in our day-to-


day lives. Though we can execute many programs within a computer itself, it will
not be of much use without outside communication.
The basic elements of a communication are:

1. A sender (source) that creates the message to be transmitted


2. A medium that carries the message
3. A receiver (sink) that receives the message

There are two types of communications parallel and serial. Parallel data transfer
can be made through an 8-bit data line for faster communication.

Serial communication is often used to control or receive data from a


microcontroller. It is a form of input/output (I/O) in which the bits of a byte being
transferred appear one after the other in a timed sequence on a single wire. Serial
data transfer is made through a serial link between the microcontroller and the PC
using RS-232C.

RS-232C

_ Meets or Exceeds TIA/EIA-232-F and ITU Recommendation V.28


_ Operates From a Single 5-V Power Supply With 1.0-_F Charge-
Pump Capacitors
_ Operates Up To 120 kbit/s
_ Two Drivers and Two Receivers
_ 30-V Input Levels
_ Low Supply Current . . . 8 mA Typical
_ ESD Protection Exceeds JESD 22
- 2000-V Human-Body Model (A114-A)
_ Upgrade With Improved ESD (15-kV HBM) and 0.1-_F Charge-
Pump Capacitors is Available With the MAX202
_ Applications
_ TIA/EIA-232-F, Battery-Powered Systems, Terminals, Modems, and
Computers

Description/Ordering Information
The MAX232 is a dual driver/receiver that includes a capacitive voltage generator
to supply TIA/EIA-232-F voltage levels from a single 5-V supply. Each receiver
converts TIA/EIA-232-F inputs to 5-V TTL/CMOS levels. These receivers have a
typical threshold of 1.3 V, a typical hysteresis of 0.5 V, and can accept 30-V
inputs. Each driver converts TTL/CMOS input levels into TIA/EIA-232-F levels.
The driver, receiver, and voltage-generator functions are available as cells in the
Texas Instruments LinASIC. library
The figure shows the waveform on a single conductor to transmit a byte (say, 0x41)
serially. The upper waveform is the TTL-level waveform at the transmit pin of the
microcontroller. The lower waveform is the same waveform converted by the RS-
232 driver (MAX232) into RS-232C level. Thus to assure error-free transmission
over greater distances than would be possible with TTL levels.

Fig11: Serial waveform

Each byte is preceded by a start bit and followed by a stop bit. The start and stop
bits are used to synchronize the serial receivers. The data byte is always
transmitted with least-significant bit (LSB) first. For error checking, it is possible
to include a parity bit as well, just prior to the stop bit.

The bits are transmitted at specific time intervals determined by the baud rate of
the serial signal. The baud rate is the reciprocal of the time to send one bit. Error-
free serial communication requires the baud rate, number of data bits, number of
stop bits, and presence or absence of a parity bit to be the same at the transmitter
and receiver ends.

The information stored in the microcontroller is sent to the PC through the COM
port using the HyperTerminal program.
BASCOM
BASCOM-AVR is not only a BASIC Compiler, but also a comfortable Integrated
Development Environment (IDE) running under Windows 95 and Windows NT. Such
a development environment supports the whole process from coding and testing a
program to programming the used microcontroller. In this book the term BASCOM is
used when no distinction must be made between BASCOM-8051 and BASCOM-
AVR. In all cases where a distinction is necessary, a few changes only are required to
make the program work with the other family of microcontrollers. This is one
important advantage of high-level languages. So as to prevent that work with
BASCOM and the program examples in this book are mere dry homework, a demo of
BASCOM-8051 or BASCOM-AVR can be used for first tests. These BASCOM
demos can be downloaded free of charge from different URLs. For proper installation
of the required BASCOM IDE, make sure a printer is installed - the printer need not
necessarily be used or connected. The licence agreement must be accepted before one
of the BASCOM IDEs is installed

Working on Projects After the start of BASCOM you can create a new file by
selecting File>New or open an existing file by selecting File>Open. In the next step,
check such BASCOM Options like device selection, baud rate, clock frequency and
other relating options. A detailed explanation of these options will be given in the next
chapter. Now you may edit the BASIC source and compile it afterwards. As a rule,
the compiler detects here the first errors and the program must be debugged. The
BASIC source must be edited as long as the compilation is without any errors.
Normally, the process of editing, compiling and debugging needs to be repeated
several times. It makes no sense to debug all errors in one step. Editing several typing
errors in one step is no problem. But for more difficult errors, a separate compiler run
checks the validity of the changes carried out. It is always easier to debug a localized
error.

With the help of the internal BASCOM Simulator the program operation can be
checked without any hardware. The probably last task in a project is programming the
device that is used in the application hardware, followed by an excessive test of the
program on the target. The project proves to be successful if these tests document a
proper function in the target hardware. Otherwise, some steps must be repeated.
Before working with the BASCOM-AVR, the development environment will be
described by means of a small program example; the next chapter describes the
BASCOM options important to the BASCOM environment used and the target
hardware.

BASCOM Options

Each BASCOM offers a lot of options that must be defined by selection in the Option
menu. The options should be selected at the beginning of a project and saved. Later
changes of this setup will then only be required for details. The following description
applies to BASCOM-AVR. In BASCOM8051, selecting the various options is quite
similar. In the first step, the used microcontroller is defined by selecting
Options>Compiler>Chip. Let us use here an AT90S8515 without external RAM.
Figure 10 shows the parameters. On the right side you can see the available memory
of the selected microcontroller. Each parameter in a function needs two bytes of stack.
the stack size shows the number of reserved bytes for the stack. The value 32 is
default and remains unchanged here. Local variables are saved in a frame. The default
value is 50 and remains unchanged, too.

Selection of a device and external memory

The compiler generates many files selectable by Options> Compiler>Output. Figure


11 shows the possibilities for selection. In dependence of the used programmer, Bin
files and/or Hex files will be generated. The compiler itself needs the debug file. The
report file reports all parameters and memory allocations. The error file documents all
errors occurring during compilation.
Selection of files to be generated

To simplify matters, all files on the left side should be selected. For simulations with
AVR Studio (AVR only), the related object file is required. Activating Size warning
reports an exceeding of the available program memory. The last option can be very
helpful. Some programmers require Bin or Hex files with swapped LSB and MSB. In
this case, activate the Swap Words option. The baud rate of serial communication
(RS232) depends on the clock frequency of the microcontroller. The clock frequency
and desired baud rate can be selected from menu Options>
Compiler>Communication. Figure 12 shows the parameter input. The error field
shows the deviation of the generated baud rate. It is very important to keep this
deviation within defined limits as otherwise communication errors may occur
Selection of baud rate and oscillator frequency

In addition to serial communication according to RS232, BASCOM supports I2C, SPI


and 1-Wire data transfer. As Figure 13 shows, the menu Options>Compiler>I2C, SPI,
1WIRE allows the allocation of pins to the respective lines. At this time at the latest, a
wiring diagram or schematic of the target hardware is required.

.
This is the screen where coding of the respective program is done
INTERFACING DIAGRAM
Source Code

$regfile = "8052.dat"
$crystal = 11059200
$baud = 9600

Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = P2.4 , Db5 = P2.5 , Db6 = P2.6 , Db7 = P2.7 , E =
P0.1 , Rs = P0.0
P1 = 0
P2 = 0
P3 = 0
P3.2 = 1
P0 = 0
Dim A As Byte
Dim C As Byte
Dim D As Byte
A=0
C=0
D=0
Cursor On Blink
Cls

Aa:
Locate 1 , 5
Lcd "IoT based"
Locate 2 , 1
Lcd "Control System"
Wait 2
Cls
Locate 1 , 1
Lcd "Fan ON "
P1.3 = 1 'Fan on
Bitwait P3.2 , Reset
Wait 2
Locate 1 , 8
Lcd "Lght ON "
P1.2 = 1 'light on
Wait 5
Locate 1 , 1
Lcd "Fan OFF"
P1.3 = 0 'fan off
Wait 5
Locate 2 , 1
Lcd "Motor ON"
P1.1 = 1 'motor on
Wait 5
Locate 2 , 10
Lcd "G:ON "
P1.0 = 1 'geyser on
Wait 5
Locate 2 , 1
Lcd "Motor OF"
P1.1 = 0 'motor off
Wait 5
Locate 2 , 10
Lcd "G:OFF"
P1.0 = 0 'geyser off
Wait 10
Locate 1 , 8
Lcd "Lght OFF"
P1.2 = 0 'light off
End

STIMULATION

You might also like