Sie sind auf Seite 1von 28

BRIEF DISCRIPTION

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

The most common energy meter is electromechanical


relay also called as watt hour meter.
The electromechanical induction meter operates by
counting the revolutions of a non-magnetic, but
electrically conductive, metal disc which is made to
rotate at a speed proportional to the power passing
through the meter. The number of revolutions is thus
proportional to the energy usage. The voltage coil consumes a small and relatively constant
amount of power, typically around 2 watts which is not registered on the meter. The current coil
similarly consumes a small amount of power in proportion to the square of the current flowing
through it, typically up to a couple of watts at full load, which is registered on the meter.
The disc is acted upon by two coils. One coil is connected in such a way that it produces
a magnetic flux in proportion to the voltage and the other produces a magnetic flux in proportion
to the current. The field of the voltage coil is delayed by 90 degrees, due to the coil's inductive
nature, and calibrated using a lag coil.[17] This produces eddy currents in the disc and the effect
is such that a force is exerted on the disc in proportion to the product of the instantaneous
current, voltage and phase angle (power factor) between them. A permanent magnet exerts an
opposing force proportional to the speed of rotation of the disc. The equilibrium between these
two opposing forces results in the disc rotating at a speed proportional to the power or rate of

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

Can be easily tampered

Not accurate and Precise

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

Accurate and precise

Cannot be easily tampered

Energy theft is reduced


4

Easily Readable

BLOCK DIAGRAM
OF
SMART ENERGY METER
5

BLOCK DIAGRAM EXPLAINATION: AS seen in the block diagram, the following


blocks are present

DIGITAL METER BLOCK:


Here energy meter is used which will be connected to the RF module which in turn will transmit
the data to the microcontroller through the home server device periodically (daily) and will
calculate the per day usage of the energy and hence get the per day data which will help user get
the statistical data of the usage of the different electrical loads.

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.

HOME SERVER BLOCK:


This block consists of Raspberry pi which is interfaced with The touch screen device along with
a GUI.Raspberry pi which will be connected to the rf module for receiving the data sent by the
RF module corresponding to the energy meter. It will also be connected to the microcontroller
through the router and the data transferring will take place by the UDP protocol. It will display
both the data collected from the cortex m3 micro controller and from the energy meter and also
gives the control of the lightning to the user.

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

DATA ACQUISITION AND CONTROLLING BY INTERNET:


This service facilitates the user by providing the data of the power usage with the help of the
server. Here user will be given user id and password through which he can access the data
anywhere by means of internet and accordingly control the lighting as per the need and
requirement.

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

Types of electromechanical relay

Single Pole Single Throw


Single Pole Double Throw
Double Pole Single Throw
Double Pole Double Throw

Single Pole Double Throw Relay


SPDT an electromagnetic switch, consist of a coil (terminals 85 & 86), 1 common terminal (30), 1
normally closed terminal (87a), and one normally open terminal (87)(Figure1).
When the coil of an SPDT relay (Figure 1) is at rest (not energized), the common terminal (30) and
the normally closed terminal (87a) have continuity. When the coil is energized, the common
terminal (30) and the normally open terminal (87) have continuity. +
The diagram below center (Figure 2) shows an SPDT relay at rest, with the coil not energized. The
diagram below right (Figure 3) shows the relay with the coil energized. As you can see, the coil is
an electromagnet that causes the arm that is always connected to the common (30) to pivot when
energized whereby contact is broken from the normally closed terminal (87a) and made with the
normally open terminal (87).
When energizing the coil of a relay, polarity of the coil does not matter unless there is
10

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

And these are extended to MCU for controlling and monitoring.

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

1024 Bytes of EEPROM for data storage

16 MIPS Processing Speed at 16 MHz

JTAG (IEEE std. 1149.1 Compliant) Interface

32 I/O lines

32 x 8 General Purpose Working Registers

3 Hardware Interrupts

Two 8-bit Timer/Counters with Separate Prescalers and Compare Modes

One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture Mode

Real Time Counter with Separate Oscillator

Four PWM Channels

8-channel, 10-bit ADC, 2 Differential Channels with Programmable Gain at 1x, 10x, or
200x

Byte-oriented Two-wire Serial Interface

Programmable Serial USART

Master/Slave

20

SPI Serial Interface

Pin Description
Pin
No.

Pin name

Description

Alternate Function

(XCK/T0)
PB0

I/O PORTB, Pin 0

T0: Timer0 External Counter Input.


XCK : USART External Clock I/O

(T1) PB1

I/O PORTB, Pin 1

T1:Timer1 External Counter Input

(INT2/AIN0)
PB2

I/O PORTB, Pin 2

(OC0/AIN1)
PB3

I/O PORTB, Pin 3

(SS) PB4

I/O PORTB, Pin 4

(MOSI) PB5

I/O PORTB, Pin 5

(MISO) PB6

I/O PORTB, Pin 6

(SCK) PB7

I/O PORTB, Pin 7

RESET

10
11

Vcc
GND

Reset Pin, Active


Low Reset
Vcc = +5V
GROUND

12

XTAL2

Output to Inverting Oscillator Amplifier

13

XTAL1

Input to Inverting Oscillator Amplifier

14

(RXD) PD0

I/O PORTD, Pin 0

15

(TXD) PD1

I/O PORTD, Pin 1

16

(INT0) PD2

I/O PORTD, Pin 2

External Interrupt INT0

17

I/O PORTD, Pin 3

External Interrupt INT1

20

(INT1) PD3
(OC1B)
PD4
(OC1A)
PD5
(ICP) PD6

21

PD7 (OC2)

I/O PORTD, Pin 7

22

PC0 (SCL)

I/O PORTC, Pin 0

23

PC1 (SDA)

I/O PORTC, Pin 1

24

PC2 (TCK)

I/O PORTC, Pin 2

18
19

21

AIN0: Analog Comparator Positive I/P


INT2: External Interrupt 2 Input
AIN1: Analog Comparator Negative I/P
OC0 : Timer0 Output Compare Match
Output

In System Programmer (ISP)


Serial Peripheral Interface (SPI)

USART Serial Communication Interface

I/O PORTD, Pin 4


PWM Channel Outputs
I/O PORTD, Pin 5
I/O PORTD, Pin 6

Timer/Counter1 Input Capture Pin


Timer/Counter2 Output Compare Match
Output
TWI Interface
JTAG Interface

25

PC3 (TMS)

I/O PORTC, Pin 3

26

PC4 (TDO)

I/O PORTC, Pin 4

27

PC5 (TDI)

I/O PORTC, Pin 5

28
29

PC6
(TOSC1)
PC7
(TOSC2)

I/O PORTC, Pin 6

Timer Oscillator Pin 1

I/O PORTC, Pin 7

Timer Oscillator Pin 2

30

AVcc

Voltage Supply = Vcc for ADC

31

GND

GROUND

32

AREF

Analog Reference Pin for ADC

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)

I/O PORTA, Pin 7

ADC Channel 7

I/O PORTA, Pin 6

ADC Channel 6

I/O PORTA, Pin 5

ADC Channel 5

I/O PORTA, Pin 4

ADC Channel 4

I/O PORTA, Pin 3

ADC Channel 3

I/O PORTA, Pin 2

ADC Channel 2

I/O PORTA, Pin 1

ADC Channel 1

I/O PORTA, Pin 0

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

Capacitor connection pins

Output pin; outputs the serially transmitted data at RS232


logic level; connected to receiver pin of PC serial port
Input pin; receives serially transmitted data at RS 232 logic
level; connected to transmitter pin of PC serial port
Output pin; outputs the serially transmitted data at TTL logic
level; connected to receiver pin of controller.
Input pins; receive the serial data at TTL logic level;
connected to serial transmitter pin of controller.

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

Output pin; outputs the serially transmitted data at TTL logic


level; connected to receiver pin of controller.
Input pin; receives serially transmitted data at RS 232 logic
level; connected to transmitter pin of PC serial port
Output pin; outputs the serially transmitted data at RS232
logic level; connected to receiver pin of PC serial port
Ground (0V)
Supply voltage; 5V (4.5V 5.5V)

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.

Figure: DB-9 male connector

PIN DESCRIPTION

27

TD [Transmit Data]

Serial Data Output (TXD).

RD [Receive Data]

Serial Data Input (RXD)

CTS [Clear to Send]

line indicate that the Modem is ready to


exchange data.

DCD [Data Carrier Detect]

-When the modem detects a "Carrier" from the


modem at the other end of the phone line, this
Line becomes active.
This tells the UART that the modem is ready to

DSR [Data Set Ready]

establish a link.
This is the opposite to DSR. This tells the

DTR [Data Terminal Ready]

Modem that the UART is ready to link.


This line informs the Modem that the UART is

RTS [Request To Send]

ready to exchange data.


Goes active when modem detects a ringing

RI [Ring Indicator]

signal from the PSTN.

28

Das könnte Ihnen auch gefallen