Photo Voltaic - Immersion heater power diverter - SAFETY WARNING!

Jeremy Harris

Senior Member
First off, a safety warning. This is NOT a project to be attempted by anyone who doesn't understand the risks of working with mains voltages. If you aren't competent at building a circuit that includes mains voltage wiring DO NOT attempt to build this.

OK, now I've (hopefully) allayed the concerns of the more safety conscious members, let me explain what this unit does, and how it works. In the UK, anyone with a solar photo voltaic (PV) system may receive a Feed In Tariff (FIT) subsidy, paid on the basis that 50% of their installed PV capacity will be exported. There is therefore a financial advantage in using as much of the power you generate as possible. One way to do this usefully is to divert any excess power generated to an immersion heater, to help heat the hot water tank. With a big hot water tank you can store a fair bit of hot water and in summer can probably get all your hot water for free using such a device.

Commercial units are available, but they cost between £200 and £300 as a minimum; one even sells for well over £1000. The challenge was to find a way to accurately measure the power being used by the whole house, and accurately determine whether power was being imported (from the grid to the house) or exported (from the house to the grid). Luckily, there are some very cheap and accurate electricity meter front end chips available that do all the hard bits. These use an isolated clip-on current transformer to measure the current flowing in the main feed cable to the house (the cable from the meter) and an isolating mains transformer winding to measure the supply voltage, and can calculate the true power (allowing for power factor variations) and output a frequency that is proportional to power and a direction signal that indicates import or export.

These two logic signals can be easily read by a Picaxe, so the next challenge is to work out how to control an immersion heater (safely). Luckily, fully isolated Solid State Relays (SSR) are readily available at a reasonable price (I paid £6 for a surplus 25A Cruezet one). These are easy to use and will switch a big mains load safely at the zero crossing point directly from a Picaxe output pin, as they have a built in opto isolator. The difficulty was finding a way to vary the power sent to the immersion heater, so that it was just enough to use any surplus, but not so much as to end up having to pay for imported electricity.

The market leading commercial device just uses burst fire control of a triac (which is what's inside the SSR) to effectively vary the number of on and off cycles of the mains to vary the power to the immersion heater. This works, but has a side effect that has attracted some criticism. Under some conditions this rapid switching can cause lights to flicker, not only in the house with the unit fitted, but also in the homes of close neighbours. It's not a major problem, but not that desirable, either. Luckily a chap on the Open Energy Monitor forum, Robin Emley, has come up with a way around this problem, using a method that doesn't need resorting to a potentially nasty control method, like phase angle control.

Robin's technique utilises a deliberate design feature within electricity meters. To ensure that these meters don't "creep" when no power is being consumed (due to small measurement errors) they have a threshold energy level below which they don't register. This is usually set to around 1 Wh, or 3600 Joules. If less than 3600 J is imported from the grid the meter won't record it. This means you can "borrow" up to 3600 J from the grid and send it to the immersion heater, then "repay" this with the same amount of energy exported back to the grid, so resetting the meter energy threshold.

As the meter front end chip supplies accurate power and direction data, all the Picaxe needs to do is manage an "energy bucket", monitoring when the bucket reaches a set level of exported energy, then turn on the immersion heater and wait for the bucket to empty to a set minimum level. I've set the "energy bucket" to have a capacity of 3600 J and have set the immersion turn on threshold to be 75% of this and the immersion turn off threshold to be at 25%. To eliminate an accidental drift towards importing energy, the "energy bucket" has a small leak, so that over time it will tend to empty, even with the immersion heater turned off.

This project uses an 08M2 as the controller, and an Analogue Devices AD7755 24 pin DIP meter front end chip (unfortunately this particular chip has now been discontinued, but there are very similar alternatives available). Below I've given details of the circuit and construction, together with the code.

As mentioned at the beginning, this is NOT a project to be undertaken by anyone who isn't competent with mains voltages. Although the design is safe, this project requires an understanding of isolation and earthing and an acceptable level of competence in assembling mains voltage circuits. It is NOT suitable for construction using strip board or prototype board construction methods. Finally, if you decide to build a unit like this, then I take no responsibility for your own safety.

PV power diverter 1.0.JPG

Power diverter - cover off.JPG

Code:
;Energy bucket immersion heater PV diverter, using Picaxe 08M2 controller

;Code not yet fully tested, but does seem to work as expected using a bench simulation

;Uses Analog Devices energy meter chip, AD7755 (now replaced by ADE7755, only available as surface mount)

;AD7755 determines true instantaneous power and direction of energy flow and has two outputs
;Output CF is an 18µS wide positive pulse equivalent to 10 J that has a PRF of between 0 and about 5570 Hz (covering a range of 0 W to 55.7 kW in theory)
;Output REVP indicates the direction of energy flow, low for import, high for export

;Operating Principle:
;
;Uses interrupt to trigger a routine whenever a CF pulse occurs.  This interrupt is on pin c.3 and is set up using the setint command (pin and mask)
;The state of the REVP input (pin c.3) is used to determine whether 10 J is added to the energy bucket or whether 10 J is subtracted from it.
;A small safety leak is built in, in that after a set number of iterations of the interrupt routine the energy bucket accumulator is decremented.
;the loop counter used to keep track of the number of iterations of the interrupt routine is reset to 0 after the leak is decremented  
;The energy bucket accumulator has a lower limit of 0 J and an upper limit that is set by the variable "capacity", in Joules / 10
;When the energy bucket accumulator fills to the upper trigger level, set by the value of "upper", the solid state relay is turned on, via pin c.2
;Whenever the energy bucket accumulator empties to the lower trigger level, set by the value of "lower", the solid state relay is turned off
;After the interrupt routine has completed the setint command is used to "re-arm" the interrupt, ready for the next energy pulse
;
;With values of 270 for the upper trigger point and 90 for the lower trigger point this controller shuttles 1800 J across the meter
;The majority of household energy meters have a 1 Wh (3600 J) threshold before registering any energy.

;This design reduces the flicker frequency by offsetting the upper and lower trigger points.  Typically the immersion will turn on for a short period every few seconds.
;For example, at 500 W export the immersion will be on for 0.7 seconds and then off for 5.5 seconds, with a 2% leak rate set.


;Pin designations:

; pin c.4 = CF		pulses from AD7755, calibrated to be 10J per pulse

; pin c.3 = REVP		import/export direction signal from AD7755.  High for export, low for import

; pin c.2 = output to drive SSR, high is SSR on, low is SSR off




#picaxe 08M2


symbol accumulator = w0										;energy bucket accumulator variable

symbol leakcounter = b2										;used as loop counter for leak, records number of times interrupt routine called

symbol upper = 270										;upper energy bucket threshold for switching on immersion (270 = 75% full)

symbol lower = 90											;lower energy bucket threshold for switching off immersion (90 = 25% full)

symbol capacity = 360										;nominal 3600 joule energy bucket capacity (value = Joules / 10)

symbol leak = 50											;50 gives a 2% leak rate in the energy bucket (decrements by one every 50 iterations)



init:

	setfreq m32											;set clock frequency to 32 MHz for best speed

	setint %00010000, %00010000								;set interrupt on pin c.4, masked to detect high pulse


main:

	pause 1000											;loop around aimlessly waiting for an interrupt
	goto main



interrupt:												;interrupt routine is called whenever an energy pulse is detected
	
	inc leakcounter
	
	if pinc.3 = 1 then let accumulator = accumulator + 1 max capacity		;accumulate export energy in energy bucket up to max set by variable "capacity" 
	endif												;pin c.3 is REVP on AD7755 and indicates import/export
													;pin c.3 low = import, pin c.3 high = export
	if pinc.3 = 0  then let accumulator = accumulator - 1	
	endif
	
	if accumulator > capacity then let accumulator = 0				;trap under flow error from subtracting from zero
	endif
	
	if accumulator > upper then high c.2						;switch on immersion if over upper trigger level
	endif
	
	if accumulator < lower then low c.2							;switch off immersion if below lower trigger level
	endif
	
	if leakcounter = leak then 
		let accumulator = accumulator - 1 min 0					;decrement accumulator once every "leakcounter" times interrupt called
		leakcounter = 0
	endif
	
	setint  %00010000, %00010000								;re-arm interrupt ready for next energy pulse
	
	return											;return back from interrupt routine to main loop
	
													;interrupt routine takes about 950µS to execute
	
END
 
Last edited:

Buzby

Senior Member
Argh !!!

I've blown off the tips of three fingers, and most of my hair, just by downloading your circuit diagram.:rolleyes:
 

BeanieBots

Moderator
Nicely written up project, thanks for sharing.
I too am in the process of undertaking such a project.
I've played with most of the power control methods you have mentioned and am still dithering over which to go for.
Do you have any links to the "energy bucket" feature that you mention?
I was aware that there was a certain level of "give and take" that could be exploited but could find no details.
In particular, any information about how long you can "borrow" would be very useful.
Can it be over several cycles or must it be within one cycle or is it litterally up to a certain energy level?

FWIW, I took the painful route of designing my own power measurement circuit. In trials I found that simply taking the average current gave almost as good as 'proper' power measurements. By keeping a headroom of ~100W it never dipped into the grid for power. Such an aproach ends up with a design alsmost as simple as yours!
 

Jeremy Harris

Senior Member
Thanks for the kind words.

I came across the energy bucket idea from some posts by Robin Emley ("calypso_rae") on the Open Energy Monitor forum. There are some basics on energy meters there, here: http://openenergymonitor.org/emon/buildingblocks/meters
and also a summary of links that may be useful, here: http://openenergymonitor.org/emon/mk2

In general, most UK meters allow at least 1 Wh (3600 J) of energy to be borrowed without being recorded, but I have read of one model (not sure if it's in use in the UK, though) that has a threshold of 1250 J. Most people seem to be finding that sticking to less than 1 Wh is OK, but it's easy enough to adjust the threshold values if you find that you have a lower threshold meter. You can borrow and repay energy over many cycles, the meter doesn't seem to have any time limit (or at least it doesn't seem to have a limit within the timescale of a few seconds).

I agree that, for most households, measuring current alone is probably almost as good as measuring true power, as the power factor for most homes probably isn't that far off unity. That might not be the case for a home with all CFL lighting and the majority of electrical appliances running with switched mode supplies, though, so measuring true power is perhaps the safest way to ensure you get the most power diverted without risking an accidental import. There are a host of energy meter chips available that make the power measurement part very simple. All seem to work pretty much the same way as the AD7755, but there are a dearth of them in DIP packages now; the majority seem to be SM only. I managed to buy a handful of surplus AD7755s in 24 pin DIP packages for £2 each, as I couldn't find a source of DIP energy meter chips from the usual suspects.
 

BeanieBots

Moderator
Links and info appreciated, thanks.
In many typical installations there will be a long distance between the consumer unit (where the clamp needs to be ) and the hot water tank (where the immersion is).
This leaves the dilema of running a long lead for the (sensitive?) clamp signal or running a long lead with frequently switched high current to the immersion.
Did you do any testing or have any rational for which way to go?
 

Jeremy Harris

Senior Member
The immersion should be connected to a dedicated spur on the consumer unit (or at least it is supposed to be) and the meter tails where the current sensor needs to go should also be at the consumer unit, too. This makes mounting the unit next to the consumer unit the best option, as the immersion feed can be fed out from it, into the diverter and then back to the original feed. It doesn't seem to cause any problems doing this, as the switching only takes place at the zero crossing point, so there's no current being switched (not sure I'd want to do this with a phase control design, though).

I can't see a problem with running the current sensor cable a fair distance if you wanted to, as it's a very low source impedance (less than 20 ohms for the modded one described here) feeding into around 10K at the meter front end chip. The additional voltage drop on a long cable could be compensated out during calibration easily enough.
 

BeanieBots

Moderator
My immersion comes from a spur off the socket ring.
I'll probably end up putting the high voltage stuff next to that and run a long lead for the current sense.
Too many things going on right now but thanks for posting the project and inspiring me to 'get on with it'.
 

westaust55

Moderator
Well done on a good write up and thanks for posting.

Albeit that Feed-In tarrif structures are quite different here, down under, I am still considering to do something at my new castle (a man's home is his "castle") It is better to try and use as much power as possible internally as exported power on gains one-third the credit per kWh than is expended for imported power.
Some folks did do better with higher feed-in tarrifs (roughly double and then equal to import rates with 10 year "contracts") but those arrangement had expired by the time I moved into new house.
 

john2051

New Member
Hi all,
I'm not sure I unstand why its better to divert pv power to an immersion heater, rather than export it to the grid. |The other house we lived at had one of
these solar water heater panels, about the size of an 160W pv panel. This gave us an abundance of hot water, and even warm water from the moon here in the uk!
Are these 'arrangements' with energy companies so bad? reason I ask, we are considering having panels installed here ( if our compensation ever materializes !)
Any advice would be welcome, regards john
 

BeanieBots

Moderator
It depends on the country you live in, when you had the panels fitted and probably a few other factors.
In the UK, it's a very odd deal:-
you get paid for generating electricity no matter what you do with it.
you get compensated for what you put back on the grid but UK energy meters cannot run backwards.
because what you put back cannot be measured, they assume 50% of what you generate.
Then there's all the different tarif rates that may apply.
In the UK, this has changed from 42p/kWhr through 22p and I think is now down at 16p.
What you put back (which can't be measured anyway) gives you a whopping (wait for it) THREE pence per kWhr!

So, "use it or lose it".
Even if they did actually pay (which they don't) for putting back on the grid, the current rate is half the value for the equivalent gas to heat water and one sixth of the rate at which electricity is charged.
Hence, it's an absolute no-brainer to use every last scrap of what you generate.
 

Jeremy Harris

Senior Member
The other odd thing is that it's actually cheaper to fit PV panels to heat your hot water via an immersion heater than it is to fit a wet solar thermal system. The cost of PV has come down a lot, so even though it's far less efficient (in terms of roof area needed for a given amount of hot water) it's still cheaper. Using PV to heat water also works better at the start and end of the day and during winter, because pretty much any amount of light will generate some electricity and this will then heat the water, no matter what temperature the tank is (as long as the tank thermostat hasn't cut in). An acquaintance has summarised the relative merits of using PV against solar thermal panels for hot water, here: http://edavies.me.uk/2012/11/pv-dhw/

The other big advantage of using PV for hot water, in addition to the clear freebie situation described by BeanieBots above, is that it needs no maintenance and is likely to last a long time. Any wet solar thermal system is going to need attention from time to time, as it relies on at least one pump circulating antifreeze around the system, plus a pressure vessel. The chances are that a solar thermal system is going to need maintenance, and perhaps replacement of parts, every few years, whereas a PV system may well run virtually maintenance free for decades.
 

westaust55

Moderator
It depends on the country you live in, when you had the panels fitted and probably a few other factors.
Very much so, in fact even which state you live in.

Here in Western Australia, the energy suppliers (synergy and horizon power, etc) only give you currently $0.09/kWh that you actually export (that is about UK5.3 pence) [net feed-in].
If you got in about 3 years about the state Govt also gave you AUD$0.40/kwh, then about 2 year ago they reduced it to AUD$0.20, and finally about 18 months ago it was dropped altogether. But those who received a state Govt at the time received a 10 year contract so keep getting the higher rates.
The rate to buy/import is $0.25/kWh.

Some Australian states had Feed-in tariffs that were around $0.44/kWh for a considerable time and others up to about $0.70/kWh for a period of time.

So in summary:
If you have a nice high feed-in tarrif (higher than import rate) you are better to export as much as you can during the day and running the dish washer, washing machine, etc, at night.
For the rest of us, you are far better off to try and use as much as you can as you generate it hen dish washer, washing machines, etc should be run during the day.
 

westaust55

Moderator
Using PV to heat water also works better at the start and end of the day and during winter, because pretty much any amount of light will generate some electricity and this will then heat the water.
On a sunny day here, at say 8am and 4pm I generate about 1 kW (up to 1.5 kW in summer) and from 11am to 1:30pm I generate about 3 to 3.5 kW depending in time of year &#8211; on a hot day the output is less.
In the course of a sunny day I can generate 15 to 18 kWh in winter and 28 to 30 kWh in summer.
On a heavy clouded winters day I typically generate from 2 kWh to maybe 8 kWh in an entire day.

My system has 2.25 kW facing east at 25 deg slope and 2.25 kW facing north at 32 deg (location 32 deg South). In summer the east facing system generates about 10% more than the north facing system as a result of higher higher ambient temps from late morning till late afternoon reducing the output from north side. But in winter the north facing system generates around 50% more that the east facing system due to better roof /installation slope.
 

Jeremy Harris

Senior Member
Nice figures, I doubt we'd do as well here with a system of that size. The prediction I have for my system is that it will generate around 6,550 kWh per year.

My array will be 6.25kWp, facing 206 deg, so better optimised for our winter. In summer here the sun rises a fair way north of east, today it rose at 059 deg and will set at 300 deg, but by mid-December it will rise at around 128 deg and set at around 232 deg. My array won't see any direct sunlight in August until late morning, but in winter it'll see sun from sunrise to sunset (assuming there's any sun around!).
 

lewisg

Senior Member
Neat well documented project!

One way to do this usefully is to divert any excess power generated to an immersion heater, to help heat the hot water tank. With a big hot water tank you can store a fair bit of hot water and in summer can probably get all your hot water for free using such a device.
Excuse me if I'm missing something but is there any provision for limiting the temperature of the hot water tank?


The immersion should be connected to a dedicated spur on the consumer unit...
US conversion: The heater should be on a dedicated circuit from the breaker panel.

Another option is to mount the SSR remotely near the hot water tank. The control wiring to the SSR should be able to run a considerable distance without problem. Another advantage to this is that the logic board would not need any special (HV/mains) wiring provisions since the current sensor is external.
 

Jeremy Harris

Senior Member
Thanks for the kind words.

The hot water tank temperature is regulated by the thermostat built in to the immersion heater (here in the UK this is the normal arrangement). If you have an immersion heater that doesn't have a built in thermostat to regulate the maximum temperature, then you'd need to add one to the tank.

No problem with fitting the SSR up by the immersion heater itself at all, as you rightly say, the control wiring could run a fair distance as it's only carrying a logic signal at around 10 to 15mA.
 

PhilHornby

Senior Member
AD7755 Application Note
AD7755 Evaluation board documentation

I have a few queries about the hardware design, if anyone can help ...

In the circuit above, the modified burden for the Current Transformer is shown as:

25461

I was slightly bemused, as to why there are 4x10R resistors, rather than just 2x5R resistors.
Was this just a result of the values available to hand, at the time❓

The datasheet shows this arrangement :-

25462

The AD7755 has separate connections for Analogue and Digital 'GND'. These are apparently only supposed to be connected at a single point on the PCB. Most of the connections are obvious apart from the 78L05's GND pin. Should that be connected to Analogue or Digital GND❓

The Application Note has a sizeable section on PCB design. Is physical layout critical in this application (for sensible results), or is it just applicable to a high-accuracy (commercial) Energy Meter?
 
Last edited:

AllyCat

Senior Member
Hi,

When I first saw the schematic diagram, I assumed that the Current Transformer had a "Balanced" output and contained two 10 ohm resistors inside. I don't know about the CT used by Jeremy, but the "YHDC" CTs which seem quite common now are IMHO rather "strange". They do have a "stereo" 3.5mm plug and their cable has two cores plus a "screen" but the screen is not connected at either end. That's very annoying as it's a moulded plug. :( Then, one end of the CT coil is connected to the "Earth" sleeve, the other to the Tip, with the Ring not connected (as specified). Incidentally, there are some interesting Tests/Reports about the YHDC CTs HERE. As for the value of the Burden resistor, it appears to be 62 ohms in the "30 Amp" version that I opened, with the coil having a similar resistance (combined external value about 37 ohms) and interestingly the equivalent of "Back to Back" Zener diodes is also fitted. I have still to measure the Turns Ratio and Inductance of the coil (to assist with the "Energy Harvesting" possibilities).

So the question arises whether there is any point in using a Balanced configuration (as intended with the AD7755 and by Jeremy) or just a simple Signal+Earth arrangement. Of course the balanced configuration is potentially more accurate, both in reducing interference/noise and doubling the (possible) signal amplitude, but is it really necessary here? In a "metering" application we expect very high accuracy because any errors might cost us (many) Pounds (money). In a Smart meter the current will be (presumably) measured directly across a "Resistance", which although a very low value can still be accurately calibrated (to perhaps +/- 0.1% ?). However, I don't believe that any "clip on" CT can be that accurate, perhaps +/-1% at best. Even a miniscule "Air Gap" can affect the accuracy, and Ferrite cores are normally associated with much higher frequencies than 50 Hz (where "iron" laminations still prevail).

Therefore, I would be inclined to connect the (current transformer input) V1N pin directly to (Analogue) Ground and use the CT "Unbalanced" to the V1P input, hence simplifying the circuit. Similarly, I wouldn't be too concerned about exact layout details, probably joining the Analogue and Digtal Earths at the 78L05 Regulator as the "Star Point". Before saying this, I did examine the AD7755 Data Sheet quite carefully and was surprised by some of the details: The (Analogue) Inputs are specified as +/- 1 volt (relative to Earth) with an "Absolute Max" of -6 volts. That's very unusual, particularly for an Analogue/Bipolar integrated circuit, where all inputs are normally limited/protected to -0.6 volts by the Substrate Diode(s). Typically, even Rail To Rail Op Amps (and PICaxe's comparator) are limited to about -0.3 volts by using a PNP (or PMOS) differential input transistor stage. Obviously AD have done something "different", presumably with a Zener Diode in series with the normal input protection measures.

Cheers, Alan.
 

PhilHornby

Senior Member
Thanks for that.

I wanted to try and build the circuit exactly as shown (since apparently it works). Maybe I'll have to go through more than one iteration :unsure:

I tried to obtain the same parts as Jeremy used, but the current transformer caused a bit of confusion. Jeremy specified a SCT013-013-060, so I bought this one. Mysteriously, it came from Poland (but took as long as if it had come from China - on a slow boat...). I've cut the tracks to the burden resistors, which were a 33R and 430R in parallel. The coil itself measures 96R. The 430R actually measured 428.5 on my Brymen BM235 with the lead resistance nulled-out.

There is a chart on that Amazon product page, that shows all the CT's in the product range develop a max. of 0.333V at whatever current they're specified for. (It also confirms a 1% accuracy figure). Presumably with Jeremy's much lower burden resistor values (5R or is it 10), this voltage is going to be much lower (5/30 x 0.333 = 55mV❓). I'm not clear why he's done that. It's probably time to start some practical experiments...
 

hippy

Technical Support
Staff member
When I first saw the schematic diagram, I assumed that the Current Transformer had a "Balanced" output and contained two 10 ohm resistors inside.
I hadn't quite understood the issue PhilHornby had identified, but now get it. I would suggest it's most likely how it is because the CT is actually separate to the circuit so it can be unplugged but that's not shown

I don't know much about CT but I do recall reading that Bad Things (TM) can happen if used open circuit without the burden resistors so they need to be included in the CT for when it is unplugged.

The other two resistors are presumably to keep the inputs to the rest of the circuit at 0V when it is unplugged -
Code:
  .----.----o A         .-----.------o A )---.------->
 _|   .|.              _|     |              |
(     |_|             (       |              |
(      |              (   .---|---.--o B )---|---.--->
(      }----o COM     (   |   |   |          |   |
(     .|.             (   |  .|. .|.        .|. .|.
(_    |_|             (_  |  |_| |_|        |_| |_|
  |    |                | |   |   |          |   |
  `----^----o B         `-'   `---^--o C )---^---^--- 0V

\___________/                  /|\
      |                         |
      `------- equivalent to ---'
So the question arises whether there is any point in using a Balanced configuration (as intended with the AD7755 and by Jeremy) or just a simple Signal+Earth arrangement.
I would guess it makes it easier to have a positive output from one or the other without having to get into electrical complexity.

Presumably with Jeremy's much lower burden resistor values (5R or is it 10), this voltage is going to be much lower (5/30 x 0.333 = 55mV❓). I'm not clear why he's done that. It's probably time to start some practical experiments.
It's not clear to me. Most people I would have thought would be repurposing existing CT and it would make sense to me to leave them 'as is', adapt the input circuitry as needed to make them what one wants or needs.

I do have, somewhere, a number of CT's and their display units but have never tried doing anything with them. Maybe I'll have a dig around and see if I can find where they are.
 

AllyCat

Senior Member
Hi,
... took as long as if it had come from China - on a slow boat....
Yes, I prefer to purchase via ebay, where the seller and shipping arrangements seem more "up front" (at least to me). The "SpeedPAK" shipping service is usually an added cost (as is VAT) now, but IMHO excellent. My Current Transformers (from cayin35) arrived in 8 days from China and it was "fun" to watch them tracking across and out of China (but usually not in the UK). The AD7755 purchase was unusual because the seller took over two weeks to dispatch (as hinted in the listing) but then shipped free via SpeedPAK, with the item still arriving before the first "expected" date, :) (but not yet tested if fake). However, I normally look at the "latest" date, because I know you can't complain until then, if an item doesn't arrive.

The 333mV value is probably rms, corresponding to 1 volt peak to peak. The maximum value for the burden resistor seems rather a mystery, but (up to) 2 volts pk-pk seems appropriate to use with a PICaxe (or Ard...) A/D converter. I would hope that at least 100 ohms is acceptable, or it would be inconvenient to switch (in and out) for the "Energy Harvesting" concept. It (now) appears that my 30A CT has 1800 turns; another advantage of the current-current version is that the turns (ratio) should be obvious. The remaining parameter that I haven't discovered yet is the coil Inductance, again relevant to Energy Harvesting (for which I will probably start a new thread).

Cheers, Alan.
 

PhilHornby

Senior Member
I don't know much about CT but I do recall reading that Bad Things (TM) can happen if used open circuit without the burden resistors so they need to be included in the CT for when it is unplugged.
Indeed...

This web site points out that Current Transformers should never be left open-circuit, in the same way that Voltage Transformers should never be short-circuited. Apparently, many tens of kilovolts are available to catch you unwares. Who would have thought these things had that trick up their sleeves o_O
The other two resistors are presumably to keep the inputs to the rest of the circuit at 0V when it is unplugged
But as @AllyCat pointed out, there are only two conductors in the lead, so that arrangement can't live inside the CT housing - it has to be external and the internal burden removed. Or the lead replaced.

There is a "transient voltage suppressor" (back-to-back zeners?), that apparently "does not allow open circuit" - maybe that is sufficient to keep me safe?

The 333mV value is probably rms, corresponding to 1 volt peak to peak.
Ah yes, of course!
 

AllyCat

Senior Member
Hi,

I keep forgetting that this is the Finished Projects section, not the Active Forum. :(
This web site points out that ..... many tens of kilovolts are available to catch you unwares.
As "Jim Harris" says in the Comments section (in September 2021), that is effectively nonsense. The author assumes that 400 volts is applied across the "single turn" primary of the transformer, but you're not going to be able to build up anything approaching 230 volts across a few cms of solid copper wire in the meter tail. Also, the post is discussing (Soft-) Iron-Cored transformers which I believe have higher saturation levels than Ferrites. However, it's interesting that YHDC do include a "transient suppressor" even in the versions that have an internal burden resistor. Perhaps they're aware that people (like us :) ) may remove the internal burden, but I suspect the primary motive is to protect the fragile internals of a (possibly incompetently designed) micro-circuit, not a "human".

The inductance of the CT appears to be about 5 Henrys, so requires around 2 uF to tune it to 50 Hz (described in the Patent). I'm quite enthusiastic about the possibilities of a PICaxe Wireless, Energy Harvesting design, but my concept may need a change in the CT cable(s) to (also) slightly enhance the "stray" capacitance to the meter tail, allowing the phase of the voltage to be detected accurately. However, the available power is unlikely to be much greater than for an "AA battery" design, i.e. an average drain of around 200 uA, equivalent to 2 Ah / 10,000 hours (= 1 year), so quite a "challenging" design. ;)

Cheers, Alan.
 

PhilHornby

Senior Member
This application seems to have exposed a huge gap in my knowledge :rolleyes:

I thought I knew what a differential signal was, but what on earth is a "differential voltage signal, referenced to a common mode (usually AGND)" ?
I thought that the whole point of differential signals, was that they were referenced to one another o_O ...

Actually, rather than trying to help me get my head round this concept, maybe a simpler question is in order ...

What is the RMS voltage I should see across the V2P/V2N pins with my meter, if the "maximum peak differential signal on Channel 2 is ±660mV" ?

My 'scope calculates it differently to my meter - but the 'scope is referenced to GND. I would expect the answer to be 660/(2*√2) = 233mV, but that doesn't match the figures they show for Channel V1 (where apparently, 330mV rms equates to ±470mV :unsure: )

(I know this only affects the accuracy of any power measurements (which is not the primary objective) - and there is lots of leeway before I blow anything up - but I'd like to get things in the right ballpark!)

Similarly the Current Transformer output voltage: With 2x4R7 resistors (in place of the 4x10R shown), I get 41mV rms for a 2KW load. Does that look like it's 'reasonable'? - bearing in mind that the load could actually be as high as 24KW with my 100A Consumer Unit.

Relevant section of the AD7755 Data Sheet :-

25471
 

AllyCat

Senior Member
Hi,
What is the RMS voltage I should see across the V2P/V2N pins with my meter, if the "maximum peak differential signal on Channel 2 is ±660mV" ?
Personally, I would expect 466 mV (rounded to 467 ;) ). But note that limit is specified in the "Accuracy" section of the Data Sheet, I think the "Absolute" limit is +/- 1 volt.

Differential Amplifiers have 3 fundamental parameters: The Differential Voltage Gain, the Common Mode Rejection and the (usually Common Mode) Input Voltage Range. For a typical Op-Amp the Differential Voltage Gain and Common Mode Rejection are very high, perhaps 100 dB (i.e. 100 Volts/mV), so the two input voltage levels will be very similar (created by feedback from the output), regardless of their voltage relative to the supply rails. Occasionally the (acceptable) input voltage range will be "Rail to Rail", but more typically a PNP (Darlington) Differential input stage will accept inputs from (just less than) Earth (0v) up to perhaps half the supply rail.

However, the AD7755 seems rather different: The (effective) Differential Voltage Gain is quite small (depends on the internal ADC) so the Differential Input voltage is quite large, but the Common Mode Range is small (+/- 100 mV). Therefore the (maximum) input voltages are determined mainly by the Differential not the Common Mode part of the specification. It seems reasonable to me that the Differential Gain shouldn't change if you connect either input to Earth (assuming they don't have a "hard" voltage bias), but it will limit the maximum effective input swing (to a half).

24 kW seems quite a lot (unless you have large EV/Heating requirements), much more than will be associated with PV generation, or even a local battery. So I think you could (at least) associate that with the maximum peak input voltage (i.e. 1v - 100 mV = 900 mV) or around 636 mV rms. Thus I calculate that corresponds to about 2 x 6R8 ? I notice the "Open Energy Monitor" design uses a 33 ohm burden, because their Arduino ADC is referenced to 5 volts pk-pk (single input, not balanced).

Cheers, Alan.
 

PhilHornby

Senior Member
Personally, I would expect 466 mV (rounded to 467 ;) ).
OK, I see what I was doing wrong :oops: ... Moving swiftly on ...

To get a voltage in that region, I've had to swap the 100K resistor in Jeremy's design to circa 33K. (36K would probably do it, but I don't seem to have one). I claim to be using the same transformer as Jeremy - but a decade has passed...maybe it's not quite identical.
24 kW seems quite a lot (unless you have large EV/Heating requirements), much more than will be associated with PV generation, or even a local battery. So I think you could (at least) associate that with the maximum peak input voltage (i.e. 1v - 100 mV = 900 mV) or around 636 mV rms. Thus I calculate that corresponds to about 2 x 6R8 ?
Well, yes, 24KW was just the rating of the main circuit breaker (100A), multiplied by the mains voltage. The highest peak usage I have seen with my Poor Man's Smart Meter is about 10KW ... though, interestingly, if I go round the house and add up the power rating of the 'big' devices, I get a theoretical maximum drain of 33KW ... thank heavens for 'diversity' !

I'll obtain a selection of Burden resistors, since I don't have many low value ones to hand. (The 4R7 ones, turned out to be rated at 2W and are enormous! The joys of Internet Shopping :) )

I'm assuming that if I were to aim for significant readings at relatively low power levels (the 3KW region where the PV and Immersion Heater operate), it would just max out at higher levels. If that 'maxxed-out' level is still within the electrical spec. (±6V?) of the AD7755, I should be OK - though any derived Power Measurement would be wrong :unsure:. I'm hoping that would mean I can increase the Energy Bucket threshold (from Jeremy's 75% level), without danger of using grid power accidentally.
 

AllyCat

Senior Member
Hi,
If that 'maxxed-out' level is still within the electrical spec. (±6V?) of the AD7755, I should be OK - though any derived Power Measurement would be wrong :unsure:. I'm hoping that would mean I can increase the Energy Bucket threshold (from Jeremy's 75% level), without danger of using grid power accidentally.
The "Absolute Max" rating is basically a guarantee that you won't destroy the chip. Often "Normal Operation" (my quotes) will occur up to those values, but the AD7755 has a "Maximum Input" of +/- 1 volt which is probably the ADC Reference/Limits. Then it is "probable" that the ADCs (and subsequent mathematical calculations) will "Limit Gracefully", but not guaranteed. So personally, I would be inclined to relate the the various "Max Operating" values with, say, the rating of the "Company Fuse", but not allow for any further "safety margins" as I would in a Worst-Case design. I plan to write more (about resolution/accuracy) in the Active forum, but bear in mind that imported energy costs typically 4 to 10 times more than is paid for that exported (and heat leaks away relatively fast from water) so the measurements and processes should err on the side of caution.

Cheers, Alan.
 

PhilHornby

Senior Member
To get a voltage in that region, I've had to swap the 100K resistor in Jeremy's design to circa 33K.
If I re-introduce the 100K resistor and set the preset to give ~121mV rms @ the V2 Channel, I get a "CF" frequency of 100Hz for a 1KW load, with 2x4R7 Burden resistors. In other words, I've successfully built the circuit as specified and got it working to spec. :) (given my ineptitude for all things analogue - and all those capacitors - that was not a given... :whistle: ).

As currently coded, the ISR takes slightly more than 1mS, so if "CF" > 1KHz (which equates to a 10KW load), it will start missing interrupts. Obviously, while this would be a "bad thing" if actually wanting to measure Power - I don't believe it would stop it performing its primary role. (Unless you have a very large PV system that can export at 10KW!)

I just need to design a PCB now...
 
Last edited:

PhilHornby

Senior Member
Then it is "probable" that the ADCs (and subsequent mathematical calculations) will "Limit Gracefully", but not guaranteed. So personally, I would be inclined to relate the the various "Max Operating" values with, say, the rating of the "Company Fuse"
It seems that Jeremy may have done just that!

(The AD7755 spec. actually says :-
"The CT turns ratio and burden resistor are selected to give a peak differential voltage of ±470mV at maximum load").

I measure 41mV rms @ ~2KW which equates to ~23KW max. load. (I'm moderately surprised that the 'matching' Channel 2 voltage equates to a rather lowly ~121mV to give the correct "CF" frequency, but that seems to be the case.)

While the CT may be correctly specified, this is going to mean some very small voltages when operating at low export levels - and will make its wiring 'sensitive', especially if it needs to be some distance from the rest of the circuit. Someone like me could get that very wrong :rolleyes:

So how about using much higher value burden resistors (say 2x39R) - with a pair of diodes paralleled across (to restrict the output to ±0.6V ish). This would take the "CF" frequency outside the current code's capabilities, so a different approach would be needed (or a 20X2 @ 64MHz?).

I may be worrying unnecessarily - I'll see how small a load I can reliably measure ...
 

AllyCat

Senior Member
Hi,
... the 'matching' Channel 2 voltage equates to a rather lowly ~121mV to give the correct "CF" frequency,......... this is going to mean some very small voltages when operating at low export levels - and will make its wiring 'sensitive', ..
... This would take the "CF" frequency outside the current code's capabilities,
You're not aiming for a "calibrated" output (e.g. exactly 1 pulse per 0.01 kWh) so you could use a larger Channel 2 input. However, the differential inputs should help in avoiding any "interference" on the input, which is often caused by (noise on) the "Earth" being used as a "reference" for the input signal. Note that the A7755 has an optional * 16 amplifier on the input(s) (that you're not using) which would make a "noisy" input much worse. ;)

I'm not clear how much faster is the "High Frequency" CT output than the "normal" (F1 and F2) mode. I thought that one of the uses for F1/F2 is to drive a stepper motor (i.e. "interleaved" pulses), yet the data sheet seems to quote completely different frequencies for them? If you can avoid the "High Speed" CF mode, then you should get a 50:50 duty cycle (at a much lower rate); an interrupt at each edge is easier to process and doubles the effective frequency.

Cheers, Alan.
 

PhilHornby

Senior Member
I may be worrying unnecessarily - I'll see how small a load I can reliably measure ...
With the 'correct' Burden resistors (2x4R7) - calibrated at 2KW - I got a 'reading' (stopwatch timing!) of about 12.5W, for a 9.7W LED bulb (my plug-in power meter said 9.8W). Now 9.7W is probably far too low to be considered useful and it was still an answer of the right order of magnitude.

With 2x43R Burden resistors, the output frequency stopped rising in proportion to the load at about 3.1KHz (which equated to ~3KW). The CT voltage was quite a way in excess of the maximum specified 470mV at this point (about 650mV from memory). As the load increased, it stayed 'maxed-out' at this level. So either approach should work, with the caveat of the existing code not dealing with a 3.1KHz "CF" input.

Note that the A7755 has an optional * 16 amplifier on the input(s) (that you're not using) which would make a "noisy" input much worse. ;)
Yes, I'd noticed that!
I'm not clear how much faster is the "High Frequency" CT output than the "normal" (F1 and F2) mode.
I'll take a look at those and see what the implication is. The "CF" output is described as being for calibration purposes and interfacing to microcontrollers...

For best analogue performance/interference rejection of the CT wiring; would it be better wired with a twisted pair, rather than screened cable - given that neither side is connected to GND?

Or should the Burden resistors live inside the CT housing, with a two core shielded cable (i.e. three conductors).
 

AllyCat

Senior Member
Hi,
For best analogue performance/interference rejection of the CT wiring; would it be better wired with a twisted pair, rather than screened cable - given that neither side is connected to GND?
---
Or should the Burden resistors live inside the CT housing, with a two core shielded cable (i.e. three conductors).
Somewhere, I read that the Current Transformer could/should be extended with CAT5 cable, i.e. a twisted pair. The CT supplied by energie (e.g. for Harvi) appears to have a twin (non-twisted?) Red/Black insulated cable with bare (soldered) ends, which are attached to a screw terminal block. It's arguable whether this is a "balanced" connection because Black is traditionally (also) considered as "Earth" (and/or Red as Live). TBH I don't think it matters because the impedances (of the Burden resistor and the coil) are so low. The polarity is of course important if you need to identify the direction of current flow (i.e. Import/Export). However, if you are using a microcontroller (or probably most ADCs) then one terminal will be defined as Earth anyway.

The question arises as to why Analog Devices chose to give the AD 7755 a balanced/differential input? I don't know, and first thought that perhaps it's to give more dynamic range, in a similar way that a Bridge-Output Audio amplifier can give double the effective voltage output swing to a Loudspeaker. But I think the probable reason is that it's compatible with Three Phase Mains power monitoring. Three Phase Mains can be considered as either "Delta" or "Star" (around an Earth point), but I think Delta is more common? For a Single Phase system, I wonder if the "Negative" (differential) amplifier input should (it certainly could) just be wired to Earth?

Things get (even) more complicated with the YHDC Current Transformer connections, in that somebody presumably wanted a physically-polarised Plug/Socket (very reminiscent of the PICaxe Programming connector), to make it "idiot proof". All that was needed is a "Mono" 3.5mm Jack, but for some reason they chose a "Stereo" Plug and then (IMHO) "got it wrong" (I'd better not mention Rev Ed ;) ). The problem is that "Chassis" type 3.5 mm Jacks (and all the Plugs) are physically arranged for the Body/Sleeve, or the (coaxial) Screen/Braid, to be Earth.

It seems that YHDC decided that one end of their coil should go to Earth (Sleeve), but then fitted a Screened cable. Unfortunately the "screen" tag/clamp is then already occupied, so the screen was left disconnected at both ends !? IMHO what they should have done is connect the second end of the coil through to the "Ring" on the Jack, which AFAIK connects to Earth anyway when a Mono socket is used. This would also have been more compatible with a Three Phase connection where the coil may have a true differential arrangement. It's particularly annoying for my proposed Energy Harvesting system, to be described in a new thread, because this (ideally) needs a third conductor (for the "voltage phase" signal). Currently, it appears necessary to "throw away" the existing (3 core) cable and fit an identical cable with its screen connected inside the (moulded) plug. :(
----
Advantages of fitting the Burden inside the CT body are that it could be "factory calibrated", and alternative sensitivity products can be fitted (e.g. to match the Company Fuse), but I wonder to what extent either actually applies? Certainly the Burden is a good (necessary?) safety measure against accidental open circuit when connected to a live system, but all the YHDC CTs appear to have a "Varistor" fitted anyway. Internally they appear to have zero (for the current-current version), one or two SMD resistors fitted, but the second resistor (if fitted) is not for "balancing" the output, but just to "trim" the resistance, probably to make a "non-standard" value, rather than the result of a factory-calibration process. Potentially, a "Balanced" version would cost slightly more to manufacture (particularly if the coil were itself centre-tapped), but I'm not aware if they manufacture any.

To me, it seems rather inefficient to maintain more than 10 different products, when one current-current version is "simpler" and meets most purposes? However, the c-c version (with no Burden fitted) actually seemed slightly more expensive than the c-v versions. Perhaps their Quality Control of the number of turns is not perfect, so they can "bodge" the sensitivity by changing the resistor value in the c-v versions? :)

Cheers, Alan.
 

PhilHornby

Senior Member
Somewhere, I read that the Current Transformer could/should be extended with CAT5 cable, i.e. a twisted pair. ...
TBH I don't think it matters because the impedances (of the Burden resistor and the coil) are so low.
I found some more insight at Open Energy Monitor, which I'm going to have to study, because it seems quite nuanced...
The polarity is of course important if you need to identify the direction of current flow (i.e. Import/Export).
ROFL - When I read this in the datasheet :-
The Datasheet said:
"This logic output will go logic high when negative power is detected, i.e., when the phase angle between the voltage and current signals is greater that 90°."
I wondered what magic this was and how it worked (since it did). Turns out I just dropped lucky when I wired it into circuit :whistle:
 
Last edited:

PhilHornby

Senior Member
Had a dummy run with the immersion heater connected today.

Despite being crudely laid-out on prototyping boards and the CT being connected using an old headphone extension, it works a treat! (This is still Jeremy's code and circuit)

For the first time since I moved into this house, today we used NO heating oil at all. During the period I monitored it, the supplier's meter never left "anti-creep" i.e. zero and the usage register did not increase.

25479
 
Top