31
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. 1

Electricity Meter

Embed Size (px)

DESCRIPTION

SMART ENERGY METER

Citation preview

Page 1: Electricity Meter

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.

1

Page 2: Electricity Meter

STUDY ABOUT

ELECTRICITY METERS

2

Page 3: Electricity Meter

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.

3

Page 4: Electricity Meter

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

Easily Readable

4

Page 5: Electricity Meter

BLOCK DIAGRAM

OF

SMART ENERGY METER

5

Page 6: Electricity Meter

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.

6

Page 7: Electricity Meter

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.

7

Page 8: Electricity Meter

STUDY ABOUT

RELAYS

8

Page 9: Electricity Meter

Electromechanical RelayA 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). 

9

Page 10: Electricity Meter

When energizing the coil of a relay, polarity of the coil does not matter unless there is

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. 

10

Page 11: Electricity Meter

STUDY ABOUT

MECHANICAL SWITCH

11

Page 12: Electricity Meter

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.

12

Page 13: Electricity Meter

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

13

Page 14: Electricity Meter

INTERNAL EXPLANATION

OF

CONTROL BLOCK

14

Page 15: Electricity Meter

15

Page 16: Electricity Meter

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..

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).

16

Page 17: Electricity Meter

ATMEGA32 MICROCONTROLLER

17

Page 18: Electricity Meter

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 on-

chip 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  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 SPI Serial Interface

Pin Description

Pin Pin name Description Alternate Function

18

Page 19: Electricity Meter

No.

1(XCK/T0) PB0

I/O PORTB, Pin 0T0: Timer0 External Counter Input.XCK : USART External Clock I/O

2 (T1) PB1 I/O PORTB, Pin 1 T1:Timer1 External Counter Input

3(INT2/AIN0) PB2

I/O PORTB, Pin 2AIN0: Analog Comparator Positive I/PINT2: External Interrupt 2 Input

4(OC0/AIN1) PB3

I/O PORTB, Pin 3AIN1: Analog Comparator Negative I/POC0 : Timer0 Output Compare Match Output

5 (SS) PB4 I/O PORTB, Pin 4

In System Programmer (ISP)Serial Peripheral Interface (SPI)

6 (MOSI) PB5 I/O PORTB, Pin 5

7 (MISO) PB6 I/O PORTB, Pin 6

8 (SCK) PB7 I/O PORTB, Pin 7

9 RESETReset Pin, Active Low Reset

 

10 Vcc Vcc = +5V  

11 GND GROUND

12 XTAL2 Output to Inverting Oscillator Amplifier

13 XTAL1 Input to Inverting Oscillator Amplifier

14 (RXD) PD0 I/O PORTD, Pin 0USART Serial Communication Interface

15 (TXD) PD1 I/O PORTD, Pin 1

16 (INT0) PD2 I/O PORTD, Pin 2 External Interrupt INT0

17 (INT1) PD3 I/O PORTD, Pin 3 External Interrupt INT1

18(OC1B) PD4

I/O PORTD, Pin 4PWM Channel Outputs

19(OC1A) PD5

I/O PORTD, Pin 5

20 (ICP) PD6 I/O PORTD, Pin 6 Timer/Counter1 Input Capture Pin

21 PD7 (OC2) I/O PORTD, Pin 7Timer/Counter2 Output Compare Match Output

22 PC0 (SCL) I/O PORTC, Pin 0TWI Interface

23 PC1 (SDA) I/O PORTC, Pin 1

24 PC2 (TCK) I/O PORTC, Pin 2

JTAG Interface25 PC3 (TMS) I/O PORTC, Pin 3

26 PC4 (TDO) I/O PORTC, Pin 4

27 PC5 (TDI) I/O PORTC, Pin 5

28PC6 (TOSC1)

I/O PORTC, Pin 6 Timer Oscillator Pin 1

29PC7 (TOSC2)

I/O PORTC, Pin 7 Timer Oscillator Pin 2

19

Page 20: Electricity Meter

30 AVcc Voltage Supply = Vcc for ADC

31 GND GROUND

32 AREF Analog Reference Pin for ADC

33PA7 (ADC7)

I/O PORTA, Pin 7 ADC Channel 7

34PA6 (ADC6)

I/O PORTA, Pin 6 ADC Channel 6

35PA5 (ADC5)

I/O PORTA, Pin 5 ADC Channel 5

36PA4 (ADC4)

I/O PORTA, Pin 4 ADC Channel 4

37PA3 (ADC3)

I/O PORTA, Pin 3 ADC Channel 3

38PA2 (ADC2)

I/O PORTA, Pin 2 ADC Channel 2

39PA1 (ADC1)

I/O PORTA, Pin 1 ADC Channel 1

40PA0 (ADC0)

I/O PORTA, Pin 0 ADC Channel 0

7805 IC

20

Page 21: Electricity Meter

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-of-

use 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:-

PIN DESCRIPTION

Pin 1 Input Pin

Pin 2 Ground

Pin 3 Output Pin

MAX232 IC

21

Page 22: Electricity Meter

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.

PIN DIAGRAM

PIN DESCRIPTION

22

Page 23: Electricity Meter

Pin No

Function Name

1

Capacitor connection pins

Capacitor 1 +2 Capacitor 3 +3 Capacitor 1 -4 Capacitor 2 +5 Capacitor 2 -6 Capacitor 4 -7 Output pin; outputs the serially transmitted data at RS232

logic level; connected to receiver pin of PC serial port T2 Out

8 Input pin; receives serially transmitted data at RS 232 logic level; connected to transmitter pin of PC serial port

R2 In

9 Output pin; outputs the serially transmitted data at TTL logic level; connected to receiver pin of controller.

R2 Out

10 Input pins; receive the serial data at TTL logic level; connected to serial transmitter pin of controller.

T2 In11 T1 In12 Output pin; outputs the serially transmitted data at TTL logic

level; connected to receiver pin of controller.R1 Out

13 Input pin; receives serially transmitted data at RS 232 logic level; connected to transmitter pin of PC serial port

R1 In

14 Output pin; outputs the serially transmitted data at RS232 logic level; connected to receiver pin of PC serial port

T1 Out

15 Ground (0V) Ground16 Supply voltage; 5V (4.5V – 5.5V) Vcc

RS232

23

Page 24: Electricity Meter

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

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.

24

Page 25: Electricity Meter

Figure: DB-9 male connector

PIN DESCRIPTION

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.

DSR [Data Set Ready]This tells the UART that the modem is ready to

establish a link.

DTR [Data Terminal Ready]This is the opposite to DSR. This tells the

Modem that the UART is ready to link.

RTS [Request To Send]This line informs the Modem that the UART is

ready to exchange data.

RI [Ring Indicator]Goes active when modem detects a ringing

signal from the PSTN.

25

Page 26: Electricity Meter

26