Author Archives: Greening Me

HEMS Wiring Update

Late last year I started adding the ability to optimise my electricity price by shifting some electrical loads around in response to a dynamic electricity tariff. My electricity price changes half-hour-by-half-hour and day-to-day, with the prices for the day ahead published each afternoon. I already had the ability to manage the same electrical loads to maximise use of the output of my own solar panels for some 3 years. The first load smartly controlled to follow my electricity costs was my electric car charging, but I have subsequently added optimisation of water heating and storage battery behaviour.

However, time has revealed an occasional issue arising when both the bought electricity price was low and a solar suplus was available, so both sources sought to enable the car charger; but in practice the vehicle didn’t charge. The issue here is that the car charger does a sanity check on the radio signal indicating that it should be operating, which fails since the combination of two signals driving a common radio transmitter can lead to excessive duration of the ‘on’ signal which fails the sanity check.

Revised HEMS wiring

My chosen solution is to disable one of the two signals sources when the other wants the car charger on. I’ve chosen to make the price signals via the HEMS the master, so when the HEMS wants to charge the car HAT #4 opens so that the ImmerSUN no-longer has influence over the car charger, and HAT #1 is used to control car charger behaviour. When the price is relatively high HAT #4 remains in the normally closed position and HAT #1 is open allowing the ImmerSUN to control charging behaviour via its output relay to use any surplus solar. (HAT refers to HArdware on Top – accessory circuit boards that mount on top of a Raspberry Pi. In my case board with 4 output delays. HAT #3 is currently unused.)

Cooling it down (or not)

As regular readers will know, I shift my major loads (including battery, car and water heating) around to exploit the cheapest periods on my tariff. Yesterday I had a conversation with someone who was very keen to do the same with a fridge. I’ve never considered doing this a fridge on two grounds:

  • Is it safe to mess with a fridge or freezer if that risks compromising the temperature and thus the safe storage of food?
  • Is there enough saving to be worth even considering this?

Although I don’t explicitly measure the power consumption of the fridge, we can make some assumptions from data that I do have.

According to the US Department of Health, a fridge can be safely left for 4 hours during a power cut, but you should avoid opening the door. That period at least corresponds to the duration of the early peak (and thus potentially the highest cost power), but I still don’t think that this would be worth the effort.

Overnight electricity consumption #1

The above illustration shows my home drawing 168 Watts overnight. That load is all the standby loads in the house (TV, DVD, oven, microwave etc), assorted phone and iPad chargers, cordless phone power, WiFi router, alarm clock, central heating controls, smart plugs and the fridge-freezer.

Overnight electricity consumption #2

For a couple of periods overnight the consumption dips to around 114 Watts, a difference of 54 Watts. I can think of nothing on my list of loads that might cycle on/off except the fridge-freezer so potentially that’s the near-continuous 54 Watt load. It’s conceivable of course that the fridge-freezer load cycling between two levels, but the lower level cannot be more than 114 Watts. 114 Watts is 4 p/hour at my highest electricity cost of 35 p/kWh or 1 p/kWh at my average rate of 9 p/kWh. This doesn’t seem a worthwhile saving to me.

Different perspectives

The above images show four different perspectives on the same day of data (April 24th) from different sources within the home.

Smart Meter HAN

Firstly, the Smart Meter HAN image shows bought electricity to the home. Each smart meter sits on a Home Area Network (HAN) which is how the In-home display provided with the meter gets its data. The in-home display is an example of a Consumer Access Device (CAD). In my case I also have a Hildebrand Glow Stick as a CAD. The Glow Stick, which looks something like an oversized USB stick, also connects as a CAD to the smart meter allowing the meter to be read. An associated app, Hildebrand’s Bright, allows the Glow Stick to be read via the cloud. In principle the Bright app can display either energy in kWh or cost, but in my case can only display energy in kWh as Octopus don’t push the price data into the smart meter so energy cost always reports as zero. The data is presented by the minute.

Smart Meter WAN

Secondly, the Smart Meter WAN image shows the same data but from the perspective of the Wide Area Network (WAN) whch connects the smart meter to the energy retailer (Octopus for me). This half-hourly data is reported via the Octo Watchdog app. The data reported is cost per kWh (the blue line) and energy consumer / kWh (the red columns). The energy data in the red columns follows that of the red line in the prior illustration but in lower resolution (half-hourly versus minute-by-minute). You can clearly see most energy being bought when the price is lowest.

Powervault

Thirdly, the Powervault image shows grid in/out and battery in/out. The green grid-in line mimics the red data from the above images. The battery in/out data is solely visible in this image. The resolution is good enough to see shorter events like kettle boil cycles.

Immersun

The final image, from the Immerun, is probably the most useful although it lacks energy price and hides battery in/out within the House data (hence ‘House’ being zero at times). The immersun alone reports output data from the solar panels and diversion to the immersion heater. It also lumps the car charger energy within ‘House’, indeed none of these views can directly report the car charger behaviour although its the dominant energy consumer here.

I’m planning to construct my own view showing all the different prices of data together in one place. I already have access to:

  1. The Immersun data via the same API called by their app. I came across a blog post that described how to do this.
  2. The Powervault data API (I only have a control API at the moment) which should give me battery in/out (at least I’m on a promise of the API at the moment).
  3. The Hilbebrand data which duplicates the Powervault Import/Export at the moment, but has the potential to provide independent monitoring of my car charger.

In principle then that would leave me able to report 3 x energy sources (grid, panels and battery; of which grid and battery would be bi-directional) and report 3 x energy consumers (car, water heating and home).

Export metering and battery storage

A recent discussion centred on whether, as someone in receipt of UK feed-in tariff (FiT) and having a smart meter, I should be on metered export or deemed export. I had previously been advised that my smart meter did not have an export register, but playing with the buttons revealed an active export register.

The illustration above taken from OFGEM’s Guidance for generators: Co-location of electricity storage facilities with renewable generation supported under the Renewables Obligation or Feed-in Tariff schemes (Version 2) shows a configuration like mine, but rules out metered export since I can charge my battery from the grid and then export that power back to the grid. FiT terms are that only generated renewable power can be exported for FiT payment and thus, regardless of the capability of my meter, I’m only permitted to deem export. Deemed export does not incentivise purchase of power from the grid and then export.

There could be an opportunity to use the export meter as part of an export tariff instead of the FiT export component, which wouldn’t have a restriction on buying and exporting grid power, but my high levels of self-use make this unattractive compared to deemed export at 50% of generation.

Enhancing the HEMS

Over the last few months I’ve gradually been adding to the capability of my HEMS which determines when is the cheapest time at which to buy electricity for different purposes. After initially controlling my car charging only, I’ve now added both immersion heater control and battery storage control.

Desktop HEMS view with real-time Immersun status alongside

To the left and centre the picture shows the plan of the HEMS for two twelve hour blocks of time from when the cost data was last updated by my supplier. To the right is the real time display of my home. It’s a dull day so only 258 Watts is coming from the solar panels (maximum of 4,000 Watts), and so the HEMS has been buying energy from the grid to charge the battery when the price is low.

For each of the panels to left and centre, the electricity price is displayed for each half hour, with the colour-coded decision of the HEMS for what to do.

The EVSE (for charging the car) shows 3 of 4 possible statuses:

  • red – the energy price is above a configurable upper cost threshold, so the car will never charge.
  • green (not shown) – the energy price is below a configurable lower cost threshold, so the car will always charge.
  • yellow – these are the cheapest half-hours. The HEMS will enable charging for the required number of half hours to deliver a configurable number of total hours with a user-defined time window (typically overnight for the car). Overnight was configured for only 1 hour, although 5 would be more typical for a full charge.
  • orange – these half hours are more expensive. The HEMS will not enable charging in these hours unless the configuration is changed for more hours.

Water heating follows the same control strategy, but is configured to only heat water during plunge pricing events when the electricity price falls below the gas price.

Operating pattern for car charger and water heating

Configuration parameters allow customisation of:

  • Upper cost threshold – never charge when price above this threshold.
  • Lower cost threshold – always charge when price below this threshold.
  • Start of time window – arrival time for charging.
  • End of time window – departure time for charging.
  • Target hours – number of hours of charging/heating required within time window.

Battery control is configured similarly, but has more states than simply on and off, and correspondingly more colours. The colours reflect those used by the battery manufacturer. I currently use only 3 states:

  • blue – normal – the battery automatically either chargers or discharges either to absorb any surplus solar electricity or displace bought electricity when demand exceeds solar availability. Here used when the electricity price is highest.
  • light green – charge only – will charge proportionately to any solar excess as above, but will not discharge. Here used for mid-range electricity costs.
  • dark green – force charge – charge at maximum power drawing power from the grid as necessary. Here used for lowest electricity prices.

HEMming it up

Here we have the whole assembly mounted on the side wall of the airing cupboard above the hot water cylinder. The whole assembly is mounted on a board which can be lifted off two screwheads. The cables are sufficiently long to allow the whole assembly to be placed on the floor should update be required.

Below the assembly can be seen a socket outlet which provides power for the low current controls only. The Raspberry Pi that provides the HEMS functionality is powered by a re-used USB mobile phone charger. All this control side can be isolated by the simple expedient of pulling out the plug. The high current power for the immersion heater is hardwired via the ImmerSUN. All power is provided via the fused spur with single pole switch that originally powered the immersion heater alone.

As an aside at this point, some ImmerSUN users have reported issues with power connectors melting as indeed have I in the past. In my installation the chances of this occurring are minimised by:

  1. Use of multistand flex for wiring rather than solid twin-and-earth.
  2. Use of bootlace ferrules to terminate the ends of the cables before insertion into the screw connectors.
  3. Use of cable ties to secure the flex to the chassis of the ImmerSUN on the provided locations adjacent to the cable entry.


HEMS Installation

The illustration shows the components mounted on a board before installation on the side wall of the airing cupboard.

To the top left is the HEMS itself (less cover) with 4 black output relays visible on the HAT of which two are connected via the white cables to operate car charger and immersion heater. Immersion heater software isn’t written yet but will mirror the charger software but on a second channel. Not illustrated is the power cable to the HEMS – a standard mobile telephone charger and USB cable.

To the top right is a 10-way junction box typically used for boiler installations. It takes switched inputs from the HEMS (x2) and ImmerSUN and uses them to drive the two outputs (radio transmitter and ImmerSUN Boost).

To the middle right is the existing radio transmitter used to operate the car charger. In this new installation it can be enabled either by the HEMS when the bought electricity price is low or by the ImmerSUN when our solar panels are in surplus.

To the bottom is the ImmerSUN. In additiona to power in and power out to the immersion heater, there are also two control signals: (i) a relay contact that closes when solar is in surplus to drive the car charger and (ii) a relay input that can be configured as ‘Boost’ enabling full power to the immersion heater on an external signal (in my case from the HEMS).

HEMS for car charging

My holiday project is to create a Home Energy Management System (HEMS) able to optimise the costs to charge my electric car.   I currently have a smart energy tariff where the electricity costs can vary each half hour and day-to-day as a function of market price variations,  The role of the HEMS is to select the cheapest time to charge the car.  It will potentially control other loads in future, although car charging is my priority.

The HEMs is creating using a small computer called a raspberry pi which can read the electricity prices from my supplier when they are updated each day.  Software of my own creation then decides when to turn a relay on or off to enable/disable the car charger,  A configuration file can be edited to influence its behaviour.  A charging schedule is built once daily and then a seperate process actions the schedule every half hour.  An existing radio link, which is already used to automatically enable my charger when the solar panels are in surplus, will signal that the charger should be enable or disabled.

I now have the HEMS running on my desk, although it’s not yet mounted in a case or wired to the transmitter.  I have also created a small webpage to show the status. 

The webpage shows the 48 half-hour blocks between 5:00 PM one day and 5:00 PM on the next day.  Each block shows the time, electricity price per kWh, and the resulting car charger schedule.  It should be noted that there’s often much more variation in price through the day than is illustrated here.  Indeed sometimes the price can go negative.

The green block indicates a period where the price is below a floor price.  The car charger is activated any time that the price drops below the floor price.

The yellow blocks indicate that the charger will be enabled for a total of 3 hours (2.5 yellow plus 0.5 existing green) within a user-defined time window to achieve an acceptable state of charge by next morning.  The user can define both the time window and the number of hours of overnight charging required.  A further block of yellow occurs outside the window in the afternoon where the price is within the range of these cheapest hours within the window, 

The orange blocks indicated when the charger could be enabled if more hours of charging were required than the 3 hours currently specified by the user.

Finally, the red blocks indicate where the price exceeds a user-defined ceiling price at which charging will not occur.

My next steps are to do a little more testing on the bench while I await delivery of the case, install the system into the case, and then install it in the airing cupboard.

In the longer term, my chosen hardware can switch up to four mains electrical loads.  I anticipate adding the immersion heater so that hot water can be made when the electricity price falls sufficiently to make that attractive versus solar or gas.  I could also enable some underfloor electric heating, but the costs to transmit a suitable control signal across the house would not be recovered by the small energy saving. 

Plunge pricing

Last night was the first time that I experienced being paid to use electricity since we finally changed to the smart tariff a week ago.

As a result of unusually high winds in some parts of the country there was an abnormal amount of electricity on the grid from wind turbines, causing the wholesale price to drop. Indeed the wholesale price dropped so low as to be negative.

My own electricity cost is linked to the wholesale cost, so my costs dropped very low and indeed negative at times. In those circumstances I remotely configured my car charging, battery storage and (for the first time) immersion heater to use the overnight power; and used the delay timers on the washing machine and dishwasher to start them during the negative cost period as their most intensive energy use is their initial water heating periods.
This snapshot shows the instantaneous consumption part way through that period with relatively high house loads and water heating.

My holiday project – building a Home Energy Management System (HEMS) – should automate the operation of the car charger and immersion heater around the periods where energy costs are lowest.

Battery Storage Configuration for the Smart Tariff

Today I’ve been thinking about configuring the Powevault storage system around my smart electricity tariff in which costs can vary every half hour.

My battery has an ability to be configured around a tariff called TIDE. I don’t have TIDE, but the ability to configure around TIDE can be reused for my tariff. The unit can be configured using a table or the clock as illustrated. There are several sections:

  1. Force charge – the battery storage charges at its maximum power (only 800 Watts) for 3.5 hours while electricity is cheapest.
  2. Charge only – a period while electricity is not quite so cheap when the battery will charge proportionally to any solar surplus, but will not discharge.  It wouldn’t make sense to start discharging the battery when electricity is only marginally more expensive than when the battery was charged.  This also prevents the battery discharging into my electric car if the car charges for a longer period than the battery.
  3. Normal – storage system will either charge proportionally to solar surplus, or discharge to minimise input.
  4. Force charge – as previously charges at maximum power in this case to ensure that some power is stored prior to the most expensive period.
  5. Normal – as previously but intended to cover the peak rate 4:00 to 7:00 PM period and beyond if there’s still stored energy.

Now that this pattern has been created, it can be adjusted by dragging the tabs around clock to adjust for when the cheapest power is at a different time day-to-day.

In the longer term I hope to automate such adjustment, although my priority is getting the car charger to automatically operate when power is cheapest.