Vous êtes sur la page 1sur 32

CHAPTER – 1

1. INTRODUCTION
According to recent survey, water has become a big issue because of less rain fall,
increase in population many cities are facing this problem people have to suffer from this
problem they don’t have sufficient amount for their daily needs. Due to lack of monitoring
water can’t be supplied properly, some areas in city get water while other some areas can’t so,
there is a need of continuous monitoring, water supply scheduling and proper distribution
another problems are excessive consumption, overflow of tanks, leakage in pipeline
,interrupted water supply. Water is a basic need of every human being everyone has to save the
water many a times with lack of monitoring ,overflow of these overhead tanks can occur
because of this lots of water get wasted, another thing because of overflow in the pipelines
with more pressure there is possibility of pipeline damage, leakage detection is one more
problem all these problems are because of lack of monitoring, manual work, less man power,
Before implementing this project I have taken a survey of Aurangabad city and field survey to
understand water supply distribution and related problems with the system, after taking a
survey I observe that all the work is manual and need a better technology to make proper
distribution. By focusing on problems in traditional methods our system design and develop a
low cost embedded system device for real time monitoring of water distribution system in
Internet of things (IOT) platform. IOT is a world where billions of objects can sense,
communicate and share information, all interconnected over public or private Internet Protocol
(IP) networks. These interconnected objects have data regularly collected, analysed and used to
initiate action, providing a wealth of intelligence for planning, management and decision
making.

1.1 PROPOSED SYSTEM


Before explaining the proposed system let us give how water flows into the taps in
houses. Cities usually source water from rivers, lakes, and ground water reservoirs. From these
water sources, the water is pumped from pump houses into treatment plants through pipes.
Water is cleaned at the treatment plant and from there it is piped into reservoirs. The reservoir
is the storehouse for the treated water. Water is pumped from these reservoirs to the overhead
tanks spread across the city. The water then gets distributed to houses and factories through a
network of pipes working on gravitational force. In some cases, the water is directly supplied
from the reservoirs to the houses.

1
As all the cities are working on a smart city concept, our system focus on, Internet of
things which is new scenario to make city as a smart city with different application. Main
objective to implement this project is to design and develop a low cost reliable and efficient
technique to make proper water distribution by continuous monitoring and also controlling it
from a central server so that we can solve water related problems. Proposed system consist of a
Raspberry pi used as microcontroller, different sensors such as flow sensor, and turbidity
sensors are used. Arduino collects the data from sensors and send it. This system solves
problem of Overflow, over consumption, Quality of water and makes a proper distribution.
Continuous monitoring and controlling from a central server is possible using this system.

2
CHAPTER – 2
2. BLOCK DIAGRAM DESCRIPTION

Fig. 1 BLOCK DIAGRAM

3
2.1 CIRCUIT DIAGRAM

Fig. 2 CIRCUIT DIAGRAM

4
2.2 ATMEL 328
The high-performance, low-power Atmel 8-bit AVR RISC-based microcontroller
combines 16KB ISP flash memory, 1KB SRAM, 512B EEPROM, an 8-channel/10-bit A/D
converter (TQFP and QFN/MLF), and debugWIRE for on-chip debugging. The device
supports a throughput of 20 MIPS at 20 MHz and operates between 2.7-5.5 volts.By executing
powerful instructions in a single clock cycle, the device achieves throughputs approaching 1
MIPS per MHz, balancing power consumption and processing speed.

2.3 FEATURES
• High-performance, Low-power Atmel®AVR® 8-bit Microcontroller
 Advanced RISC Architecture
 130 Powerful Instructions – Most Single-clock Cycle Execution
 32 × 8 General Purpose Working Registers
 Fully Static Operation
 Up to 16MIPS Throughput at 16MHz
 On-chip 2-cycle Multiplier

2.4 High Endurance Non-volatile Memory segments


 4/8/16 Kbytes of in-system self-programmable flash program memory
 256/512/512 bytes EEPROM
 512/1K/1Kbytes internal SRAM
 Write/erase cyles: 10,000 flash/100,000 EEPROM
 Data retention: 20 years at 85°C/100 years at 25°C
 Optional boot code section with independent lock bits
 In-system programming by on-chip boot program
 True read-while-write operation
 Programming lock for software security

2.5 Peripheral Features


Two 8-bit timer/counters with separate prescaler and compare mode
 One 16-bit timer/counter with separate prescaler, compare mode, and capture mode
 Real time counter with separate oscillator
 Six PWM channels

5
 8-channel 10-bit ADC in TQFP and QFN/MLF package
 6-channel 10-bit ADC in PDIP Package
 Programmable serial USART
 Master/slave SPI serial interface
 Byte-oriented 2-wire serial interface (Philips I2C compatible)
 Programmable watchdog timer with separate on-chip oscillator
 On-chip analog comparator
 Interrupt and wake-up on pin change

2.6 Special Microcontroller Features


 Power-on Reset and Programmable Brownout Detection
 Internal Calibrated RC Oscillator
 External and Internal Interrupt Sources
 Five Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, and
 Standby

2.7 I/O and Packages


 23 Programmable I/O Lines
 28-lead PDIP, 32-lead TQFP, and 32-pad QFN/MLF

2.8 Operating Voltages


 1.8V - 5.5V for Atmel ATmega168V
 2.7V - 5.5V for Atmel ATmega 168V

2.9 Speed grade


 ATmega168V: 0 - 4MHz @ 1.8V - 5.5V, 0 - 10MHz @ 2.7V - 5.5V
 ATmega168: 0 - 10MHz @ 2.7V - 5.5V, 0 - 20MHz @ 4.5V - 5.5V

2.10 Power Consumption at 4Mhz, 3V, 25°C


Low power consumption
 Active mode: 250µA at 1MHz, 1.8V 15µA at 32kHz, 1.8V (including oscillator)
 Power-down mode: 0.1µA at 1.8V

6
CHAPTER – 3
3. PIN DIAGRAM OF ATMEGA 328

Fig. 3 PIN DIAGRAM OF ATMEGA 328


3.1 PIN DESCRIPTIONS
VCC
 Digital supply voltage
GND
 Ground.

3.2 Port B (PB7:0) XTAL1/XTAL2/TOSC1/TOSC2


 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.Depending on the clock selection fuse settings, PB6 can be used as input to the
inverting Oscillator amplifier and input to the internal clock operating circuit.
Depending on the clock selection fuse settings, PB7 can be used as output from the inverting
Oscillator amplifier.If the Internal Calibrated RC Oscillator is used as chip clock source,
PB7..6 is used as TOSC2.1input for the Asynchronous Timer/Counter2 if the AS2 bit in
ASSR is set.The various special features of Port B are elaborated in “Alternate functions of
port B” on page 78 and “System clock and clock options.

7
3.3 Port C (PC5:0)P
 Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected for each bit).
The PC5..0 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.

3.4 PC6/RESET
 If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the electrical
characteristics of PC6 differ from those of the other pins of Port C.If the RSTDISBL Fuse
is un programmed, PC6 is used as a 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 29-3 on page 307. Shorter pulses are not guaranteed to
generate a Reset.

3.5 Port D (PD7:0)P


 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-up4 2545T–AVR–05/11 ATmega48/88/168resistors are activated. The
Port D pins are tri-stated when a reset condition becomes active,even if the clock is not
running.

3.6 AVCC
AVCC is the supply voltage pin for the A/D Converter, PC3:0, and ADC7:6. 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. Note that PC6..4 use digital supply voltage,
VCCG.

3.7 AREF
AREF is the analog reference pin for the A/D Converter.

3.8 ADC7:6 (TQFP and QFN/MLF package only)


In the TQFP and QFN/MLF package, ADC7:6 serve as analog inputs to the A/D
converter. These pins are powered from the analog supply and serve as 10-bit ADC channels.

8
CHAPTER - 4
4. OVERVIEW OF ATMEGA 168
The Atmel ATmega 168 is a low-power CMOS 8-bit microcontroller based on the
AVR enhanced RISC architecture. By executing powerful instructions in a single clock cycle,
theATmega168 achieves throughputs approaching 1 MIPS per MHz allowing the system
designed to optimize power consumption versus processing speed.

4.1 BLOCK DIAGRAM

Fig. 4 BLOCK DIAGRAM OF ATMEGA 168


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.

9
4.2 THE ATMEL ATMEGA48/88/168 FEATURES
4K/8K/16K bytes of In-System Programmable Flash with Read-While-Write
capabilities, 256/512/512 bytes EEPROM,512/1K/1K bytes SRAM, 23 general purpose I/O
lines, 32 general purpose working registers, three flexible Timer/Counters with compare
modes, internal and external interrupts, a serial programmable USART, a byte-oriented 2-wire
Serial Interface, an SPI serial port, a 6-channel 10-bit ADC (8 channels in TQFP and
QFN/MLF packages), a programmable Watchdog Timer with internal Oscillator, and five
software selectable power saving modes.
The Idle mode stops the CPU while allowing the SRAM, Timer/Counters, USART, 2-
wire Serial Interface, SPI port, and interrupt system to continue to function. The Power-down
mode saves the register contents but freezes the Oscillator, disabling all other chip functions
until the next 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-up combined with low power consumption. Atmel offers the
QTouch Library for embedding capacitive touch buttons, sliders and wheel functionality into
AVR microcontrollers. The patented charge-transfer signal acquisition offers robust sensing
and includes fully debounced reporting of touch keys and includes Adjacent Key Suppression
technology for unambiguous detection of key events. The easy-to-use QTouch Suite tool chain
allows you to explore, develop and debug your own touch applications. The device is
manufactured using the Atmel high density non-volatile memory technology. The On-chip ISP
Flash allows the program memory to be reprogrammed In-System through an SPI serial
interface, by a conventional non-volatile 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 amonolithic chip,
the Atmel ATmega 168 is a powerful microcontroller that provides a highly flexible and cost
effective solution to many embedded control applications. The ATmega 168 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.

10
CHAPTER – 5
5. AVR CPU CORE
This section discusses the AVR core architecture in general. The main function of the
CPU core is to ensure correct program execution. The CPU must therefore be able to access
memories, perform calculations, control peripherals, and handle interrupts.

5.1 ARCHITECTURAL OVERVIEW

Fig. 5 ARCHITECTURAL OVERVIEW


In order to maximize performance and parallelism, the AVR uses a Harvard
architecture – with separate memories and buses for program and data. Instructions in the
program memory are executed with a single level pipelining. While one instruction is being
executed, the next instruction is pre-fetched from the program memory. This concept enables
instructions to be executed in every clock cycle. The program memory is In-System
Reprogrammable Flash memory. The ALU supports arithmetic and logic operations between
registers or between a constant and a register. Single register operations can also be executed in
the ALU. After an arithmetic operation, the Status Register is updated to reflect information
about the result of the operation. Program flow is provided by conditional and unconditional
jump and call instructions, able to directly address the whole address space. Most AVR
instructions have a single 16-bit word format. Every program memory address contains a 16-
bit or 32-bit instruction.

11
Program Flash memory space is divided in two sections, the Boot Program section and
the Application Program section. Both sections have dedicated Lock bits for write and
read/write protection. The SPM instruction that writes into the Application Flash memory
section must reside in the Boot Program section. The memory spaces in the AVR architecture
are all linear and regular memory maps. A flexible interrupt module has its control registers in
the I/O space with an additional Global Interrupt Enable bit in the Status Register. The
interrupts have priority in accordance with their Interrupt Vector position. The I/O memory
space contains 64 addresses for CPU peripheral functions as Control Registers, SPI, and other
I/O functions. The I/O Memory can be accessed directly, or as the Data Space locations
following those of the Register File, 0x20 - 0x5F. In addition, the ATmega48/88/168 has
Extended I/O space from 0x60 - 0xFF in SRAM where only the ST/STS/STD and
LD/LDS/LDD instructions can be used.

5.2 ALU – ARITHMETIC LOGIC UNIT


The high-performance AVR ALU operates in direct connection with all the 32 general
purpose working registers. Within a single clock cycle, arithmetic operations between general
purpose registers or between a register and an immediate are executed. The ALU operations
are divided into three main categories – arithmetic, logical, and bit-functions. Some
implementations of the architecture also provide a powerful multiplier supporting both
signed/unsigned multiplication and fractional format

5.3 STATUS REGISTER


The Status Register contains information about the result of the most recently executed
arithmetic instruction. This information can be used for altering program flow in order to
perform conditional operations. Note that the Status Register is updated after all ALU
operations, as specified in the Instruction Set Reference. This will in many cases remove the
need for using the dedicated compare instructions, resulting in faster and more compact code.
The Status Register is not automatically stored when entering an interrupt routine and restored
when returning from an interrupt. This must be handled by software.

5.4 SREG – AVR STATUS REGISTER

12
5.5 GENERAL PURPOSE REGISTER FILE
The register file is optimized for the AVR enhanced RISC instruction set. In order to
achieve the required performance and flexibility, the following input/output schemes are
supported by the register file:
• One 8-bit output operand and one 8-bit result input
• Two 8-bit output operands and one 8-bit result input
• Two 8-bit output operands and one 16-bit result input
• One 16-bit output operand and one 16-bit result input

5.6 AVR CPU GENERAL PURPOSE WORKING REGISTERS

Most of the instructions operating on the register file have direct access to all registers,
and most of them are single cycle instructions.

5.7 THE X-REGISTER, Y-REGISTER, AND Z-REGISTER


The registers R26..R31 have some added functions to their general purpose usage.
These registers are 16-bit address pointers for indirect addressing of the data space. The three
indirect address registers X, Y, and Z are defined as described in Figure 7-3.

13
CHAPTER – 6
6. LCD
LCD stands for Liquid Crystal Display. LCD is finding wide spread use replacing
LEDs (seven segment LEDs or other multi segment LEDs) because of the following reasons:
1. The declining prices of LCDs.
2. The ability to display numbers, characters and graphics. This is in contrast to LEDs,
which are limited to numbers and a few characters.
3. Incorporation of a refreshing controller into the LCD, thereby relieving the CPU of the
task of refreshing the LCD. In contrast, the LED must be refreshed by the CPU to keep
displaying the data.
4. Ease of programming for characters and graphics.
These components are “specialized” for being used with the microcontrollers, which
means that they cannot be activated by standard IC circuits. They are used for writing different
messages on a miniature LCD.

Fig. 6 LCD DISPLAY

A model described here is for its low price and great possibilities most frequently used
in practice. It is based on the HD44780 microcontroller (Hitachi) and can display messages in
two lines with 16 characters each . It displays all the alphabets, Greek letters, punctuation
marks, mathematical symbols etc. In addition, it is possible to display symbols that user makes
up on its own. Automatic shifting message on display (shift left and right), appearance of the
pointer, backlight etc. are considered as useful characteristics.

6.1 PIN FUNCTIONS


There are pins along one side of the small printed board used for connection to the
microcontroller. There are total of 14 pins marked with numbers (16 in case the background
light is built in). Their function is described in the table below:

14
Table No. 1 PIN FUNCTIONS
6.2 LCD SCREEN
LCD screen consists of two lines with 16 characters each. Each character consists of
5x7 dot matrix. Contrast on display depends on the power supply voltage and whether
messages are displayed in one or two lines. For that reason, variable voltage 0-Vdd is applied
on pin marked as Vee. Trimmer potentiometer is usually used for that purpose. Some versions
of displays have built in backlight (blue or green diodes). When used during operating, a
resistor for current limitation should be used (like with any LE diode).

Fig. 7 LCD DISPLAY PANEL

15
6.3 LCD BASIC COMMANDS
All data transferred to LCD through outputs D0-D7 will be interpreted as commands or
as data, which depends on logic state on pin RS:
RS = 1 - Bits D0 - D7 are addresses of characters that should be displayed. Built in
processor addresses built in “map of characters” and displays corresponding symbols. Displaying
position is determined by DDRAM address. This address is either previously defined or the
address of previously transferred character is automatically incremented.RS = 0 - Bits D0 - D7
are commands which determine display mode. List of commands forlcd:

6.4 LCD CONNECTION


Depending on how many lines are used for connection to the microcontroller, there are
8- bit and 4-bit LCD modes. The appropriate mode is determined at the beginning of the
process in a phase called “initialization”. In the first case, the data are transferred through
outputs D0-D7 as it has been already explained. In case of 4-bit LED mode, for the sake of
saving valuable I/O pins of the microcontroller, there are only 4 higher bits (D4-D7) used for
communication, while other may be left unconnected. Consequently, each data is sent to LCD
in two steps: four higher bits are sent first (that normally would be sent through lines D4-D7),
four lower bits are sent afterwards. With the help of initialization, LCD will correctly connect
and interpret each data received. Besides, with regards to the fact that data are rarely read from
LCD (data mainly are transferred from microcontroller to LCD) one more I/O pin may be
saved by simple connecting R/W pin to the Ground. Such saving has its price. Even though
message displaying will be normally performed, it will not be possible to read from busy flag
since it is not possible to read from display.

6.5 LCD INITIALIZATION


Once the power supply is turned on, LCD is automatically cleared. This process lasts
for approximately 15mS. After that, display is ready to operate. The mode of operating is set
by default. This means that:
1. Display is cleared
2. Mode
DL = 1 Communication through 8-bit interface
N = 0 Messages are displayed in one line
F = 0 Character font 5 x 8 dots
3. Display/Cursor on/off
D = 0 Display off

16
U = 0 Cursor off
B = 0 Cursor blink off
4. Character entry
5. ID = 1 Addresses on display are automatically incremented by 1
S = 0 Display shift off
Automatic reset is mainly performed without any problems. Mainly but not always! If
for any reason power supply voltage does not reach full value in the course of 10mS, display
will start perform completely unpredictably? If voltage supply unit can not meet this condition
or if it is needed to provide completely safe operating, the process of initialization by which a
new reset enabling display to operate normally must be applied.Algorithm according to the
initialization is being performed depends on whether connection to the microcontroller is
through 4- or 8-bit interface. All left over to be done after that is to give basic commands and
of course- to display messages .

6.6 LCD (LIQUID CRYSTAL DISPLAY)

Fig. 8 LCD DISPLAY PANEL

17
Reflective twisted nomadic liquid crystal display.
1. Polarizing filter film with a vertical axis to polarize light as it enters.
2. Glass substrate with ITOelectrodes. The shapes of these electrodes will determine the
shapes that will appear when the LCD is turned ON. Vertical ridges etched on the
surface are smooth.
3. Twisted nematic liquid crystal.
4. Glass substrate with common electrode film (ITO) with horizontal ridges to line up
with the horizontal filter.
5. Polarizing filter film with a horizontal axis to block/pass light.
6. Reflective surface to send light back to viewer. (In a backlit LCD, this layer is replaced
with a light source.)

6.7 16 X 2 CHARACTER LCD DISPLAY


An LCD is a small low cost display. it is easy to interface with a micro-controller
because of an embedded controller (the black blob on the back of the board). This controller is
standard across many displays (hd 44780), which means many micro-controllers have libraries
that make displaying messages as easy as a single line of code.

6.8 SCHEMATIC VIEW 16 X 2 LCD DISPLAY

Fig. 9 SCHEMATIC VIEW OF 16 X 2 LCD DISPLAY

18
6.9 FEATURES
 5 x 8 dots with cursor
 built-in controller (ks 0066 or equivalent)
 + 5v power supply (also available for + 3v)
 1/16 duty cycle
 b/l to be driven by pin 1, pin 2 or pin 15, pin 16 or a.k (led)
 n.v. optional for + 3v power supply

6.10 ADDRESS CODE

6.11 DETAILS OF 16 X 2 LCD DISPLAY

19
CHAPTER – 7
7. POWER SUPPLY
7.1 INTRODUCTION
The present chapter introduces the operation of power supply circuits built using filters,
rectifiers, and then voltage regulators. Starting with an AC voltage, a steady DC voltage is
obtained by rectifying the AC voltage, then filtering to a DC level, and finally, regulating to
obtain a desired fixed DC voltage. The regulation is usually obtained from an IC voltage
regulator unit, which takes a DC voltage and provides a somewhat lower DC voltage, which
remains the same even if the input DC voltage varies, or the output load connected to the DC
voltage changes.

Fig. 10 CIRCUIT DIAGRAMS FOR POWER SUPPLY

7.2 IC VOLTAGE REGULATORS


Voltage regulators comprise a class of widely used ICs. Regulator IC units contain the
circuitry for reference source, comparator amplifier, control device, and overload protection all
in a single IC. Although the internal construction of the IC is somewhat different from that
described for discrete voltage regulator circuits, the external operation is much the same. IC
units provide regulation of either a fixed positive voltage, a fixed negative voltage, or an
adjustable set voltage.

20
A power supply can be built using a transformer connected to the AC supply line to
step the AC voltage to desired amplitude, then rectifying that AC voltage, filtering with a
capacitor and RC filter, if desired, and finally regulating the DC voltage using an IC regulator.
The regulators can be selected for operation with load currents from hundreds of Milli amperes
to tens of amperes, corresponding to power ratings from milliwatts to tens of watts.

7.3 THREE-TERMINAL VOLTAGE REGULATORS


Fig shows the basic connection of a three-terminal voltage regulator IC to a load. The
fixed voltage regulator has an unregulated DC input voltage, VI, applied to one input terminal,
a regulated output DC voltage, Vo, from a second terminal, with the third terminal connected
to ground The specifications also list the amount of output voltage change resulting from a
change in load current (load regulation) or in input voltage (line regulation).

7.4 FIXED POSITIVE VOLTAGE REGULATORS

Fig.11 Fixed Voltage Regulators

The series 78 regulators provide fixed regulated voltages from 5 to 24 V shows how
one such IC, a 7812, is connected to provide voltage regulation with the output from this unit
of +12V Dec. An unregulated input voltage VI is filtered by capacitor C1 and connected to the
IC’s IN terminal. The IC’s OUT terminal provides a regulated + 12V which is filtered by the
capacitor C2 (mostly for any high-frequency noise). The third IC terminal is connected to
ground (GND).

While the input voltage may vary over some permissible voltage range, and the output
load may vary over some acceptable range, the output voltage remains constant within
specified voltage variation limits. These limitations are spelled out in the manufacturer’s
specification sheets.

21
7.5 BLOCK DIAGRAM
The AC voltage, typically 220V RMS, is connected to a transformer, which steps that
AC voltage down to the level of the desired DC output. A diode rectifier then provides a full-
wave rectified voltage that is initially filtered by a simple capacitor filter to produce a DC
voltage. This resulting DC voltage usually has some ripple or AC voltage variation. A
regulator circuit removes the ripples and also remains the same DC value even if the input DC
voltage varies, or the load connected to the output DC voltage changes. This voltage regulation
is usually obtained using one of the popular voltage regulator IC units.

Fig. 12 Block Diagram of Power Supply

7.6 TRANSFORMER
The potential transformer will step down the power supply voltage (0-230V) to (0-6V)
level. Then the secondary of the potential transformer will be connected to the precision
rectifier, which is constructed with the help of op–amp. The advantages of using a precision
rectifier are it will give a peak voltage output as DC, the rest of the circuits will give only RMS
output.

7.7 BRIDGE RECTIFIER


When four diodes are connected as shown in the figure, the circuit is called as a bridge
rectifier. The input to the circuit is applied to the diagonally opposite corners of the network,
and the output is taken from the remaining two corners. Let us assume that the transformer
is working properly and there is a positive potential, at point A and a negative potential at point
B. The positive potential at point A will forward bias D3 and reverse bias D4. The negative
potential at point B will forward bias D1 and reverse D2. At this time the D3 and D1 are
forward biased and will allow current flow to pass through them; D4 and D2 are reverse biased
and will block current flow. The path for current flow is from point B through D1, up through
RL, through D3, through the secondary of the transformer back to point B. This path is
indicated by the solid arrows. Waveforms (1) and (2) can be observed across D1 and D3.One-
half cycle later the polarity across the secondary of the transformer reverse, forward biasing D2
and D4 and reverse biasing D1 and D3. The current flow will now be from point A through
D4, up through RL, through D2, through the secondary of T1, and back to point A.

22
This path is indicated by the broken arrows. Waveforms (3) and (4) can be observed
across D2 and D4. The current flow through RL is always in the same direction. In flowing
through RL this current develops a voltage corresponding to that shown waveform (5). Since
current flows through the load (RL) during both half cycles of the applied voltage, this bridge
rectifier is a full-wave rectifier. One advantage of a bridge rectifier over a conventional full-
wave rectifier is that with a given transformer the bridge rectifier produces a voltage output
that is nearly twice that of the conventional full-wave circuit.
This may be shown by assigning values to some of the components shown in views A
and B. Assume that the same transformer is used in both circuits. The peak voltage developed
between points X and y is 1000 volts in both circuits. Since only one diode can conduct at any
instant, the maximum voltage that can be rectified at any instant is 500 volts. The maximum
voltage that appears across the load resistor is nearly-but never exceeds-500 v0lts, as a result of
the small voltage drop across the diode. In the bridge rectifier shown in view B, the maximum
voltage that can be rectified is the full secondary voltage, which is 1000 volts. Therefore, the
peak output voltage across the load resistor is nearly 1000 volts. With both circuits using the
same transformer, the bridge rectifier circuit produces a higher output voltage than the
conventional full-wave rectifier circuit.

7.8 IC VOLTAGE REGULATORS


Voltage regulators comprise a class of widely used ICs. Regulator IC units contain the
circuitry for reference source, comparator amplifier, control device, and overload protection all
in a single IC. IC units provide regulation of either a fixed positive voltage, a fixed negative
voltage, or an adjustable set voltage. The regulators can be selected for operation with load
currents from hundreds of Milli amperes to tens of amperes, corresponding to power ratings
from milliwatts to tens of watts. A fixed three-terminal voltage regulator has an unregulated
DC input voltage, VI, applied to one input terminal, a regulated DC output voltage, Vo, from a
second terminal, with the third terminal connected to ground. The series 78 regulators provide
fixed positive regulated voltages from 5 to 24 volts. Similarly, the series 79 regulators provide
fixed negative regulated voltages from 5 to 24 volts.
 For IC’s, Micro Controller, LCD --------- 5 volts
 For alarm circuit, op-amp, relay circuits ---------- 12 volts

23
CHAPTER – 8
8. IOT (INTERNET OF THINGS)
8.1 ABSTRACT
The Internet of things refers to a type of network to connect anything with the Internet
based on stipulated protocols through information sensing equipments to conduct information
exchange and communications in order to achieve smart recognitions, positioning, tracing,
monitoring, and administration. In this paper we briefly discussed about what IOT is, how IOT
enables different technologies, about its architecture, characteristics & applications, IOT
functional view & what are the future challenges for IOT.

8.2 INTRODUCTION
This chapter will address state of the art definitions and architectural models for IoT
offered by standardization organizations, IoT projects, academia, national initiatives, white
papers, books and related industries. While we have tried to be thorough, our effort cannot be
said to be exhaustive, given the proliferation of interest in the subject. Different definitions
And architectural models for IoT reflect different perspectives and support different business
interests. Analyzing these different definitions and architectures can help illuminate their
strengths and weaknesses. Still, as stated earlier, we see a need to have a common and non I
biased definition that effectively encompasses the expansive nature of the subject. We believe
the following review of different definitions and architectural models will serve us in
composing that more universal definition.

24
CHAPTER – 9
9. WATER FLOW SENSOR
9.1 INTRODUCTION
Water flow sensor consists of a plastic valve body, a water rotor, and a hall-effect
sensor. When water flows through the rotor, rotor rolls. Its speed changes with different rate of
flow. The hall-effect sensor outputs the corresponding pulse Signal.

Fig. 13 WATER FLOW SENSOR

9.2 DESCRIPTION
Water flow sensor consists of a plastic valve body, a water rotor, and a hall-effect
sensor. When water flows through the rotor, rotor rolls. Its speed changes with different rate of
flow. The hall-effect sensor outputs the corresponding pulse signal.
This one is suitable to detect flow in water dispenser or coffee machine.
We have a comprehensive line of water flow sensors in different diameters. Check them out to
find the one that meets your need most.

9.3 FEATURES
 Compact, Easy to Install
 High Sealing Performance
 High Quality Hall Effect Sensor
 RoHS Compliant

9.4 SPECIFICATIONS
 Mini. Wokring Voltage: DC 4.5V
 Max. Working Current: 15mA (DC 5V)
 Working Voltage: DC 5V~24V
 Flow Rate Range: 1~30L/min

25
 Load Capacity: ?10mA (DC 5V)
 Operating Temperature: ?80?
 Liquid Temperature: ?120?
 Operating Humidity: 35%~90%RH
 Water Pressure: ?1.75MPa
 Storage Temperature: -25~+ 80?
 Storage Humidity: 25%~95%RH

9.5 WIRING DIAGRAM


The external diameter of thread the connections use is 1.4mm.

Fig. 14 WIRING DIAGRAM


9.6 READING WATER FLOW RATE WITH WATER FLOW SENSOR
This is part of a project I have been working on and I thought I would share it here
since there have been a few threads on how to read water flow rate in liters per hour using the
Water Flow Sensor found in here. It uses a simple rotating wheel that pulses a hall effect
sensor. By reading these pulses and implementing a little math, we can read the liquids flow
rate accurate to within 3%. The threads are simple G3/4 so finding barbed ends will not be that
hard.

9.7 HARDWARE INSTALLATION

You will need Arduino, Water Flow Sensor,10K resistor, a breadboard and some
jumper wires. Wiring up the Water Flow Sensor is pretty simple. There are 3 wires: Black,
Red, and Yellow. Black to the Arduino ground pin Red to Arduino 5v pin The yellow wire will
need to be connected to a 10k pull up resistor. and then to pin 2 on the Arduino.

Here is a fritzing diagram I made to show you how to wire it all up. Once you have it
wired up you will need to upload the following code to your Arduino. Once it is uploaded and
you have some fluid flowing through the Water Flow Sensor, you can open the serial monitor
and it will display the flow rate, refreshing every second.

26
CHAPTER – 10
10. PROGRAMME

// reading liquid flow rate using Seeeduino and Water Flow Sensor from hotmcu.com
// Code adapted by Charles Gantt from PC Fan RPM code written by Crenn
@thebestcasescenario.com
// http:/themakersworkbench.com http://thebestcasescenario.com http://hotmcu.com
volatile int NbTopsFan; // measuring the rising edges of the signal
int Calc;
int hallsensor = 2; // The pin location of the sensor
void rpm () // This is the function that the interupt calls
{
NbTopsFan++; // This function measures the rising and falling edge of the
hall effect sensors signal
}
void setup()
{
pinMode(hallsensor, INPUT); // initializes digital pin 2 as an input
Serial.begin(9600); // This is the setup function where the serial port is
initialised,
attachInterrupt(0, rpm, RISING); // and the interrupt is attached
}
void loop ()
{
NbTopsFan = 0; // Set NbTops to 0 ready for calculations
sei(); // Enables interrupts
delay (1000); // Wait 1 second
cli(); // Disable interrupts
Calc = (NbTopsFan * 60 / 4.5); // (Pulse frequency x 60) / 4.5Q, = flow rate in
L/hour
Serial.print (Calc, DEC); // Prints the number calculated above
Serial.print (" L/hour\r\n"); // Prints "L/hour" and returns a new line
}

27
CHAPTER – 11
11. APPLICATIONS
 Used to monitor the water supply
 Used to find and avoid the water theft
 Avoids wastage of water
 Reduces time
 Reduces man power

28
CHAPTER – 12
12. PHOTOGRAPHY

29
CHAPTER – 13
13. COST OF ESTIMATION

Quantity Amount in
S. No Name of the Equipment
Nos Rs
1 Wifi – IOT 1 1300

2 Atmega PIN 1 800

3 LCD Display 1 700

4 Transformer 1 500

5 Solenoid Valve 2 800

6 Sensor 1 1300

7 Wire _ 200

8 Others _ 400

Total Rs. 6000

Total Amount Rs. 6,000/-

(Rupees Six Thousand Only)

30
CHAPTER – 14
14. CONCLUSION
Using this system secure and continuous monitoring is possible No need to go on field
for monitoring so manual work has reduced it makes system more efficient, reliable, low cost
and accurate we can Data monitored from anywhere controlling is possible from a remote
server it is Economical in development and.

31
CHAPTER – 15
15. REFERENCES
15.1 REFERENCE BOOKS
[1] Charles Scribner’s Sons. Nikola Tesla. Complete Dictionary of Scientific Biography,
volume 13. 2008.
[2] H. Meyer. A history of electricity and magnetism. MIT Press, Cambridge, Mass, 1971.
[3] D. C. Miller. Sparks, Lightning, Cosmic Rays: An anecdotal history of electricity.
The Macmillan Company, New York, 1937.
[4] T. H. Bullock. Electroreception. Springer, New York, 2005.
[5] R. Nersesian. Power for the 21st century: a comprehensive guide to conventional and
alternative sources. M.E. Sharpe Inc., 2010.
[6]Britanica: Academic Edition. http://www.britannica.com/EBchecked/topic/227204/Carl-
Friedrich-Gauss.
[7] K. Rice and S. Paul. Carl Friedrich Gauss. Australian Mathematics Teacher, 6:1–4, 2005.
[8] I. Stewart. Gauss. Scientific American offprint’s. W.H. Freeman, 1977.
[9] T. Gower, J. Barrow-Green, and I. Leader. The Princeton Companion to Mathematics.
Princeton University Press, Princeton, NJ, 2009.
[10] MILL MAN J and HAWKIES C.C. “INTEGRATED ELECTRONICS” MCGRAW
HILL, 1972
[11] ROY CHOUDHURY D, SHAIL JAIN, “ LINEAR INTEGRATED CIRCUIT”, New Age
International Publishers, New Delhi,2000
[12] “THE 8051 MICROCONTROLLER AND EMBEDDED SYSTEM” by Mohammad Ali
Mazidi.

15.2 REFERENCE WEBSITES


 http://www.atmel.com/
 http://www.microchip.com/
 www.8052.com
 http://www.beyondlogic.org
 http://www.ctv.es/pckits/home.html
 http://www.aimglobal.org/

32

Vous aimerez peut-être aussi