Professional Documents
Culture Documents
GENERATION SYSTEM
ABSTRACT
Water is one of our most important natural resources. We drink it, use it for cooking
and cleaning, and depend on it in many aspects of our lives. For this motive she must
be protected and managed economically. It should not be surprising, then, that we
have a need to measure the amount of water we use. In this paper we present a short
history of mechanical residential water meters with moving parts such as
displacement and velocity water meters. Due to this traditional water meters we
cannot able to get the actual consumption of water. And also for multispecialty flats
utility and toilets will be located in different places so we cannot able to get the
cumulative value of consumption of each and every flat. And also due to many
moving parts in traditional meter there is a lot of chances to getting failure. For
solving these problems we are going to introduce a digital water meter. So that we
can able to get the flow consumption of each and every inlets of the flat though the
digital flow meter and also we can able to generate the accurate water consumption
bill for each flats. And also, it has a special advantage of leakage detection, open tap
detection and no flow detection alarm. So that we can able avoid the complete
leakage of water. We can also be able to monitor the data wirelessly using webpage.
And also this project will help us to do effective water conservation.
BLOCK DIAGRAM
POWER SUPPLY
The following fig shows the circuit of a power supply that converts an ac
source to a dc source
TRANSFORMER:
FIG TRANSFORMER
RECTIFIER:
In a full wave rectifier circuit we use two diodes, one for each half of the
wave. A multiple winding transformer is used whose secondary winding is split
equally into two halves with a common center tapped connection. Configuration
results in each diode conducting in turn when its anode terminal is positive with
respect to the transformer center point C produces an output during both half-
cycles. Full rectifier advantages are flexible compared to that of half wave
rectifier. The full wave rectifier circuit consists of two power diodes connected
to a single load resistance (RL) with each diode taking it in turn to supply current
to the load resistor. When point A of the transformer is positive with respect to
point A, diode D1 conducts in the forward direction as indicated by the arrows.
When point B is positive in the negative half of the cycle with respect to C point,
the diode D2 conducts in the forward direction and the current flowing through
resistor R is in the same direction for both half-cycles of the wave.
The output voltage across the resistor R is the phasor sum of the two
waveforms, it is also known as a bi-phase circuit. The spaces between each half-
wave developed by each diode is now being filled in by the other. The average
DC output voltage across the load resistor is now double that of the single half-
wave rectifier circuit and is about 0.637Vmax of the peak voltage by assuming
no losses. VMAX is the maximum peak value in one half of the secondary
winding and VRMS is the rms value.
The peak voltage of the output waveform is the same as before for the half-
wave rectifier provided each half of the transformer windings have the same rms
voltage. To obtain a different DC voltage output different transformer ratios can
be used. The disadvantage of this type of full wave rectifier circuit is that a larger
transformer for a given power output is required with two separate but identical
secondary windings makes this type of full wave rectifying circuit costly
compared to the Full Wave Bridge Rectifier circuit.
FIG RECTIFIER
CAPACITORS:
FIG CAPACITORS
RESISTOR:
A resistor is an electrical component that limits or regulates the flow of
electrical current in an electronic circuit. Resistors can also be used to provide a
specific voltage for an active device such as a transistor. All other factors being
equal, in a direct-current (DC) circuit, the current through a resistor is inversely
proportional to its resistance, and directly proportional to the voltage across it.
This is the well-known Ohm's Law. In alternating-current (AC) circuits, this rule
also applies as long as the resistor does not contain inductance or capacitance.
FIG RESISTORS
VOLTAGE REGULATOR:
78xx ICs have three terminals and are commonly found in the TO-
220 form factor, although they are available in surface-mount, TO-92, andTO-
3 packages. These devices support an input voltage anywhere from around 2.5
volts over the intended output voltage up to a maximum of 35 to 40 volts
depending on the model, and typically provide 1 or
1.5 amperes of current (though smaller or larger packages may have a lower or
higher current rating).
Features:
• Output Current up to 1A
Description:
Reverse-Bias Protection:
Occasionally, the input voltage to the regulator can collapse faster than the
output voltage. This can occur, for example, when the input supply is crow barred
during an output overvoltage condition. If the output voltage is greater than
approximately 7 V, the emitter-base junction of the series-pass element (internal
or external) could break down and be damaged.
MICROCONTROLLER AVR
Atmel says that the name AVR is not an acronym and does not stand for
anything in particular. The creators of the AVR give no definitive answer as to
what the term "AVR" stands for However, it is commonly accepted that AVR
stands for Alf and Vegard's RISC processor, Note that the use of "AVR" in this
article generally refers to the 8-bit RISC line of Atmel AVR Microcontrollers.
Among the first of the AVR line was the AT90S8515, which in a 40-pin
DIP package has the same pin out as an 8051 microcontroller, including the
external multiplexed address and data bus.
Features
Note that erase and write can be performed separately in many cases, byte-
by-byte, which may also help prolong life when bits only need to be set to all 1s
(erase) or selectively cleared to 0s (write).
The size of the program memory is usually indicated in the naming of the device
itself (e.g., the ATmega64x line has 64 KB of flash, while the ATmega32x line
has 32 KB).
There is no provision for off-chip program memory; all code executed by
the AVR core must reside in the on-chip flash. However, this limitation does not
apply to the AT94 FPSLIC AVR/FPGA chips.
The data address space consists of the register file, I/O registers,
and SRAM. Some small models also map the program ROM into the data address
space, but larger models do not.
Internal registers:
Atmel ATxmega128A1 in 100-pin TQFP package
The AVRs have 32 single-byte registers and are classified as 8-bit RISC
devices.
The very smallest of the tinyAVR variants use a reduced architecture with
only 16 registers (r0 through r15 are omitted) which are not addressable as
memory locations. I/O memory begins at address 000016, followed by SRAM. In
addition, these devices have slight deviations from the standard AVR instruction
set. Most notably, the direct load/store instructions (LDS/STS) have been reduced
from 2 words (32 bits) to 1 word (16 bits), limiting the total direct addressable
memory (the sum of both I/O and SRAM) to 128 bytes. Conversely, the indirect
load instruction's (LD) 16-bit address space is expanded to also include non-
volatile memory such as Flash and configuration bits; therefore, the LPM
instruction is unnecessary and omitted.
In the XMEGA variant, the working register file is not mapped into the
data address space; as such, it is not possible to treat any of the XMEGA's
working registers as though they were SRAM. Instead, the I/O registers are
mapped into the data address space starting at the very beginning of the address
space. Additionally, the amount of data address space dedicated to I/O registers
has grown substantially to 4096 bytes (000016–0FFF16). As with previous
generations, however, the fast I/O manipulation instructions can only reach the
first 64 I/O register locations (the first 32 locations for bitwise instructions).
Following the I/O registers, the XMEGA series sets aside a 4096 byte range of
the data address space, which can be used optionally for mapping the internal
EEPROM to the data address space (100016–1FFF16). The actual SRAM is located
after these ranges, starting at 2000.
GPIO port
Each GPIO port on a tiny or mega AVR drives up to eight pins and is
controlled by three 8-bit registers: DDRx, PORTx and PINx, where x is the port
identifier.
The sensor comes with three wires: red (5-24VDC power), black (ground) and
yellow (Hall effect pulse output). By counting the pulses from the output of the
sensor, you can easily calculate water flow. Each pulse is approximately 2.25
milliliters. Note this isn't a precision sensor, and the pulse rate does vary a bit
depending on the flow rate, fluid pressure and sensor orientation. It will need
careful calibration if better than 10% precision is required. However, its great
for basic measurement tasks!
We have as example Arduino sketch that can be used to quickly test the sensor,
it will calculate the approximate flow of water in liters/hour.
The pulse signal is a simple square wave so its quite easy to log and convert into
liters per minute using the following formula.
Features:
Model: YF-S201
Sensor Type: Hall effect
Working Voltage: 5 to 18V DC (min tested working voltage 4.5V)
Max current draw: 15mA @ 5V
Output Type: 5V TTL
Working Flow Rate: 1 to 30 Liters/Minute
Working Temperature range: -25 to +80℃
Working Humidity Range: 35%-80% RH
Accuracy: ±10%
Maximum water pressure: 2.0 MPa
Output duty cycle: 50% +-10%
Output rise time: 0.04us
Output fall time: 0.18us
Flow rate pulse characteristics: Frequency (Hz) = 7.5 * Flow rate (L/min)
Pulses per Liter: 450
Durability: minimum 300,000 cycles
Cable length: 15cm
1/2" nominal pipe connections, 0.78" outer diameter, 1/2" of thread
Size: 2.5" x 1.4" x 1.4"
Connection details:
RELAY
FIG RELAY
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. A simple electromagnetic
relay consists of a coil of wire wrapped around a soft iron core, 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 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.
LCD DISPLAY
Liquid crystals are a phase of matter whose order is intermediate between that
of a liquid and that of a crystal. The molecules are typically rod shaped organic
matters about 25 Angstroms in length and their ordering is a function of temperature.
The molecular orientation can be controlled with applied electric fields. LCD is made
up of two sheets of polarizing material with the liquid crystal solution between them.
An electric current passed through the liquid causes the crystals to align so that light
cannot pass through them, which results in display of character as per the applied
voltage in its data lines. The driver is provided to drive the LCD. It stores the display
data transferred from the microcontroller in the internal display RAM and generates
dot matrix liquid crystal driving signals. Each bit data of display RAM corresponds
to on/off state of a dot of a liquid crystal display.
VCC, GND AND V0 - While VCC and VSS provide +5V and ground,
respectively;
DC MOTOR:
An Electric DC motor is a machine which converts electric energy into
mechanical energy. The working of DC motor is based on the principle that
when a current-carrying conductor is placed in a magnetic field, it experiences a
mechanical force.
The direction of mechanical force is given by Fleming’s Left-hand Rule and
its magnitude is given by F = BIL Newton.
However, for special applications such as in steel mills, mines and electric
trains, it is advantageous to convert alternating current into direct current in
order to use dc motors. The reason is that speed/torque characteristics of d.c.
motors are much more superior to that of a.c. motors. Therefore, it is not
surprising to note that for industrial drives, d.c. motors are as popular as 3-phase
induction motors.
DC MOTOR PRINCIPLE
F = BIL Newtons
The ESP8266 is a low-cost Wi-Fi chip with full TCP/IP stack and MCU
(microcontroller unit) capability produced by Shanghai-based Chinese
manufacturer, Espresso. The chip first came to the attention of western makers in
August 2014 with the ESP-01 module, made by a third-party manufacturer, AI-
Thinker. This small module allows microcontrollers to connect to a Wi-Fi
network and make simple TCP/IP connections using Hayes-style commands.
However, at the time there was almost no English-language documentation on
the chip and the commands it accepted. The very low price and the fact that there
were very few external components on the module which suggested that it could
eventually be very inexpensive in volume, attracted many hackers to explore the
module, chip, and the software on it, as well as to translate the Chinese
documentation. The ESP8285 is an ESP8266 with 1 MiB of built-in flash,
allowing for single-chip devices capable of connecting to Wi-Fi.
Features:
Applications:
The ESP8266 Wi-Fi Module is a self-contained SOC with integrated
TCP/IP protocol stack that can give any microcontroller access to your WiFi
network. The ESP8266 is capable of either hosting an application or offloading
all Wi-Fi networking functions from another application processor. This module
comes with AT commands firmware which allows you to get functionality like
arduino Wi-Fi shield, however you can load different firmware’s to make your
own application on the modules' memory and processor. It’s a very economic
module and has a huge and growing community support.
ESP8266 is transforming the world with its low cost and high features
which makes it an ideal module for Internet of Things (IOT). It can be used in
any application where you need to connect a device to your local network or
internet.
SOFTWARE USED:
INTRODUCTION TO PROTEUS
The first version of what is now the Proteus Design Suite was
called PC-B and was written by the company chairman, John Jameson,
for DOS in 1988. Schematic Capture support followed in 1990, with a port to the
Windows environment shortly thereafter. Mixed mode SPICE Simulation was
first integrated into Proteus in 1996 and microcontroller simulation then arrived
in Proteus in 1998. Shape based autorouting was added in 2002 and 2006 saw
another major product update with 3D Board Visualisation. More recently, a
dedicated IDE for simulation was added in 2011 and MCAD import/export was
included in 2015. Feature led product releases are typically biannual, while
maintenance based service packs are released as required.
CodeVisionAVR:
Code Vision AVR is a C cross-compiler, Integrated Development
Environment and Automatic Program Generator designed for the Atmel
AVR family of microcontrollers.
The program is designed to run under the Windows 98, Me, NT 4, 2000, XP
and Vista 32bit operating systems.
The C cross-compiler implements nearly all the elements of the ANSI C
language, as allowed by the AVR architecture, with some features added to
take advantage of specificity of the AVR architecture and the embedded
system needs.
The compiled COFF object files can be C source level debugged, with
variable watching, using the Atmel AVR Studio debugger.
The Integrated Development Environment (IDE) has built-in AVR Chip In-
System Programmer software that enables the automatical transfer of the
program to the microcontroller chip after successful compilation/assembly.
The In-System Programmer software is designed to work in conjunction
with the Atmel STK500, AVRISP, AVRISP MkII, AVR Dragon, JTAGICE
MkII, AVRProg (AVR910 application note), Kanda Systems STK200+,
STK300, Dontronics DT006, Vogel Elektronik VTEC-ISP, Futurlec
JRAVR and MicroTronics' ATCPU, Mega2000 development boards.
For debugging embedded systems, which employ serial
communication, the IDE has a built-in Terminal.
Besides the standard C libraries, the CodeVisionAVR C compiler has
dedicated libraries for:
Alphanumeric LCD modules
Philips I2C bus
National Semiconductor LM75 Temperature Sensor
Philips PCF8563, PCF8583, Maxim/Dallas Semiconductor DS1302
and DS1307 Real Time Clocks
Maxim/Dallas Semiconductor 1 Wire protocol
Maxim/Dallas Semiconductor DS1820, DS18S20 and DS18B20
Temperature Sensors
Maxim/Dallas Semiconductor DS1621 Thermometer/Thermostat
Maxim/Dallas Semiconductor DS2430 and DS2433 EEPROMs
SPI
Power management
Delays
Gray code conversion.
EXTREME BURNER:
The eXtreme Burner- AVR is a full graphical user interface (GUI) AVR series
of MCU that supports several types of clock sources for various applications. It
enables you to read and write a RC Oscillator or a perfect high speed crystal
oscillator and you can select from the following clock sources:
- external Clock.
- calibrated Internal RC Oscillator.
- external RC Oscillator.
- external Low Frequency Crystal.
- external Crystal/Ceramic Resonator.
FIG EXTREME BURNER
Node Js
INTRODUCTION TO NODE
Node.js is primarily used to build network programs such as Web servers. The
biggest difference between Node.js and PHP is that most functions in
PHP block until completion (commands execute only after previous commands
have completed), while functions in Node.js are designed to be non-
blocking (commands execute concurrently or even in parallel, and
use callbacks to signal completion or failure).
a) Platform architecture
Node.js was built on the Google V8 JavaScript engine since it was open-sourced
under the BSD license, extremely fast, and proficient with internet fundamentals
such as HTTP, DNS, TCP.Also, JavaScript was a well-known language, making
Node.js immediately accessible to the entire web development community.
b) Industry support
There are thousands of open-source libraries for Node.js, most of them hosted on
the npm website. The Node.js developer community has two main mailing lists
and the IRCchannel #node.js on freenode. There are multiple developer
conferences and events that support the Node.js community
including NodeConf, Node Interactive and Node Summit as well as a number of
regional events.
Modern desktop IDEs provide editing and debugging features specifically for
Node.js applications. Such IDEs
include Atom, Brackets, JetBrains WebStorm, Microsoft Visual Studio (with
Node.js Tools for Visual Studio, or TypeScript with Node
definitions,) NetBeans,Nodeclipse Enide Studio (Eclipse-based), and Visual
Studio Code. Certain online web-based IDEs also support Node.js, such
as Codeanywhere, Codenvy, Cloud9 IDE, Koding, and the visual flow editor
in Node-RED.
c) Threading in Node
Node.js operates on a single thread, using non-blocking I/O calls, allowing it to
support tens of thousands of concurrent connections without incurring the cost of
thread context switching.The design of sharing a single thread among all the
requests that use the observer pattern is intended for building highly concurrent
applications, where any function performing I/O must use a callback. In order to
accommodate the single-threaded event loop, Node.js utilizes the libuv library
that, in turn, uses a fixed-sized thread pool that is responsible for some of the non-
blocking asynchronous I/O operations.
Execution of parallel tasks in Node.js is handled by a thread pool. The main thread
call functions post tasks to the shared task queue that threads in the thread pool
pull and execute. Inherently non-blocking system functions such as networking
translates to kernel-side non-blocking sockets, while inherently blocking system
functions such as file I/O run in a blocking way on its own thread. When a thread
in the thread pool completes a task, it informs the main thread of this, which in
turn, wakes up and executes the registered callback. Since callbacks are handled
in serial on the main thread, long lasting computations and other CPU-bound
tasks will freeze the entire event-loop until completion.
d) Features of Node.js
Following are some of the important features that make Node.js the first choice
of software architects.
Asynchronous and Event Driven − All APIs of Node.js library are asynchronous,
that is, non-blocking. It essentially means a Node.js based server never waits for
an API to return data. The server moves to the next API after calling it and a
notification mechanism of Events of Node.js helps the server to get a response
from the previous API call.
Single Threaded but Highly Scalable − Node.js uses a single threaded model with
event looping. Event mechanism helps the server to respond in a non-blocking
way and makes the server highly scalable as opposed to traditional servers which
create limited threads to handle requests. Node.js uses a single threaded program
and the same program can provide service to a much larger number of requests
than traditional servers like Apache HTTP Server.
Concepts
The following diagram depicts some important parts of Node.js which we will
discuss in detail in the subsequent chapters.
Following are the areas where Node.js is proving itself as a perfect technology
partner.
I/O bound Applications
Data Streaming Applications
Data Intensive Real-time Applications (DIRT)
JSON APIs based Applications
Single Page Applications
XAMPP
Etymology
• MySQL
• PHP
• Perl
• Tomcat
X(Cross platform)
• It is a web server software program notable for playing a key role in the initial
growth of the World Wide Web.
• It is a web server that allows you to host your websites or any other content for
that matter. Apache is available for UNIX as well as WINDOWS. Some of the
most common server-side languages supported by Apache are - PHP, Python and
Perl. It is free of charge.
MySQL
VISUAL STUDIO
Visual Studio Code combines the simplicity of a source code editor with powerful
developer tooling, like IntelliSense code completion and debugging.
First and foremost, it is an editor that gets out of your way. The delightfully
frictionless edit-build-debug cycle means less time fiddling with your
environment, and more time executing on your ideas.
Visual Studio Code supports macOS, Linux, and Windows - so you can hit the
ground running, no matter the platform.
At its heart, Visual Studio Code features a lightning fast source code editor,
perfect for day-to-day use. With support for hundreds of languages, VS Code
helps you be instantly productive with syntax highlighting, bracket-matching,
auto-indentation, box-selection, snippets, and more. Intuitive keyboard shortcuts,
easy customization and community-contributed keyboard shortcut mappings let
you navigate your code with ease.
For serious coding, you'll often benefit from tools with more code understanding
than just blocks of text. Visual Studio Code includes built-in support for
IntelliSense code completion, rich semantic code understanding and navigation,
and code refactoring.
And when the coding gets tough, the tough get debugging. Debugging is often
the one feature that developers miss most in a leaner coding experience, so we
made it happen. Visual Studio Code includes an interactive debugger, so you can
step through source code, inspect variables, view call stacks, and execute
commands in the console.
VS Code also integrates with build and scripting tools to perform common tasks
making everyday workflows faster. VS Code has support for Git so you can work
with source control without leaving the editor including viewing pending changes
diffs.
Customize every feature to your liking and install any number of third-party
extensions. While most scenarios work "out of the box" with no configuration,
VS Code also grows with you, and we encourage you to optimize your experience
to suit your unique needs. VS Code is an open source project so you can also
contribute to the growing and vibrant community on GitHub.
Architecturally, Visual Studio Code combines the best of web, native, and
language-specific technologies. Using Electron, VS Code combines web
technologies such as JavaScript and Node.js with the speed and flexibility of
native apps. VS Code uses a newer, faster version of the same industrial-strength
HTML-based editor that has powered the “Monaco” cloud editor, Internet
Explorer's F12 Tools, and other projects. Additionally, VS Code uses a tools
service architecture that enables it to integrate with many of the same
technologies that power Visual Studio, including Roslyn for .NET, TypeScript,
the Visual Studio debugging engine, and more.
Visual Studio Code includes a public extensibility model that lets developers
build and use extensions, and richly customize their edit-build-debug experience.