PC Controlled Industrial Monitoring
PC Controlled Industrial Monitoring
CHAPTER 1
INTRODUCTION
During Second planning Commission of the independence era , Industry was the main focus
to develop. So, Faults are occurring since the very beginning and designing of it was the
major issue and then revolution in electronics was the major boost for industrial development
Now every unit of the industry is being monitored by sensors and actuators. As a part of
revolutionizing India, We have also developed a prototype of Industrial Fault Detection and
Monitoring System.
The Bhopal disaster(3rd December 1985),also referred to as the Bhopal gas tragedy ,was a gas
leak incident in India ,considered the world’s worst industrial disaster.
Following a major earthquake, a 15-metere tsunami disabled the power supply and cooling of
three Fukushima Daiichi reactors, causing a nuclear accident on 11 march 2011.All three
cores largely melted in the first three days.
Considering this accidents in the recent past we decided to develop a electronic prototype
For continuous smart detection and monitoring of industry to avoid accidents in near future.
.
Fig.1.1
1.3 ADVANTAGE
Our Industry is equipped with temperature and gas sensor which detects faults of physical
quantities like high temperature rise and harmful gas leakage.As temperature rises due to fire
in units of factory or any leakage of chemicals, the buzzer will provide prior information.
For monitoring Purpose,Our industry is designed with a relay based energy conserving
equipments which are monitored with PC and situation of every factory units can be known
in an server room which is full of PC’s.
CHAPTER 2
INTRODUCTION TO ATMEGA16
Fig 2.1
Fig 2.2
2.2 OVERVIEW:
.
The ATmega16 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced
RISC architecture. By executing powerful instructions in a single clock cycle, the ATmega16
achieves throughputs approaching 1 MIPS per MHz allowing the system designer to optimize
power consumption versus processing. The AVR core combines a rich instruction set with 32
general purpose working registers. All the 32 registers are directly connected to the
Arithmetic Logic Unit (ALU), allowing two independent registers to be accessed in one
single instruction executed in one clock cycle. The resulting architecture is more code
efficient while achieving throughputs up to ten times faster than conventional CISC
microcontrollers.The ATmega16 provides the following features: 16 Kbytes of In-System
Programmable Flash Program memory with Read-While-Write capabilities, 512 bytes
EEPROM, 1 Kbyte SRAM, 32general purpose I/O lines, 32 general purpose working
registers, a JTAG interface for Boundary-scan, On-chip Debugging support and
programming, three flexible Timer/Counters with com-pare modes, Internal and External
Interrupts, a serial programmable USART, a byte orientedTwo-wire Serial Interface, an 8-
channel, 10-bit ADC with optional differential input stage with programmable gain (TQFP
package only), a programmable Watchdog Timer with Internal Oscillator, an SPI serial port,
and six software selectable power saving modes. The Idle mode stops the CPU while
allowing the USART,Two-wire interface, A/D Converter, SRAM, Timer/Counters,SPI port,
and interrupt system to continue functioning. The Power-down mode saves the
registercontents but freezes the Oscillator,disabling all other chip functions until the next
External Interrupt or Hardware Reset. In Power-save mode, the Asynchronous Timer
continues to run,allowing the user to maintain a timer base while the rest of the device is
sleeping. The ADC Noise Reduction mode stops the CPU and all I/O modules except
Asynchronous Timer and ADC, to minimize switching noise during ADC conversions.
In Standby mode, the crystal/resonator Oscillator is running while the rest of the device is
sleeping. This allows very fast start-upcombined with low-power consumption.
In Extended Standby mode,both the main Oscillator and the Asynchronous Timer continue
to run. The device is manufactured using Atmel’s high density nonvolatile memory
technology. The On-chip ISP Flash allows the program memory to be reprogrammed in-
system through an SPI serial interface, by a conventional nonvolatile memory programmer,
or by an On-chip Boot program running on the AVR core. The boot program can use any
interface to download the application program in the Application Flash memory. Software in
the Boot Flash section will continue to run while the Application Flash section is updated,
providing true Read-While-Write operation. By combining an 8-bit RISC CPU with In
System Self-Programmable Flash on a monolithic chip, the Atmel ATmega16 is a powerful
microcontroller that provides a highly-flexible and cost-effective solution to many embedded
control applications.The ATmega16 AVR is supported with a full suite of program and
system development tools including: C compilers, macro assemblers, program
debugger/simulators, in-circuit emulators, and evaluation kits.
31 GND GROUND
Table 2.1
Port A (PA7..PA0):
Port A serves as the analog inputs to the A/D Converter. Port A also serves as an
8-bit bi-directional I/O port, If A/D Converter is not used. Port pins can provide internal
pull-up resistors (selected for each bit). The Port A output buffers have symmetrical
drive characteristics with both high sink and source capability. When pins PA0 to PA7
are used as inputs and are externally pulled low, they will source current if the internal
pull-up resistors are activated. The Port A pins are tri-stated when a reset condition
becomes active, even if the clock is not running.
Port B (PB7..PB0):
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for
each bit). The Port B output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port B pins that are externally pulled low will source current if
the pull-up resistors are activated. The Port B pins are tri-stated when a reset condition becomes
active, even if the clock is not running. Port B also serves the functions of various special
features of the ATmega16..
PORT C (PC7..PC0):
Port C is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for
each bit). The Port C output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port C pins that are externally pulled low will source current if
the pull-up resistors are activated. The Port C pins are tri-stated when a reset condition becomes
active, even if the clock is not running. If the JTAG interface is enabled, the pull-up resistors on
pins PC5(TDI), PC3(TMS) and PC2(TCK) will be activated even if a reset occurs. Port C also
serves the functions of the JTAG interface and other special features of the ATmega16.
PORT D (PD7..PD0):
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for
each bit). The Port D output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port D pins that are externally pulled low will source current if
the pull-up resistors are activated. The Port D pins are tri-stated when a reset condition becomes
active, even if the clock is not running. Port D also serves the functions of special features of the
ATmega16.
RESET:
Reset Input. A low level on this pin for longer than the minimum pulse length will
generate a reset, even if the clock is not running. The minimum pulse length is given in Table 15
on page 35. Shorter pulses are not guaranteed to generate a reset.
XTAL1:
Input to the inverting Oscillator amplifier & input to the internal clock operating circuit.
XTAL2:
Output from the inverting Oscillator amplifier.
9
AVCC:
AVCC is the supply voltage pin for Port A and the A/D Converter. It should be
externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be
connected to VCC through a low-pass filter.
AREF:
AREF is the analog reference pin for the A/D Converter.
FEATURES
• High-performance, Low-power AVR® 8-bit Microcontroller
• Advanced RISC Architecture
– 131 Powerful Instructions – Most Single-clock Cycle Execution
– 32 x 8 General Purpose Working Registers
– Fully Static Operation
– Up to 16 MIPS Throughput at 16 MHz
– On-chip 2-cycle Multiplier
• Nonvolatile Program and Data Memories
– 16K Bytes of In-System Self-Programmable Flash
Endurance: 10,000 Write/Erase Cycles
– Optional Boot Code Section with Independent Lock Bits
In-System Programming by On-chip Boot Program
True Read-While-Write Operation
– 512 Bytes EEPROM
Endurance: 100,000 Write/Erase Cycles
– 1K Byte Internal SRAM
– Programming Lock for Software Security
• JTAG (IEEE std. 1149.1 Compliant) Interface
– Boundary-scan Capabilities According to the JTAG Standard
– Extensive On-chip Debug Support
– Programming of Flash, EEPROM, Fuses, and Lock Bits through the JTAG Interface
• Peripheral Features
10
11
CHAPTER 3
SENSORS
Fig 3.1
12
FEATURES
Wide detecting scope
Stable and long life
Fast response and High sensitivity
APPLICATION IDEAS
HARDWARE OVERVIEW
This is an Analog output sensor. This needs to be connected to any one Analog socket in Grove
Base Shield. The examples used in this tutorial make uses of A0 analog pin. Connect this module
to the A0 port of Base Shield.
It is possible to connect the Grove module to Arduino directly by using jumper wires by using
the connection as shown in the table below:
The output voltage from the Gas sensor increases when the concentration of gas increases.
Sensitivity can be adjusted by varying the potentiometer.
13
Fig 3.2
PIN DESCRIPTION:
Table 3.1
14
CHAPTER 4
RELAY & USB TO TTL
4.1 RELAY
4.1.1 What Is Relay?
A relay is an electrically operated switch. Many relays use an electromagnet to
mechanically operate a switch, but other operating principles are also used, such as solid-state
relays. Relays are used where it is necessary to control a circuit by a separate low-power signal,
or where several circuits must be controlled by one signal. The first relays were used in long
distance telegraph circuits as amplifiers: they repeated the signal coming in from one circuit and
re-transmitted it on another circuit. Relays were used extensively in telephone exchanges and
early computers to perform logical operations.
A type of relay that can handle the high power required to directly control an electric motor or
other loads is called a contactor. Solid-state relays control power circuits with no moving parts,
instead using a semiconductor device to perform switching. Relays with calibrated operating
characteristics and sometimes multiple operating coils are used to protect electrical circuits from
overload or faults; in modern electric power systems these functions are performed by digital
instruments still called "protective relays".
Magnetic latching relays require one pulse of coil power to move their contacts in one direction,
and another, redirected pulse to move them back. Repeated pulses from the same input have no
effect. Magnetic latching relays are useful in applications where interrupted power should not be
able to transition the contacts.
Magnetic latching relays can have either single or dual coils. On a single coil device, the relay
will operate in one direction when power is applied with one polarity, and will reset when the
polarity is reversed. On a dual coil device, when polarized voltage is applied to the reset coil the
contacts will transition. AC controlled magnetic latch relays have single coils that employ
steering diodes to differentiate between operate and reset commands
15
Fig 4.1
4.1.3 Working Principle
A simple electromagnetic relay consists of a coil of wire wrapped around a soft iron core (a
solenoid), an iron yoke which provides a low reluctance path for magnetic flux, a movable iron
armature, and one or more sets of contacts (there are two contacts in the relay pictured). The
armature is hinged to the yoke and mechanically linked to one or more sets of moving contacts.
The armature is held in place by a spring so that when the relay is de-energized there is an air
gap in the magnetic circuit. In this condition, one of the two sets of contacts in the relay pictured
is closed, and the other set is open. Other relays may have more or fewer sets of contacts
depending on their function. The relay in the picture also has a wire connecting the armature to
the yoke. This ensures continuity of the circuit between the moving contacts on the armature, and
the circuit track on the printed circuit board (PCB) via the yoke, which is soldered to the PCB.
When an electric current is passed through the coil it generates a magnetic field that activates the
armature, and the consequent movement of the movable contact(s) either makes or breaks
(depending upon construction) a connection with a fixed contact. If the set of contacts was closed
when the relay was de-energized, then the movement opens the contacts and breaks the
connection, and vice versa if the contacts were open. When the current to the coil is switched off,
the armature is returned by a force, approximately half as strong as the magnetic force, to its
relaxed position. Usually this force is provided by a spring, but gravity is also used commonly in
16
industrial motor starters. Most relays are manufactured to operate quickly. In a low-voltage
application this reduces noise; in a high voltage or current application it reduces arcing.
When the coil is energized with direct current, a diode is often placed across the coil to dissipate
the energy from the collapsing magnetic field at deactivation, which would otherwise generate a
voltage spike dangerous to semiconductor circuit components. Such diodes were not widely used
before the application of transistors as relay drivers, but soon became ubiquitous as early
germanium transistors were easily destroyed by this surge. Some automotive relays include a
diode inside the relay case.
If the relay is driving a large, or especially a reactive load, there may be a similar problem of
surge currents around the relay output contacts. In this case a snubber circuit (a capacitor and
resistor in series) across the contacts may absorb the surge. Suitably rated capacitors and the
associated resistor are sold as a single packaged component for this commonplace use.
If the coil is designed to be energized with alternating current (AC), some method is used to split
the flux into two out-of-phase components which add together, increasing the minimum pull on
the armature during the AC cycle. Typically this is done with a small copper "shading ring"
crimped around a portion of the core that creates the delayed, out-of-phase component,[9] which
holds the contacts during the zero crossings of the control voltage.
All cables feature an FTDI FT232R device integrated within the cable USB type ‘A’ connector,
which provide access to UART Transmit (Tx), Receive (Rx), RTS#, CTS#, VCC (5V) and GND
connections. All cables are fully RoHS compliant and are FCC/CE approved.
17
18
Fig 4.3
4.2.3 Working
It can convert any standard full duplex USB port to a 5V TTL signal in either direction.
The unit is powered from the USB port and requires no external power. It also features data
direction auto-turnaround eliminating the need for flow control.. The autosensing data
turnaround automatically enables the TTL driver when data is present making the device plug-
and-play. The USB-TTL-5 has a Type A female connector on the USB side and either a DB9
male connector or 5-way terminal block on the TTL side. Separate terminal block is included in
package.
19
CHAPTER 5
LIQUID CRYSTAL DISPLAY
Fig 5.1
20
Fig 5.2
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
Selects command register when low; and data register when Register
4
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-
Table 5.1
21
Table 5.2
22
1)Clear display:-
23
24
25
CHAPTER 6
PRINCIPLE OF OPERATION
26
27
28
01 Microcontroller 175/-
02 Relay 15/-
LCD
06 100/-
07 Bulb 20/-
08 LED,Buzzer 10/-
Table No. 6.1
29
CHAPTER 7
CONCLUSION
Finally, I conclude that our project shows the future prospects for industry and various demands
that can be satisfied by our project. At higher temperature, it may be risk for the workers to
work under that conditions and hence they will be uncomfortable in breathing and when
effective gases are much in excess then the workers will be more prone to respiratory problems.
In order to avoid such failures in near future we designed this prototype.
Energy Conservation is also in mind that one should monitor every energy conserving unit in the
industry by a control room where all the PC are interconnected. Thus PC can control every
energy unit by just a click of fingers.
At last I would say being an Indian, I must secure our industry as they provide future prospects
to our developing nation and many people lives depend on it, Moreover one would understand
that our nation depends mostly on agriculture and industrialization and One would develop a
smarter industry to develop a smarter nation.
The scope for the future enhancement of the circuit is also shown in the block diagram.
If an amplifier connected to the motor or various other equipment at the power grid is
connected to the microcontroller circuit.
Suitable programming can also be done with the fault detection controlling of power grid.
It can also be implemented by the use of GSM technology.
A password protected gate at the entrance can also be designed for more security purposes.
30
REFERENCES:-
[1] http://www.rs232-converters.com/single_usb_to_ttl_converter.htm
[2] http://www.circuitstoday.com/working-of-relays
[3] http://www.electronics-tutorials.ws/io/io_3.html
[4] http://wiki.seeed.cc/Grove-Gas_Sensor-MQ5/
[5] https://www.engineersgarage.com/electronic-components/16x2-lcd-module-datasheet
[6] https://www.parallax.com/sites/default/files/.../605-00009-MQ-5-Datasheet.pdf
[7] http://www.prolific.com.tw/UserFiles/files/ds_pl2303HXD_v1_4_4.pdf
31