Jump to content

Scratch built solar PV divertor


Radian
 Share

Recommended Posts

Always feels a bit pretentious starting a thread in Boffin's corner but I guess it's best to keep electronics & coding out of the other sub forums.

 

Anyhow, I'm messing around with a bit of an 'old chestnut' - a device that spots power being exported to the National Grid and intervenes to dump it into something more useful such as a DHW cylinder immersion heater. Being tight, and having a comprehensive store of electronics parts to hand, I feel compelled to roll my own - as has been done by numerous others before me - such as Robin Emley and, I believe, our own @ProDave

 

So far all I have is a small mains transformer, a couple of CT's and a scope looking at what happens when a grid-tied inverter pushes more into the grid than is coming out and I'm already seeing issues. First photo shows relation between voltage and current during base-load 662W import:

 

IMG_20220513_122931521.thumb.jpg.b9400c8527dc0a46ab28fafcbff3f145.jpg

 

The voltage waveform (blue) is typical of a small 240VAC transformer saturating (not the ideal way to represent the mains waveform but hey, it's safe). The current waveform (yellow) is 'peaky' in the middle of the cycle showing just how much of my ~700W baseload is capacitive - i.e. lots of switch-mode PSU's rectifying the AC and recharging their reservoir capacitors after partial discharge between cycles. So far so good I guess although I don't like the idea of sampling the distorted voltage waveform.

 

Next photo is when the Sun comes out:

 

IMG_20220513_124212642.thumb.jpg.b233d9c0b83bd1876dd48ebed7c6579b.jpg

 

Oops, 0 Watts imported, who knows how many exported then? That's my task here now.

 

So the current due to the resistive component of the baseload is starting out from the zero crossing and immediately being cancelled out by the inverter which manages to push the current drawn into negative territory, until it gets overwhelmed by the capacitive loading later in the cycle. The inverter loses the fight near the middle of the cycle and current begins to flow back in from the grid. But on balance, over the whole cycle, more current was going out than coming in hence the utilities smart meter shows zero (it doesn't show export amount but the meter logs it in one of its registers - 1.1kWh so far!).

 

The scheme seems to be to measure the real power, retaining its sign, on every cycle and keeping a running total such that when it reaches a certain (-ve) threshold (before 3600 Joules is reached) it triggers the Immersion heater to 'claw back' the same amount of Joules to keep from tipping the meter into registering an export. Thus filling and emptying a so called 'energy bucket'. Makes sense. But a few questions arise - how quick does the triggering of the Immersion load have to be? Can it be made less critical by setting a lower threshold?

 

I ask because I can't easily wire directly from the meter area to the immersion so I guess a wireless solution is required and these all have a degree of latency. What are the other significant challenges I wonder?

Link to comment
Share on other sites

Yes I built my own, but I "cheated" and had separate current clamps for power going to the house (consumed power) and power coming from the inverter (generated power) so that made life easy.

 

Before that I did experiment with a single current clamp and comparing the phase of the current waveform to the voltage, but although it worked, some loads, I recall the washing machine in particular, really confused it.

 

If you are going down the road of roll your own, look at the electricity meter chips.  They have cracked this to perfection so they should be able to separate import and export  for you to use.

  • Like 1
Link to comment
Share on other sites

2 hours ago, Onoff said:

I bet you do Sudoku? 😂

 

More of a Wordle  type really. Until it went mainstream 🙄

 

15 minutes ago, ProDave said:

Yes I built my own, but I "cheated" and had separate current clamps for power going to the house (consumed power) and power coming from the inverter (generated power) so that made life easy.

 

That's a smart move I hadn't thought of. Will bear it in mind in case it proves simpler.

 

18 minutes ago, ProDave said:

If you are going down the road of roll your own, look at the electricity meter chips.  They have cracked this to perfection so they should be able to separate import and export  for you to use.

 

Yes, I often see this advice when reading up on the subject. I have several chips of this type in various meters, smart sockets etc. but I've yet to see one that is fast enough to do cycle-by-cycle analysis which, rightly or wrongly, is what I've set out to achieve. Again, it may be the fall-back solution but I'm becoming deeply interested in the nuances of power monitoring.

 

One early discovery I made was that my venerable Current Cost CC128 meter that I hacked to get working wirelessly over MQTT reads apparent power which is why my base load looked over inflated. Mostly the power factor for that is under 50%. More surprises in store I'm sure!

Link to comment
Share on other sites

Posted (edited)
55 minutes ago, Radian said:

Current Cost CC128

I use the Envi model that has the optical sensor.

 

Can you read the LED on the import meter and decide on its state what is happening? i.e if no flashing direct PV to battery storage, if permanently on, say for half second, divert PV to DHW.

Edited by SteamyTea
Link to comment
Share on other sites

2 hours ago, SteamyTea said:

I use the Envi model that has the optical sensor.

 

Can you read the LED on the import meter and decide on its state what is happening? i.e if no flashing direct PV to battery storage, if permanently on, say for half second, divert PV to DHW.

 

Well it's got the bi-directional IEC 62056-21 port but that's password protected. The blinking LEDs that track consumption at a rate of 4000 flashes/kWh don't appear to distinguish direction of power flow which is odd. At least some meters lock on solid when exporting. Not mine.

Link to comment
Share on other sites

Posted (edited)

Had a thought.

Can you sense and measure the DC side for generation, then compare to the import AC side.

I have one of these that I once thought may be useful, going to dump as it has been in loft for a decade.

Can you hack into it, or use it for parts.

Can deliver next Monday as i fancy passing my mates tombstone.

Compress_20220517_121750_0983.jpg

Edited by SteamyTea
Link to comment
Share on other sites

1 hour ago, SteamyTea said:

Can you hack into it, or use it for parts.

 

A very kind offer indeed but it'd be a shame to butcher an Iconic bit of 90's renewable energy tech like that! I bet it'd get snapped up on Ebay.

 

Actually it has given me a very useful idea - the Sunny Boy comms uses X10 style mains signalling and that could be a simple low-latency control method to fire-up the immersion (sort of like tagging individual mains cycles for consumption). I dabbled with that in the 90's so could dust down some old kit to try if and when I get that far.

 

Link to comment
Share on other sites

Posted (edited)
6 minutes ago, Radian said:

t'd be a shame to butcher an Iconic bit of 90's renewable energy tech like that! I bet it'd get snapped up on Ebay.

Off to the dump, will be is the skip with an old laptop in an hour.

 

Got a couple of large boxes of PC hardware.  Most of that will be going to the dump soon.  Don't think many people need 1990s components like graphics cards, sound cards, dial up modems and memory modules up to 1 Mb.

Or a 40 Mb hard drive.

Edited by SteamyTea
Link to comment
Share on other sites

Small progress report. Still sticking to the plan regarding choice ESP32 as processor. One of the reasons is the ability to do firmware updates over WiFi so once it's in place I can tweak code from anywhere. This also provides full galvanic isolation so I can measure the 240VAC directly with reference to Neutral and dispense with the sinewave distortion and phase shift inherent in transformer coupling. While there are specialist transformers specifically for this purpose it's a bulky solution. People in parts of the world on 110VAC are lucky as they can cheaply wire transformers with split primary 110V windings in series and get non-staurated AC at half the output voltage for measurement purposes. A series pair of 1meg resistors (for safety) as part of a voltage divider with 10K is all it takes to turn 240VAC into a 3V swing for the ADC. Another benefit of having an embedded web server at the end of a huge huge air gap is that I can create scope-like images of the waveforms in a bitmap (with an arbitrary number of traces) to keep an eye on everything. Example proof-of-concept bitmap just collected from my browser:

 

2018761946_chunk(7).gif.6e6b231c8952a0112d8241d64ee17b76.gif

 

Oh dear, the  ESP32 ADC isn't very linear. That's a pair of test waveforms from this function generator:

IMG_20220520_100754294_HDR.jpg.fc8c949dc4cf895badbee106c2ad8ea1.jpg

 

Still, it's a start.

Link to comment
Share on other sites

14 minutes ago, Radian said:

This also provides full galvanic isolation so I can measure the 240VAC directly with reference to Neutral and dispense with the sinewave distortion and phase shift inherent in transformer coupling

.........

 

15 minutes ago, Radian said:

A series pair of 1meg resistors (for safety) as part of a voltage divider with 10K is all it takes to turn 240VAC into a 3V swing for the ADC.

Quite interested in this. Can you post up a diagram. I have some ESP8266 that I can play with.

Link to comment
Share on other sites

14 minutes ago, SteamyTea said:

Quite interested in this. Can you post up a diagram. I have some ESP8266 that I can play with.

 

Uh oh! It's live mains we're talking about so I don't know where to stand on this request! I've been wiring things directly to the mains since I was around 16 years old and kind of have a second sense about working around lethal voltages. There's nothing physically wrong with doing it, but given the dangers there's usually a lot of pressure to use alternatives involving transformers or opto isolators. But this is one case where direct connection can be desirable.

 

There are plenty of examples on the web such as this one but using an OpAmp, like the one in that link, is optional for a real bargain basement mess around. My initial test circuit is about as simple as you can get:

 

ACADC.png.ade287df28775e6c61d912b1b77bc39d.png

 

Anyway, it illustrates the point.

 

Actually, to put things into perspective, I have some Touch Dimmers around the house that use a couple of high-value resistors connecting the touch plate to the phase control circuit at line voltage. You get a little tingling sensation off these things but the uA current through the body to Earth is harmless enough for them still to be sold on the open market. Same thing as above really.

Link to comment
Share on other sites

11 minutes ago, Radian said:

I've been wiring things directly to the mains since I was around 16 years old

That late in life.

I have an out of date Part P.

I shall a play when I have more time, never used the ADC on the 8266s.

Link to comment
Share on other sites

9 minutes ago, SteamyTea said:

That late in life.

 

Actually, I must have been something like 14 or 15 as I was flogging home-made sound to light converters to my class mates well before I did my O-Levels. Funnily enough I found one in the recent attic clear out. Should have taken a photo. Rats.

Link to comment
Share on other sites

47 minutes ago, Radian said:

Funnily enough I found one in the recent attic clear out

Doing a similar 'spring clean' at the moment.  Don't think I can post up what I have found that belongs to my old partner.  May forward a picture to @pocster, then deny all knowledge (shall strip out geolocation data and replace it with his position).

  • Thanks 1
  • Haha 1
Link to comment
Share on other sites

2 hours ago, Radian said:

Actually, I must have been something like 14 or 15 as I was flogging home-made sound to light converters to my class mates well before I did my O-Levels. Funnily enough I found one in the recent attic clear out. Should have taken a photo. Rats.

Yes while at school I made a whole lighting control rig for the school drama productions - about 10 dimmers in a row, worked like a dream nobody died but once the show was over I disposed of it and now only work at 24v and below.That tingle frightens me these days! I am happy doing mains wiring for switches, rings etc but electronics at mains voltages with open circuit boards nope, and would not recommend it.

Link to comment
Share on other sites

Ah school electronics.  When I first encountered it, the school disco rig you dare not touch 2 different bits of metal at once.  Earthing was not a concept that any previous person had bothered much about.  And I remember the 2 big speaker stacks, they looked very professional until when you actually read the fancy writing on the nameplates it read "heapacrap"  Being part of the disco crew had it's perks, even as 15 year olds, one of the teachers would deliver a pint of beer each to the disco crew.

 

Then the stage lighting rig.  When I first got there is was a bank of dirty great big rheostats strapped to a wall.  This was modernised with solid state dimmers.  To make the PCB's for these dimmer modules we didn't do any chemical etching, instead one of the engineering teachers merely stuck the blank board down to the milling table and removed the unwanted copper with a milling cutter to leave the tracks that were wanted.  A patch panel based on 15A round pin plugs and sockets let you patch different dimmer modules on the desk to different lights.  We had tremendous interference problems with the stage sound system when the lights were used, emc filtering was an unknown subject then.

 

I remember pre one production we had to run some new cables through the roof void above the hall, crawling on planks between the steel trusses and just wood fibre ceiling panel boards between you and the floor of the hall way below.  Nobody thought this was a dangerous thing for school children to do and nobody had heard of safety harnesses.

 

Can you imagine any of this being allowed today?

Link to comment
Share on other sites

Posted (edited)
7 minutes ago, ProDave said:

Can you imagine any of this being allowed today?

Given the amount of time at work this week I have spent in SHE related refresher courses instead of being out in the sun doing "dangerous" ;) things on my building site, I'm going with "No". 

 

And I share the OP's pain with non-linear ADCs. Dropping the sample rate (if Nyquist will let you) can help sometimes. But mostly not :(

Edited by dnb
Link to comment
Share on other sites

16 minutes ago, MikeSharp01 said:

but electronics at mains voltages with open circuit boards nope, and would not recommend it.

I agree. I even avoid probing live terminals with a multimeter unless absolutely necessary. I've got a 240V isolating transformer to float circuits under test - which at least reduces the chances of shock from a careless stray touch. Also allows scope earth to connect to Neutral without triggering the RCD.

 

4 minutes ago, ProDave said:

Can you imagine any of this being allowed today?

Does this advance humanity or not I wonder?

Link to comment
Share on other sites

3 hours ago, Radian said:

Actually, I must have been something like 14 or 15 as I was flogging home-made sound to light converters to my class mates well before I did my O-Levels. Funnily enough I found one in the recent attic clear out. Should have taken a photo. Rats.

 

2 transistor FM bugs here. The school got quite upset and threatened me with the 1948 Wireless Telegraphy Act. 

Link to comment
Share on other sites

4 minutes ago, Onoff said:

2 transistor FM bugs here. The school got quite upset and threatened me with the 1948 Wireless Telegraphy Act. 

Fond memories of those. I remember when we used to be shit scared of the General Post Office who were in charge of that kind of business. I wonder how many people today would believe that.

Link to comment
Share on other sites

a number of us seemingly have worrying similar backgrounds...

 

Our stage lighting setup was a pretty fancy early 70s Rank board, but we lost a channel or two each year and no-one  had ever tried replacing just the triacs til I was around...

Link to comment
Share on other sites

3 minutes ago, dpmiller said:

a number of us seemingly have worrying similar backgrounds...

 

I've got a theory about that... 🙊

Link to comment
Share on other sites

5 hours ago, Radian said:

2 transistor FM bugs here.

 I did that as well 

3 hours ago, dpmiller said:

a number of us seemingly have worrying similar backgrounds...

It would seem so and yet back in them days (1974) I felt so very alone and now there are people like me everywhere round here.

 

Link to comment
Share on other sites

Posted (edited)
1 hour ago, MikeSharp01 said:

I felt so very alone and now there are people like me everywhere

'friends all over the world, all over the world.  None in this country, but all over the world'

 

Edited by SteamyTea
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...