Difference between revisions of "EmonTx V3"
|Line 2:||Line 2:|
The emontx V3 is the latest generation of the
The emontx V3 is the latest generation of the emonTx Low Power Wireless Energy Monitoring Node designed for monitoring AC electrical power on (up to4 (household/building) circuits using non-invasive clip on CT current sensors and an AC-AC Voltage adaptor to provide a voltage signal for full Real Power calculations.
[[File:Emontxv3.jpg|400 px|emonTx V3 Setup]]
[[File:Emontxv3.jpg|400 px|emonTx V3 Setup]]
|Line 21:||Line 21:|
[[File:EmonTx_V3.2_Labelled_Ports.jpg|650 px|emonTx V3 Ports]]
[[File:EmonTx_V3.2_Labelled_Ports.jpg|650 px|emonTx V3 Ports]]
[[File:EmonTx V3.2 PortMap.png|650 px|emonTx V3 Port map]]
[[File:EmonTx V3.2 PortMap.png|650 px|emonTx V3 Port map]]
==Power Supply Options==
==Power Supply Options==
Revision as of 13:21, 21 December 2013
THIS DOCUMENTATION PAGE IS A WORK IN PROGRESS - please bare with us while we flesh out this page in the coming days. Please help where you can to fix typos and add missing info. Your login user from openenergymonitor.org should carry over to the wiki. You might need to logout then log back into openenergymonitor.org before loading the wiki to be able to edit it.
The emontx V3 is the latest generation of the emonTx Low Power Wireless Energy Monitoring Node designed for monitoring AC electrical power on (up to) 4 separate (household/building) circuits using non-invasive clip on CT current sensors and an AC-AC Voltage adaptor to provide a voltage signal for full Real Power calculations.
- EmonTx v3 can measure real power, apparent power, power factor, rms voltage and current on 4 different mains circuits, it also has inputs for temperature and humidity sensing.
- Pre-assembled SMT design
- A single AC-AC adapter can now be used to power the emonTxV3 and provide AC voltage measurement
- 4x CT current sensing inputs
- An on-board 3x AA battery option
- Flexible choice of RF radio module and removable microcontroller
Using an ATmega328 microprocessor the emonTx V3 runs standard Arduino sketches and is easy to customise and upload code using the Arduino IDE and a USB to UART cable.
The data from the emonTx V3 is transmitted via wireless (433/868Mhz) to an emonBase web-connected base-station (we recommend a Raspberry Pi with an RFM12Pi) which then posts the data onto an emoncms server (e.g. emoncms.org) for logging, processing and graphing.
The main board of the emonTx V3 comes pre-assembled, just requiring the addition of the RFu328 and optionally a battery holder added to get going. However if the 'fully-built' option has been selected in the emonTx V3 Bundle Builder then the emonTx V3 will come with the Rfu328 already fitted (using Xbee style 2mm headers) and with firmware ready uploaded. If this is the case skip to step 3 below.
Power Supply Options
There are four ways to power the emonTx V3:
- USB to UART cable - only recommended for short periods while programming, it is recommended to remove all other power sources
- 5V DC Mini-USB cable - remove jumper JP2 when powering via DC if AC adapter is present
- 3 x AA Batteries - remove jumper JP2 when powering via DC if AC adapter is present
- 9V AC-AC power adapter - with jumper JP2 closed (If jumper 2 is left open then the AC-AC adapter will be used for power sampling but not to power the emonTx V3 - see Powering via AC below)
Powering via DC (1-3)
When powering the emonTx V3 via DC (1-3) (and running the main emonTx firmware (emonTxV3_RFM12B_DiscreteSampling)) the emonTx V3 will take Apparent Power measurements, measuring only current, assuming the Power Factor of 1 and Vrms to be 230V, power saving mode will also be implemented, going into sleep mode in between readings (default every 10s) to save battery power.
The red LED indicator with illuminate for a couple of seconds then extinguish never to flash again if powering from a DC source. If the LED flashes multiple times at startup this indicates the emonTx is detecting an AC waveform - this can happen if an AC adapter has just been removed, hit the reset button if this occurs. When powering the unit via 5V USB/battery it is advisable to remove the JP2 jumper if an AC-AC adapter is present.
Powering via AC (4)
A nice feature of the emonTx V3 is the ability to use an AC-AC adapter to power the unit at the same time as simultaneously providing an AC voltage waveform sample. If the emonTx V3 detects the presence of an AC waveform (AC adapter connected) at startup it will automatically implement Real Power and Irms measurements by sampling the AC waveform. Real Power is what you get billed for and can sometimes (depending on the appliances connected to the circuit being monitored) vary significantly from Apparent Power - see Building Blocks for more info on AC power theory. For best power monitoring accuracy we recommend powering with an AC-AC adapter whenever possible.
Using the AC voltage waveform for reference also enables the emonTx to monitor the direction of the current flow, this is important for solar PV monitoring, if you notice a negative reading when you were expecting a positive one, flip the orientation of the CT. The red indicator LED will flash at startup then flash once every 10's to indicate that an AC waveform has been detected. Sleep mode will be disabled to keep a more consistent power draw on the AC circuit.
Important note regarding powering with AC: powering via AC is only recommended for standard emonTx operation without auxiliary sensors (apart from a single DS128B20 temperature sensor) or equipment (e.g. relay modules) connected. If the current draw exceeds 20mA the AC voltage waveform sample will be effected, adversely effecting the reading accuracy of the emonTx. To avoid damage to the emonTx V3's circuits the current drawn from the AC circuit should never exceed 60mA - see technical wiki for more info. If more than 20mA of current is required it is recommended to remove jumper 2 (JP2) and power the emonTx via 5V USB. If an AC-AC adapter is connected it will only be used to provide an AC sample when JP2 is removed.
Uploading Arduino Firmware
Compiling and Uploading using Arduino IDE
The emonTx V3 with the RFu328 uses the ATmega328 microcontroller (same as Arduino Uno) and comes with the Optiboot (Arduino Uno) serial bootloader installed. This makes it super easy to upload new code to the emonTx V3 from the Arduino IDE.
A USB to UART cable is required to upload new Arduino firmware sketches
Start by downloading the firmware, libraries and setting up the Arduino programming environment by following this guide:
Once complete the emonTx V3 firmware location should be navigable from within the Arduino IDE by going to:
File > Sketchbook > OpenEnergyMonitor > emonTxFirmware > emonTxV3
Flashing Pre-compiled .hex
The main emonTx V3 emonTxV3_RFM12B_Discrete Sampling firmware as pre-loaded onto pre-build emonTx is also supplied as a pre-compiled .hex file. This can easily be uploaded using AVR dude. On Linux run:
$ sudo apt-get install avrdude
$ avrdude -v -c arduino -p ATMEGA328P -P /dev/ttyUSB0 -b 115200 -U flash:w:emonTxV3_RFM12B_DiscreteSampling.cpp433.hex
Specifying the USB port of your USB to UART programmer and the correct name and location of the .hex file
Arduino Firmware Info
See GitHub readme for firmware info:
All emonTx V3 firmware is available on Github:emonTxFirmware
All emonTx V3's sold pre-assembled are shipped with emonTxV3_RFM12B_Discrete Sampling firmware. This is the main firmware for the emonTx V3 and has been tested and calibrated. This firmware has the following features:
- Detection of AC-AC adapter sets Apparent Power / Real Power Sampling accordingly
- Detection of battery / USB 5V or AC > DC power method and sets sleep mode accordingly
- Detection of CT connections and samples only from the channels needed
- Detection of remote DS18B20 temperature sensor connection
The emonTxV3_RFM12B_Discrete Sampling firmware samples over 10 full AC cycles, so 200ms per measurement on each CT. Within this measurement it samples rapidly at about 2500 samples per second. There is then an assumption that the power does not fluctuate significantly in the time it is asleep, which is usually good enough for typical household monitoring. If greater precision is required (as is the case with PV Power Diversion it is recommended that you use PLL continuous sampling, see RFM12B firmware examples folder on GitHub.
CT Energy Monitoring
A DS18B20 digital temperature sensor can easily be connected by the emonTx V3 by connecting the sensor into the emonTx V3's screw terminal block. The default firmware supports auto-detecting one DS18B20 sensor. Many DS18B20's can be daisy-chained but this will require changes being made to the pre-installed emonTx firmware - you may also run into power draw issues depending on how you are powering the emonTx (see Power Supply Options above).
In order to save power when running off batteries the emonTx V3 supports switching off of the DS18B20 in-between readings and performing the temperature conversion while the ATmega328 is sleeping. To do this power (3.3V) is supplied to the DS18B20's power pin from Dig5, this digital pin is switched off between readings. The data connection from the DS18B20 is connected to Dig19, this I/O pin has got a 4K7 pull-up resistor on-board the emonTx V3's PCB as required by the DS18B20.
To connect an external DS18B20 to the emonTx V3 screw terminal block connections are as follows
|Screw terminal pin||DS18B20 Connection|
|3 - GND||GND (Black)|
|5 - Dig5||Power (Red)|
|6 - Dig19||Data (White)|
Utility Meter Interface
Optical Pulse Counting
Many meters have pulse outputs, including electricity meters (single phase, 3-phase, import and export), gas meters, water flow meters etc. The pulse output may be a flashing LED or a switching relay (usually solid state) or both. We recommend using the optical interface where available as this decouples the monitoring equipment from any high/mains voltages.
In the case of an electricity meter, a pulse output corresponds to a certain amount of energy passing through the meter (KWhr/Wh). For single-phase domestic electricity meters (eg. Elster A100c) each pulse usually corresponds to 1 Wh (1000 pulses per kwh). For water and gas meters they will usually be marked to show the quantity of water (liters/gallons) or of gas (cubic meters/cubic feet) that each pulse represents.
The emonTx V3 has one interrupt input (IRQ 0, Dig2) which can be used for pulse counting. This is broken out on terminal block port 4
Read more about pulse counting on the OpenEnergyMonitor Buillding Block pagers here
emonTx V3 Hardware Connections
You should connect the pulse input into emonTx V3 terminal block port 4 (IRQ 0 / Digital 2) If you are connecting a hard-wired pulse output you may need to add a pull-down resistor onto the emonTx V3 PCB (R31) If you are using an optical counter (e.g TSL257) you should connecting the power pin to the 3.3V or 5V (if running off 5V USB)
|Screw terminal pin||Connection|
|1||5V (if powered via 5V USB)|
|4||IRQ 0 / Dig2|
We recommend powering the emonTx V3 from either a 5V USB or AC_AC adapter when used for pulse counting operation. Due to the additional power requirements of the optical pulse sensor, battery life will be significantly reduced compared to running an emonTx from 3 x AA batteries for CT operation only.
Direct Optical Interface
if you have an Elster meter (tested with Elster 100C) the emonTx V3 with an IR TSL261R sensor can be used to interface directly with the meter protocol to read off the exact accumulated watt hours that you have generated or used. This reading can be used on it's own or to cross-check and calibrate CT based measurement. See here for original blog post
The Rfu328 sold through the OpenEnergyMonitor shop is ready setup for use with the RFM12B, just make sure you solder the RFM12B with the correct orientation if soldering it yourself: the crystal on the RFM12B should be on the same side as the tiny 16Mhz ATmega328 crystal on the RFu328. To use the RFM12B on the RFu328 a modified version of the JeeLib RF12 library has been created. This is called the RFu_JeeLib see GitHub readme for the modifications which have been undertaken. Once using the RFu_JeeLib the RFM12B on the RFu348 can be used exactly the same as before, all code written for the emonTx V2, JeeNode etc should work just fine using using the RFu_JeeLib library.
A Ciseco SRF module can also be used on the emonTx V3 instead of an RFM12B. The easiest thing to do is to purchase a complete RFu328 SRF setup from Ciseco, however, a SRF can be used on the RFu328 purchased from the OpenEnergyMonitor shop with one small modification. The RFu328 sold through the OpenEnergyMonitor shop comes ready setup for use the RFM12B, to use it with the SRF you will need to remove one SMT resistor and rotate another by 90 degress. Follow these instructions from Ciseco IN REVERSE!
While an SMA antenna does not improve the gain it does make the antenna setup more durable and allow for the use of an SMA extension cable and remote whip antenna which can be a real lifesaver for installations with tricky RF considerations (thick stone walls, no direct line of sight).
Adding an SMA antenna
Ideally the RFu328 should be soldered directly onto the emonTX via the SMT pads when using an SMA connector (as shown in the photo below) as this directly connects the RF antenna pad on the RFu238 to the PCB antenna track of the emonTx which connects to the SMA connector.
It is possible to use an SMA antenna when the RFu328 has been mounted on headers instead of soldered directly to the SMT pads on the emonTx. To do so you will need to connect the antenna pad of the RFu328 to the antenna pad on the emonTx by using a small wire jumper - the wire jumper and the two pads which need to be connected are shown by the red line on the photo below.
|Manufacturer||Description||Value||Package||Rapid Code||Farnell Code||RS Code|
|Tru Connect||SMA PCB connector||N/A||thru-hole||16-1562||2079861||512-0070|
|RF-Solutions||434Mhz Ant straight||434Mhz||SMA||542-488||1304036||542-535|
|RF-Solutions||434Mhz Ant 90 degrees||434Mhz||SMA||542-488|
|RF-Solutions||868Mhz Ant straight||868Mhz||SMA||1304037||542-551|
|RF-Solutions||868Mhz Ant 90 degrees||868Mhz||SMA||542-563|
|Ciseco||SMA Extension whip antena 5m||433Mhz||SMA|
|Ciseco||SMA Extension whip antena 5m||868Mhz||SMA|
Max / typical
if exceeded damage might happen
|CT 1-3||Monitoring Power @ 240V||23kW||60KW||Using 22R burden and YHDC SCT-013-00 with 22 turns|
|CT 4||Monitoring Power @ 240V||4.5kW||4.6kW max measure – 19.7kW max dissipation||Using 22R burden and YHDC SCT-013-00 with 22 turns|
|AC-DC half-wave supply||Current output||20mA||60mA||Current draw above 20mA AC sample signal will be effected|
|3.3V Rail current output||When powering with 5V USB||150mA||168mA||Limitation SOT22 MCP1700 Ta=40C Vi=5.25V|
|Storage Temperature||Not programmed||-50C||+150C|
|5V Input Voltage||USB/FTDI/5V Aux||+3.4V||+6V||+6.5V (see note 1)||See note 1|
|3.3V Supply Voltage||on 3.3V supply rail||2.6V *||3.3V||3.8V RFM12B / 3.6V SRF *||*ADC readings will be incorrect if Vcc!=3.3V|
|Typical power consumption email@example.comV||0.032 mA (ATmega328 WDT sleep)||7.1mA (MCU running)||9-10mA (MCU + LED) up to 23-28mA for 3ms during RFM12B transmission||With ATmega328 and RFM12B and 1 CT connected|
Note 1: A higher voltage (up to 17.6V) can be used to power the emonTx if power is connected into the MCP1754 through the AC-DC enable jumper pin.
Open-Hardware Design Files
Proudly open source, the hardware designs are released under the Creative Commons Attribution-ShareAlike 3.0 Unported License:
All the Design files for the emonTx V3 are hosted on Git based SolderPad, see: http://solderpad.com/git/openenergymon/emontxv3
Ideas for Future Versions
- Add resistor divider (470K/1M with low value cap to GND) for battery voltage monitoring into free ADC, although there are no free ADC's! Maybe it could be jumpered into ADC0 since AC-AC will not be used when battery is preset?
- Check optimal SMA antenna tuning PCB trace
PCB: 100mm x 80mm
Download: Extruded Aluminium Case Datasheet
It was decided to use an extruded aluminium case with acrylic fascia. The case is solid, wall mountable and port cutouts are easily customizable with laser cut fascias. The embodied energy of aluminium is greater than plastic to make in the first place but to recycle uses less energy than plastic. See our blog post investigating the embodied energy of casing materials.
The emonTx V3 fascia design CAD files are available here: Thingiverse Download
DIN Rail Mount
The hardware designs (schematics and CAD files) are licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
The firmware is released under the GNU GPL V3 license
The documentation is subject to GNU Free Documentation License
The hardware designs follow the terms of the OSHW (Open-source hardware) Statement of Principles 1.0.
Environmental & Life Cycle
We are passionate about sustainability and are aware of the embodied energy and use of resources involved in electronic manufacture. We try our best to reduce environmental impact wherever possible:
- We have recently been inspired by a few projects taking a lead in promoting and making steps towards Ethical and Sustainable Electronics, see our blog post we wrote on the topic .
- The emonTx V3 case was chosen since aluminium can be easily recycled, see our blog post considering the embodied energy involved
- The PCB's are manufactured in the UK by a manufacturer who uses lead free techniques, complies to the highest environmental industry standard and is actively investing in techniques and equipment to reduce wastage and environmental impact (e.g water treatment and recycling). Hot-air leveling was chosen instead of immersion gold finish to reduce environmental impact.
- The assembly is also done in the UK with all components being RoHS compliant and free of conflict materials.
- Surface freight is used in preference to air shipping when ordering parts in bulk. This consumes 33 times less energy.
- We have strived to optimise electrical consumption in our hardware to be as low was possible and recommend the use of green rechargable batteries, see blog post
OUR PRODUCTS AND ASSEMBLY KITS MAY BE USED BY EXPERIENCED, SKILLED USERS, AT THEIR OWN RISK. TO THE FULLEST EXTENT PERMISSIBLE BY THE APPLICABLE LAW, WE HEREBY DISCLAIM ANY AND ALL RESPONSIBILITY, RISK, LIABILITY AND DAMAGES ARISING OUT OF DEATH OR PERSONAL INJURY RESULTING FROM ASSEMBLY OR OPERATION OF OUR PRODUCTS.
The OpenEnergyMonitor system is sold as a development kit to empower members of the openenergymonitor community to to get involved with the OpenEnergyMonitor open-source energy monitoring development project.
Your safety is your own responsibility, including proper use of equipment and safety gear, and determining whether you have adequate skill and experience. OpenEnergyMonitor and Megni registered partnership disclaims all responsibility for any resulting damage, injury, or expense. It is your responsibility to make sure that your activities comply with applicable laws, including copyright. Always check the webpage associated with each unit before you get started. There may be important updates or corrections! All use of the instructions, kits, projects and suggestions given both by megni.co.uk, openenergymonitor.org and shop.openenergymonitor.org are to be used at your own risk. The technology (hardware , firmware and software) are constantly changing, documentation (including build guide and instructions) may not be complete or correct.
If you feel uncomfortable with assembling or using any part of the kit, simply return it to us for a full refund.