Power Analyzer Manual Rev 1r0

User Manual: Power Analyzer Manual rev 1r0

Open the PDF directly: View PDF PDF.
Page Count: 17

DownloadPower Analyzer Manual Rev 1r0
Open PDF In BrowserView PDF
Power Analyzer 2
Harware Manual
Rev. 1 r0

T

he Power Analyzer2 offers a number of
improvements and new functions compared to
the mature kit it is now replacing. Hardware
improvements includes the addition of on board
fuse and connectors for added safety, and the use
of precision current sensing resistor that improves
accuracy, replacing the unsightly copper wire
shunt that was the dominating the appearance of
the kit.

This kit can be used to measure and monitor
accurately electrical energy usage. It is designed
for easy interfacing with any UART equipped
microcontroller circuit and modules, such as the
gizDuino line.

Watt-Hour

Real Power
Power Factor

Apparent
Reactive
Fundamental
Harmonic
Fundamental Reactive

POWER

SAFETY WARNING:

•
•

Page 1 of 1 6 pages

The Power Analyzer module directly taps its DC power source from the AC
mains. Hence the whole assembly is an electrical hazard once plugged in a
live outlet.
• Never touch any part of the PCB assembly while the circuit is plugged and
powered through the AC line.
• Do not connect any other component in any part of the circuit other than
the opto-isolated serial I/O port. The opto-isolated port is the only electrically
safe access port in the Power Analyzer module.

©201 4 by e-Gizmo Mechatonix Central

Power Analyzer 2

FEATURES:

Measurements:
Volt RMS
Amp RMS
Real Power
Apparent Power
Reactive Power
Fundamental Power
Fundamental Reactive Power
Harmonic Power
Power Factor
Watt-Hour

Opto isolated Interface Port:
UART TX
UART RX
Non-isolated Interface Port:
UART TX
UART RX
+5V
Future Version:
Current Transformer Version

Electrical:
Operation Voltage: 1 00V- 240V AC, 60Hz
Current Capacity : 8A continous

(b)
(a)

(c)
Figure 1. The AC Power Analyzer module. Notable improvements compared to its predecessor includes
(a) AC source side and load side terminals are now clearly separated and a 10A on board fuse is added.
(b) A pair of 1% SMD current shunt replaced the ugly copper coil shunt. As always, MPX-X2 safety
qualified AC capacitor is used for the critical capacitive AC voltage divider and power supply circuit.

Power Analyzer 2

©201 4 by e-Gizmo Mechatonix Central

Page 2 of 1 6 pages

1. COMPONENTS LOCATOR GUIDE

Figure 2. Location of connectors and major components. Note that under normal use, the 0V Voltage
Offset Calibration jumper must be installed. Once connected to AC, dangerous voltage appears to all
components in the circuit, except P4. P4 is the only port considered safe for connecting your circuits.

Table 1 . P3 UART Non-isolated Port
Warning: This UART port is not galvanically

isolated from the mains connected portion of the
circuit and should be used with reasonable
caution.
Pin

1
2
3
4

ID

RXD
TXD
GND
+5V

Description

UART Receive pin TTL level
UART Transmit pin TTL level
Circuit Ground
Low Current +5V Output

Table 3. LED Indicators
ID

D6
D7
D8

Description

Power Indicator. Normally ON
Alarm, indicates input overload
condition when ON
Acquisition Link indicator, normally
flashing at 1 Hz rate

Table 2. P4 UART Opto-isolated Port

This is an electrically safe port that is amply
isolated from the AC mains. This is the only
electrically safe port of the circuit, hence, any
electrical wirings connecting outside components
and circuits must be done through this port only.
Pin

1
2
3
4

ID

TXC
TXE
RXA
RXK

Page 3 of 1 6 pages

Description

TX Transistor Collector Pin
TX Transistor Emitter Pin
RX LED Anode (+) pin
RX LED Cathode (-) pin
©201 4 by e-Gizmo Mechatonix Central

Power Analyzer 2

Figure 3. AC source and load side wiring. Make sure all wires are securely fastened into their
correct connectors. Heavy AC power may pass through this circuit, any loose wiring will pose a
hazard.

2. AC WIRINGS
KEEPING IT SAFE

To minimize risk of AC wiring errors, a couple of
terminals are provided that clearly separate the
source and load side wiring. Connect only as
shown in Figure 3. Connecting the AC wiring any
other way may result in fire, injury to persons, and
permanent damage to the circuit board.

2.1 Connecting wires to the AC terminals
Use AWG 1 6 or heavier insulated stranded wires
for all AC source and load connections.
1 . Strip off about 8mm length of insulation from
the AC wires.
2. Loosen the terminal screws and gently insert
fully inward the stripped portion of the wire
between the clips of the terminal. Make sure no
wire strands are left free. Loose strands might
bridge to the other terminal and results in nasty
short circuits.
3. Tighten the screws just enough torque to
securely fasten the wires.
4. Test the connections with a slight pull in the
wire to ensure a tight and secured wiring
installation.
Power Analyzer 2

ON board fuse - A time lag 1 0A fuse is
installed on board to minimize circuit damage
due to overloading. Replace only with fuse of
the same rating. After replacing, nudge the
fuse gently to check and ensure the fuse clips
have a good grip. If the fuse clip is loose,
remove the fuse, squeeze the clip lip gently
towards its others, and then reseat the fuse.
Replace the fuse clips if it already lost its
grips.
AC Capacitor - Low voltage DC supply is
tapped from the AC mains through the AC
capacitor C3. The kit uses MPX-X2 type AC
capacitor verified by various safety agencies
as suitable for direct AC mains circuits. In the
unlikely event that this component fails,
replace with the same type only.
Although the DC voltage at various points in
the circuit may be low, it is not isolated from
the AC mains, and poses a real risk of
electrocution. Never touch any part of the
circuit while in operation. This basic safety
warning cannot be overstated.

©201 4 by e-Gizmo Mechatonix Central

Page 4 of 1 6 pages

Figure 4. Interface wiring to a PC RS-232 COM port is surprisingly simple. Measurements can be
displayed on a PC using terminal programs such as Terminal by Br@y++ (see section 5.2). If you can
write your own PC app, then, you can customize your own display and functions. A sample program
written in VB.net can be downloaded for free from the corresponding product page of this kit @ egizmo.com.

3. APPLICATION

The Power Analyzer Module is a general purpose
AC power data acquisition module. To make it do
useful function, additional components are necessary.

3.1 Connecting to a PC
The quickest way to monitor and display data from
the Power Analyzer module is probably with the
use of a PC. But of course, there are several even
more important reasons why you want to connect
it with a PC.
You can program your PC using your favorite
programming IDE (e.g. Visual Basic Express) to
not just display the measurements, but to log,
analyze, maybe even manage and automate your
electrical energy usage. The source code for a
simple visual basic program that displays all
measurements is available as a free download at
e-gizmo.com. You can use this to jump start your
development and add as many functions as you
like.

Page 5 of 1 6 pages

If your desktop PC has a COM port, you don't
need any extra interface circuit to connect it with
your Power Analyzer. You can make your own
interface cable as shown in Figure 4 using just a
DB-9 connector, a 4k7 resistor, and a 4-wire
header connector. Your PC program must enable
the RTS line of your COM port to use this simple
interface.
Laptops, unfortunately, are
COM port. A USB to Serial
required. The connection is
scheme recommended for
Figure 5.

no longer fitted with
TTL conversion kit is
identical to the wiring
MCUs as shown in

Future options will include a Bluetooth adapter for
an even better still wireless link between your PC
and Power Analyzer.

©201 4 by e-Gizmo Mechatonix Central

Power Analyzer 2

Figure 5. Interfacing the Power Analyzer with an MCU or gizDuino/Arduino controller. Any MCU equipped
with a UART may be used. Resistor values shown are for reference only, and may need to be changed
as the application circuit may so require.

3.2 Connecting to an MCU

3.3 Power Analyzer Instrument

The Power Analyzer can be connected to any
microcontroller MCU circuit and module with UART
port. MCU boards, such as Arduino and gizDuino,
will allow you to construct application specific
functions for the Power Analyzer. For example,
use it with a Wi-fi equipped gizDuino combo, and
you can program and build a powerful internet
enabled power monitoring system.

You can actually build a fully functional Power
Analyzer instrument without writing a single code.
The Power Analyzer has a built-in output function
that allows it to connect to a 4x20 Serial LCD 2 kit.
Set up the output mode to LCD display mode as
described in section 4.

Here are a few more project ideas you can build
by combining the Power Analyzer with a
microcontroller:
- Prepaid power cutoff device
- Electrical energy monitor/ Energy usage
- 3-phase load balancing
- Stand alone Power Analyzer
- Power Scheduling, etc.,

Power Analyzer 2

The Watt-Hour integrator timer is free running. You
can reset Watt-Hour and integrator anytime to zero
by pressing the Watt-Hour reset button.
The Watt-Hour timer is somewhat limited by the
LCD display to 99:59:59. Past this, the LCD may
display an erroneous time, but the integrator timer
will continue with the correct time.
Note the safety reminders enumerated in the
caption.

©201 4 by e-Gizmo Mechatonix Central

Page 6 of 1 6 pages

Page 7 of 1 6 pages

©201 4 by e-Gizmo Mechatonix Central

Power Analyzer 2

Figure 6. It is very easy to build an AC Power measuring instrument using the Power Analyzer kit. You only need to add a
4x20 Serial LCD2 kit as a display unit powered by a separate DC supply. A transformer type AC-DC adapter with good AC
isolation is recommended for the Serial LCD2 kit. Note that the Serial LCD2 is now connected to the non-isolated port, and
makes it an electrical hazard as well. Make sure everything is enclosed in an insulating case.

4. SERIAL OUTPUT MODES

4.1 .2 Solder pads settings

The Power Analyzer serial data output can be
configured in four different modes:

The serial output mode can be changed at anytime
by applying a solder short on a corresponding
solder pad. Obviously, a soldering iron is needed
for this endeavor.

Readable Format streaming
ASCII CSV Format streaming
Data on Demand
Serial LCD streaming

Short one pad only corresponding to the desired
configuration. The Power Analyzer will assume the
solder configured role regardless of the settings
made with the serial port M command.

4.1 Setting the serial output mode

The serial output mode can be configured two
ways, one is through serial port command, and the
other is by bridging a set of solder pads. The
solder pads settings takes the priority and cannot
be overriden by the serial port command.

GS1 - ASCII CSV streaming
GS2 - Serial LCD streaming
GS4 - Readable Format streaming
GS1
GS2 and
GS4
Solder Pads

4.1 .1 Serial port command

Use the M command to set the serial output mode
to the desired settings. Details of the command
can be viewed in the Communications Section 6 of
this manual. Settings are stored in a non-volatile
memory of the Power Analyzer, and will be in
effect, even after power cycling, until a new mode
is set.

Figure 7. Solder pads locations. By applying a solder to
bridge a pair of pads (left to right), the serial output
mode can be set to a desired mode. Leaving these
pads unsoldered will allow the display mode to be set
using serial port command.

[STX]STAT,VERSION,VRMS,IRMS,PREAL,VA,QAVERAGE,QINSTANT,PF,TEMPERATURE,PHARMONIC,PFUNDAMENTAL,PQFUNDAMENTAL,WATTHR,INT[ETX]

Example CSV output stream:
[STX]OK,1 000,231 .49,0.21 6,34.56,49.65,-37.11 ,-22.93,0.6961 ,40.07,0.03,34.53,-37.11 ,1 .475,987[ETX]

Figure 8. Comma Separated Value CSV transmission format. The third line displays an example CSV
stream. [STX] and [ETX] are non printable ASCII characters and may be displayed by the terminal
program using various symbols (e.g. a blank box character).

Power Analyzer 2

©201 4 by e-Gizmo Mechatonix Central

Page 8 of 1 6 pages

4.2 ASCII CSV Streaming

4.3 ASCII Readable Format Streaming

In this mode, the Power Analyzer will dump all
measurement data in Comma Separated Value
CSV format in the order shown in Figure 8.

The Power Analyzer, in this mode, basically dumps
everything in ASCII human readable format. The
whole stream is wrapped in [STX][ETX] marker.

[STX] - STX marker

See communications section for more detail.

STAT - Status

"OK" - Normal Operation
"OVF-V" - Voltage Range exceeded
"OVF-I" - Current Range exceeded

Any OVF condition results in invalid readings.

VERSION - 4-digit Firmware Version Stamp
VRMS - AC Voltage, Voltage RMS
IRMS - AC Current, Ampere RMS
PREAL - Real Power, Watts
VA - Apparent Power, Watts
QAVERAGE - Average Reactive Power, Watts
QINSTANT - Instantenous Reactive Power,
Watts

PF - Power Factor
TEMPERATURE - Chip Temperature ºC

Example readable format output:
Volt RMS: 231.46 Amp RMS: 0.22 Real Power: 34.73
VA: 50.04 Q Power: -37.49 Q Instant: -17.76
PF: 0.6940 Temperature: 41.88
Harmonic: 0.03 Fundamental: 34.69 Fundamental Reactive: -37.49
Watt-Hour: 3.122
Integration Time: 0:23:46

4.4 Serial LCD streaming
Power Analyzer output stream will be in the Serial
LCD2 format. A 4x20 Serial LCD2 kit is required as
shown in Figure 6 to use this feature. Because of
the obvious limitation in displayable capacity, not
all measurements will be displayed. Following is a
list of measurements that can be viewed with a
Serial LCD2 kit display:
- AC Voltage, Voltage RMS
- AC Current, Ampere RMS
- Real Power, Watts
- Power Factor
- Apparent Power, Watts
- Chip Temperature ºC
- Integration Time
- Average Reactive Power, Watts
- Watt-Hour Integration

PHARMONIC - Harmonic Component Power,
Watts

PFUNDAMENTAL - Fundamental Component
Power, Watts

PQFUNDAMENTAL - Reactive Fundamental
Component Power, Watts

WATTHR - Watt-Hour Integration
INT - Integration Time
[ETX] - ETX marker
See communications section for more detail

Page 9 of 1 6 pages

©201 4 by e-Gizmo Mechatonix Central

Power Analyzer 2

5. OFFSET CALIBRATION

The Power Analyzer is sold pretested and
calibrated in the configuration as when it was sold.
Replacing the current sensors will require a full
recalibration, and this can be done only with
proper calibration equipment. Full recalibration is
therefore something not to be done by the end
user.
With usage, it is possible that the zero point of the
Power Analyzer kit may have shifted to a value
other than zero. This drift is usually not significant
enough to cause an appreciable error with most
measurements but in the low range region (less
than 1 0W).
If you so desire, error in the low power range
region can be further minimized by performing
offset calibration periodically.
5.1 Equipment Required

- A PC with COM port running "Terminal by
Br@y++" program.
- Serial cable to connect to PC as described in
Figure 4.
5.2 About the Terminal by Br@y++

Terminal is a freeware developed by, guess who,
Br@y++. This program allows you to use your PC
as a dumb terminal, very much like the
HyperTerminal that was once bundled with your
Windows OS. But there is a huge difference. This
terminal program allows you to do more than just
transmit and receive a stream of characters. For
example, it allows you to setup the hardware
handshake lines of the COM port, this is a required
feature to enable our use of the simple cable
interface. It allows us to transmit non printable
characters, such as the [STX] [ETX] markers
required for each message transmission block. It is
a program made for experimenting geeks.

5.3 Zero Offset Calibration Procedure

Launch and set up the Terminal program by
clicking ON the following options:
COM Port - COM port where your Power
Analyzer is connected. Our example used
COM1 .
Baud Rate - 9600
Data bits - 8
Parity - none
Stop bits - 1
Handshaking - RTS/CTS
With the Power Analyzer connected and powered,
measurement data from the Power Analyzer
should start streaming in. If no data is displayed,
try typing:
$02M1 $03
from the transmit window, and then click [SEND].
$02- [STX] marker. This cause the Terminal to
send STX (ASCII code = 2)
$03- [ETX] marker. This cause the Terminal to
send ETX (ASCII code = 3)
You should see the measurements at this point.
Following is the recommended procedure:
1 . Power OFF the Power Analyzer.
2. Remove the Offset Calibration jumper and
unplug/disconnect any load in the P1 AC OUT
side.

Download and learn more about the program by
visiting their site:
http://sites.google.com/site/terminalbpp/
Offset calibration jumper
location shown with the
jumper already removed.

Power Analyzer 2

©201 4 by e-Gizmo Mechatonix Central

Page 1 0 of 1 6 pages

3. Reapply AC power. Find the portion in the
displayed measurements that indicates Volt
RMS. Make sure it displays a value of less of
than 5 VAC.
4. Type $02 O $03 at the Terminal transmit window
and then click [SEND]. This will initiate the offset
calibration procedure. Wait until the Power
Analyzer completes the procedure. This should
take less than 30 seconds.
5. Power OFF the Power Analyzer and reinstall the
jumper removed in step 2.

This should be transmitted in their ASCII code
representation as shown in the following table:
Symbol
Hex

STX R
ETX
0x02 0x52 0x03

Visual Basic:
‘ correct way to send [STX] & ETX marker
Serial1.print(chr(2)+”R”+chr(3))

9600
8 Bit
none
none

Wrong:
Serial1.print(“[STX]R[ETX]”)

6.1 Summary of Functions

Mn
Dnn
R
V
O

Transmission Format: Format: [STX]R[ETX]

Correct:

6. COMMUNICATIONS

Baud Rate:
Data:
Parity:
Handshake:

Example 1 : Reset Watt-hour Integrator

Arduino:
Correct:

- Set Serial Output mode
- Transmit Requested Data
- Reset watt-hour
- Firmware Version
- Offset Calibration

Serial.write(0x02);
Serial.print(“R”);
Serial.write(0x03);

// correct way to send [STX]
// ASCII equivalent of ‘R’ 0x52
// [ETX] marker

6.2 Communications Format

Wrong:

Important:

Serial.print(“[STX]R[ETX]”);

Every packet of data transmission are wrapped
inside an [STX] and [ETX] marker.
[STX] – Start of transmission marker, ASCII value
= 0x02
[ETX] – End of transmission marker, ASCII value
= 0x03
The first character after the [STX] marker is a
single character function specifier. Each
transmission may contain just a function specifier
only, or may contain a series of data in addition to
the function specifier. End of transmission is
signaled by the [ETX] marker.
[STX] and [ETX] are data packet markers and
should not be transmitted as literal string. They
should be send in their ASCII representation. The
correct way of transmitting the [STX] and [ETX]
markers are as shown in the following example:

Page 11 of 1 6 pages

‘WRONG!

// WRONG!

Alternately, you can use the C/Arduino “\” operator
to send the ASCII code of STX and ETX, together
with the function and data:
Serial.print(“\002R\003”); //“\002”=STX, “\003”=ETX

Notice that in the example, only the STX and ETX
marker need to be manually converted to their
ASCII code, for the simple reason that they have
no equivalent printable characters. The three line
implementation (long format)may make your
program longer, but is more human readable.
Hence, for clarity, all example codes given are
shown in the long format. We leave it up to you if
you want to convert and code it in short format.

©201 4 by e-Gizmo Mechatonix Central

Power Analyzer 2

6.3 Function Description

6.3.3 R - Restart Watt-hour Integrator

6.3.1 . M – Set Serial Output mode

This function will reset the watt-hour and integrator
to zero.

Format: [STX]Mn[ETX]

Format:[STX]R[ETX]

Where n= Mode setting 1 -4

6.3.4 V - Display Firmware Version

1 - Transmit all readings in readable format at 1
sec refresh rate
2 - Transmit all data in ASCII CSV format at 1 sec
refresh rate
3 - Data on demand
4 - Transmit selected data using e-Gizmo Serial
LCD II protocol
See section 4 for details.

Returns a four digit Firmware Revision stamp.
Format:[STX]V[ETX]
6.3.5 O - Offset Calibration
For best accuracy, offset calibration may be done
periodically. See section 5 for details.

6.3.2. D - Transmit Requested Data
To prevent confusing results, use this function with
the Serial Output Mode set to 3 (Transmit on
Demand). D function will cause the Power
analyzer to transmit the requested data regardless
of the settings of the Serial Output Mode.
Format: [STX]Dnn[ETX]
Where nn= Data 0-1 2
Note: nn should always be entered as two digits
00 - Volt RMS
01 - Amp RMS
02 - Real Power
03 - Apparent Power S
04 - Reactive Power Q
05 - Power Pactor
06 - Chip Temperature
07 - Harmonic Power
08 - Fundamental Power
09 - Fundamental Reactive Power
10A0 -- Watt-Hour
0B -- Integration Time (secs)
11
10C2 -- Status
Example (Arduino): Get Real Power
Serial.write(0x02);
Serial.print(“D02”);
Serial.write(0x03);

Power Analyzer 2

//STX code
//Transmit Real Power
//ETX code

©201 4 by e-Gizmo Mechatonix Central

Page 1 2 of 1 6 pages

7. USEFUL INFORMATION

Figure 10. Screen capture
example of a Terminal program
session. Note the communication interface setup.

Figure 11. Visual Basic example
program showing all
measurements. If you can
develop your own PC app, then
you can customize your PC
functions and display in any
way you want.

Page 1 3 of 1 6 pages

©201 4 by e-Gizmo Mechatonix Central

Power Analyzer 2

Figure 12. The Power Analyzer 2 complete schematic diagram. The
Power Analyzer uses the same CS5463 analyzer chip as before. The on
board MCU, on the other hand, uses a ATMEGA168, which made it
possible to pack in more functions and features.

Page 1 4 of 1 6 pages

©201 4 by e-Gizmo Mechatonix Central

Power Analyzer 2

8. PCB ARTWORKS

Component Silk Screen Layout

Page 1 5 of 1 6 pages

©201 4 by e-Gizmo Mechatonix Central

Power Analyzer 2

Power Analyzer 2

©201 4 by e-Gizmo Mechatonix Central

Page 1 6 of 1 6 pages

ERROR: undefined
OFFENDING COMMAND: !eW6acVF7
STACK:



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.7
Linearized                      : No
Page Count                      : 17
Has XFA                         : No
XMP Toolkit                     : Adobe XMP Core 5.2-c001 63.139439, 2010/09/27-13:37:26
Create Date                     : 2016:10:07 14:19:08+08:00
Modify Date                     : 2016:10:07 14:19:08+08:00
Metadata Date                   : 2016:10:07 14:19:08+08:00
Schemas Namespace URI           : http://www.foxitsoftware.com/connectedPDF/1.0/
Schemas Prefix                  : cPDF
Schemas Schema                  : ConnectedPDF Schema
Schemas Property Name           : cDocID
Schemas Property Value Type     : Text
Schemas Property Category       : external
Schemas Property Description    : The cDocID
C Doc ID                        : https://cws.connectedpdf.com/cDocID/F6AAF343400ADB327D3D58CF7E662CE9~F4CBCCE48C5511E68FA40D1F11A909EAEDF70D2700B70B54-3C7B405CB02259DD-4496A4271A0FCCBF36088600
C Version ID                    : https://cws.connectedpdf.com/cVersionID/F6AAF343400ADB327D3D58CF7E662CE9~F4CF02388C5511E68FA40D1F11A909EAEDF70D2700B70B54-E248BD4D6225EC79-DA15A7DB8818F59D98D38600
Producer                        : GPL Ghostscript 8.15
Title                           : Power Analyzer Manual.pdf
Creator                         : Adobe Acrobat 9.3.0
Author                          : Admin
EXIF Metadata provided by EXIF.tools

Navigation menu