Beruflich Dokumente
Kultur Dokumente
Smart energy meter will first capture the reading from the digital meter
through RF module. This in turn will be provided to the home server
device (RASPBERRY PI) which will communicate with another MCU
(Microcontroller Unit) through router using UDP(USER DATAGRAM
PROTOCOL). MCU on receiving the data from the home server will
analyze
the data and further control the control the loads through two
way switching using relay.
STUDY ABOUT
ELECTRICITY METERS
Electricity Meter:
An electricity meter or energy meter is a device that measures the amount of electric
energy consumed by a residence, business, or an electrically powered device.
Electricity meters are typically calibrated in billing units, the most common one being
the kilowatt hour[kWh]
Electromechanical meters
energy usage. The disc drives a register mechanism which counts revolutions, much like
the odometer in a car, in order to render a measurement of the total energy used.
Limitations
Electronic meters
Electronic meters display the energy used
on an LCD or LED display, and some can
also transmit readings to remote places. In
addition to measuring energy used,
electronic meters can also record other
parameters of the load and supply such as
instantaneous and maximum rate of usage
demands, voltages, power
factor and reactive power used.
Advantages
Easily Readable
BLOCK DIAGRAM
OF
SMART ENERGY METER
5
CONTROL BLOCK:
This block will consist of the control section that will help control the electrical loads. Relays
here use the two way switching concept where both the switches are relays and one of them is
controlled by the mechanical switch and the other using microcontroller for extended access.
Here the switches provided will be dc switches which will diminish the danger of facing
accidents like electric shock and sparking for the user.
MICROCONTROLLER BLOCK:
This block comprises of the microcontroller CORTEX M3 which will govern the switching of
the loads connected in the control block after analyzing the data which will be received through
the home server device through router accordingly and also help us calculate the power used by
each device.
Note: For control of lightning in the house it is necessary that the device should be connected to
the internet and simultaneously connected to the Cortex M3 so that it gives the user Internet
control.
7
STUDY ABOUT
RELAYS
Electromechanical Relay
A relay is a switching device. 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.
Types of relay
Latching Relay
Reed Relay
Solid state relay
Electromechanical Relay
a diode across the coil. If a diode is not present, you may attach positive voltage to either terminal
of the coil and negative voltage to the other, otherwise you must connect positive to the side of the
coil that the cathode side (side with stripe) of the diode is connected and negative to side of the coil
that the anode side of the diode is connected.
11
STUDY ABOUT
MECHANICAL SWITCH
12
Electrical switch
A switch is an electrical component that can break an electrical circuit, interrupting the current
or diverting it from one conductor to another
The most familiar form of switch is a manually operated electromechanical device with one or
more sets of electrical contacts, which are connected to external circuits. Each set of contacts can
be in one of two states: either "closed" meaning the contacts are touching and electricity can flow
between them, or "open", meaning the contacts are separated and the switch is nonconducting.
The mechanism actuating the transition between these two states (open or closed) can be either a
"toggle" (flip switch for continuous "on" or "off") or "momentary" (push-for "on" or push-for
"off") type.
An ideal switch would have no voltage drop when closed, and would have no limits on voltage
or current rating. It would have zero rise time and fall time during state changes, and would
change state without "bouncing" between on and off positions.
Practical switches fall short of this ideal; they have resistance, limits on the current and voltage
they can handle, finite switching time, etc. The ideal switch is often used in circuit analysis as it
greatly simplifies the system of equations to be solved, but this can lead to a less accurate
solution
In the simplest case, a switch has two conductive pieces, often metal, called contacts, connected
to an external circuit, that touch to complete (make) the circuit, and separate to open (break) the
circuit. The contact material is chosen for its resistance to corrosion, because most metals form
insulating oxides that would prevent the switch from working. Contact materials are also chosen
on the basis of electrical conductivity, hardness (resistance to abrasive wear), mechanical
strength, low cost and low toxicity.
13
Here the mechanical switch is used to power ON and OFF the relay circuit which actuates the
relay to switch ON when the switch is CLOSED and put the relay OFF when the switch is
OPEN. This is how the indoor house switches act in the home automation system.
Concept of DC switch:
Conventional method in electrical wiring at home is to have switches that are used for ON and
OFF purposes.
They break off and put on the phase supply to a device.
A new and better method to control the device is to use DC supply at low voltage and current
which can control Phase supply to a device using devices such as relays that create isolation
between electrical and electronic supply hence providing safety at the switching end.
Advantages:
Shock Proof
Cost effective
14
INTERNAL EXPLANATION
OF
CONTROL BLOCK
15
16
The control Block circuit is as shown above contains the following parts
Relays
Switches
Working:A concept of two way switching is used with some modification in this control box
For switching purpose a two relay connected as shown in fig 2 is connected for switching
the phase wire of a single phase ac supply
One relay is (relay 1) controlled by a mechanical switch, and another relay is controlled
by the MCU. By doing the above arrangement relay can be controlled by either switch or can be
controlled by using MCU interchangeably.
From the above figure if relay 1 is ON, then the circuit will be completed and the phase
will be connected with the bulb, making it ON
Now if mechanical switch 1 is made ON, the dc supply of relay 1 will break which will
break the connection and make relay OFF..
17
Using same technique the power supply of relay 2 is connected with MCU and MCU will
be control the operation of relay
This MCU (cortex M3) is to be interface with the Ethernet module, and by using LAN
cable it is connected with the home server (Raspberry pi).
18
ATMEGA32 MICROCONTROLLER
The AVR is a modified Harvard architecture 8-bit RISC single chip microcontroller which was
developed by Atmel in 1996. The AVR was one of the first microcontroller families to use onchip flash memory for program storage, as opposed to one-time programmable ROM, EPROM,
or EEPROM used by other microcontrollers at the time.
Feautres of Atmega32
32 KB of FLASH
19
2KB of SRAM
32 I/O lines
3 Hardware Interrupts
One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture Mode
8-channel, 10-bit ADC, 2 Differential Channels with Programmable Gain at 1x, 10x, or
200x
Master/Slave
20
Pin Description
Pin
No.
Pin name
Description
Alternate Function
(XCK/T0)
PB0
(T1) PB1
(INT2/AIN0)
PB2
(OC0/AIN1)
PB3
(SS) PB4
(MOSI) PB5
(MISO) PB6
(SCK) PB7
RESET
10
11
Vcc
GND
12
XTAL2
13
XTAL1
14
(RXD) PD0
15
(TXD) PD1
16
(INT0) PD2
17
20
(INT1) PD3
(OC1B)
PD4
(OC1A)
PD5
(ICP) PD6
21
PD7 (OC2)
22
PC0 (SCL)
23
PC1 (SDA)
24
PC2 (TCK)
18
19
21
25
PC3 (TMS)
26
PC4 (TDO)
27
PC5 (TDI)
28
29
PC6
(TOSC1)
PC7
(TOSC2)
30
AVcc
31
GND
GROUND
32
AREF
33
34
35
36
37
38
39
40
22
PA7
(ADC7)
PA6
(ADC6)
PA5
(ADC5)
PA4
(ADC4)
PA3
(ADC3)
PA2
(ADC2)
PA1
(ADC1)
PA0
(ADC0)
ADC Channel 7
ADC Channel 6
ADC Channel 5
ADC Channel 4
ADC Channel 3
ADC Channel 2
ADC Channel 1
ADC Channel 0
7805 IC
The 78xx (sometimes L78xx, LM78xx, MC78xx...) is a family of self-contained
fixed linear voltage regulator integrated circuits. The 78xx family is commonly
used in electronic circuits requiring a regulated power supply due to their ease-ofuse and low cost. For ICs within the family, the xx is replaced with two digits,
indicating the output voltage (for example, the 7805 has a 5 volt output, while the
7812 produces 12 volts). The 78xx line are positive voltage regulators: they
produce a voltage that is positive relative to a common ground.
PIN DIAGRAM:-
23
PIN DESCRIPTION
Pin 1
Input Pin
Pin 2
Ground
Pin 3
Output Pin
MAX232 IC
The MAX232 is an IC, first created in 1987 by Maxim Integrated Products, that
converts signals from an RS-232 serial port to signals suitable for use
in TTL compatible digital logic circuits. The MAX232 is a dual driver/receiver and
typically converts the RX, TX, CTS and RTS signals.
The drivers provide RS-232 voltage level outputs (approx. 7.5 V) from a single
+ 5 V supply via on-chip charge pumps and external capacitors. This makes it
useful for implementing RS-232 in devices that otherwise do not need any voltages
outside the 0 V to + 5 V range, as power supplydesign does not need to be made
more complicated just for driving the RS-232 in this case.
The receivers reduce RS-232 inputs (which may be as high as 25 V), to standard
5 V TTL levels. These receivers have a typical threshold of 1.3 V, and a
typical hysteresis of 0.5 V.
24
PIN DIAGRAM
PIN DESCRIPTION
Pin
No
1
2
3
4
5
6
7
8
9
10
11
25
Function
Name
Capacitor 1 +
Capacitor 3 +
Capacitor 1 Capacitor 2 +
Capacitor 2 Capacitor 4 T2 Out
R2 In
R2 Out
T2 In
T1 In
12
13
14
15
16
R1 Out
R1 In
T1 Out
Ground
Vcc
RS232
The RS-232 serial communication protocol is a standard protocol used in asynchronous serial
communication. It is the primary protocol used over modem lines. It is the protocol used by the
MicroStamp11 when it communicates with a host PC. These components are the UART, the
serial channel, and the interface logic. An interface chip known as the universal asynchronous
receiver/transmitter or UART is used to implement serial data transmission. The UART sits
between the host computer and the serial channel. The serial channel is the collection of wires
over which the bits are transmitted. The output from the UART is a standard TTL/CMOS logic
level of 0 or 5 volts. In order to improve bandwidth, remove noise, and increase range, this TTL
26
logical level is converted to an RS-232 logic level of -12 to +12 volts before being sent out on
the serial channel.
Figure: RS-232
Frame Most of the bits in a frame are self-explanatory. The start bit is used to signal the
beginning of a frame and the stop bit is used to signal the end of a frame. The only bit that
probably needs a bit of explanation is the parity bit. Parity is used to detect transmission errors.
For even parity checking, the number of 1's in the data plus the parity bit must equal an even
number. For odd parity, this sum must be an odd number. Parity bits are used to detect errors in
transmitted data. Before sending out a frame, the transmitter sets the parity bit so that the frame
has either even or odd parity. The receiver and transmitter have already agreed upon which type
of parity check (even or odd) is being used. When the frame is received, then the receiver checks
the parity of the received frame. If the parity is wrong, then the receiver knows an error occurred
in transmission and the receiver can request that the transmitter re-send the frame.
PIN DESCRIPTION
27
TD [Transmit Data]
RD [Receive Data]
establish a link.
This is the opposite to DSR. This tells the
RI [Ring Indicator]
28