Hi,
This thread follows on from another with a rather unspecific title, aiming to "divert" surplus electricity from Solar PV panels into heating a Hot Water Tank. There, the solution adopted a method described in an excellent PICaxe Finished Project from 2009 with a very relevant title. The WARNING is particularly appropriate because the implementation involves making electrical connections not just to mains voltages, but at and around the "Consumer Unit", Mains Distribution Board or Fusebox, etc., which might not be protected even by an isolating switch or circuit breaker.
Therefore, even some commercial manufacturers now balk at that practice and have adopted a wireless (radio) architecture. Also, in the 13 years since that original thread began, a number of new systems and methods have evolved, for example PV Battery Storage, multiple (stratified) heating elements in the Hot Water Tank, Electric Vehicle charging, "Off-Peak" control of Refrigeration and now (in UK) perhaps Air Conditioning, etc.. However, the (direct) "restriction" of power to Washing Machines, Microwave Ovens and similar heating devices may not be practical, either because the heating is required "immediately", or because their Timer might "forget" the present stage of their operating sequence. Also sometimes, "Low Frequency" power-cycling (i.e. neither true "PWM" nor overall On/Off control) is used in "heating" systems, for example a thermostatic (soldering) iron or Microwave Oven (to control the Temperature or average Power Level), might conflict with the operation of the PV energy diversion system.
Thus the primary purpose of this tentative project is to measure "continuously" if (and how much) electricity is being Imported or Exported from/to the "National Grid", and to broadcast sufficient data to allow other devices (or Users) to make an "informed decision" about their (short-term) power consumption. As described in my comments from paragraph 2 in post #30 linked above (and a few before and after), the first aim is to learn from and adapt the methods used by some products already in the market place. In particular, "Harvi" from myenergi who appear to be at the forefront of the technology, and have made available several useful documents. The particular features of interest here are that their sensor module (Harvi) simply clips a standard Current Transformer onto a "meter tail", not just to monitor the current flow, but also to "Harvest" the power needed to run the microcontroller and to operate the Radio Transmitter, etc.. Therefore, I will begin with a theoretical / mathematical analysis of some of the practical issues, such as the Power Budget, Computing Budget, Realistic Accuracy and Components Inventory, etc..
The development of any Wireless (Radio) system should start with (at least) two questions : Is it Legal? and Where does its Power come from? I had already decided that the "most suitable" frequency would be in the 868 MHz "ISM" (Industrial, Scientific and Medical) Band, so it's encouraging that this was also chosen for Harvi. The band is "License Exempt", but NOT "Regulations Free", however here the restrictions can actually help us with the design process. In many countries the Transmitted Power is limited to typically 10 - 20 mW (13 dBm) and sometimes to a (Transmitting) "Duty Cycle" as low as 1% (averaged over a period of maybe one minute). This leads us to the Power Budget: An "acceptable" wire-less power supply could be typically 2 x AA cells, to be replaced approximately once every year, giving an average current drain of around 2.5 Ah / 10,000 hours = 250 uA. A first estimate is that Energy Harvesting from the monitoring Current Transformer could be a little higher than this.
Power Budget :
For now, I'll assume a minimum average "primary" mains power drain of 1 Amp (as quoted for Harvi) , i.e. 230 watts, or a "house" consumption of around 6 kWh/day. However, a "flaw" in this estimation is that a primary purpose of the project (particularly when a storage Battery is included in a Solar PV system) is to absolutely minimise the energy Imported or Exported (i.e. via the electricity meter/tails). My personal target for a "good" day is to neither import nor export more than 1 kWh, which blows a hole in this power harvesting budget. But for many other days, particularly in mid Winter/Summer, the average current may be far higher, so one solution is to employ a rechargeable battery in the power supply (typically the size of a few NiMH AA cells, or an equivalent Lithium battery) to average the available power over a much longer period (perhaps months). Another method (hinted in the Harvi specification) could be to connect a ~10uF "Motor Start" type capacitor across the mains (possibly in the Immersion Heater Controller) which would drain a "reactive" 1 Amp a.c., but cause NO power consumption or dissipation. This method would need to be reviewed if Smart Meters are ever modified to measure the "VA Product" instead of Real Power and seems to be a good reason for avoiding a Smart Meter.
Another possibility is to add a second Current Transformer in a location where more current flows (for example the input to the Consumer Unit / Fusebox). The CTs are not cheap (the lowest I've found is 5 UKP upwards) but comparable to a mains transformer in a regulated power supply, whilst avoiding the need for any direct mains electrical connections. A second CT also potentially avoids the need to "switch" a single CT between Harvesting and Monitoring modes. Alternatively, a typical Solar PV system has at least three major current paths (PV Panels, Grid and House) so a second current sensor can give another value (from which the third current can be calculated). Therefore, my analysis will retain the capability of switching (at least) one CT to deliver both "Power" and "Data".
Thus, an estimated Power Budget is around 0.5 mA (with a 1 : 2000 turns ratio Current Transformer), but there are a few tricks which could increase this a little, if necessary. The Voltage available from the Energy Harvesting is not defined (yet), but my present target is for a "3 volt" main supply rail. This is ideal for a PICaxe, which can indeed operate with less than 0.5 mA (at a clock frequency of 1 or 2 MHz). However, the target is to use a 16 MHz clock (consuming around 2 mA and leaving some headroom if needed), but running at this frequency for only around 10% of the time (each second) and then "Sleeping" for the remaining period, i.e. an average consumption of about 200 uA.
Similarly, there are various "four-pin" ISM Transmitters available (usually 433 MHz) which for 20 mW output may drain around 25 mA, i.e. an average of 250 uA for a "compliant" 1% duty period. However, my (long term) preference is for an 868 MHz Transceiver module (such as the CC1101 or RFM69) both of which are ideal to use with a ~3 v supply rail and also consume around 25 mA when transmitting. Sadly, both of these modules require a 4-wire SPI Bus interface, however the intention is NOT to use either Bit Banging nor X2 commands, but dedicated PEEK/POKESFR byte commands, directly to the "silicon" hardware of the "base PIC" chip. Most of the other required hardware functions (ADC, Comparators, etc.) also should be available within the PICaxe, or perhaps in the Transceiver (Data Formatting and FIFO, etc.), but there is perhaps another surprising load consideration:
The Current Transformer needs to be loaded by a low impedance "Burden" resistor, usually below 100 ohms, to give 2 volts peak-peak (to the PICaxe ADC) from a maximum primary current of say 60 Amps rms (170 A pk-pk), i.e. 85 mA pk-pk in the CT secondary winding = 24 ohms. But to Harvest 5 volts (or hopefully more) at 0.5 mA, requires a parallel resistance of well above 10k ohms. The Burden resistance directly affects the accuracy so a very low resistance analogue (or "bilateral") switch is needed (ideally around 0.1 ohm). A traditional CD4016 4-channel Bilateral Switch has a typical resistance of 2,000 ohms (max, at 5 volts supply) and even the improved HC{T} 4066 derivatives are still around 60 ohms (or higher with a 3 volt rail). A few (in one 4066 package) might be connected in parallel, or there might be better (SMD) devices available, but all a "google" found me is still around 5 ohms. Then, two ADC inputs could perform a differential measurement across the Burden alone, which does offer some other potential benefits, but an easier method could be to use the contacts of a "mechanical" Relay :
A single-contact (pair) SIL miniature Reed Relay is smaller than a DIL package and can have a contact resistance of a little over 0.1 ohm, rated up to at least 108 operations (i.e. 3 years at 1 closure per second). This could be extended by switching the relay only when required, e.g. not overnight (when there is no PV to be measured), etc.. Of course the relay coil requires a significant current, but a 500 ohms relay has a "must operate" rating around 3.75 volts (i.e. 7.5 mA), which can then fall back to typically half of that, once the contacts are closed. The measurement period will be just over 20 ms for one mains cycle in each second, i.e. an average of <100 uA added to the power budget. A typical "latching" relay doesn't appear to offer much benefit over this; I do have an alternative trick but have reached the forum's 10,000 characters limit.
Therefore, I must pause here and will continue with details of the Computational methods and overall design, etc. in due course.
Cheers, Alan.
This thread follows on from another with a rather unspecific title, aiming to "divert" surplus electricity from Solar PV panels into heating a Hot Water Tank. There, the solution adopted a method described in an excellent PICaxe Finished Project from 2009 with a very relevant title. The WARNING is particularly appropriate because the implementation involves making electrical connections not just to mains voltages, but at and around the "Consumer Unit", Mains Distribution Board or Fusebox, etc., which might not be protected even by an isolating switch or circuit breaker.
Therefore, even some commercial manufacturers now balk at that practice and have adopted a wireless (radio) architecture. Also, in the 13 years since that original thread began, a number of new systems and methods have evolved, for example PV Battery Storage, multiple (stratified) heating elements in the Hot Water Tank, Electric Vehicle charging, "Off-Peak" control of Refrigeration and now (in UK) perhaps Air Conditioning, etc.. However, the (direct) "restriction" of power to Washing Machines, Microwave Ovens and similar heating devices may not be practical, either because the heating is required "immediately", or because their Timer might "forget" the present stage of their operating sequence. Also sometimes, "Low Frequency" power-cycling (i.e. neither true "PWM" nor overall On/Off control) is used in "heating" systems, for example a thermostatic (soldering) iron or Microwave Oven (to control the Temperature or average Power Level), might conflict with the operation of the PV energy diversion system.
Thus the primary purpose of this tentative project is to measure "continuously" if (and how much) electricity is being Imported or Exported from/to the "National Grid", and to broadcast sufficient data to allow other devices (or Users) to make an "informed decision" about their (short-term) power consumption. As described in my comments from paragraph 2 in post #30 linked above (and a few before and after), the first aim is to learn from and adapt the methods used by some products already in the market place. In particular, "Harvi" from myenergi who appear to be at the forefront of the technology, and have made available several useful documents. The particular features of interest here are that their sensor module (Harvi) simply clips a standard Current Transformer onto a "meter tail", not just to monitor the current flow, but also to "Harvest" the power needed to run the microcontroller and to operate the Radio Transmitter, etc.. Therefore, I will begin with a theoretical / mathematical analysis of some of the practical issues, such as the Power Budget, Computing Budget, Realistic Accuracy and Components Inventory, etc..
The development of any Wireless (Radio) system should start with (at least) two questions : Is it Legal? and Where does its Power come from? I had already decided that the "most suitable" frequency would be in the 868 MHz "ISM" (Industrial, Scientific and Medical) Band, so it's encouraging that this was also chosen for Harvi. The band is "License Exempt", but NOT "Regulations Free", however here the restrictions can actually help us with the design process. In many countries the Transmitted Power is limited to typically 10 - 20 mW (13 dBm) and sometimes to a (Transmitting) "Duty Cycle" as low as 1% (averaged over a period of maybe one minute). This leads us to the Power Budget: An "acceptable" wire-less power supply could be typically 2 x AA cells, to be replaced approximately once every year, giving an average current drain of around 2.5 Ah / 10,000 hours = 250 uA. A first estimate is that Energy Harvesting from the monitoring Current Transformer could be a little higher than this.
Power Budget :
For now, I'll assume a minimum average "primary" mains power drain of 1 Amp (as quoted for Harvi) , i.e. 230 watts, or a "house" consumption of around 6 kWh/day. However, a "flaw" in this estimation is that a primary purpose of the project (particularly when a storage Battery is included in a Solar PV system) is to absolutely minimise the energy Imported or Exported (i.e. via the electricity meter/tails). My personal target for a "good" day is to neither import nor export more than 1 kWh, which blows a hole in this power harvesting budget. But for many other days, particularly in mid Winter/Summer, the average current may be far higher, so one solution is to employ a rechargeable battery in the power supply (typically the size of a few NiMH AA cells, or an equivalent Lithium battery) to average the available power over a much longer period (perhaps months). Another method (hinted in the Harvi specification) could be to connect a ~10uF "Motor Start" type capacitor across the mains (possibly in the Immersion Heater Controller) which would drain a "reactive" 1 Amp a.c., but cause NO power consumption or dissipation. This method would need to be reviewed if Smart Meters are ever modified to measure the "VA Product" instead of Real Power and seems to be a good reason for avoiding a Smart Meter.
Another possibility is to add a second Current Transformer in a location where more current flows (for example the input to the Consumer Unit / Fusebox). The CTs are not cheap (the lowest I've found is 5 UKP upwards) but comparable to a mains transformer in a regulated power supply, whilst avoiding the need for any direct mains electrical connections. A second CT also potentially avoids the need to "switch" a single CT between Harvesting and Monitoring modes. Alternatively, a typical Solar PV system has at least three major current paths (PV Panels, Grid and House) so a second current sensor can give another value (from which the third current can be calculated). Therefore, my analysis will retain the capability of switching (at least) one CT to deliver both "Power" and "Data".
Thus, an estimated Power Budget is around 0.5 mA (with a 1 : 2000 turns ratio Current Transformer), but there are a few tricks which could increase this a little, if necessary. The Voltage available from the Energy Harvesting is not defined (yet), but my present target is for a "3 volt" main supply rail. This is ideal for a PICaxe, which can indeed operate with less than 0.5 mA (at a clock frequency of 1 or 2 MHz). However, the target is to use a 16 MHz clock (consuming around 2 mA and leaving some headroom if needed), but running at this frequency for only around 10% of the time (each second) and then "Sleeping" for the remaining period, i.e. an average consumption of about 200 uA.
Similarly, there are various "four-pin" ISM Transmitters available (usually 433 MHz) which for 20 mW output may drain around 25 mA, i.e. an average of 250 uA for a "compliant" 1% duty period. However, my (long term) preference is for an 868 MHz Transceiver module (such as the CC1101 or RFM69) both of which are ideal to use with a ~3 v supply rail and also consume around 25 mA when transmitting. Sadly, both of these modules require a 4-wire SPI Bus interface, however the intention is NOT to use either Bit Banging nor X2 commands, but dedicated PEEK/POKESFR byte commands, directly to the "silicon" hardware of the "base PIC" chip. Most of the other required hardware functions (ADC, Comparators, etc.) also should be available within the PICaxe, or perhaps in the Transceiver (Data Formatting and FIFO, etc.), but there is perhaps another surprising load consideration:
The Current Transformer needs to be loaded by a low impedance "Burden" resistor, usually below 100 ohms, to give 2 volts peak-peak (to the PICaxe ADC) from a maximum primary current of say 60 Amps rms (170 A pk-pk), i.e. 85 mA pk-pk in the CT secondary winding = 24 ohms. But to Harvest 5 volts (or hopefully more) at 0.5 mA, requires a parallel resistance of well above 10k ohms. The Burden resistance directly affects the accuracy so a very low resistance analogue (or "bilateral") switch is needed (ideally around 0.1 ohm). A traditional CD4016 4-channel Bilateral Switch has a typical resistance of 2,000 ohms (max, at 5 volts supply) and even the improved HC{T} 4066 derivatives are still around 60 ohms (or higher with a 3 volt rail). A few (in one 4066 package) might be connected in parallel, or there might be better (SMD) devices available, but all a "google" found me is still around 5 ohms. Then, two ADC inputs could perform a differential measurement across the Burden alone, which does offer some other potential benefits, but an easier method could be to use the contacts of a "mechanical" Relay :
A single-contact (pair) SIL miniature Reed Relay is smaller than a DIL package and can have a contact resistance of a little over 0.1 ohm, rated up to at least 108 operations (i.e. 3 years at 1 closure per second). This could be extended by switching the relay only when required, e.g. not overnight (when there is no PV to be measured), etc.. Of course the relay coil requires a significant current, but a 500 ohms relay has a "must operate" rating around 3.75 volts (i.e. 7.5 mA), which can then fall back to typically half of that, once the contacts are closed. The measurement period will be just over 20 ms for one mains cycle in each second, i.e. an average of <100 uA added to the power budget. A typical "latching" relay doesn't appear to offer much benefit over this; I do have an alternative trick but have reached the forum's 10,000 characters limit.
Therefore, I must pause here and will continue with details of the Computational methods and overall design, etc. in due course.
Cheers, Alan.