Wireless Current Sensor User Manual - Bkp

Wireless Current Sensor
User Manual
PN: 2010
Berkshire Products, Inc.
Phone: 770-271-0088
http://www.bkp-store.com/
Rev: 1.00
© Copyright 2013
Wireless Current Sensor User Manual
Table of Contents
1
2
3
4
5
6
7
8
Introduction................................................................................................................. 2
1.1
XB compatibility................................................................................................. 2
Making Connections and Jumper Settings.................................................................. 3
2.1
AD/DC Power Input Jumper – J6 or J9 .............................................................. 3
2.2
AC/DC Current Sensing– J1, J3, & J4................................................................ 4
2.3
Current Sense Terminal – J5............................................................................... 4
2.4
Unstuffed Headers – J2, J2, & J8........................................................................ 4
Theory of Operation and Configuration ..................................................................... 5
3.1
Input Sense Circuit.............................................................................................. 5
3.2
Conditioning circuit ............................................................................................ 5
3.3
Comparator section ............................................................................................. 5
3.4
Circuit Setup ....................................................................................................... 6
3.5
An Example ........................................................................................................ 6
Configuring the XBee Radio ...................................................................................... 7
4.1
Starting X-CTU................................................................................................... 8
4.2
Configuring the Networking ............................................................................... 9
4.3
Configuring the Addressing.............................................................................. 10
4.4
Configuring the Serial Interfacing .................................................................... 11
4.5
Configuring I/O Settings................................................................................... 12
4.6
Configuring I/O Sampling ................................................................................ 13
Schematic Diagram................................................................................................... 14
PCB Mechanical ....................................................................................................... 15
Appendix A – Specifications .................................................................................... 16
Appendix B - Warranty............................................................................................. 17
Rev 1.00
i
8/19/2013
Wireless Current Sensor User Manual
The latest versions of manuals, sample code and other tools can be found on our site at:
http://bkp-store.com/
If you have any questions, corrections, or feedback about this manual please contact us
at:
http://bkp-store.com/index.php?route=information/contact
Rev 1.00
1
8/19/2013
Wireless Current Sensor User Manual
1 Introduction
The Wireless Current sensor is designed to measure AD or DC currents up to 5 Amps at a
maximum of 32V. It is designed to sense positive or negative AC current levels or high /
low DC current levels and use the set points to trigger an XBee wireless module to send a
notification.
1.1 XB compatibility
The Wireless Current Sensor can be used with XBee1 radio modules to allow remote
communications and control. Xbees are designed to use very little power except when the
radios are transmitting data.
The board can be used with the following types of XBee & XBeePro radios in Series 1 &
2 footprints:







DigiMesh2 2.4G
DigiMesh2 900MHz
802.15.4
900MHz
868MHz
Zigbee
WiFi
For best results we recommend that you use XBee radios with the RP-SMA antenna
connector or the mini whip antenna. These will experience the least interference from the
copper areas on the PCB. The XBee radios with chip and PCB antennas will still work
but their range may be reduced.
Note 1: XBee is a registered trademark of Digi International Inc.
Note 2: DigiMesh is a registered trademark of Digi International Inc.
Rev 1.00
2
8/19/2013
Wireless Current Sensor User Manual
2 Making Connections and Jumper Settings
Refer to following PCB diagram for component placement.
Figure 2-1
2.1 AD/DC Power Input Jumper – J6 or J9
The board can accept DC or AC power input. This can be with stripped wires connected
to the screw terminal at J9 or the 2.1mm power connector J6 (see Figure 2-1). The DC
supply is not polarity sensitive since the board has a bridge rectifier on the input. DC
power is the preferred input type if available.
Note: Do not exceed +32V supply input to the board! You can measure the input voltage
at TP1 and GND (Pin 3 or 4 on J8).
The power supply must able to source enough current to power the board and the XBee
radio in TX mode. This will typically be up to 500mA (0.5A) for the higher powered
XBee radios. The input pre-regulator on the board is an 80% switcher supplying +5V
volts so your input supply needs to provide about 3.1W. If you have a +12V supply then
it should be rated at 250mA minimum.
Rev 1.00
3
8/19/2013
Wireless Current Sensor User Manual
2.2 AC/DC Current Sensing– J1, J3, & J4
The circuit is designed to sense AC or DC currents. More information will be supplied in
the theory of operation section. For now note that these three jumpers should all be in the
same position as follows:
Pin 1-2: – Select AC operation
Pin 2-3: – Select DC operation
2.3 Current Sense Terminal – J5
This two position screw terminal is used to sense the current. Notice that the top pin is
labeled S+ and the other is S-. These are the required polarity connections when you are
using DC sensing. For AC connections it does not matter.
Note: Do not try to measure currents higher that 5 Amps or voltages greater than 32
Volts. The board is not designed for operation above these levels.
2.4 Unstuffed Headers – J2, J2, & J8
These headers are not stuffed on the board and leave you the option of stuffing headers or
receptacles on 0.100” centers. J2 and J7 are connected one-to-one with the XBee pins
and J8 gives access to +5V, +3.3V, and GND. See the schematic diagram for more
information.
Rev 1.00
4
8/19/2013
Wireless Current Sensor User Manual
3 Theory of Operation and Configuration
Before we start we need to make one thing clear: this is not a precision scientific
instrument. It is designed to allow you to measure / sense currents and report the results
wirelessly.
3.1 Input Sense Circuit
The heart of input section of the circuit is the current sense IC made by Allegro: Part
Number ACS712. When the current thru the chip is zero amps the output on pin 7 is a
nominal 2.5V. As the current swings plus or minus, the output voltage changes at a rate
of 185mV per Amp. Since this is a 5 Amp sensor the output can vary a total of ±925mV
(0.925V).
3.2 Conditioning circuit
Two OP-Amps (U1 & U7) make up the AC/DC conditioning circuit. When the jumpers
(J1, J3, & J4) are in the AC position, the output of U1A is set to be about 1.650V at zero
current. Its amplification is set so that full scale plus/minus current (±5A) will range from
0.135V to 3.185V. When the jumpers (J1, J3, & J4) are in the DC position, the output of
U1A is set to be about 0.050V at zero current and 3.245V at the maximum current of 5A.
The output of U1A is connected to an analog XBee pin so you can set the XBee for timed
sample rate reporting.
OP-Amp U4B is used to buffer the output of U1A for the comparator section.
3.3 Comparator section
The output of U4B drives the two comparators in U2 through Shottky isolation diodes in
D1. Comparator U2A is set to go high (+3.3V) if the AC current (positive swing) or DC
current exceeds a certain level. Trim pot R15 sets the current level for the trigger point
and trim pot R18 sets the decay time along with R19 and C8.
Comparator U2B is set to go high (+3.3V) if the AC current (negative swing) or DC
current (low) exceeds a certain level. Trim pot R7 sets the current level for the trigger
and trim pot R3 sets the decay time along with R5 and C5.
Rev 1.00
5
8/19/2013
Wireless Current Sensor User Manual
3.4 Circuit Setup
On the XBee radio you need to program the digital inputs DIO1 and/or DIO2 to Change
Detect mode to report the comparator changes as required. You can disable the low side
comparator, U2B via XBee programming or by using R7 to set the voltage at pin 6 of
U2B to 0.0V.
You should set the decay trim pots R3 and R18 such that the decay is not too fast. If it is
too fast you will get a pulsing DC signal at the comparator pins which will cause the
output to generate multiple triggers to the XBee radio. Note that R5 and R19 (10K Ohm)
are in the circuit to prevent short circuits if you reduce the trim pots to zero Ohms. In
most cases the decay trim pots can most likely be set at their maximum clockwise
position. Note that these are 10 turn pots.
C5 & C8 are 1.0µF - 5% tolerance parts in 1206 packages. They can be increased easily
by soldering additional capacitors to them in parallel if you need longer decay times.
3.5 An Example
Let’s say you want to trigger when AC current hits 2A. Set your jumpers J1, J3 & J4 to
the AC position (pins 1-2). At this point you know the nominal output of U4B will be
1.65 volts and the maximum swing is 3.185V. That gives the following equation:
Vtrip = 1.650V + (2 * ((3.185 – 1.650) / 5)) => +2.265V
At that current the voltage at the sense pin 3 of U2A will be 2.265V minus the voltage
across the diode in D1 (about 0.15V*) or about 2.115V. In order to provide some margin
and make sure that the pulsed DC does not cause multiple triggers; you might start with
setting the voltage level at pin 2 of U2A to about 2.00 to 2.05V.
* The voltage drop in Shottky diodes is very low at low currents.
Rev 1.00
6
8/19/2013
Wireless Current Sensor User Manual
4 Configuring the XBee Radio
The examples shown here use an XBee 2.4G DigiMesh version with Digi’s X-CTU
software which is free and available from Digi International (www.digi.com). To
program the radios we use the UARTSBee V4 device which provides power and a USB
UART connection to the PC. They are available from Amazon (www.amazon.com) and
other sources and look similar to this picture:
Figure 4-1
These devices are also useful for connecting to your PC to use as the “base station” to
talk back and forth with the remote I/O module’s XBee radio.
Note: Be aware that this board may not be able to supply enough power for an XBee Pro
type radio if you plug it into a USB hub.
Note: When the device is first plugged in you may get an alert from your PC that it needs
to install drivers for a new device. The UARTSBee uses the FTDI chip for USB to Serial
conversion and most PCs have these drivers pre-installed. If yours doesn’t, go to
www.ftdi-chip.com to get the latest ones for your PC and OS.
Rev 1.00
7
8/19/2013
Wireless Current Sensor User Manual
4.1 Starting X-CTU
When you start X-CTU you should see a screen like the following:
Figure 4-2
In this example the USB → Serial was on COM4. The baud rate should be 9600 to start
with, since that is how the XBees are shipped from Digi. Click the Test / Query button to
see if the XBee is active. If so, you should get a window like this:
Figure 4-3
Is this case the test was OK. It found an XB24 or a 2.4G DigiMesh. If it had been the
higher power Pro it would have been XBP24. The firmware version is shown along with
its serial number (IEEE Address) which is HEX: 0013A200 40870B85. The address is
always 8 Bytes (64 bits) and leading zeros are not shown. Most Digi XBees start with
0013A200. It is also shown on the label on the bottom of the module.
Rev 1.00
8
8/19/2013
Wireless Current Sensor User Manual
4.2 Configuring the Networking
The next step is to click the Modem Configuration tab and then press the Read button to
get a screen like the following:
Figure 4-4
Under the Networking section there are options that you can change. Note that different
types of modules will have different options. The ones shown here are for DigiMesh. For
this module type the only two changes that we will talk about are the VID and the
Channel.

Modem VID: This is a HEX number that sets the PAN (Personal Area Network)
ID for the network. Valid range is 0-0xFFFF. All the XBees on your network
should use the same VID.
 Operating Channel: This sets the operating channel number (Uses 802.15.4
channel numbers). Note two things here:
1. XBee modules have more channels available than XBee Pro modules, so be sure
to select an operating channel that both types can use if you have mixed modules
on your network.
2. Select a channel number that minimizes conflict with any Wi-Fi networks you
have. There are docs on the web that show 802.15.4 channel assignments.
See the Digi manual for specifics on other networking options.
Rev 1.00
9
8/19/2013
Wireless Current Sensor User Manual
4.3 Configuring the Addressing
XBee modules talk to each other using their serial numbers or a 16 bit addressing
scheme. We will show the 802.15.4 64 bit scheme here. The Digi XBee manuals show
you how to use short addresses.
Figure 4-5
In this example we are programming a module for an I/O board that will talk to a host
module (base station) at regular intervals. So in this case we set the High order 4 Bytes to
the standard XBee address of 0x0013A200 and the lower 4 bytes to the address of our
base station module 0x40883039. Once this is set, the module will know what address to
send API packets to when an input changes or when a sample must be sent.
Rev 1.00
10
8/19/2013
Wireless Current Sensor User Manual
4.4 Configuring the Serial Interfacing
There are a few options to set here:
Figure 4-6
One option that needs setting here is the API enable. API mode must be enabled if the
XBee module on the I/O board is going to be able to transmit input pin information and
set the outputs. API mode 2 is used by the Arduino XBee library if you plan to use an
Arduino type board as your base station.
Also note that the Digital I/O pins DIO6 and DIO7 are configured here. The reason for
that is they can also be used as serial port flow control pins. If you are using DIO6 and
DIO7 on your module then you should configure them here as Inputs or Outputs.
Rev 1.00
11
8/19/2013
Wireless Current Sensor User Manual
4.5 Configuring I/O Settings
Here is where you configure the I/O pins for DIO0 to DIO5 (see prior section for DIO6 &
DIO7):
Figure 4-7
Configure DIO0 to DIO5 pins as input or output to match your I/O board setup. DIO8 to
DIO12 are not used and should be left as 0-Disabled.
The PR field defaults to 0x1FFF or binary 1 1111 1111 1111. Each bit set to one (1)
defines a pull-up resistor on input pins DIO12 to DIO0. The default values should be fine
unless you are using the input pins for analog inputs. In that case the lower six bits should
be zero for any pin that is an analog input.
Rev 1.00
12
8/19/2013
Wireless Current Sensor User Manual
4.6 Configuring I/O Sampling
This is the last area of X-CTU covered here:
Figure 4-8
The DIO Change Detect is a bit field and should be set to a hex value. Any bit that is set
will cause the XBee to send a packet when the I/O line for that bit changes (goes low to
high or high to low) and the pin is set as an input. For example if you set this field to
0x2C (binary 0100 1100) then it would send a data packet if DIO6, DIO3 or DIO2
changes state on its input.
The Sample Rate tells the XBee module to send a data packet at regular intervals to
report the status of digital and analog input pins. The number is in milliseconds so a
reasonable minimum value is about 0x80 or 128mS. If an edge change is programmed
and it occurs between samples then a packet will be sent then as well. The maximum
value for this field is 0xFFFF or 65,353mS. A value of zero stops the samples.
Rev 1.00
13
8/19/2013
Wireless Current Sensor User Manual
5 Schematic Diagram
Rev 1.00
14
8/19/2013
Wireless Current Sensor User Manual
6 PCB Mechanical
Note: Dimensions are in mils.
Rev 1.00
15
8/19/2013
Wireless Current Sensor User Manual
7 Appendix A – Specifications
Power Requirements:


8V @ 400mA – minimum
32V maximum @ 100mA
Do not exceed +32V input. The Input DC voltage (after the bridge rectifier) can be
monitored at TP1 (see Figure 2-1) on the board.
Environmental:



-30° to +65°C - Operating
-40° to +85°C - Storage
5% to 95% Relative Humidity, non-Condensing
Rev 1.00
16
8/19/2013
Wireless Current Sensor User Manual
8 Appendix B - Warranty
Berkshire Products, Inc. warrants to the original consumer or other end user purchaser
that this product is free from defects in materials or workmanship for a period of one (1)
year from the date of purchase. During the warranty period, and upon proof of purchase,
the product will be repaired or replaced (with the same or functionally equivalent model)
at our option, without charge for either parts or labor.
This warranty does not apply to defects due directly or indirectly to misuse, abuse,
negligence, accident, repairs or alterations made by the customer or another party.
UNDER NO CIRCUMSTANCES WILL BERKSHIRE PRODUCTS, INC. BE LIABLE
IN ANY WAY TO ANY PURCHASER FOR DAMAGES, LOST REVENUE, LOST
WAGES, OR ANY OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OR INABILITY TO USE THIS PRODUCT.
Berkshire Products, Inc. reserves the right to make modifications in this product without
prior notification.
Rev 1.00
17
8/19/2013
Download PDF