Difference between revisions of "EmonTx V3"

From OpenEnergyMonitor Wiki
Jump to: navigation, search
(Firmware - Calibration: Expanded to make clear that the standard calibration assumes nominal component values, and can usually be improved.)
(AD-DC Power Supply component ratings)
 
(49 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
='''For new (2015) emonTx V3.4 see wiki page: [[EmonTx_V3.4]]'''=
 
='''For new (2015) emonTx V3.4 see wiki page: [[EmonTx_V3.4]]'''=
  
The emontx V3 is a 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.
+
The emontx v3 is a Low Power Wireless Energy Monitoring Node designed to monitor AC electrical power of four separate (household/building) circuits using non-invasive clip-on CT sensors and an AC-AC Voltage adaptor to provide a voltage signal for Real Power calculations.
  
 
[[File:Emontxv3.jpg|400 px|emonTx V3 Setup]]
 
[[File:Emontxv3.jpg|400 px|emonTx V3 Setup]]
Line 11: Line 11:
 
==Features==
 
==Features==
  
* emonTx v3 can measure apparent power, real power*, power factor*, RMS voltage* and current on 4 different mains circuits, it also has inputs for temperature and humidity sensing.
+
* emonTx v3 can measure apparent power, real power*, power factor*, RMS voltage* and current on four mains circuits
 +
* temperature and humidity sensing
 
* Pre-assembled SMT design
 
* Pre-assembled SMT design
* A single AC-AC adapter can now be used to power the emonTx V3 and provide AC voltage measurement
+
* A single AC-AC adapter can be used to power the emonTx V3 and provide AC voltage measurement
 
* 4x CT current sensing inputs
 
* 4x CT current sensing inputs
* An on-board 3x AA battery option
+
* On-board 3x AA battery option
 
* Flexible choice of RF radio module and removable microcontroller
 
* Flexible choice of RF radio module and removable microcontroller
  
Line 30: Line 31:
 
==Overview==
 
==Overview==
  
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.
+
Using an ATmega328 microprocessor, the emonTx V3 runs standard Arduino sketches.  Custom sketches are uploaded 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.
+
Data from the emonTx V3 is transmitted via a 433/868MHz radio to an emonBase, a web-connected base-station (we recommend a Raspberry Pi with an RFM12Pi) which then posts the data to 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.
+
  
 +
The main board of the emonTx V3 is pre-assembled, requiring the addition of the RFu328 and an optional battery holder to get up and running. However, if the 'fully-built' option has been selected in the emonTx v3 Bundle Builder, the emonTx will ship with the  Rfu328 and firmware installed. If this is the case, skip to step 3 below.
  
 
==Power Supply Options==
 
==Power Supply Options==
  
There are four ways to power the emonTx V3:
+
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
+
#USB to UART cable - recommended for short periods only, e.g. while programming. We recommend removal of all other power sources.
#5V DC Mini-USB cable - remove jumper JP2 when powering via DC if AC adapter is present  
+
#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
+
#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)  
+
#9V AC-AC power adapter - with jumper JP2 closed (If jumper 2 is left open 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)===
 
===Powering via DC (1-3)===
When powering the emonTx V3 via DC (1-3) (and running the main emonTx firmware ([https://github.com/openenergymonitor/emonTxFirmware/tree/master/emonTxV3/RFM12B/emonTxV3_RFM12B_DiscreteSampling 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.
+
When powering the emonTx V3 via DC (1-3) (and running the main emonTx firmware ([https://github.com/openenergymonitor/emonTxFirmware/tree/master/emonTxV3/RFM12B/emonTxV3_RFM12B_DiscreteSampling emonTxV3_RFM12B_DiscreteSampling])) the emonTx v3 will take Apparent Power measurements, measuring only current, assuming a Power Factor of 1, and Vrms to be 230V. Power saving mode will be implemented, i.e. the unit will go into sleep mode between readings (default every 10s) to conserve battery power.
  
'''The red LED indicator will 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.'''
+
'''The red LED indicator will illuminate for a couple of seconds then extinguish never to flash again, if power is 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 been removed. Press the reset button if that 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)===
 
===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.
+
A nice feature of the emonTx v3 is the ability to use an AC-AC adapter to power the unit while simultaneously providing an AC voltage sample. If the emonTx v3 detects the presence of an AC adapter at startup, it will automatically take 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.  
+
Using the AC voltage sample for reference enables the emonTx to monitor the direction of the current flow. This is important for PV system monitoring. If you notice a negative reading when you were expecting a positive one, detach the CT from the wire, flip it 180 degrees, and re-attach it to the wire. '''The red indicator LED will flash at startup then flash once every 10's to indicate an AC waveform has been detected'''. Sleep mode will be disabled to maintain a 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 up to 4 DS18B20 temperature sensors) or equipment (e.g. relay modules) connected. Correct operation via the ac supply is critically dependant upon using the correct ac-ac adapter. If you are using the recommended ac-ac adapter and the current draw exceeds 10 mA and the mains supply is below the minimum allowable, then the circuit operation will be impaired, adversely affecting 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 10mA 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.''
+
''Important note regarding powering with AC: Only recommended for standard emonTx operation without auxiliary sensors (apart from a max of 4 DS18B20 temperature sensors) or equipment (e.g. relay modules) connected. Correct operation via the AC supply is critically dependant upon using the correct AC-AC adapter. If you are using the recommended adapter, the current draw exceeds 10 mA, and mains voltage is below the allowed minimum, circuit operation will be impaired adversely affecting the accuracy of the emonTx. To avoid damage to the emonTx v3 circuits the current drawn from the AC circuit should never exceed 60mA - see the technical wiki for more info. If more than 10mA of current is required, it is recommended to remove jumper 2 (JP2) and power the emonTx via the 5V USB connector. If an AC-AC adapter is connected it will be used only to provide an AC sample when JP2 is removed.''
  
 
==Uploading Arduino Firmware==
 
==Uploading Arduino Firmware==
  
 
===Compiling and Uploading using Arduino IDE===
 
===Compiling and Uploading using Arduino IDE===
The emonTx V3 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.  
+
The emonTx v3 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.  
  
  
Line 71: Line 71:
 
[http://openenergymonitor.org/emon/buildingblocks/setting-up-the-arduino-environment Setting up the Arduino Programming Environment]
 
[http://openenergymonitor.org/emon/buildingblocks/setting-up-the-arduino-environment Setting up the Arduino Programming Environment]
  
Once complete the emonTx V3 firmware location should be navigable from within the Arduino IDE by going to:
+
Once complete, the emonTx v3 firmware location should be navigable from within the Arduino IDE by going to:
  
 
''File > Sketchbook > OpenEnergyMonitor > emonTxFirmware > emonTxV3''
 
''File > Sketchbook > OpenEnergyMonitor > emonTxFirmware > emonTxV3''
Line 77: Line 77:
 
===Flashing Pre-compiled .hex===
 
===Flashing Pre-compiled .hex===
  
The main emonTx V3 ''[https://github.com/openenergymonitor/emonTxFirmware/tree/master/emonTxV3/RFM12B/emonTxV3_RFM12B_DiscreteSampling emonTxV3_RFM12B_Discrete Sampling]'' firmware as pre-loaded onto pre-build emonTx is also supplied as a pre-compiled .hex file.  
+
The main emonTx v3 ''[https://github.com/openenergymonitor/emonTxFirmware/tree/master/emonTxV3/RFM12B/emonTxV3_RFM12B_DiscreteSampling emonTxV3_RFM12B_Discrete Sampling]'' firmware as pre-loaded onto pre-build emonTx is also supplied as a pre-compiled .hex file.  
  
 
GitHub can be used to make sure you have the latest version:
 
GitHub can be used to make sure you have the latest version:
Line 94: Line 94:
 
Specifying the USB port of your USB to UART programmer and the correct name and location of the .hex file
 
Specifying the USB port of your USB to UART programmer and the correct name and location of the .hex file
  
'''Windows''' :you might be able to use the the [http://www.hobbytronics.co.uk/arduino-xloader XLoader] application to upload .hex files (we have not tested this ourselves, please update wiki if you have)
+
'''Windows''': you might be able to use the the [http://www.hobbytronics.co.uk/arduino-xloader XLoader] application to upload .hex files (we have not tested this. Please update the wiki if you have)
  
 
===Flashing the Bootloader===
 
===Flashing the Bootloader===
Line 100: Line 100:
 
''Should not be required''
 
''Should not be required''
  
The OptioBoot Arduino Uno serial bootloader should be ready loaded onto the ATmega328 on the emonTx in the factory. If however for any reason you need to re-upload the bootloder and set the fuses this can be done:
+
The OptioBoot Arduino Uno serial bootloader should already be loaded on the ATmega328 chip. If however, for some reason you need to re-upload the bootloder and set the fuses, here's how it's done:
  
The stock emonTx firmware can be downloaded in pre-compiled .hex form including the bootloader from github, look for .hex file including the word bootloader in the title on the emonTx V3 GitHub.   
+
The stock emonTx firmware can be downloaded in pre-compiled .hex form, including the bootloader, from github, look for a .hex file with the word bootloader in the title, on the emonTx V3 GitHub.   
  
  
Line 109: Line 109:
 
<code><pre>$ sudo avrdude -v -p atmega328p -c avrispmkII -P usb -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m -U flash:w:emonTxV3_4_RFM12B_DiscreteSampling_bootloader.cpp.hex:i  -Ulock:w:0x0F:m</pre></code>
 
<code><pre>$ sudo avrdude -v -p atmega328p -c avrispmkII -P usb -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m -U flash:w:emonTxV3_4_RFM12B_DiscreteSampling_bootloader.cpp.hex:i  -Ulock:w:0x0F:m</pre></code>
  
or to speed things up:
+
or, to speed things up:
  
 
<code><pre>$ sudo avrdude -V -u -p atmega328p -c avrispmkII -P usb -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m -U flash:w:emonTxV3_4_RFM12B_DiscreteSampling_bootloader.cpp.hex:i  -Ulock:w:0x0F:m</pre></code>
 
<code><pre>$ sudo avrdude -V -u -p atmega328p -c avrispmkII -P usb -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m -U flash:w:emonTxV3_4_RFM12B_DiscreteSampling_bootloader.cpp.hex:i  -Ulock:w:0x0F:m</pre></code>
  
If, for any reason (e.g to make a backup) you want to read the data back from the ATmega328 this can be done with:
+
If you want to read the data from the ATmega328, e.g to make a backup, execute the following command:
  
 
<code><pre> $ avrdude -v -p atmega328p -c avrispmkII -P usb -U flash:r:test_intel.hex:i</pre></code>
 
<code><pre> $ avrdude -v -p atmega328p -c avrispmkII -P usb -U flash:r:test_intel.hex:i</pre></code>
Line 121: Line 121:
 
See GitHub readme for firmware info:  
 
See GitHub readme for firmware info:  
  
'''All emonTx V3 firmware is available [https://github.com/openenergymonitor/emonTxFirmware on Github:emonTxFirmware]'''
+
'''All emonTx v3 firmware is available [https://github.com/openenergymonitor/emonTxFirmware 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 based on the nominal component values. If better accuracy is required, and facilities are available, then the unit should be re-calibrated to take account of variations present in the actual components used. You will need access to a programmer to reload the sketch.
+
All pre-assembled emonTx v3s are shipped with '''emonTxV3_RFM12B_Discrete Sampling''' firmware. This is the main firmware for the emonTx v3 and has been tested and the device calibrated based on nominal component values. If better accuracy is required, and facilities are available, the unit should be re-calibrated to take account of variations present in the components used. You will need access to a programmer to reload the sketch.
If you ordered an emonTx V3 without a radio module, no firmware will be loaded, although there will be a bootloader present. You will need access to a programmer to load a sketch.
+
If you ordered an emonTx v3 without a radio module, no firmware will be loaded, although a bootloader will be present. You will need access to a programmer to load a sketch.
  
 
The '''emonTxV3_RFM12B_Discrete Sampling''' firmware has the following features:
 
The '''emonTxV3_RFM12B_Discrete Sampling''' firmware has the following features:
  
* Detection of AC-AC adapter sets Apparent Power / Real Power Sampling accordingly
+
* Detection of AC-AC adapter sets Apparent Power / Real Power Sampling mode
* Detection of battery / USB 5V or AC > DC power method and sets sleep mode accordingly
+
* Detection of battery / USB 5V or AC > DC power method and sets sleep mode
* Detection of CT connections and samples only from the channels needed
+
* Detects connected CTs, and samples only from the connected sensors
* Detection of remote DS18B20 temperature sensor connection
+
* Detection of remote DS18B20 temperature sensor
  
[Note: Detection of the inputs in use takes place at power-on. The sketch must be re-started (press the reset button) if any change is made to the input connections.]
+
[Note: Detection of connected sensors occurs at power-on. The sketch must be re-started (press the reset button) if changes are made to the input connections, i.e. sensors are connected or disconnected after power-on]
  
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 [http://openenergymonitor.org/emon/pvdiversion/pll PV Power Diversion] it is recommended that you use PLL continuous sampling, see RFM12B firmware examples folder on GitHub.
+
The '''emonTxV3_RFM12B_Discrete Sampling''' firmware samples 10 full AC cycles, i.e. 200ms per measurement per CT. Within this measurement, samples are taken at the rate of approximately 2500 per second. It is assumed the power does not vary significantly during the time the emonTx is in sleep mode, which is usually sufficient for household monitoring. If greater precision is required, (as is the case with [http://openenergymonitor.org/emon/pvdiversion/pll PV Power Diversion] we recommended you use PLL continuous sampling. See the RFM12B firmware examples folder on GitHub.
  
 
==Standard Operation==
 
==Standard Operation==
Line 142: Line 142:
 
====Single Phase====
 
====Single Phase====
  
By default, all OEM sketches are intended for single phase operation. All sketches are available on [https://github.com/openenergymonitor/emonTxFirmware/tree/master/emonTxV3/RFM12Bm GitHub].
+
By default, all OEM sketches are intended for monitoring a single phase system. All sketches are available on [https://github.com/openenergymonitor/emonTxFirmware/tree/master/emonTxV3/RFM12Bm GitHub].
  
The [https://github.com/openenergymonitor/emonTxFirmware/tree/master/emonTxV3/RFM12B/emonTxV3_4_RFM12B_DiscreteSampling "Discrete Sampling"] sketch is suitable for general purpose use, including installations where the emonTx is powered by batteries. However, more advanced sketches are available under "Examples" and these include a sketch for 3-phase installations, "Continuous Sampling" (useful where there is a rapidly switched load, for example), pulse input, etc.
+
The [https://github.com/openenergymonitor/emonTxFirmware/tree/master/emonTxV3/RFM12B/emonTxV3_4_RFM12B_DiscreteSampling "Discrete Sampling"] sketch is suitable for general purpose use, including installations where the emonTx is powered by batteries. However, advanced sketches are available under "Examples" including a sketch for 3-phase installations, "Continuous Sampling" (useful where there is a rapidly switched load, for example), pulse input, etc.
  
 
The theory behind the calculations is explained in the [http://openenergymonitor.org/emon/buildingblocks "Building Blocks"] section.
 
The theory behind the calculations is explained in the [http://openenergymonitor.org/emon/buildingblocks "Building Blocks"] section.
Line 150: Line 150:
 
====Three-Phase====
 
====Three-Phase====
  
Because the emonTx has only one voltage sensing input, it is not possible to accurately measure 3-phase power with a single unit. However, if the voltage balance between the phases is accurately maintained (i.e. the supply has a relatively high fault level), it is possible to measure the voltage of the first phase and use this to calculate a reasonable representation of the voltages on the second and third phases, that can then be used to calculate the real and apparent powers on those other two phases. A sketch that does this is [https://github.com/openenergymonitor/emonTxFirmware/tree/master/emonTxV3/RFM12B/Examples/emonTxV3_3Phase_Voltage emonTxV3_3Phase_Voltage]
+
Because the emonTx has only one voltage sensing input, it is not possible to accurately measure 3-phase power with a single unit. However, if the voltage balance between the phases is accurately maintained (i.e. the supply has a relatively high fault level), it is possible to measure the voltage of the first phase and use this to calculate a reasonable representation of the voltages on the second and third phases, that can then be used to calculate the real and apparent power on the other two phases. A sketch that does this is [https://github.com/openenergymonitor/emonTxFirmware/tree/master/emonTxV3/RFM12B/Examples/emonTxV3_3Phase_Voltage emonTxV3_3Phase_Voltage]
  
The "emonTxV3_3Phase_Voltage" sketch works by sampling the Phase 1 voltage as normal, but the values are stored in a circular array. One third of a cycle later, the stored value is read back and used to calculate the real power in Phase 2, and two thirds of a cycle later, the stored value is read back and used to calculate the real power in Phase 3. Unfortunately, because the samples do not align exactly with the desired points on the second and third phases, it is necessary to interpolate between samples. When commissioning this sketch, it is essential to follow the calibration procedure in the comments.
+
The "emonTxV3_3Phase_Voltage" sketch works by sampling the Phase 1 voltage as normal, but the values are stored in a circular array. One third of a cycle later, the stored value is read and used to calculate the real power in Phase 2. Two thirds of a cycle later, the stored value is read again and used to calculate the real power in Phase 3. Unfortunately, because the samples do not align exactly with the desired points on the second and third phases, it is necessary to interpolate between samples. When commissioning this sketch, it is essential to follow the calibration procedure in the comments.
  
 
Further information about 3-phase supplies can be found in [http://openenergymonitor.org/emon/buildingblocks/3-phase-power "Building Blocks"].
 
Further information about 3-phase supplies can be found in [http://openenergymonitor.org/emon/buildingblocks/3-phase-power "Building Blocks"].
Line 160: Line 160:
 
Like any other device assembled using components from a variety of sources, the values that the emonTx reads are subject to normal manufacturing tolerances. These have been analysed in detail in [http://openenergymonitor.org/emon/buildingblocks/emontx-error-sources Building Blocks].
 
Like any other device assembled using components from a variety of sources, the values that the emonTx reads are subject to normal manufacturing tolerances. These have been analysed in detail in [http://openenergymonitor.org/emon/buildingblocks/emontx-error-sources Building Blocks].
  
It is very important to note that the 'worst-case' error is exactly that, the error that is ''possible'' if every component has the greatest possible error and all errors add up in the worst possible way. The worst case is very unlikely to occur in practice, it is normal for most components to be much closer to the nominal value than 'worst-case' and for some of the errors to cancel each other. With careful calibration, some users claim that their emonTx is reporting energy consumption that is within 1% of the value recorded by the energy supplier's meter.
+
It is very important to note that the 'worst-case' error is exactly that, the maximum error ''possible'' if every component has the greatest possible error, and all errors add up in the worst possible way. The worst case is very unlikely to occur in practice. Most components are closer to their nominal values than their 'worst-case' values, and some of the errors will cancel each other. With careful calibration, some users claim their emonTx is reporting energy consumption within 1% of the value recorded by their energy supplier's meter.
  
 
==Extended Operation==
 
==Extended Operation==
 
===Temperature Monitoring===
 
===Temperature 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).  
+
A DS18B20 digital temperature sensor can easily be connected to the emonTx v3 by connecting the sensor to the screw terminal block. '''The default firmware supports auto-detecting one DS18B20 sensor'''. Many DS18B20s can be daisy-chained, but this will require changes to the pre-installed emonTx firmware. You may also run into power consumption 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 Dig19/ADC5. This digital pin is switched off between readings. The data connection from the DS18B20 is connected to Dig5, this I/O pin has got a 4K7 pull-up resistor to 3.3 V on-board the emonTx V3's PCB as required by the DS18B20.
+
In order to conserve battery power, the emonTx v3 switches off the DS18B20 between readings, and executes the temperature conversion routine while the ATmega328 is sleeping. To do this, power (3.3V) is supplied to the DS18B20's power pin from Dig19/ADC5. This digital pin is switched off between readings. The data connection from the DS18B20 is connected to Dig5. This I/O pin has a 4K7 pull-up resistor connected to the 3.3 V rail as required by the DS18B20.
  
To connect an external DS18B20 to the emonTx V3 screw terminal block connections are as follows
+
To connect an external DS18B20 to the emonTx v3 screw terminal block, connections are as follows:
 
{| class="wikitable"
 
{| class="wikitable"
 
|+DS18B20 emonTx V3 screw terminal connections
 
|+DS18B20 emonTx V3 screw terminal connections
Line 188: Line 188:
 
   
 
   
 
====Optical Pulse Counting====
 
====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.  
+
Many meters have pulse outputs, including electricity meters (single phase, 3-phase, import and export), gas meters, water 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 (kWh/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.
+
In the case of an electricity meter, a pulse output corresponds to a fixed amount of energy passing through the meter (kWh/Wh). For single-phase domestic electricity meters (e.g. Elster A100c) each pulse usually corresponds to 1 Wh (1000 pulses per kWh).  Water and gas meters are typically marked to show the quantity of water (liters/gallons), or gas, (cubic meters/cubic feet) 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'''
 
'''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'''
 
   
 
   
The emonTx V3 [https://github.com/openenergymonitor/emonTxFirmware/tree/master/emonTxV3/RFM12B/Examples pulse counting example sketch calculates the power by the calculating the time elapsed between pulses].
+
The emonTx V3 [https://github.com/openenergymonitor/emonTxFirmware/tree/master/emonTxV3/RFM12B/Examples pulse counting example sketch calculates the power by the measuring the time between pulses].
  
Read more about pulse counting [http://openenergymonitor.org/emon/buildingblocks/introduction-to-pulse-counting on the OpenEnergyMonitor Buillding Block pagers here]
+
Read more about pulse counting [http://openenergymonitor.org/emon/buildingblocks/introduction-to-pulse-counting on the OpenEnergyMonitor Buillding Block pages here]
  
 
   
 
   
'''emonTx V3 Hardware Connections'''
+
'''emonTx v3 Hardware Connections'''
 
   
 
   
You should connect the pulse input into emonTx V3 terminal block port 4 (IRQ 0 / Digital 2)
+
Connect the pulse input to 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 connecting a hard-wired pulse output, you may need to add a pull-down resistor to PCB (R31)
If you are using an optical counter (e.g [http://shop.openenergymonitor.com/tsl257-optical-pulse-sensing-kit/ TSL257]) you should connecting the power pin to the 3.3V or 5V (if running off 5V USB)
+
If you are using an optical counter (e.g [http://shop.openenergymonitor.com/tsl257-optical-pulse-sensing-kit/ TSL257]), you should connect the power pin to 3.3V or 5V (if running off 5V USB)
 
   
 
   
 
{| class="wikitable"
 
{| class="wikitable"
Line 225: Line 225:
 
|}
 
|}
  
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.
+
When used for pulse counting operation, we recommend powering the emonTx v3 from the 5V mini-USB connector, or the AC-AC adapter. The additional power consumed by the optical pulse sensor will significantly reduce battery life, compared to CT-only operation.
  
 
====Direct Optical Interface====
 
====Direct Optical Interface====
if you have an [http://4.bp.blogspot.com/-O6Rbpza8DRI/UDtMZHQNG7I/AAAAAAAACeo/i6Xx0PCuLdo/s1600/IMAG0876.jpg Elster] meter (tested with Elster 100C) the emonTx V3 with an [http://shop.openenergymonitor.com/tsl261r-ir-sensor-kit/ 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 [http://openenergymonitor.blogspot.com/2012/08/reading-watt-hour-data-from-elster.html blog post]
+
if you have an [http://4.bp.blogspot.com/-O6Rbpza8DRI/UDtMZHQNG7I/AAAAAAAACeo/i6Xx0PCuLdo/s1600/IMAG0876.jpg Elster] meter, (tested with an Elster 100C) the emonTx V3 with an [http://shop.openenergymonitor.com/tsl261r-ir-sensor-kit/ IR TSL261R] sensor, can be used to interface directly with the meter to read the accumulated watt hours you have generated or consumed. This reading can be used on its own or to cross-check and calibrate CT based measurement. See here for original [http://openenergymonitor.blogspot.com/2012/08/reading-watt-hour-data-from-elster.html blog post]
  
 
==Connectivity==
 
==Connectivity==
Openenergymonitor was designed to use a low power radio to transfer the readings from the Sensor Node to the base station.  This has both a lower power and longer range than wifi.  
+
OpenEnergyMonitor was designed to use a low power radio to transfer the readings from the Sensor Node to the base station.  This uses less power and has longer range than wifi.  
 
===RF Connectivity===
 
===RF Connectivity===
 
===RFM12B===
 
===RFM12B===
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 [https://github.com/openenergymonitor/RFu_jeelib  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.
+
The Rfu328 sold through the OpenEnergyMonitor shop is setup for use with the RFM12B. Make sure you solder the RFM12B with the correct orientation if fitting 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 [https://github.com/openenergymonitor/RFu_jeelib  RFu_JeeLib] see the GitHub readme for details regarding the modifications. Using the RFu_JeeLib, the RFM12B on the RFu348 can be used exactly as before, i.e. all code written for the emonTx V2, JeeNode, etc should work fine using using the RFu_JeeLib library.
  
 
===SRF===
 
===SRF===
  
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 [http://shop.ciseco.co.uk/rf-328-arduino-atmega-328-compatible-radio-transceiver-rfu-328/ 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. [http://openmicros.org/index.php/articles/88-ciseco-product-documentation/268 Follow these instructions from Ciseco IN REVERSE!]
+
A Ciseco SRF module can be used on the emonTx V3 instead of an RFM12B. The easiest thing to do is to purchase a complete [http://shop.ciseco.co.uk/rf-328-arduino-atmega-328-compatible-radio-transceiver-rfu-328/ RFu328 SRF setup from Ciseco], however, an SRF module can be used on the RFu328 purchased from the OpenEnergyMonitor shop with a small modification. The RFu328 sold through the OpenEnergyMonitor shop comes setup for use an RFM12B. To use it with the SRF module, you'll need to remove one SMT resistor and rotate another by 90 degress. [http://openmicros.org/index.php/articles/88-ciseco-product-documentation/268 Follow these instructions from Ciseco IN REVERSE!]
  
'''Due to the higher power requirements of the SRF it is not possible to power the emonTx V3 from an AC adapter when using an SRF, when an SRF is used the board should be powered via DC and the jumper removed''' see [[#Electrical Characteristics - Absolute min / max]] for power ratings.
+
'''Due to higher power requirements, it is not possible to power the emonTx v3 from an AC adapter when using an SRF module. When an SRF module is used, the board should be powered via DC and the jumper removed''' see [[#Electrical Characteristics - Absolute min / max]] for power ratings.
  
 
===Antenna===
 
===Antenna===
  
By default the emonTx V3 is shipped with a wire whip antenna. In our tests a wire whip has been shown to perform best. See our test data below:
+
By default, the emonTx V3 is shipped with a wire whip antenna. Our tests have shown a wire whip performs best. See our test data below:
  
 
[[File:EmonTx ant test photo.jpg‎|500 px|emonTx Test Photo|]] [[File:EmonTxV3_ant_test.png‎|500 px|emonTx Test Graph]]  
 
[[File:EmonTx ant test photo.jpg‎|500 px|emonTx Test Photo|]] [[File:EmonTxV3_ant_test.png‎|500 px|emonTx Test Graph]]  
  
All antennas and RFM12B modules were 433Mhz running standard emonTx descrete sampling firmware transmitting once very 10s. Each emonTx was given an unique node ID (7-10) so we could identify the transmissions.  
+
All antennas and RFM12B modules were 433MHz running standard emonTx discrete sampling firmware, transmitting once very 10s. Each emonTx was given a unique node ID (7-10) to enable transmission identification.  
  
An RFM1269CW was used as the receiver to make use of it's easily available RSSI reading to compare the antennas. The RSSI readings will all be a little worse since the RFM1269CW is an 868Mhz module with an 868mhz antenna forced to receive on 433mhz in software.
+
An RFM69CW receiver provided RSSI readings to enable antenna comparison. The RSSI readings were all lower than normal since the RFM69CW used is an 868MHz module, with an 868MHz antenna, forced via software, to a 433MHz receive frequency.
  
The emonTx's with the SMA antenna had the RFu328 soldered directly (SMT) to the PCB, the coil and whip antenna had the RFu328 mounted using headers
+
The emonTxs with the SMA antenna had the RFu328 soldered directly (SMT) to the PCB, the coil and whip antenna had the RFu328 mounted using headers
  
  
Line 258: Line 258:
 
====SMA Antenna====
 
====SMA Antenna====
  
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).  
+
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 feedline and remote whip antenna. The whip can be a real lifesaver for installations with difficult RF considerations e.g. thick stone walls, no direct line of sight.  
  
 
'''Adding an SMA antenna'''
 
'''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.
+
Ideally, the RFu328 should be soldered directly to the emonTX via the SMT pads when using an SMA connector, (as shown in the photo below) as this connects the antenna pad on the RFu238 directly to the emonTx PCB antenna track which is connected to the SMA connector.
  
 
[[File:EmonTx_V3_SMA.jpg|none|thumb|RFu328 SMT SMA|250 px]]  
 
[[File:EmonTx_V3_SMA.jpg|none|thumb|RFu328 SMT SMA|250 px]]  
  
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.
+
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'll need to connect the RFu328 antenna pad to the antenna pad on the emonTx with a small wire jumper. The wire jumper and the two pads which need to be connected are shown by the red line in the photo below.
  
 
[[File:EmonTx V3 SMA RFu headers.jpg|none|250 px|thumb|RFu328 Headers showing jumper for SMA]]
 
[[File:EmonTx V3 SMA RFu headers.jpg|none|250 px|thumb|RFu328 Headers showing jumper for SMA]]
Line 291: Line 291:
 
|-
 
|-
 
|RF-Solutions
 
|RF-Solutions
|434Mhz Ant straight  
+
|434MHz Ant straight  
|434Mhz
+
|434MHz
 
|SMA
 
|SMA
 
|542-488
 
|542-488
Line 299: Line 299:
 
|-
 
|-
 
|RF-Solutions
 
|RF-Solutions
|434Mhz Ant 90 degrees  
+
|434MHz Ant 90 degrees  
|434Mhz
+
|434MHz
 
|SMA
 
|SMA
 
|
 
|
Line 307: Line 307:
 
|-
 
|-
 
|RF-Solutions
 
|RF-Solutions
|868Mhz Ant straight  
+
|868MHz Ant straight  
|868Mhz
+
|868MHz
 
|SMA
 
|SMA
 
|
 
|
Line 315: Line 315:
 
|-
 
|-
 
|RF-Solutions
 
|RF-Solutions
|868Mhz Ant 90 degrees  
+
|868MHz Ant 90 degrees  
|868Mhz
+
|868MHz
 
|SMA
 
|SMA
 
|
 
|
Line 324: Line 324:
 
|Ciseco
 
|Ciseco
 
|[http://shop.ciseco.co.uk/433mhz-whip-antenna-with-1-5m-cable/ SMA Extension whip antena 5m]  
 
|[http://shop.ciseco.co.uk/433mhz-whip-antenna-with-1-5m-cable/ SMA Extension whip antena 5m]  
|433Mhz
+
|433MHz
 
|SMA
 
|SMA
 
|
 
|
Line 332: Line 332:
 
|Ciseco
 
|Ciseco
 
|[http://shop.ciseco.co.uk/868mhz-whip-antenna-with-5m-cable/ SMA Extension whip antena 5m]  
 
|[http://shop.ciseco.co.uk/868mhz-whip-antenna-with-5m-cable/ SMA Extension whip antena 5m]  
|868Mhz
+
|868MHz
 
|SMA
 
|SMA
 
|
 
|
Line 340: Line 340:
  
 
===Wired Connectivity===
 
===Wired Connectivity===
Whilst the system was designed to transfer data via radio it is possible to link the emonTx and RaspberryPi by wires.  It should be noted that this is NOT the standard setup.
+
Whilst the system was designed to transfer data via radio, it is possible to link the emonTx and RaspberryPi by wires.  Note: this is NOT the standard setup.
  
====Direct connection emonTx V3 > Raspberry Pi GPIO====
+
====Direct connection - emonTx v3 to Raspberry Pi GPIO====
  
Both the Raspberry Pi and emonTx V3 run at 3.3V so the serial RX and TX lines can be directly connected. the 5V power rail from the Raspberry Pi can be supplied to the emonTx which is then stepped down to to 3.3V through the emonTx V3's voltage regulator. 5V is provided by the red wire (see photo). The ground connection is the black wire and the serial data going from the emonTx to the Raspberry Pi is the green wire. Wire for serial data going the other (Pi to emonTx) has not been connected in this example but could be added if two way comms is required.   
+
Both the Raspberry Pi and emonTx v3 run at 3.3V, so the serial data Receive and Transmit lines can be directly connected. the 5V power rail from the Raspberry Pi can be supplied to the emonTx which is then limited to 3.3V by the emonTx v3 voltage regulator. 5V is provided by the red wire (see photo). The ground connection is the black wire, the serial data from the emonTx is the green wire. Wire for serial data traveling the opposite direction i.e. Pi to emonTx, has not been connected in this example, but can be added if two way communication is required.   
  
 
[[File:Emontx_to_pi_serial.JPG|400 px|Emontx to pi serial]]
 
[[File:Emontx_to_pi_serial.JPG|400 px|Emontx to pi serial]]
Line 350: Line 350:
  
  
[http://openenergymonitor.org/emon/node/3884 See hear for updated detailed documentation for emonTx Raspberry Pi direct serial interface]
+
[http://openenergymonitor.org/emon/node/3884 See here for detailed emonTx/Raspberry Pi direct serial interface documentation]
  
 
==Electrical Characteristics - Absolute min / max==
 
==Electrical Characteristics - Absolute min / max==
Line 367: Line 367:
 
|'''Absolute Max'''
 
|'''Absolute Max'''
  
if exceeded damage might happen
+
damage possible if exceeded
  
 
|'''Notes'''
 
|'''Notes'''
Line 374: Line 374:
 
|Monitoring Power @ 240V  
 
|Monitoring Power @ 240V  
 
|
 
|
|23kW
+
|23kW / 95.8A
|60kW
+
|60kW / 250A
 
|Using 22R burden and  YHDC SCT-013-00 with 22 turns  
 
|Using 22R burden and  YHDC SCT-013-00 with 22 turns  
 
|-
 
|-
Line 381: Line 381:
 
|Monitoring Power @ 240V  
 
|Monitoring Power @ 240V  
 
|
 
|
|4.5kW
+
|4.5kW / 19.2A
|4.6kW max measure – 19.7kW max dissipation
+
|4.6kW max measure – 19.7kW / 82A Max dissipation
 
|Using 120R burden and  YHDC SCT-013-00 with 22 turns  
 
|Using 120R burden and  YHDC SCT-013-00 with 22 turns  
 
|-
 
|-
Line 448: Line 448:
 
===Burden Resistor Calculations===
 
===Burden Resistor Calculations===
  
<u>Using SCT-13-000 with 2000 turns with 100A max primary: </u>
+
<u>Using SCT-013-000 with 2000 turns with 100A max primary: </u>
 
http://www.yhdc.com/cn/product/25/
 
http://www.yhdc.com/cn/product/25/
  
'''CT 1-3 have got a 22R burden resistor which can measure up to 97A (23.3kW @ 240V) using YHDC SCT-013-00 CT which has 2000 turns.'''
+
'''CTs 1-3 have a 22R burden resistor, and can measure up to 97A (23.3kW @ 240V) using a YHDC SCT-013-00 CT which has 2000 turns.'''
  
'''CT 4 is rated up to 4.6kW using 120R burden'''
+
'''CT 4 has a 120R burden and can measure up to 19.16 A (4.6kW max @ 240 V)'''
  
  
<u>Using CT-16-000 with 6060 turns with 200A max primary recommend 33R to give max current of 214A</u>
+
<u>Using an SCT-016-000 with 6060 turns, at 200A max primary the recommended burden is 33R, which gives a max current rating of 214A</u>
http://www.yhdc.com/cn/product/49/
+
  
 +
<u>Using an SCT-006-000 with 533 turns, at 20A max primary the recommended burden is 30R, which gives a max current rating of 20.7A</u>
  
The higher the burden resistor the smaller the range of measurement and the higher the accuracy at the low end of the measurement scale. Burden resistors should be +/- 1%.
+
Calculate resistor values using: https://tyler.anairo.com/projects/open-energy-monitor-calculator
 +
 
 +
The higher the burden resistance, the smaller the measurement range, the higher the low end accuracy will be. Burden resistors should be +/- 1% tolerance.
  
 
Is^=Ip^/turns = Irms x sqrt(2)/turns
 
Is^=Ip^/turns = Irms x sqrt(2)/turns
  
Rb= (AREF/2) / Is^ = AREF/ 2Is^
+
Rb= (AREF/2) / Is^ = AREF / 2Is^
  
 
Rb= (AREF * turns) / (2*IpRMS x sqrt(2))
 
Rb= (AREF * turns) / (2*IpRMS x sqrt(2))
Line 475: Line 477:
 
Closest value = 22R or 24R
 
Closest value = 22R or 24R
  
We will go for 22R this gives Pmax of 23.3kW (97.1A) which is close enough to 100A. Measurement 97-100A will be poor anyway since [http://openenergymonitor.org/emon/buildingblocks/report-yhdc-sct-013-000-current-transformer CT starts to saturate].
+
Using 22R yields a Pmax of 23.3kW (97.1A) which is close enough to 100A. Measurements at 97-100A will be poor since [http://openenergymonitor.org/emon/buildingblocks/report-yhdc-sct-013-000-current-transformer the CT starts to saturate].
  
 
Pmax=(240 * 3.3 * 2000) / (2 *sqrt(2) * 22) = 23.3kW
 
Pmax=(240 * 3.3 * 2000) / (2 *sqrt(2) * 22) = 23.3kW
  
  
Rb (16.7A , 4kW @ 240V) = 3.3*2000 / 2 x 16.67 x sqrt(2) = 23.3 O = 139.9 Ohm
+
Rb (16.7A , 4kW @ 240V) = 3.3*2000 / 2 x 16.67 x sqrt(2) = 23.3 O = 139.9 Ohms
  
 
Closest value = 120R or 150R
 
Closest value = 120R or 150R
  
We will go for 120R to rate up to 19.16A or 4.6kW @ 240V
+
A 120R burden yields a max rating of 19.16A or ~4.6kW @ 240V
  
If the power level does go above the rated power level the voltage will go above 3.3V and the ATmega328’s ADC will be saturated. A 1K series resistor is used to limit the current going into the ATmega. The ATmega 328’s internal voltage clamping diodes will safely clamp the voltage avoiding damage. [http://openenergymonitor.org/emon/node/171 http://openenergymonitor.org/emon/node/171]
+
If the power level goes above the CT max rating, the voltage will go above 3.3V and the ATmega328’s ADC will be saturated. A 1K series resistor is used to limit input current to the ATmega. The ATmega 328’s internal clamping diodes will safely limit the voltage, preventing damage. [http://openenergymonitor.org/emon/node/171 http://openenergymonitor.org/emon/node/171]
  
 
===CT inserted indication===
 
===CT inserted indication===
  
On the emonTx V3 design the switched jack plug has been utilized to provide a clear indication to show if the CT is connected or not. When a 3.5mm jack plug is NOT inserted pin 3 is connected to pin 2 and pin 4 is connected to pin 5 as shown in the diagram below. Pin 4 has been connected to GND so when no CT is connected ADC will show 0V.  
+
On the emonTx v3 design, a switched jack is utilized to provide a clear indication if a CT is connected or not. When a 3.5mm plug is NOT inserted pin 3 is connected to pin 2 and pin 4 is connected to pin 5 as shown in the diagram below. Pin 4 has been connected to GND so when no CT is connected, the ADC will sense 0V.  
  
When a 3.5mm jack is inserted the connection is between pin 4 & 5 is broken and the CT channel will works as usual
+
When a 3.5mm plug is inserted, the connection between pins 4 & 5 is broken and the CT channel will operate normally.
  
 
[[File:EmonTxV3 CT.png|400 px|emonTx V3 Setup]]
 
[[File:EmonTxV3 CT.png|400 px|emonTx V3 Setup]]
  
This method will increase quiescent power consumption slightly since 3.3V will be connected to GND through 470K resistor when no CT is connected. This will introduce a current drain of 7uA per channel, so a maximum of total of 21uA on the board (assuming at least 1 CT is always connected). See Quiescent power consumption section.
+
This method increases quiescent power consumption slightly since 3.3V will be connected to GND through a 470K resistor when no CT is connected. This will introduce a current drain of 7uA per channel, so a maximum of total of 21uA on the board (assuming at least 1 CT is always connected). See Quiescent power consumption section.
  
 
===Burden resistor and capacitor power and voltage ratings===
 
===Burden resistor and capacitor power and voltage ratings===
Line 506: Line 508:
  
  
CT 4 (up to 4.6kW) uses a 120R resistor. Even though this channel is only rated up to 4.6kW we can’t stop it accidentally being attempted to be used for higher measurement. Components should be rated for saturation. The max voltage through burden at CT saturation will be 10.2V (measured by Robert to be 5.2V rms). The max power the 120R burden will need to dissipate is 867mW
+
CT 4 (up to 4.6kW) uses a 120R resistor. Although this channel is rated for a maximum of 4.6kW, we can’t stop it from accidentally being used to make a measurment above that power level. Components should be rated for saturation. The max voltage through burden at CT saturation will be 10.2V (measured by Robert to be 5.2V rms). The max power the 120R burden will need to dissipate is 867mW.
  
  
However the emonTx will be specced for domestic use. In the UK the maximum rated fuse/RCB is 100A, most new builds are 80A. Therefore we can safely spec the emonTx for 100A max.
+
However, the emonTx will be specced for domestic use. In the UK, the maximum rated fuse/RCB is 100A, most new builds are 80A. Therefore we can safely spec the emonTx for 100A max.
  
  
Line 521: Line 523:
 
Max voltage in CT 4 120R burden = 6V (measured by Robert to be 3.9 V rms)
 
Max voltage in CT 4 120R burden = 6V (measured by Robert to be 3.9 V rms)
  
Max power in 120R burden = 300mA
+
Max power in 120R burden = 300mW
  
If a 0.25W resistor was used the maximum current in the secondary would be 42mA this equates to 82A or 19.7kW. CT4 will be physically removed from CT1-3 and clearly marked as 4.6kW max. ''Ideally a red colour 3.5mm socket will be used to clearly identify.''
+
If a 0.25W resistor was used, the maximum current in the secondary would be 42mA. This equates to 82A or 19.7kW. CT4 will be physically removed from CT1-3 and clearly marked as 4.6kW max. ''Ideally, a red 3.5mm socket will be used to clearly identify.''
  
Therefore the actual max power will be around 175mW. This give a good margin.  
+
Therefore the actual max power will be around 175mW. That gives a good margin.  
  
 
'''Conclusion: 0.25W burden and 6V capacitor will be suitable ratings. '''
 
'''Conclusion: 0.25W burden and 6V capacitor will be suitable ratings. '''
Line 533: Line 535:
 
Given testing results these values have been shown be to conservative, testing results are:
 
Given testing results these values have been shown be to conservative, testing results are:
  
*100 A, 22 R: Burden voltage = 0.935 V rms., 2.612 V peak-peak
+
*100 A, 22 R: Burden voltage = 0.935 Vrms, 2.612 V peak-peak
*100 A, 120 R: Burden voltage = 3.89 V rms., 12.07 V peak-peak
+
*100 A, 120 R: Burden voltage = 3.89 Vrms, 12.07 V peak-peak
*250 A, 22 R: Burden voltage = 1.498 V rms., 5.626 V peak-peak
+
*250 A, 22 R: Burden voltage = 1.498 Vrms, 5.626 V peak-peak
*250 A, 120 R: Burden voltage = 5.194 V rms., 21.9 V peak-peak
+
*250 A, 120 R: Burden voltage = 5.194 Vrms, 21.9 V peak-peak
  
 
Max power is thus 225 mW (120 R) or 102 mW (22 R)
 
Max power is thus 225 mW (120 R) or 102 mW (22 R)
  
These are the maximum rms voltages that can be developed, if 250 mW resistors are used, the actual power is comfortably inside the rating.
+
These are the maximum RMS voltages that can be developed. If 250 mW resistors are used, the actual power is comfortably inside the rating.
  
 
===Power Supply===
 
===Power Supply===
Line 546: Line 548:
 
====DC====
 
====DC====
  
The emonTx V3 has been designed to accept power via 5V USB, 3x AA batteries, FTDI connection, Aux input from terminal blocks or from AC power adapter via AC-DC half-wave rectifier circuit.
+
The emonTx v3 has been designed to accept power via 5V USB, 3x AA batteries, FTDI connection, Aux input from terminal blocks or from AC power adapter via an AC-DC half-wave power suply.
  
Only a single source of power should be used at once. '''DO NOT MIX POWER SOURCES.'''
+
Only one of the available power sources should be used. '''DO NOT MIX POWER SOURCES.'''
  
In order to keep quiescent power loss to the minimum a SOT32 MCP1700 LDO regulator was chosen for battery, USB 5V and FTDI power (5v) operation. The max input is 6V which is fine for 3 x AA and USB
+
In order to keep quiescent power loss to a minimum, a SOT32 MCP1700 LDO regulator was chosen for battery, USB 5V and FTDI power (5V) operation. The max input is 6V which is fine for battery (3 x AA) and USB operation. The MCP1700 has lower quiescent power consumption than the MCP1702 used in the AC-DC half-wave supply.
+
operation. The regulator has a lower quiescent power consumption than the MCP1702 which is used for the AC half-wave supply.
+
  
  
Line 558: Line 558:
 
Max voltage drop required = 5.25-3.3=1.95V
 
Max voltage drop required = 5.25-3.3=1.95V
  
Thermal resistance junction to ambient (JA) for MCP1700 SOT23A = 230 degrees C/W (from
+
Thermal resistance junction to ambient (JA) for MCP1700 SOT23A = 230 degrees C/W (from datashet)
  
 
Max case temperature = 150 degrees (from datasheet)
 
Max case temperature = 150 degrees (from datasheet)
Line 567: Line 567:
  
  
The emonTx V3 does not support charging, please make sure batteries are removed before connecting USB or FTDI power.
+
The emonTx v3 does not support battery charging. Please ensure batteries are removed before connecting USB or FTDI power.
  
 
====AC-DC====
 
====AC-DC====
  
For Power supply design circuit design see blog posts:
+
For Power supply design circuit design, see blog posts:
 
[[http://openenergymonitor.blogspot.co.uk/2012/05/emontx-single-ac-power-supply.html]]
 
[[http://openenergymonitor.blogspot.co.uk/2012/05/emontx-single-ac-power-supply.html]]
 
][http://openenergymonitor.blogspot.com/2013/01/power-emontx-from-single-ac-power.html]]
 
][http://openenergymonitor.blogspot.com/2013/01/power-emontx-from-single-ac-power.html]]
  
For emonTx V3 power supply specifications see: [[#Electrical Characteristics - Absolute min / max]]
+
For emonTx V3 power supply specifications, see: [[#Electrical Characteristics - Absolute min / max]]
  
All calcs assume using YHDC 013-000 CT and Ideal Power 9C AC-AC adapter 77DE-06-09-MI / 77DB-06-09-MI
+
All calculations assume a YHDC 013-000 CT and Ideal Power 9C AC-AC adapter 77DE-06-09-MI / 77DB-06-09-MI
  
  
A SOT89 MCP1754 LDO is use the the AC-DC power supply circuit. The MCP17542 can handle up to 16V input. The larger SOT89 package is needed to dissipate the heat. The large 47uF capacitor is needed to store enough energy to see us through half wave cycles. See section below for more info on AC-DC half wave operation.
+
An SOT89 MCP1754 LDO regulator is used in the the AC-DC power supply circuit. The MCP17542 maximum input is 16 Volts. The larger SOT89 package is needed to dissipate the heat. The 47uF capacitor stores enough energy to see us through half wave cycles. See section below for more info on AC-DC half wave operation.
  
'''The calculations below were first done for the MCP1702, this LDO was swapped for the Mcp1754. The MCP 1754 was used in the production version V3.2. See below for thermal calculations. '''
+
'''The calculations below were first done for the MCP1702. This LDO reulator was swapped for the MCP1754. The MCP1754 was used in production version 3.2. See below for thermal calculations. '''
  
  
'''Powering from AC-DC half wave (MCP1702 SOT89) - old not used in production'''  
+
'''Powering from AC-DC half wave (MCP1702 SOT89) - old, not used in production'''  
  
 
''Thermal resistance junction to ambient (JA) for MCP1702 SOT-89 JA=52 degrees C/W (from datasheet)
 
''Thermal resistance junction to ambient (JA) for MCP1702 SOT-89 JA=52 degrees C/W (from datasheet)
Line 591: Line 591:
 
Max case temperature = 150 degrees (from datasheet)
 
Max case temperature = 150 degrees (from datasheet)
  
I max = (T case max – T ambient max)/thermal resistance (JA) / delta V max
+
I<sub>max</sub> = (T case max – T ambient max)/thermal resistance (JA) / delta V max
  
  
 
At 12Vrms (max output of 9V AC-AC at max mains voltage)
 
At 12Vrms (max output of 9V AC-AC at max mains voltage)
  
Delta B = 12-3.3 = 10.7V
+
&Delta;B = 12-3.3 = 10.7V
  
I max (SOT-89) = ((150-40)/52)/10.7V = 21.6-19.7mA (30C – 40C ambient)  
+
I<sub>max</sub> (SOT-89) = ((150-40)/52)/10.7V = 21.6-19.7mA (30C – 40C ambient)  
worst case – max mains voltage and 50 degree ambient – max output = 18mA )
+
worst case – max mains voltage and 50 degree ambient – max output = 18mA)
  
  
 
At V=10.4Vrms (output of 9V AC-AC at typical mains voltage)
 
At V=10.4Vrms (output of 9V AC-AC at typical mains voltage)
  
Delta B = 10.4-3.3 = 7.1V
+
&Delta;B = 10.4-3.3 = 7.1V
  
I max (SOT-89) = ((150-40)/52)/7.1V = 32.5-29.7mA (30C – 40C ambient)
+
I<sub>max</sub> (SOT-89) = ((150-40)/52)/7.1V = 32.5-29.7mA (30C – 40C ambient)
  
  
Line 612: Line 612:
 
At V=8.77Vrms (output of 9V AC-AC at min mains voltage)
 
At V=8.77Vrms (output of 9V AC-AC at min mains voltage)
  
Delta B = 8.77-3.3 = 3.62
+
&Delta;B = 8.77-3.3 = 3.62
  
I max (SOT-89) = ((150-40)/52)/3.62V = 63.7-58.4mA (30C – 40C ambient)''
+
I<sub>max</sub> (SOT-89) = ((150-40)/52)/3.62V = 63.7-58.4mA (30C – 40C ambient)''
  
  
Assume maximum possible continuous current supplied by MCP1702 from AC-DC half-wave to be 18-20mA.
+
Assume maximum possible continuous current supplied by MCP1702 from the AC-DC half-wave supply to be 18-20mA.
  
  
  
'''Powering from AC-DC half wave (MCP1754 SOT89) - new used in production V3.2'''
+
'''Powering from an AC-DC half wave supply (MCP1754 SOT89) - new, used in production v3.2'''
  
  
Line 628: Line 628:
 
Max case temperature = 150 degrees (from datasheet)
 
Max case temperature = 150 degrees (from datasheet)
  
I max = (T case max – T ambient max)/thermal resistance (JA) / delta V max
+
I<sub>max</sub> = (T case max – T ambient max)/thermal resistance (JA) / delta V max
  
  
Line 634: Line 634:
 
At 12Vrms (max output of 9V AC-AC at max mains voltage)
 
At 12Vrms (max output of 9V AC-AC at max mains voltage)
  
Delta B = 12-3.3 = 10.7V
+
&Delta;B = 12-3.3 = 10.7V
  
I max (SOT-89) MCP1754 = ((150-40)/153.3)/10.7V = 67 mA (40C ambient)  
+
I<sub>max</sub> (SOT-89) MCP1754 = ((150-40)/153.3)/10.7V = 67 mA (40C ambient)  
  
 
worst case – max mains voltage and 50 degree ambient – max output = 61mA )
 
worst case – max mains voltage and 50 degree ambient – max output = 61mA )
Line 643: Line 643:
 
At V=10.4Vrms (output of 9V AC-AC at typical mains voltage)
 
At V=10.4Vrms (output of 9V AC-AC at typical mains voltage)
  
Delta B = 10.4-3.3 = 7.1V
+
&Delta;B = 10.4-3.3 = 7.1V
  
I max (SOT-89)  MCP1754 = ((150-40)/153.3)/7.1V = 101 mA (40C ambient)
+
I<sub>max</sub> (SOT-89)  MCP1754 = ((150-40)/153.3)/7.1V = 101 mA (40C ambient)
  
  
 
At V=8.77Vrms (output of 9V AC-AC at min mains voltage)
 
At V=8.77Vrms (output of 9V AC-AC at min mains voltage)
  
Delta B = 8.77-3.3 = 3.62
+
&Delta;B = 8.77-3.3 = 3.62
  
I max (SOT-89)  MCP1754 = ((150-40)/153.3)/3.62V = 198 mA (40C ambient)  
+
I<sub>max</sub> (SOT-89)  MCP1754 = ((150-40)/153.3)/3.62V = 198 mA (40C ambient)  
 
 
  
'''Using the MCP1754 with it’s higher thermal rating means the rating of the current limiting resistor is now the bottleneck factor in how much current can be drawn from the supply.'''
+
'''Using the MCP1754 with its higher thermal rating means the current limiting resistor dissapation rating is now the bottleneck to how much current can be drawn from the supply.'''
  
''Robert Wall: AC-DC supply might not work (ripple will be unacceptable) if it is connected to a remote socket also serving a high current load at lowest mains voltage; however the possibility that this particular combination of circumstances will happen in practice is extremely remote and can be discounted.''
+
''Robert Wall: AC-DC supply might not work (ripple will be unacceptable) if it is connected to a remote socket also serving a high current load at lowest mains voltage. However, the possibility this particular combination of circumstances will happen in practice is extremely remote and can be discounted.''
  
====AD-DC Power Supply Component ratings====
+
====AD-DC Power Supply component ratings====
  
 
Max operation output of circuit = 20mA
 
Max operation output of circuit = 20mA
  
Max extreme output of circuit = 30mA - AC voltage sample will be affected and MCP1702 could overheat if ambient temperature is 40-50 degrees. 30MA should only be drawn for short periods. Eg SFR radio Tx'ing.
+
Maximum output of circuit = 30mA. The AC voltage sample will be affected and the MCP1702 could overheat if ambient temperature is 40-50 degrees. 30mA should be drawn only for short periods. E.g. SRF radio Transmitting.
  
  
'''Do not try to draw more than 30mA. This will result in 3.3V rail significantly dropping and too higher current passing through 56R current limiting resistor. This will damage cause the resistor to heat up/burn out.'''
+
'''Do not try to draw more than 30mA. This will result in the 3.3V rail dropping significantly, and excess current passing through the 56R current limiting resistor. This will cause the resistor to overheat/burn.'''
  
  
Line 673: Line 673:
 
''Current limiting resistor: 56R R29.'' At worst case, lowest mains voltage and extreme current output: Average power dissipation: 222mW. 0.25W resistor will be ok.
 
''Current limiting resistor: 56R R29.'' At worst case, lowest mains voltage and extreme current output: Average power dissipation: 222mW. 0.25W resistor will be ok.
  
''Reservoir capacitor C18 47uF:'' should not see a higher voltage than 12V since the zener diode will clamp the voltage 12v. A capacitor rating of 16V will be more than enough.
+
''Reservoir capacitor C18 47uF:'' should not see a higher voltage than 12V since the zener diode will clamp the voltage to 12V. A capacitor rating of 16V will be more than enough.
  
 
''De-coupling 1uF capacitor C17 voltage rating: ''
 
''De-coupling 1uF capacitor C17 voltage rating: ''
The transformer is ground referenced, the other side referenced to 1.65 V – so 6.3 V should be plenty.  The alternating component of the voltage should be very small, else we have phase shift problems. [The major part of the 12 V will appear across the divider chain, R13 + R14.]
+
The transformer is ground referenced, the other side referenced to 1.65 V – so 6.3 V should be plenty.  The alternating component of the voltage should be very small, else we have phase shift problems. [The major part of the 12V will appear across the divider chain, R13 + R14.]
 +
 
 +
''Zener diode'' - 12V MCP1702 over voltage protection 106mW average - not needed since MCP1754 is used and can handle 16V input
  
''Zener diode'' - 12V MCP1702 overvoltage protection 106mW average - not needed since MCP1754 is used and can handle 16V input
+
Update V3.4.5: Swap to LDK320ADU33R with a max input voltage of 18V since at highest mains voltage 16V max input of MCP1754 was being exceeded**
  
 
==Open-Hardware Design Files==
 
==Open-Hardware Design Files==
Line 692: Line 694:
 
===Ideas for Future Versions===
 
===Ideas for Future Versions===
  
* Add resistor divider (470K/1M with [http://www.dsplog.com/2012/05/06/thermal-noise-rc-low-pass-filter/ 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?
+
* Add resistor divider (470K/1M with [http://www.dsplog.com/2012/05/06/thermal-noise-rc-low-pass-filter/ low value cap to GND]) for battery voltage monitoring into a free ADC input, although there are no free ADC's! Maybe it could be jumpered to ADC0 since AC-AC will not be used when a battery is present.
  
 
* Check optimal SMA antenna tuning PCB trace
 
* Check optimal SMA antenna tuning PCB trace
Line 706: Line 708:
 
===Enclosure & Fascia CAD Design===
 
===Enclosure & Fascia CAD Design===
  
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 [http://openenergymonitor.blogspot.co.uk/2012/05/embodied-energy-of-electronic-enclosure.html blog post] investigating the embodied energy of casing materials.
+
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 initial embodied energy of aluminium is greater than plastic, but recycling aluminum uses less energy than recycling plastic. See our [http://openenergymonitor.blogspot.co.uk/2012/05/embodied-energy-of-electronic-enclosure.html blog post] investigating the embodied energy of electronics enclosure materials.
  
 
The emonTx V3 fascia design CAD files are available here: [http://www.thingiverse.com/thing:209267 Thingiverse Download]
 
The emonTx V3 fascia design CAD files are available here: [http://www.thingiverse.com/thing:209267 Thingiverse Download]
Line 724: Line 726:
 
==Environmental & Life Cycle==
 
==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 are passionate about sustainability and are aware of the embodied energy and use of resources involved in electronics manufacturing. 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 [http://openenergymonitor.blogspot.com/2013/08/ethical-and-sustainable-electronics.html blog post we wrote on the topic ].  
 
* We have recently been inspired by a few projects taking a lead in promoting and making steps towards Ethical and Sustainable Electronics, see our [http://openenergymonitor.blogspot.com/2013/08/ethical-and-sustainable-electronics.html blog post we wrote on the topic ].  
Line 730: Line 732:
 
* The emonTx V3 case was chosen since aluminium can be easily recycled, see our [http://openenergymonitor.blogspot.com/2012/05/embodied-energy-of-electronic-enclosure.html blog post considering the embodied energy involved]
 
* The emonTx V3 case was chosen since aluminium can be easily recycled, see our [http://openenergymonitor.blogspot.com/2012/05/embodied-energy-of-electronic-enclosure.html 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 PCBs are manufactured in the UK by a manufacturer who uses lead free techniques, complies to the highest environmental industry standards and is actively investing in techniques and equipment to reduce waste 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.
+
* The assembly is done in the UK. All components are 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.
 
* 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 [http://openenergymonitor.blogspot.com/2013/10/aa-battery-considerations.html blog post]
+
* We have strived to reduce electrical energy consumption in our hardware to be as low as possible and recommend the use of green, rechargable batteries, see [http://openenergymonitor.blogspot.com/2013/10/aa-battery-considerations.html blog post]
  
 
==Disclaimer==
 
==Disclaimer==

Latest revision as of 18:52, 30 September 2019

emonTx V3.2

For new (2015) emonTx V3.4 see wiki page: EmonTx_V3.4

The emontx v3 is a Low Power Wireless Energy Monitoring Node designed to monitor AC electrical power of four separate (household/building) circuits using non-invasive clip-on CT sensors and an AC-AC Voltage adaptor to provide a voltage signal for Real Power calculations.

emonTx V3 Setup emonTx V3 PCB emonTx V 3 PCB assembled

Features

  • emonTx v3 can measure apparent power, real power*, power factor*, RMS voltage* and current on four mains circuits
  • temperature and humidity sensing
  • Pre-assembled SMT design
  • A single AC-AC adapter can be used to power the emonTx V3 and provide AC voltage measurement
  • 4x CT current sensing inputs
  • On-board 3x AA battery option
  • Flexible choice of RF radio module and removable microcontroller
* when AC-AC voltage adapter is connected

Port Map

emonTx V3.2

emonTx V3 Ports emonTx V3 IO emonTx V3 Port map

Overview

Using an ATmega328 microprocessor, the emonTx V3 runs standard Arduino sketches. Custom sketches are uploaded using the Arduino IDE and a USB to UART cable.

Data from the emonTx V3 is transmitted via a 433/868MHz radio to an emonBase, a web-connected base-station (we recommend a Raspberry Pi with an RFM12Pi) which then posts the data to an emoncms server (e.g. emoncms.org) for logging, processing and graphing.

The main board of the emonTx V3 is pre-assembled, requiring the addition of the RFu328 and an optional battery holder to get up and running. However, if the 'fully-built' option has been selected in the emonTx v3 Bundle Builder, the emonTx will ship with the Rfu328 and firmware installed. If this is the case, skip to step 3 below.

Power Supply Options

There are four ways to power the emonTx v3:

  1. USB to UART cable - recommended for short periods only, e.g. while programming. We recommend removal of all other power sources.
  2. 5V DC Mini-USB cable - remove jumper JP2 when powering via DC, if AC adapter is present
  3. 3 x AA Batteries - remove jumper JP2 when powering via DC, if AC adapter is present
  4. 9V AC-AC power adapter - with jumper JP2 closed (If jumper 2 is left open 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 a Power Factor of 1, and Vrms to be 230V. Power saving mode will be implemented, i.e. the unit will go into sleep mode between readings (default every 10s) to conserve battery power.

The red LED indicator will illuminate for a couple of seconds then extinguish never to flash again, if power is 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 been removed. Press the reset button if that 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 while simultaneously providing an AC voltage sample. If the emonTx v3 detects the presence of an AC adapter at startup, it will automatically take 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 sample for reference enables the emonTx to monitor the direction of the current flow. This is important for PV system monitoring. If you notice a negative reading when you were expecting a positive one, detach the CT from the wire, flip it 180 degrees, and re-attach it to the wire. The red indicator LED will flash at startup then flash once every 10's to indicate an AC waveform has been detected. Sleep mode will be disabled to maintain a consistent power draw on the AC circuit.

Important note regarding powering with AC: Only recommended for standard emonTx operation without auxiliary sensors (apart from a max of 4 DS18B20 temperature sensors) or equipment (e.g. relay modules) connected. Correct operation via the AC supply is critically dependant upon using the correct AC-AC adapter. If you are using the recommended adapter, the current draw exceeds 10 mA, and mains voltage is below the allowed minimum, circuit operation will be impaired adversely affecting the accuracy of the emonTx. To avoid damage to the emonTx v3 circuits the current drawn from the AC circuit should never exceed 60mA - see the technical wiki for more info. If more than 10mA of current is required, it is recommended to remove jumper 2 (JP2) and power the emonTx via the 5V USB connector. If an AC-AC adapter is connected it will be used only to provide an AC sample when JP2 is removed.

Uploading Arduino Firmware

Compiling and Uploading using Arduino IDE

The emonTx v3 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:

Setting up the Arduino Programming Environment

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.

GitHub can be used to make sure you have the latest version:

$ git clone https://github.com/openenergymonitor/emonTxFirmware.git $ cd emonTxFirmware/emonTxV3/RFM12B/emonTxV3_RFM12B_DiscreteSampling

Linux : use AVRdude

$ 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

Windows: you might be able to use the the XLoader application to upload .hex files (we have not tested this. Please update the wiki if you have)

Flashing the Bootloader

Should not be required

The OptioBoot Arduino Uno serial bootloader should already be loaded on the ATmega328 chip. If however, for some reason you need to re-upload the bootloder and set the fuses, here's how it's done:

The stock emonTx firmware can be downloaded in pre-compiled .hex form, including the bootloader, from github, look for a .hex file with the word bootloader in the title, on the emonTx V3 GitHub.


The .hex file can be flashed, and the fuses set, on the ATmega328 using the following avrdude command:

$ sudo avrdude -v -p atmega328p -c avrispmkII -P usb -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m -U flash:w:emonTxV3_4_RFM12B_DiscreteSampling_bootloader.cpp.hex:i  -Ulock:w:0x0F:m

or, to speed things up:

$ sudo avrdude -V -u -p atmega328p -c avrispmkII -P usb -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m -U flash:w:emonTxV3_4_RFM12B_DiscreteSampling_bootloader.cpp.hex:i  -Ulock:w:0x0F:m

If you want to read the data from the ATmega328, e.g to make a backup, execute the following command:

 $ avrdude -v -p atmega328p -c avrispmkII -P usb -U flash:r:test_intel.hex:i

Arduino Firmware Info

See GitHub readme for firmware info:

All emonTx v3 firmware is available on Github:emonTxFirmware

All pre-assembled emonTx v3s are shipped with emonTxV3_RFM12B_Discrete Sampling firmware. This is the main firmware for the emonTx v3 and has been tested and the device calibrated based on nominal component values. If better accuracy is required, and facilities are available, the unit should be re-calibrated to take account of variations present in the components used. You will need access to a programmer to reload the sketch. If you ordered an emonTx v3 without a radio module, no firmware will be loaded, although a bootloader will be present. You will need access to a programmer to load a sketch.

The emonTxV3_RFM12B_Discrete Sampling firmware has the following features:

  • Detection of AC-AC adapter sets Apparent Power / Real Power Sampling mode
  • Detection of battery / USB 5V or AC > DC power method and sets sleep mode
  • Detects connected CTs, and samples only from the connected sensors
  • Detection of remote DS18B20 temperature sensor

[Note: Detection of connected sensors occurs at power-on. The sketch must be re-started (press the reset button) if changes are made to the input connections, i.e. sensors are connected or disconnected after power-on]

The emonTxV3_RFM12B_Discrete Sampling firmware samples 10 full AC cycles, i.e. 200ms per measurement per CT. Within this measurement, samples are taken at the rate of approximately 2500 per second. It is assumed the power does not vary significantly during the time the emonTx is in sleep mode, which is usually sufficient for household monitoring. If greater precision is required, (as is the case with PV Power Diversion we recommended you use PLL continuous sampling. See the RFM12B firmware examples folder on GitHub.

Standard Operation

CT Energy Monitoring

Single Phase

By default, all OEM sketches are intended for monitoring a single phase system. All sketches are available on GitHub.

The "Discrete Sampling" sketch is suitable for general purpose use, including installations where the emonTx is powered by batteries. However, advanced sketches are available under "Examples" including a sketch for 3-phase installations, "Continuous Sampling" (useful where there is a rapidly switched load, for example), pulse input, etc.

The theory behind the calculations is explained in the "Building Blocks" section.

Three-Phase

Because the emonTx has only one voltage sensing input, it is not possible to accurately measure 3-phase power with a single unit. However, if the voltage balance between the phases is accurately maintained (i.e. the supply has a relatively high fault level), it is possible to measure the voltage of the first phase and use this to calculate a reasonable representation of the voltages on the second and third phases, that can then be used to calculate the real and apparent power on the other two phases. A sketch that does this is emonTxV3_3Phase_Voltage

The "emonTxV3_3Phase_Voltage" sketch works by sampling the Phase 1 voltage as normal, but the values are stored in a circular array. One third of a cycle later, the stored value is read and used to calculate the real power in Phase 2. Two thirds of a cycle later, the stored value is read again and used to calculate the real power in Phase 3. Unfortunately, because the samples do not align exactly with the desired points on the second and third phases, it is necessary to interpolate between samples. When commissioning this sketch, it is essential to follow the calibration procedure in the comments.

Further information about 3-phase supplies can be found in "Building Blocks".

Accuracy

Like any other device assembled using components from a variety of sources, the values that the emonTx reads are subject to normal manufacturing tolerances. These have been analysed in detail in Building Blocks.

It is very important to note that the 'worst-case' error is exactly that, the maximum error possible if every component has the greatest possible error, and all errors add up in the worst possible way. The worst case is very unlikely to occur in practice. Most components are closer to their nominal values than their 'worst-case' values, and some of the errors will cancel each other. With careful calibration, some users claim their emonTx is reporting energy consumption within 1% of the value recorded by their energy supplier's meter.

Extended Operation

Temperature Monitoring

A DS18B20 digital temperature sensor can easily be connected to the emonTx v3 by connecting the sensor to the screw terminal block. The default firmware supports auto-detecting one DS18B20 sensor. Many DS18B20s can be daisy-chained, but this will require changes to the pre-installed emonTx firmware. You may also run into power consumption issues depending on how you are powering the emonTx (see Power Supply Options above).

In order to conserve battery power, the emonTx v3 switches off the DS18B20 between readings, and executes the temperature conversion routine while the ATmega328 is sleeping. To do this, power (3.3V) is supplied to the DS18B20's power pin from Dig19/ADC5. This digital pin is switched off between readings. The data connection from the DS18B20 is connected to Dig5. This I/O pin has a 4K7 pull-up resistor connected to the 3.3 V rail as required by the DS18B20.

To connect an external DS18B20 to the emonTx v3 screw terminal block, connections are as follows:

DS18B20 emonTx V3 screw terminal connections
Screw terminal pin DS18B20 Connection
3 - GND GND (Black)
5 - Dig19 Power (Red)
6 - Dig5 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 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 fixed amount of energy passing through the meter (kWh/Wh). For single-phase domestic electricity meters (e.g. Elster A100c) each pulse usually corresponds to 1 Wh (1000 pulses per kWh). Water and gas meters are typically marked to show the quantity of water (liters/gallons), or gas, (cubic meters/cubic feet) 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

The emonTx V3 pulse counting example sketch calculates the power by the measuring the time between pulses.

Read more about pulse counting on the OpenEnergyMonitor Buillding Block pages here


emonTx v3 Hardware Connections

Connect the pulse input to 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 to PCB (R31) If you are using an optical counter (e.g TSL257), you should connect the power pin to 3.3V or 5V (if running off 5V USB)

emonTx V3 pulse-counting screw terminal connections
Screw terminal pin Connection
1 5V (if powered via 5V USB)
2 3.3V
3 GND
4 IRQ 0 / Dig2

When used for pulse counting operation, we recommend powering the emonTx v3 from the 5V mini-USB connector, or the AC-AC adapter. The additional power consumed by the optical pulse sensor will significantly reduce battery life, compared to CT-only operation.

Direct Optical Interface

if you have an Elster meter, (tested with an Elster 100C) the emonTx V3 with an IR TSL261R sensor, can be used to interface directly with the meter to read the accumulated watt hours you have generated or consumed. This reading can be used on its own or to cross-check and calibrate CT based measurement. See here for original blog post

Connectivity

OpenEnergyMonitor was designed to use a low power radio to transfer the readings from the Sensor Node to the base station. This uses less power and has longer range than wifi.

RF Connectivity

RFM12B

The Rfu328 sold through the OpenEnergyMonitor shop is setup for use with the RFM12B. Make sure you solder the RFM12B with the correct orientation if fitting 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 the GitHub readme for details regarding the modifications. Using the RFu_JeeLib, the RFM12B on the RFu348 can be used exactly as before, i.e. all code written for the emonTx V2, JeeNode, etc should work fine using using the RFu_JeeLib library.

SRF

A Ciseco SRF module can 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, an SRF module can be used on the RFu328 purchased from the OpenEnergyMonitor shop with a small modification. The RFu328 sold through the OpenEnergyMonitor shop comes setup for use an RFM12B. To use it with the SRF module, you'll need to remove one SMT resistor and rotate another by 90 degress. Follow these instructions from Ciseco IN REVERSE!

Due to higher power requirements, it is not possible to power the emonTx v3 from an AC adapter when using an SRF module. When an SRF module is used, the board should be powered via DC and the jumper removed see #Electrical Characteristics - Absolute min / max for power ratings.

Antenna

By default, the emonTx V3 is shipped with a wire whip antenna. Our tests have shown a wire whip performs best. See our test data below:

EmonTx ant test photo.jpg emonTx Test Graph

All antennas and RFM12B modules were 433MHz running standard emonTx discrete sampling firmware, transmitting once very 10s. Each emonTx was given a unique node ID (7-10) to enable transmission identification.

An RFM69CW receiver provided RSSI readings to enable antenna comparison. The RSSI readings were all lower than normal since the RFM69CW used is an 868MHz module, with an 868MHz antenna, forced via software, to a 433MHz receive frequency.

The emonTxs with the SMA antenna had the RFu328 soldered directly (SMT) to the PCB, the coil and whip antenna had the RFu328 mounted using headers


SMA Antenna

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 feedline and remote whip antenna. The whip can be a real lifesaver for installations with difficult RF considerations e.g. thick stone walls, no direct line of sight.

Adding an SMA antenna

Ideally, the RFu328 should be soldered directly to the emonTX via the SMT pads when using an SMA connector, (as shown in the photo below) as this connects the antenna pad on the RFu238 directly to the emonTx PCB antenna track which is connected to the SMA connector.

RFu328 SMT SMA

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'll need to connect the RFu328 antenna pad to the antenna pad on the emonTx with a small wire jumper. The wire jumper and the two pads which need to be connected are shown by the red line in the photo below.

RFu328 Headers showing jumper for SMA


SMA antenna options for emonTx V3
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 / 2DB 2305893 / 2096220 / 2133440 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

Wired Connectivity

Whilst the system was designed to transfer data via radio, it is possible to link the emonTx and RaspberryPi by wires. Note: this is NOT the standard setup.

Direct connection - emonTx v3 to Raspberry Pi GPIO

Both the Raspberry Pi and emonTx v3 run at 3.3V, so the serial data Receive and Transmit lines can be directly connected. the 5V power rail from the Raspberry Pi can be supplied to the emonTx which is then limited to 3.3V by the emonTx v3 voltage regulator. 5V is provided by the red wire (see photo). The ground connection is the black wire, the serial data from the emonTx is the green wire. Wire for serial data traveling the opposite direction i.e. Pi to emonTx, has not been connected in this example, but can be added if two way communication is required.

Emontx to pi serial emonTx Pi direct connection


See here for detailed emonTx/Raspberry Pi direct serial interface documentation

Electrical Characteristics - Absolute min / max

emonTx V3 Datasheet
Function Parameter Min Recommended

Max / typical

Absolute Max

damage possible if exceeded

Notes
CT 1-3 Monitoring Power @ 240V 23kW / 95.8A 60kW / 250A Using 22R burden and YHDC SCT-013-00 with 22 turns
CT 4 Monitoring Power @ 240V 4.5kW / 19.2A 4.6kW max measure – 19.7kW / 82A Max dissipation Using 120R 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
Operating Temperature Temperature -40C +40C +85C
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
Power Consumption RFM12B @3.3V 0.034 mA (MCU sleep + RFM12B sleep) 7.3mA (MCU running) 9-10mA (MCU + LED), 23-28mA for 3ms RFM12B tx With ATmega328, RFM12B and 1 CT connected
Power Consumption SRF @3.3V 0.032 mA (MCU sleep + SRF sleep II) 7.4mA (MCU running, SRF sleep II) 31.24mA (MCU running, SRF awake) With ATmega328, SRF 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.

Design Calculations

Burden Resistor Calculations

Using SCT-013-000 with 2000 turns with 100A max primary: http://www.yhdc.com/cn/product/25/

CTs 1-3 have a 22R burden resistor, and can measure up to 97A (23.3kW @ 240V) using a YHDC SCT-013-00 CT which has 2000 turns.

CT 4 has a 120R burden and can measure up to 19.16 A (4.6kW max @ 240 V)


Using an SCT-016-000 with 6060 turns, at 200A max primary the recommended burden is 33R, which gives a max current rating of 214A

Using an SCT-006-000 with 533 turns, at 20A max primary the recommended burden is 30R, which gives a max current rating of 20.7A

Calculate resistor values using: https://tyler.anairo.com/projects/open-energy-monitor-calculator

The higher the burden resistance, the smaller the measurement range, the higher the low end accuracy will be. Burden resistors should be +/- 1% tolerance.

Is^=Ip^/turns = Irms x sqrt(2)/turns

Rb= (AREF/2) / Is^ = AREF / 2Is^

Rb= (AREF * turns) / (2*IpRMS x sqrt(2))

Pmax=(240 * AREF * turns) / (2 *sqrt(2) * Rb)


Rb (100A , 24kW @ 240V) = 3.3*2000 / 2 x 100 x sqrt(2) = 23.3 Ohm

Closest value = 22R or 24R

Using 22R yields a Pmax of 23.3kW (97.1A) which is close enough to 100A. Measurements at 97-100A will be poor since the CT starts to saturate.

Pmax=(240 * 3.3 * 2000) / (2 *sqrt(2) * 22) = 23.3kW


Rb (16.7A , 4kW @ 240V) = 3.3*2000 / 2 x 16.67 x sqrt(2) = 23.3 O = 139.9 Ohms

Closest value = 120R or 150R

A 120R burden yields a max rating of 19.16A or ~4.6kW @ 240V

If the power level goes above the CT max rating, the voltage will go above 3.3V and the ATmega328’s ADC will be saturated. A 1K series resistor is used to limit input current to the ATmega. The ATmega 328’s internal clamping diodes will safely limit the voltage, preventing damage. http://openenergymonitor.org/emon/node/171

CT inserted indication

On the emonTx v3 design, a switched jack is utilized to provide a clear indication if a CT is connected or not. When a 3.5mm plug is NOT inserted pin 3 is connected to pin 2 and pin 4 is connected to pin 5 as shown in the diagram below. Pin 4 has been connected to GND so when no CT is connected, the ADC will sense 0V.

When a 3.5mm plug is inserted, the connection between pins 4 & 5 is broken and the CT channel will operate normally.

emonTx V3 Setup

This method increases quiescent power consumption slightly since 3.3V will be connected to GND through a 470K resistor when no CT is connected. This will introduce a current drain of 7uA per channel, so a maximum of total of 21uA on the board (assuming at least 1 CT is always connected). See Quiescent power consumption section.

Burden resistor and capacitor power and voltage ratings

From testing results the maximum current in the secondary at saturation (primary current 250A – 60kW! @ 240V) is 85mA (RMS)


CT 1-3 (up to 23.3kW) use a 22R resistor. The max voltage through the burden at CT saturation will be 1.87V (measured by Robert to be 1.5V RMS). The max power the 22R burden will need to dissipate at CT saturation is 159mW


CT 4 (up to 4.6kW) uses a 120R resistor. Although this channel is rated for a maximum of 4.6kW, we can’t stop it from accidentally being used to make a measurment above that power level. Components should be rated for saturation. The max voltage through burden at CT saturation will be 10.2V (measured by Robert to be 5.2V rms). The max power the 120R burden will need to dissipate is 867mW.


However, the emonTx will be specced for domestic use. In the UK, the maximum rated fuse/RCB is 100A, most new builds are 80A. Therefore we can safely spec the emonTx for 100A max.


The current in the secondary at 100A is 50mA (RMS).

Max voltage in CT 1-3 22R burden = 1.1Vrms (measured by Robert to be 0.935 Vrms)

Max power in 22R CT = 55mW


Max voltage in CT 4 120R burden = 6V (measured by Robert to be 3.9 V rms)

Max power in 120R burden = 300mW

If a 0.25W resistor was used, the maximum current in the secondary would be 42mA. This equates to 82A or 19.7kW. CT4 will be physically removed from CT1-3 and clearly marked as 4.6kW max. Ideally, a red 3.5mm socket will be used to clearly identify.

Therefore the actual max power will be around 175mW. That gives a good margin.

Conclusion: 0.25W burden and 6V capacitor will be suitable ratings. A 0606 X5R 10uF 6.3V filtering capacitor can be used


Given testing results these values have been shown be to conservative, testing results are:

  • 100 A, 22 R: Burden voltage = 0.935 Vrms, 2.612 V peak-peak
  • 100 A, 120 R: Burden voltage = 3.89 Vrms, 12.07 V peak-peak
  • 250 A, 22 R: Burden voltage = 1.498 Vrms, 5.626 V peak-peak
  • 250 A, 120 R: Burden voltage = 5.194 Vrms, 21.9 V peak-peak

Max power is thus 225 mW (120 R) or 102 mW (22 R)

These are the maximum RMS voltages that can be developed. If 250 mW resistors are used, the actual power is comfortably inside the rating.

Power Supply

DC

The emonTx v3 has been designed to accept power via 5V USB, 3x AA batteries, FTDI connection, Aux input from terminal blocks or from AC power adapter via an AC-DC half-wave power suply.

Only one of the available power sources should be used. DO NOT MIX POWER SOURCES.

In order to keep quiescent power loss to a minimum, a SOT32 MCP1700 LDO regulator was chosen for battery, USB 5V and FTDI power (5V) operation. The max input is 6V which is fine for battery (3 x AA) and USB operation. The MCP1700 has lower quiescent power consumption than the MCP1702 used in the AC-DC half-wave supply.


Powering from 5V USB (MCP1700 SOT22) Thermal Calculations Max voltage drop required = 5.25-3.3=1.95V

Thermal resistance junction to ambient (JA) for MCP1700 SOT23A = 230 degrees C/W (from datashet)

Max case temperature = 150 degrees (from datasheet)

I max = (T case max – T ambient max)/thermal resistance (JA) / delta V max

I max (SOT23A) = ((150-40)/336)/1.95V = 168mA (for SOT23A)


The emonTx v3 does not support battery charging. Please ensure batteries are removed before connecting USB or FTDI power.

AC-DC

For Power supply design circuit design, see blog posts: [[1]] ][2]]

For emonTx V3 power supply specifications, see: #Electrical Characteristics - Absolute min / max

All calculations assume a YHDC 013-000 CT and Ideal Power 9C AC-AC adapter 77DE-06-09-MI / 77DB-06-09-MI


An SOT89 MCP1754 LDO regulator is used in the the AC-DC power supply circuit. The MCP17542 maximum input is 16 Volts. The larger SOT89 package is needed to dissipate the heat. The 47uF capacitor stores enough energy to see us through half wave cycles. See section below for more info on AC-DC half wave operation.

The calculations below were first done for the MCP1702. This LDO reulator was swapped for the MCP1754. The MCP1754 was used in production version 3.2. See below for thermal calculations.


Powering from AC-DC half wave (MCP1702 SOT89) - old, not used in production

Thermal resistance junction to ambient (JA) for MCP1702 SOT-89 JA=52 degrees C/W (from datasheet)

Max case temperature = 150 degrees (from datasheet)

Imax = (T case max – T ambient max)/thermal resistance (JA) / delta V max


At 12Vrms (max output of 9V AC-AC at max mains voltage)

ΔB = 12-3.3 = 10.7V

Imax (SOT-89) = ((150-40)/52)/10.7V = 21.6-19.7mA (30C – 40C ambient) worst case – max mains voltage and 50 degree ambient – max output = 18mA)


At V=10.4Vrms (output of 9V AC-AC at typical mains voltage)

ΔB = 10.4-3.3 = 7.1V

Imax (SOT-89) = ((150-40)/52)/7.1V = 32.5-29.7mA (30C – 40C ambient)


At V=8.77Vrms (output of 9V AC-AC at min mains voltage)

ΔB = 8.77-3.3 = 3.62

Imax (SOT-89) = ((150-40)/52)/3.62V = 63.7-58.4mA (30C – 40C ambient)


Assume maximum possible continuous current supplied by MCP1702 from the AC-DC half-wave supply to be 18-20mA.


Powering from an AC-DC half wave supply (MCP1754 SOT89) - new, used in production v3.2


Thermal resistance junction to ambient (JA) for MCP1702 SOT-89 JA=153.3 degrees C/W (from datasheet P.22)

Max case temperature = 150 degrees (from datasheet)

Imax = (T case max – T ambient max)/thermal resistance (JA) / delta V max


At 12Vrms (max output of 9V AC-AC at max mains voltage)

ΔB = 12-3.3 = 10.7V

Imax (SOT-89) MCP1754 = ((150-40)/153.3)/10.7V = 67 mA (40C ambient)

worst case – max mains voltage and 50 degree ambient – max output = 61mA )


At V=10.4Vrms (output of 9V AC-AC at typical mains voltage)

ΔB = 10.4-3.3 = 7.1V

Imax (SOT-89) MCP1754 = ((150-40)/153.3)/7.1V = 101 mA (40C ambient)


At V=8.77Vrms (output of 9V AC-AC at min mains voltage)

ΔB = 8.77-3.3 = 3.62

Imax (SOT-89) MCP1754 = ((150-40)/153.3)/3.62V = 198 mA (40C ambient)


Using the MCP1754 with its higher thermal rating means the current limiting resistor dissapation rating is now the bottleneck to how much current can be drawn from the supply.

Robert Wall: AC-DC supply might not work (ripple will be unacceptable) if it is connected to a remote socket also serving a high current load at lowest mains voltage. However, the possibility this particular combination of circumstances will happen in practice is extremely remote and can be discounted.

AD-DC Power Supply component ratings

Max operation output of circuit = 20mA

Maximum output of circuit = 30mA. The AC voltage sample will be affected and the MCP1702 could overheat if ambient temperature is 40-50 degrees. 30mA should be drawn only for short periods. E.g. SRF radio Transmitting.


Do not try to draw more than 30mA. This will result in the 3.3V rail dropping significantly, and excess current passing through the 56R current limiting resistor. This will cause the resistor to overheat/burn.


Halfwave rectifier diode D1: Worst case at highest mains voltage and extreme current output: 30mW average

Current limiting resistor: 56R R29. At worst case, lowest mains voltage and extreme current output: Average power dissipation: 222mW. 0.25W resistor will be ok.

Reservoir capacitor C18 47uF: should not see a higher voltage than 12V since the zener diode will clamp the voltage to 12V. A capacitor rating of 16V will be more than enough.

De-coupling 1uF capacitor C17 voltage rating: The transformer is ground referenced, the other side referenced to 1.65 V – so 6.3 V should be plenty. The alternating component of the voltage should be very small, else we have phase shift problems. [The major part of the 12V will appear across the divider chain, R13 + R14.]

Zener diode - 12V MCP1702 over voltage protection 106mW average - not needed since MCP1754 is used and can handle 16V input

Update V3.4.5: Swap to LDK320ADU33R with a max input voltage of 18V since at highest mains voltage 16V max input of MCP1754 was being exceeded**

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

emonTx V3 BOM

The circuit schematic and pcb layout files are available on GitHub, see: https://github.com/openenergymonitor/Hardware/tree/master/emonTxV3/emonTx_V3.2

Ideas for Future Versions

  • Add resistor divider (470K/1M with low value cap to GND) for battery voltage monitoring into a free ADC input, although there are no free ADC's! Maybe it could be jumpered to ADC0 since AC-AC will not be used when a battery is present.
  • Check optimal SMA antenna tuning PCB trace

Physical Dimensions

PCB: 100mm x 80mm

emonTx V3 Dimensions

Download: Extruded Aluminium Case Datasheet

Enclosure & Fascia CAD Design

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 initial embodied energy of aluminium is greater than plastic, but recycling aluminum uses less energy than recycling plastic. See our blog post investigating the embodied energy of electronics enclosure materials.

The emonTx V3 fascia design CAD files are available here: Thingiverse Download

DIN Rail Mount

Thanks to @Aquefot for contributing a DIN mount rail fitting CAD design ready to be 3D printed for the emonTx: Thingiverse Download

License

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 electronics manufacturing. 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 PCBs are manufactured in the UK by a manufacturer who uses lead free techniques, complies to the highest environmental industry standards and is actively investing in techniques and equipment to reduce waste 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 done in the UK. All components are 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 reduce electrical energy consumption in our hardware to be as low as possible and recommend the use of green, rechargable batteries, see blog post

Disclaimer

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.