Welcome to ned Productions

by . Last updated .

Welcome to ned Productions (non-commercial personal website, for commercial company see ned Productions Limited). Please choose an item you are interested in on the left hand side, or continue down for Niall’s virtual diary.

Niall’s virtual diary:

Started all the way back in 1998 when there was no word “blog” yet, hence “virtual diary”.

Original content has undergone multiple conversions Microsoft FrontPage => Microsoft Expression Web, legacy HTML tag soup => XHTML, XHTML => Markdown, and with a ‘various codepages’ => UTF-8 conversion for good measure. Some content, especially the older stuff, may not have entirely survived intact.

You can find the posts here replicated onto Diaspora, if you prefer to subscribe there instead.

Latest entries: Feed icon

Sunday 17 April 2022: 23:36. Two and a bit months have passed since my last post in my series on my future house build where I showed computer renderings of the ‘shrunken’ seventeen metre wide house designed to fit inside one site of the two I hope to build upon. This was the conservative design intended to not be controversial to the planners, and last post I expected a final decision by June.

I am glad to report that the planners moved a bit quicker than expected, and we received notification three weeks ago that they intend to grant planning permission in early May if no appeals to the decision are lodged. If final permission is granted, then begins the process of purchasing the sites, which will take at least two months. I feel a little nervous about the purchase as sites have risen in price by about 15% since we agreed to buy them last year, plus I successfully cleared the previous planning blockers on that estate by getting local political representative John Paul O’Shea to intervene, so I have this horrible feeling that the sale will go wrong. Only when the land deeds are into my hands will I rest easier.

You can see the planning application and all the gory details at http://planning.corkcoco.ie/ePlan/AppFileRefDetails/224184/0, however to summarise there were only a few absolutely ordinary conditions imposed by the planner:

  1. The proposed development shall be carried out according to the plans lodged.

  2. A commencement contribution fee of €6,342.91 shall be paid to Cork County Council (this is based on internal square meterage of the property, and as much as it looks high, it’s less than half what it would be inside the city).

  3. All new planting on the site shall be native in origin.

  4. Any cutting of vegetation shall be outside the bird breeding season.

  5. No muck nor debris to enter the public road from the site during construction.

  6. Prior to commencement a connection to the public water mains is required.

To be honest, considering some of the conditions imposed by planners on previous developments in the same estate, these are very unimposing. Even only a year ago they were imposing a lot more onerous conditions. I suppose this is a new planner, from the preplanning feedback we really thought she was going to be even harsher, but in the end it turned out not to be so. I’m not complaining however!

The ecological report reckons the development could affect in the Blackwater Special Area of Conservation (these are protected under EU law):

  • Floating river vegetation.
  • Freshwater Pearl Mussel.
  • Sea, Brook and River Lamprey (Eels).
  • Migrating Salmon.
  • Otters.

Of these, the Freshwater Pearl Mussel is the most likely to be impacted, despite them being about 60 km downriver. Indeed, in the application as I described last post I submitted a Habitats Screening statement on said Freshwater Mussels and how this development would not impact them. At that time the Council didn’t employ an Ecologist, which is why everybody had to contract one in, so I took a stab at writing my own report. That turned out to be superfluous to needs, but there was no way of knowing that at the time.

I guess the most surprising thing about the planning approval was the decision to permit materials other than smooth painted render everywhere. They permitted the low stone wall at the front, the charred wood in the middle, the zinc roofed porch, and the expansive glazing element at the front. They also had no issue with the large greenhouse at the back, and the entire of the south facing roof being solar panels. Surprisingly open minded of them.

The planning application for the larger twenty metre house went in a month ago, but it got bounced because I didn’t use yellow paper when printing the copies of the site notice in the application (I did use yellow paper on site). So I had to pay for another newspaper advert, reprinting and reerection of the site notices, and a bunch of other stuff had to be adjusted in the six copies of everything in the application, before I was able to resubmit it end of last week. Assuming it takes three months, that means we’ll hear back about it mid July, which hopefully will be around when I should get the title deeds into my hands. Obviously, if they just go ahead and approve that planning application, then it’s off to the races in terms of getting started on construction detail, but if they don’t approve, then we’ll need to figure out what to do next based on whatever the planner writes in their report as the basis for rejection.

In any case, none of this is anything worth worrying about for the next few months, so I can go focus on other things. My next non-work work task is proposing standardised secure sockets for C++, specifically the proposal paper for WG21. I need to bang it out using my very limited non-work time, and get it submitted and then that’s off to the races as well.

Then it’s all the other stuff I had hoped to get done or even started and I haven’t. Sigh. If only there were more hours in the week!

#house




Sunday 6 February 2022: 02:58. It’s been just under three months since my last post in my series on my future house build, and during which of course Christmas occurred. Since the New Year pretty much all my free time has gone on getting the planning application ready – it was submitted last Tuesday, and so I now have the time to write up what happened since mid-November.

The preplanning feedback came back the week of Christmas, so we didn’t really get much time to digest it before everything stopped for the holidays. Things didn’t really get going until mid January, whereupon we started acting on the feedback (which I have slightly edited for privacy and clarity):

I have reviewed the proposal submitted and I would have the following comments to make in relation to same.

  • I note that the governing permission on the subject site is 00/4700. I would draw your attention to condition no. 3 of the original grant which notes the following

    • The construction of traditional type dwellings the siting, design, external finish and architectural standard of which shall be to the Planning Authority’s satisfaction and in harmony with the environment of the locality.

      Reason: To ensure a satisfactory standard of design and layout for the proposed development in the interests of visual amenity.

  • I note the subject site is located within the development boundary, where the sites are zoned existing built up area. On this basis, the principle of the construction of a residential dwelling is acceptable.

  • In terms of the amalgamation of site no. 29 and 30 to facilitate the proposed development, I would have concerns in relation to the sustainable use of land and lowering the density of development within a defined settlement boundary. A strong justification for the amalgamation of the sites would need to be put forward at application stage, this should include analysis of no. of serviced sites available within the settlement boundary.

  • In terms of design of the proposed development, it is noted that the specifics of design and layout are usually addressed at application stage. However, I note drawings have been submitted with the preplanning request. On this basis, I would have the following comments in relation to same

    • I would have concerns in relation to the overall scale of the proposed development in the context of the existing housing estate. The overall scale of the proposed development would appear from the submitted drawings to be excessive given its context within the existing housing estate and it would not be considered to be keeping in character with the existing dwellings in the estate.
    • I note that the housing development comprises various styles of dwelling, however, there is still an overall general consistency of appearance. While a more contemporary dwelling could be considered at this location, it should still aim to be consistent with the general appearance and character of the dwellings in the vicinity of the sites.
    • I would also refer to the condition no. 3 of the governing permission set out above which required traditional type dwellings.
  • As an update on the WWTP in the village, it is considered that there is some capacity within the treatment plant. However, all applications looking to connect to the plant going forward will be referred to the Executive Scientist and Ecologist. There is not too much more that I can say on this at this stage, however, updated information may be included in the new Cork County Development Plan which is set to be published in early 2022.

If the above seems vague, non-commital and rather hard to discern exactly what they want changed, that would be normal for preplanning feedback – nailing colours to a mast removes later flexibility. That said, after a bit of thought and study their feedback could be rewritten into more concrete terms thusly:

  1. Despite that the current style guide is the 2011 guide (very shortly to be replaced with the 2022 style guide), we want this house to meet the 2001 style guide because that was the guide in force when the estate’s original planning was granted, and the existing houses were theoretically built according to that style.

            (The reason this matters a lot is that the 2011 style guide bans gables, whereas the 2001 style guide effectively requires gables. We designed towards the current guide (i.e. gableless), so now we need to redesign around gables jutting out everywhere!)

  2. No materials to be on the outside except light coloured smooth painted render, as that is what all the other houses in the estate are supposed to be (and which most certainly are not, as they acknowledged).

  3. They don’t like the idea of one house spanning two serviced sites in a way which permanently reduces housing density, but left open a possibility that they could be persuaded if it did not set a precedent others could later reuse.

  4. They think the proposed house and its framing too big.

  5. Planning applications submitted from 2022 onwards will require an Ecological Impact Assessment, and one will need to prove that how one connects to the WWTP will not impact the Blackwater Special Area of Conservation which is protected under EU law.

To deliver on these we did:

  1. Gable-ified the design, particularly the ‘shrunken’ house (more below).

  2. Removed most of the non-smooth-painted-render materials, and shrank the area of what remain.

  3. Made a second design of the house fitting into a 17 metre width rather than its original 20 metre width so it can fit into a single site. This ‘shrunken’ house became our fallback plan, the conservative option likely to get planning permission. It is this I submitted last Tuesday for Site 30 only.

    Also, given the phrase ‘A strong justification for the amalgamation of the sites would need to be put forward at application stage’ it became obvious that we would need to hire a specialist Planning Consultant to help us write the planning application for the 20 metre house i.e. a former Planner who knows how to write in Planner-ese. Alas, Planning Consultants are expensive, quotes came in between €800 and €5000 some with long lead times. We ended up choosing a lady who could get started within a few weeks for €3000.

  4. Removed the extended framing from the 20 metre width house and built it up higher with gables in order to make it look shorter and less different from the other estate houses.

  5. I wrote a Habitats Directive Screening statement which followed the EU framework for describing how we will impact the Blackwater Special Area of Conservation both during construction and during the lifetime of the house. One normally pays an ecologist €800-1000 to write one of these, I cobbled mine together by exhaustively assembling all the Habitats Screening statements from preceding planning permissions in the same area, and I replicated the same points they made using similar language, but also customised it slightly to describe how our rainwater harvesting tanks are good for the Freshwater Pearl Mussels 64km downstream in the Blackwater by attentuating stormwater surges to the WWTP etc etc. We shall see if that sticks!

The ‘shrunken’ design

This 17 metre design looks very much like the 20 metre design submitted for preplanning I showed pictures of last post, but we had to make a fair few changes:

  1. The loss of three metres of width means more spillage of floor space into depth, so both front gables come out a little further and a whole new gable appears in the back.

  2. As we no longer have the width to put the home office over an internal bridge into the upper floor west, the eastmost front gable goes to two storeys and the home office goes into the upper floor there instead.

  3. As the internal bridge no longer makes sense, the main vaulted living space area gets both wider as well as shorter. This makes a master bedroom infeasible in the westmost front gable, so we move the plant room in there as it is now comparatively small. The master bedroom now goes into the rear gable.

Otherwise, apart from size changes, things remain as they were, though energy efficiency according to the PHPP takes a dive of about 20% because there is much more surface area than before for less internal floor area. Also, the margin for minor builder error in airtightness to reach the Passive House Plus standard shrinks from 40% to a mere 24%, a 67% reduction .

I am fortunate that Twinmotion 2022 beta had come out since the last post, and using it I was laboriously able to make ray traced images this time. They look a lot better than those from the previous post, though I had to dial down the quality settings severely given my emaciated graphics card. Note that these are missing the greenhouse on the back and a few other minor changes.

My ray trace of the original Twinmotion file setting correct latitude and longitude for our house’s location and orientation. Sunbeams are for 12pm on the 1st March. Pictures progress top left to top right downwards, finishing from bottom left to bottom right: (i) view from living room towards kitchen; (ii) view from front door at kitchen; (iii) view from front door at kitchen and living room; (iv) view from front door at living room; (v) view from mezzanine library reading area downwards into dining table and living area; (vi) view from mezzanine library reading area out front windows of house.

There is also the master bedroom and the games room:

Heading out of the master bedroom, which has a door opening into the back garden, the back of the house is remarkable only for the number of solar panels on the roof:

A reminder that the lean-to greenhouse on the back was yet to be added, and the green ethereal building next door is a hypothetical house. Moving around to the front:

As you can see, we have hacked back the surface area of unapproved materials severely, with the northern glazing column reduced from three wide panes to two narrow ones, and the bottom half broken into a forward extended metal porch, albeit without much metal showing. This shrunken design surely should tick the planner’s boxes.

What’s next?

Now that the shrunken design on the single site 30 is submitted, our next task is to prepare the planning application for the 20 metre wide house in collaboration with the Planning Consultant. No doubt she will write the application in a way that if it gets rejected, it is designed to go straight into An Bord Pleanala, the national appeals mechanism for planning. That takes a further four months and yet more money in fees of course.

However there is a third option – submit a third planning application for the same land, this time with the shrunken house occupying Site 29 but with the boundary around both sites, possibly also with the outhouse from the slightly larger house. It can thus be argued that Site 30 has not been consumed nor made unavailable for future development in any way. Whether this is worth doing, or is feasible, depends on how the Planners react to the 20 metre wide house: if their primary objection is that the extra three metres of width renders the other site permanently consumed, or that three metres longer makes the house too bulky compared to neighbouring houses, but otherwise they don’t object, that would seem the obvious path forwards. If, on the other hand, it is the fundamental principle of granting planning on amalgamated sites at all as it would set a precedent, then it probably doesn’t matter what you put on those two sites. We’ll only find out when the Planners deliver their verdict.

Assuming that getting a verdict on the single site application will take four months, that puts a decision into June, with a decision on the dual-site application probably landing in July. Completing the purchase of the site might take two months starting from June, so nothing more could happen anyway until August. If it then goes to An Bord Pleanala, I suppose concurrently we submit planning application number three and we should hear back from both of those around December 2022. We then could begin detailed construction drawings which I can’t believe would take anything less than four months, probably six months, given that the Energy Consultant will be in there, as will a M&E consultant and probably a garden designer. Thus only in June 2023 would one be ready to approach builders for construction quotes as the upper bound, with the lower bound no earlier than January 2023.

Both are rather a long time away, though almost certainly by then price inflation should be getting tamed by interest rate rises and a slowing economy should debottleneck materials and labour supplies. I’m also not entirely sure that even if we booked construction by the end of this year would it actually speed anything up given the backlog in the self build industry, though it would almost certainly cost us more. So, in all probability, it will be 2024 no matter what we do before construction begins.

My original plan was to build the outhouse first and install services into it, this would let me commence building and thus be eligible to draw down €30k of government subsidy, lest the government reduce that next budget. I’m also minded that commencing the mortgage sooner rather than later would lock in a lower fixed interest rate for the first five years. Might it be doable by September of this year, give it two months to get approved, then submit commencement for December in order to claim the subsidy? Maybe, though it’s a bit tight.

Let’s just hope that the government extends the subsidy into 2023!

#house




Thursday 18 November 2021: 22:47. Last post in my series on my future house build I described the house we have designed and submitted for preplanning feedback using Virtual Reality via the Oculus Quest 2, and I did some rough ‘back of envelope’ energy modelling to see if it would meet Passive House energy consumption standards. I concluded by looking forward to seeing if a PHPP model of the house (PHPP is the computer modelling software for Passive Houses) would match my crude calculations.

So yeah, I just went ahead and inputted the house design into PHPP v9.6 straight away and this post is about what it spat out, because it contains quite a few surprises. To remind folk so later makes sense, we intend to meet the Passive House Classic standard and the RIBA 2025 challenge for this house, with stretch goals for the Passive House Plus, the RIBA 2030 Challenge, and the Passive House Premium minus PV generation:

Required:
Irish 2019 NZEB BER A1 House
Required:
German Passive House Classic
Required:
RIBA 2025 Challenge
Stretch goal 1:
German Passive House Plus
Stretch goal 2:
RIBA 2030 Challenge
Stretch goal 3:
German Passive House Premium
Heat & Ventilation Energy:≤ 25 kWh/m2/yr≤ 15 kWh/m2/yr
(40% better)
≤ 15 kWh/m2/yr
(40% better)
≤ 15 kWh/m2/yr
(40% better)
Air Leakage:≤ 3 m3/hr/m2≤ 0.6 air changes per hour
(72% better)
≤ 0.6 air changes per hour
(72% better)
≤ 0.6 air changes per hour
(72% better)
Wall & Floor Insulation:≤ 0.18 W/m2K≤ 0.15 W/m2K
(17% better)
≤ 0.15 W/m2K
(17% better)
≤ 0.15 W/m2K
(17% better)
Window Insulation:≤ 1.4 W/m2K≤ 0.8 W/m2K
(43% better)
≤ 0.8 W/m2K
(43% better)
≤ 0.8 W/m2K
(43% better)
Total Energy Use:≤ 120 kWh/m2/yr≤ 60 kWh/m2/yr
(50% better)
≤ 60 kWh/m2/yr
(50% better)
≤ 45 kWh/m2/yr
(63% better)
≤ 35 kWh/m2/yr
(71% better)
≤ 30 kWh/m2/yr
(75% better)
Embodied lifecycle carbon emissions:≤ 1200 kg CO2e/m2≤ 800 kg CO2e/m2
(33% better)
≤ 625 kg CO2e/m2
(48% better)
Potable water consumption:≤ 125 litres per occupant per day≤ 95 litres per occupant per day
(24% better)
≤ 75 litres per occupant per day
(40% better)
Indoor CO2 levels:≤ 900 ppm≤ 900 ppm
Indoor VOC levels:≤ 0.3 mg/m3≤ 0.3 mg/m3

To clarify:

  • Passive House Classic is a low energy house, approximately twice better than the current best rated house under the 2019 EU Near Zero Energy Building (NZEB) regulations (Passive House Classic long precedes EU NZEB, and indeed strongly influenced the design of EU NZEB which is why they look so similar).
  • Passive House Plus is a net zero energy house, over a calendar year it generates about as much energy as it consumes by generating energy in summer and consuming an equivalent amount in winter.
  • Passive House Premium is a net generating house in that it contributes much more to the grid than it consumes. Because in Ireland there is no feed-in tariff for solar PV, and when they introduce one next year it will pay at desultory rates and has a low annual cap for maximum payment, it is not economic in Ireland to generate much excess electricity on-site. One can still aim for a stretch goal of ≤ 30 kWh/m2/yr total energy use however, and to put that in perspective, what an Irish BER A2 rated house uses only for space heating is what a Passive House Premium uses for everything – cooking, showers, all electricity use etc.

How I configured my PHPP model

Firstly, I must stress the following:

  • I have never taken the Passive House Designers Course.
  • I basically just filled in the PHPP v9.6 spreadsheet using common sense, a fair bit of head scratching, and occasionally peeking inside the equations to figure out what the hell they mean and/or what the error messages were going on about.
  • I did not invest time on inputting detailing such as thermal bridges nor exact shell layer composition.

What I modelled:

  • Climate: PHPP defaults for Cork Airport in Ireland, albeit with altitude reduced to my site’s.
  • U-Values: Three building assemblies of a single 0.5m thick shell giving a u-value of 0.147 W/m2K, each for ground floor, first floor, roof.
  • Areas: Fairly close approximations of shell areas from plans.
  • Ground: Fairly close approximations of shell areas from plans with u-value of 0.11 W/m2K. I left all other values at suggested defaults.
  • Components and Windows: I approximated Munster Joinery’s Passive House range of windows and doors, Velux’s Passive House range of roof windows, the Zehnder ComfoAir 550 as the MVHR, and the ShowerSave 20 ltr/min waste water heat recovery unit. As per the design described in earlier posts, there is no heat pump employed here.
  • Shading: I put full temporary sun protection on the south facing roof windows, as these will have external mechanical shutters. I put 70% shading on the south facing wall windows due to an external mechanical blind on the games room and the summer plants in the greenhouse.
  • Ventilation: As my site is windy, I chose a moderately protected site with wind hitting it from all sides. I set the worst possible air tightness, 0.6 ACH, and made the shell air tightness layer somewhat elastic by 10 m2 for the whole house. I configured 30 m3/hr of ventilation per person, and chose its suggested default of 180 m3/hr of ventilation for the house. I told it to run that constantly for 24 hours per day. I chose two metres of inlet and outlet air ducts, and a subsoil heat exchanger to represent the earth tube with efficiency of 60%. It reckons that with all that combinated, the total ventilation system should achieve 75.2% effective heat recovery, with the earth tube basically paying for the other losses around the 75% raw efficiency of the MVHR unit.
  • Summer Ventilation: I configured an automatic bypass of the heat recovery on the MVHR, and set a 0.32 ACH for ventilation which is +50% of the winter ventilation, as suggested by the help box. Unfortunately the subsoil heat exchanger doesn’t appear to be factored in, so to account for it reducing the incoming air by maybe 60% of the difference to ground I increased that ventilation to 0.66 ACH to make the numbers come out about what look to me about right for a 0.32 ACH via a long deep earth tube.
  • Domestic Hot Water + Distribution:
    • For Space heat distribution I configured 10 m of distribution pipe of 15 mm diameter with 24 mm 0.04 W/mK insulation @ 75 C temperature. Radiators are best run at 55 C to prevent them producing a scalded metal smell – or indeed burning people – but a thermal store sits at 75 C, so I have to choose 75 C here (in practice one would use a thermostatic mixer drawing from both the top and bottom of the tank to reduce the radiator temperature).
    • For DHW useful heat I left the defaults as was (16 ltrs/person/day for showers, 9 ltrs/person/day for hot water) but configured a shower drain water heat recovery unit as described earlier for a 16 ltr/min ten minute long average shower with heat recovery into the cold water feed for the thermal store’s DHW inner tank and the shower cold water feed. This gave a 55% whole system shower heat recovery.
    • For DHW distribution I left the flow temperature at 60 C, and configured 20 m of circulation pipe of 15 mm diameter with 24 mm 0.04 W/mK insulation. I added a further 10 m of individual pipes off the DHW circulation pipe with six tap openings per person per day every day of the year.
    • For Storage heat losses I chose a DHW and heating tank with 5000 litres capacity @ 75 C to represent the thermal store. Assuming a 2x2x3 metre airtight box insulated with Kingspan Sauna Satu with a u-value of 0.023 W/m2K = 20 m2 that gives a heat loss rate of 0.46 W/K.
  • Photovoltaics: I configured sixteen of my cheap 375w Trina honey solar panels on the south facing roof at a 35 degree slope under the assumption that more cheap panels is better than fewer expensive panels. This has a maximum generation capacity of 6 kW. PHPP lets you enter their detailed functionality such as crossover voltage and the inverter’s details, and it thinks this install in my climate and this house would generate 6023 kWh of electricity per year for a materials cost of €4.7k, which is equivalent to €0.04/kWh if amortised over twenty years.
  • Electricity: I left the defaults for all the appliances as-is, except to add an always on computer server consuming 875 kWh of electricity per year.

My PHPP model results

Yeah, so PHPP is ridiculously detailed:

JanFebMarAprMayJunJulAugSepOctNovDecYear 
Heating degree hours - External10.99.79.98.67.04.93.73.75.07.28.910.590kKh
Heating degree hours - Ground6.05.76.36.05.34.74.44.13.94.74.95.561kKh
Losses - Exterior14281281130711349236434864886529431173138211840kWh
Losses - Ground1971852071961801621561491421651681862093kWh
Solar gains - North648017025736439837927920412172482436kWh
Solar gains - East89193239413728231486264kWh
Solar gains - South3553355357437266876406026364733952956421kWh
Solar gains - West2735681141291261149989553524914kWh
Solar gains - Horiz.0000000000000kWh
Solar gains - Opaque52631242032402482261851549562421695kWh
Internal heat gains4584144584434584434584584434584434585396kWh
Utilisation factor99%99%92%72%56%41%35%39%51%84%97%99%66% 
Heating demand 6705422524171003913606992667kWh

Of the heat losses due to the shell, 929 kWh per annum is lost by ventilation (both intentional and unintentional). The southern glazing accumulates the most heat for obvious reasons, however due to the extensive raised high northern glazing it’s not a small accumulation there, which I found surprising. Internal heat gains (appliances, showers, cooking, people etc) are substantial, and you’ll note they are constant throughout the year. This is ‘baseline’ heating, and too much of it will cause overheating in summer.

Speaking of overheating, PHPP thinks it will be minimal, on four days per year (0.9%) in July might internal temperature exceed 25 C. If I add external blinds on the northern glazing that does fall to 0.5%, which probably isn’t cost beneficial.

Of the 5396 kWh per annum of internal heat gains, 4127 kWh is from electrical appliances and the remainder comes from the thermal store losing heat (222 kWh), domestic hot water (1055 kWh) and the remainder is distribution losses. In terms of monthly, that’s 344 kWh/month electrical appliances and 88 kWh/month domestic hot water.

Finally let’s look at the photovoltaic gains from the roof solar panels month by month, and note that the solar panels will generate more electricity than the house uses for everything for the months of April - September. This will be important, as you shall see later:

JanFebMarAprMayJunJulAugSepOctNovDec Year 
Solar radiation on tilted surface445195147160158145127116755235kWh/(m²month)1204.9kWh/(m²a)
Ambient temperature667911141616141187°C10.5°C
Total monthly yield221258478742800784715629577377262179kWh/month6023.2kWh/a
Losses through shading situation000000000000kWh/month0.0kWh/a

Does PHPP think this house design meets our goals and stretch goals?

PHPP thinks this house design has a Primary Energy Renewable (PER) demand of 38 kWh/m2/yr, which is well under 60 (Passive House Classic) and 45 (Passive House Plus). It is not low enough (though see later) for RIBA 2030 nor Passive House Premium.

Showers and sinks it thinks will consume 25 ltrs/day/person of hot water, which is about 30 ltrs/day/person once mixed with cold down to 40 C. Toilets are supplied by rainwater, so most of the remaining potable water use will come from washing dishes or clothes. Assuming the washing machine and dish washer are run once per day, that adds 15.5 and 4.5 ltrs/day/person, giving a total of 50 ltrs/day/person. Assuming that cooking and drinking water wouldn’t exceed 25 ltrs/day/person, I’d say the RIBA 2030 challenge for potable water use should be met.

The RIBA 2030 Challenge embodied lifecycle carbon emissions is mostly down to what building material you choose – concrete is very bad, wood is good. If you choose wood for everything, unless your builder does something really weird, one should come in easily under 625 kg CO2e/m2.

Finally, because 6kW of PV panel doesn’t generate enough electricity, we don’t meet the generation requirement for Passive House Plus (it requires generation ≥ 51 kWh/m2/yr if PER demand ≤ 38 kWh/m2/yr, which ours just about meets). We would need to fit +50% more solar panels to meet the generation requirement.

Correcting the Primary Energy Renewable (PER)

As I mentioned on a few occasions now, PHPP assumes that you feed your excess PV generated electricity back to the grid. It has no facility for indicating that you’d want to do anything else with that excess electricity e.g. heat the thermal store so nighttime electricity doesn’t have to. An added wrinkle for Ireland is that there will be a cap on the payment for your contributions to the grid, at the time of writing the details are not clear, but it seems that the rebate will be capped to 30% of your total including PV electricity consumption (how they are going to validate this is beyond me, but that’s the current thinking apparently).

We need therefore to correct PHPP so as little nighttime electricity to heat the thermal store is used as possible, which by definition will lower total direct electricity usage and therefore reduce PER demand.

My 5000 litre thermal store if completely full @ 75 C contains 322 kWh of space heating or domestic hot water. One would keep no less than 50 kWh of space heating hot each night, so that leaves 270 kWh to buffer sunny days across overcast days. I thought it would be interesting to also model a 3000 litre thermal store, which contains a maximum of 193 kWh and so its buffer is 143 kWh.

Annual figures from above:

  • Total electrical appliance usage: 4128 kWh
  • Total space + DHW heating: 3723 kWh
  • Therefore total house electricity consumption: 7851 kWh (+ 841 kWh for pumps, ventilation etc)
  • Estimated electrical appliance replaced by PV solar during daylight hours: 1296 kWh
  • Estimated ‘spare’ PV solar electricity which normally would feed into grid: 4727 kWh

From this we can say that the feed in payments will be capped at 2355 kWh per year, which at €0.065/kWh is €153.

Estimated night time electricity savings for 3000 litre (193 kWh) thermal store
JanFebMarAprMayJunJulAugSepOctNovDec
Max electricity supplied by solar for electrical appliances during daylight4755102158172170156137125815638
Solar electricity remaining174203377584628614559492452296207141
Domestic hot water heating888888888888888888888888
Space heating670542252417100391360699
Tank days between sunshine671330303030303024105
Thermal tank contribution-671-52837454533526471404361117-345-717
Thermal store capacity5050871931931931931931931935050
Mains electricity contribution8710118834853352647140436111710371
Mains electricity demand-968-818-242-186-172-174-188-207-219-263-490-1023

You might notice the ‘Tank days between sunshine’, this is the average number of days that the buffer in the tank can supply all space heating and domestic hot water for the average day in that month. So, if in December it were -6.8 C, the store would run out twice quicker as that is double the differential from the monthly average, whereas if were +13.3 C, the store would run out twice slower (this being half the differential from the monthly average). The 3000 litre tank gets you a bit less than a week in winter average i.e. sunny days, which tend to come in bursts in the Irish winter, need to occur at least once per week. From experience I find this rather too optimistic, so I’ve assumed that due to the limited spare capacity in the thermal store, in the winter it will only capture half of the sunny days and the rest goes back to the grid.

Annual for 3000 litre tank:

  • Estimated mains electricity contribution as thermal store was full: 3310 kWh (45% reduction, due to cap earns €153)
  • Estimated mains electricity demand from appliances or because thermal store was empty: 4951 kWh (37% reduction, or €288 of night rate electricity saved)
Estimated night time electricity savings for 5000 litre (322 kWh) thermal store
JanFebMarAprMayJunJulAugSepOctNovDec
Tank days between sunshine111324303030303030301810
Thermal tank contribution-584-42737454533526471404361117-242-646
Thermal store capacity5050873223223223223223223228050
Mains electricity contribution00021953352647140436111700
Mains electricity demand-881-716-242-186-172-174-188-207-219-263-288-922

‘Tank days between sunshine’ is nearly double for the 5000 litre tank, and I think it likely that a burst of sunny days would occur every ten days or so in winter, so the thermal store should be able to absorb all excess PV.

Annual for 5000 litre tank:

  • Estimated mains electricity contribution as thermal store was full: 2631 kWh (44% reduction, due to cap earns €153)
  • Estimated mains electricity demand from appliances or because thermal store was empty: 4459 kWh (43% reduction, or €339 of night rate electricity saved)

Something interesting here is that a 5000 litre tank is only about €600 more than a 3000 litre tank, so that is a payback time of twelve years or so given the electricity savings of €51/yr.

In any case, for either size of tank diverting excess solar to the thermal store makes a big difference to mains electricity consumed, primarily because all domestic hot water is covered by solar PV. If we adjust PHPP’s PER worksheet to add a ‘Thermal storage’ offset of mains electricity consumption, with 100% of DHW supply from the solar panels throughout the year and the remainder offsetting space heating:

  • For 37% demand reduction (30% of space heating, 100% of DHW) of 3000 litre tank, PER demand drops to 26.9 kWh/m2/yr.
  • For 43% demand reduction (48% of space heating, 100% of DHW) of 5000 litre tank, PER demand drops to 24.4 kWh/m2/yr.

Both of these are under Passive House Premium’s maximum energy consumption of 30 kWh/m2/yr, so in this sense both stretch goals 2 and 3 have been reached. However because the generation of electricity by the house is far below what it consumes (1627 - 2188 kWh), it does not meet the minimum generation requirements, and therefore Passive House Plus (let alone Premium) is not achievable.

As much as fitting +50% more solar panels looks tempting to reach Passive House Plus, that adds an additional capital cost of €2.2k or so, and because of the feed in cap, the effect of the added generation on our annual electricity bill of a mere €1000 or so is not going to be much. In other words, it’s not economic. Equally, for just a small added capital outlay one might fit an oversized solar inverter, and if the government in the future remove that cap, adding more solar panels later is easy.

Why did my crude model overestimate total energy consumption by so much?

Summary of my hand made crude model from the last post:

  • Primary energy demand for the proposed house would be around 11,000 kWh.
  • This is for 260 m2 of living space, which gives a 41 kWh/m2/yr which is well below the limit of 60 kWh/m2/yr required for Passive House Classic, and is even below the 45 kWh/m2/yr limit required for Passive House Plus.

PHPP came in at 79% total energy use of my crude model. There were two main causes:

  • My crude model assumed far more DHW goes on showers. This is because I forgot to scale the numbers for hot water consumption only (I used total flow), and also because I modelled five adults, whereas PHPP hardcodes modelling 3.2 adults.
  • My crude model assumed more air leakage due to doors being opened and closed etc.
  • I had basically put a smoothing estimator for the thermal store rather than anything more rigorous like the above, and whilst not a bad estimation for me effectively sticking my finger in the air, it was a bit off.

If I fixed those, it pretty closely matched PHPP which was reassuring!

#house #energy-modelling #PHPP




Monday 8 November 2021: 03:49. Today I’m going to divert from my usual focus on embedded systems in my series on my future house build. Last post I said I’d been quite fatigued during the two weeks since I fell ill, and I’m sorry to say these past three weeks have not been much better. Apart from sleeping and working, I have had no energy to do much else – no WG21 papers, no open source, no embedded systems programming, no custom Home Assistant integration work, no gym nor anything outside work and sleep. I am slowly on the mend, but it’s certainly going slowly. I originally had thought I had contracted just a head cold, but given these weeks of fatigue … well, it probably was in fact covid, and I’ve since had a mild dose of long covid.

Anyway, I’m glad to report that our house design is finally done. After a mere five months to secure the rights on our site, our architect Stephen O’Leary from Cork based Rebel Design Studio only could get started these past few weeks. As you may remember, in my original post in August, I had already had a crack at designing the whole house, including layouts internal and external, designing its ventilation, heating and electrical systems, and I had prepared a thirty-five page brief dense with detail. Stephen took that design and rendered it into 3D, along with a few variants and then finally a fourth design which was entirely his, albeit thematically similar.

Getting the VR headset to view architecture

I had bought an Oculus Quest 2 specifically to wander around these concept designs in VR, so I tried importing the Twinmotion renders into Unreal Engine 4 and then generating an Android mobile binary targeting the Oculus. Unfortunately, Oculus’ Android doesn’t implement Mobile HDR, and when you disable HDR, all the Twinmotion assets render as sheets of entirely all white or all black – i.e. useless. If you enable Mobile HDR, the binary doesn’t work on the Quest 2 at all.

This was rather unfortunate, so I had to fall back to the Oculus Rift emulation function of the Quest 2 whereby a PC renders the VR and the image gets blitted over a USB cable to the headset. Alas the Windows Oculus software sucks monkey balls, it just silently refuses to work if you don’t get everything exactly right, and it provides zero help messages nor clues as to what is wrong with it. Literally trial & error black magic to get it working. Awful experience, but I got there in the end mainly through a lot of Google searching of people having the exact same awful experience as me. Thanks Facebook .

Unreal Engine 4, at least if you stay on the PC, works really rather well in VR with very little added effort, and my recently bought AMD Radeon 6600 XT renders such simple 3D models as these like butter. Without me coding anything up, it’s a very basic experience, you esssentially fly around with the keyboard and you have free range look with the headset. But, it’s enough to get the job done in terms of evaluating the concept designs.

Yes, Twinmotion also has a VR viewing option, but if you try it you’ll find it sucks. As it’s also UE4 based, I have no idea how they managed to make it suck so badly. In any case, importing your Twinmotion file into UE4 is so straightforward it’s the obvious workaround. Also, if you package up your UE4 game into a standalone binary, even a laptop with Intel integrated graphics will do a passable job of rendering it, whereas for some reason Twinmotion’s standalone viewer binaries suck badly on Intel integrated graphics. Again, same bloody engine, no idea why it’s so bad.

(Incidentally, if you’d like UE4 to make it look really pretty, try turning on ray tracing. Looks gorgeous on the outside, but inside everything’s too reflective, and I didn’t find the time to figure out how to dial back so much reflection. The pictures below were rendered actually by my laptop’s Intel integrated graphics using a standalone packaged game without ray tracing enabled)

My original design

Stephen had rendered my original design mostly as I had it into 3D. The general design was that of a bungalow, but with victorian style raised ceilings on the ground floor, and a reduced width loft conversion upstairs spanning three quarters of the house length. The design showpiece was a roof to floor open vaulted space for the living area, with a raised mezzanine reading and library area overlooking it. I had chosen the golden ratio for width to length, but I had been worried that it just wasn’t wide enough to have the ‘church hall’ effect I was seeking. Looking at the images without VR it seemed reasonable (note these are rendered by BIMx not Unreal Engine):

Once into the VR however, my fears were confirmed: the vaulted area felt ‘pokey’. Stephen’s rendition deviated from my original design, I actually had the vaulted space wider, and the mezzanine was lower and jutted into it around the middle, all of which was going to require expensive steel beam structural support. However, his wasn’t a million miles away. The problem was – and it was only really obvious once in VR – that the height to width ratio just wasn’t there, and as the house already had a 180m2 footprint, and I wanted all bedrooms on the ground floor, extending it another five metres just for the main living space seemed inefficient.

Another issue was that I had chosen a ten metre wide building, which leaves nine metres wide internally (the raised ceilings were to admit additional light to compensate for the added width). Stephen was adament that this would not fly with planning, who seek eight metre wide buildings. I know that some rural one off houses get away with ten metres, but as we are building on an estate, the best Stephen felt possible was a roof not peaking in the middle such that the front roof of the house would match the others on the estate, and the back roof would be consequently much longer and steeper as a result in order to stretch the width out to ten metres.

That seemed reasonable, but it rather ruins the roof symmetry of my original design in an unpleasing way. As you’ll see later, Passive House Plus (< 45 kWh/m2K) isn’t achievable without the ratio of total house shell area to floor space being below a certain ratio, and the eight metre maximum width requirement makes that virtually impossible. Passive House Classic (< 60 kWh/m2K) is still just about within reach however.

The final design as being submitted to preplanning

Stephen’s own design had taken my original concepts and done something rather different with them: If you imagine an S-shape whereby your living room opens up into the vaulted height as you approach the kitchen, the kitchen terminates the ground approach but then you sweep upwards onto your mezzanine library reading area, that’s pretty much Stephen’s design. The clever thing here is you now get the width proportional to the height that my design was lacking – actually, you get oodles of width, it’s about 2x width for the height, but as it’s an S-shape, it breaks up that width in a fluid flow.

My import of the original Twinmotion file setting correct latitude and longitude for our house’s location and orientation. Sunbeams are for 12pm on the 1st March. Pictures progress top left to top right downwards, finishing from bottom left to bottom right: (i) view from living room towards kitchen; (ii) view end of dinner table looking towards hallway upwards; (iii) view from kitchen towards living room upwards; (iv) view from mezzanine library reading area downwards into dining table and living area, with the bridge towards the right (v) view from top of the stairs over the bridge towards the living room (vi) view from the top of the stairs towards the mezzanine library reading area.

Obviously, using so much of the house’s length and height to achieve this effect leaves insufficient space for all of the rooms I had in my original design, so two of the four bedrooms get partially extended out the front of the house, leaving a space in the middle for a tree where the front door is, which is then brought as-if into the vaulted space by a whole ton load of glazing:

(If you’re wondering why there is a transparent house next door, it’s because the site next to us is empty. The white houses are existing neighbour houses)

To then round out the protruding bedrooms, we run a cage around the house to encompass the patio outside the living room:

You no doubt notice the greenhouse at the back – myself and Megan are keen on growing a fair proportion of our annual fruit and vegetables, so we have a full house length three metre wide lean to greenhouse. The house’s exhaust air from the MVHR vents into this greenhouse, filling it with extra CO2 and moisture, but also constantly ventilating it. You can see a full house width of raised tanks above the patio, these actually sit above part of the master bedroom and living room – they harvest rainwater from the roof for the greenhouse. It should be possible to store 8000 litres up there, with additional harvesting tanks for the greenhouse as the wind dominates from the south west, and thus it is the south and west faces which receive the most rainfall.

However that large greenhouse comes with a big cost: no direct glazing on the south side of the house, because where the greenhouse joins the house it must be wall. Equally though there is a big benefit: the extensive groundfloor glazing is almost entirely blocked in summer by all those plants, but for the rest of the year it permits significant solar ingress, as is obvious from the sunshine falling through in March. That means solar heating for eight months of the year, but no overheating in summer.

Finally, let’s look at my proposed back garden and the enormous thermal store I want (as explained in in my original post in August):

You may have noticed that the site is actually two sites joined together, yet even with the 0.35 acres that affords, there isn’t really that much of a back garden. The brown walled patch is a walled garden for growing things perfectly happy outdoors and for which valuable greenhouse space is a waste – potatoes and carrots are excellent examples, they grow even better outside than in a greenhouse. That leaves not a massive garden once everything else is considered. It’ll do, but given all the money I spent on two rather than one sites, it does feel a little underwhelming. At least it’ll keep the mowing effort down I suppose.

(Indeed, the most likely reason we think this planning proposal will be rejected is ‘inefficient use of serviced sites’ i.e. we used two serviced sites for one house, which therefore deprives others of a potential house. Never mind how pokey small those sites are!)

Finally, witness my thermal store! It’s really massive. It dominates the utility/plant room. To the left of it will be the MVHR and any heat pump if it turns out we need one of those (we currently think that as a passive house, a heat pump won’t have cost benefit). The remainder will be washing and drying machines. But just look at how big that thermal store is, it’s 2m wide x 2m deep x 3m high including lots of insulation! Contains 5000 litres of water storing approximately 200 kWh of hot water. With the insulation I have planned, it should leak around 40 watts of heat into the house, so about one third of a human adult being in the house i.e. eminently tolerable.

As described in that earlier post, the thermal store gets heated by any excess left over from the solar array on any sunny days. As it’s so massive, and passive houses need so little energy, that thermal store if completely full is enough to provide domestic hot water and space heating in winter for around a week in a worst case scenario e.g. Beast from the East outside temperatures with mains electricity off for the entire week. In normal scenarios, it should be able to carry the energy gathered from a few sunny days in winter for up to a month, thus offsetting the need to top up the thermal store using cheap night time electricity.

It’s a very simple system, albeit highly unconventional when almost everybody else would just fit a heat pump. However my maths says that oversizing this tank only costs a bit more than a grand more, whereas a heat pump costs at least eight grand including commissioning. Sure, the heat pump might deliver up to 5 kWh of heating for 1 kWh of electricity, but because it requires periodic expensive servicing and probable replacement after fifteen years or so, and you really don’t need much heating for a passive house which reduces the return on investment, if you work it out it makes more sense to oversize the tank and solar panels and use cheap nighttime electricity to charge the tank if needed. Also in favour of this is that a heat pump can always be fitted later (ideally when they’ve become cheaper), whereas a tank this large has to be designed in from the beginning.

Anyway this is the design being submitted to preplanning this week. We shall see how it goes!

Incidentally, so later makes sense, we intend to meet the RIBA 2025 challenge for this house:

Irish 2019 NZEB BER A1 HouseGerman Passive House ClassicRIBA 2025 Challenge
Heat & Ventilation Energy≤ 25 kWh/m2/yr≤ 15 kWh/m2/yr (40% better)
Air Leakage≤ 3 m3/hr/m2≤ 0.6 air changes per hour (72% better)
Wall & Floor Insulation≤ 0.18 W/m2K≤ 0.15 W/m2K (17% better)
Window Insulation≤ 1.4 W/m2K≤ 0.8 W/m2K (43% better)
Total Energy Use≤ 120 kWh/m2/yr≤ 60 kWh/m2/yr (50% better)≤ 60 kWh/m2/yr (50% better)
Embodied lifecycle carbon emissions≤ 1200 kg CO2e/m2≤ 800 kg CO2e/m2 (33% better)
Potable water consumption≤ 125 litres per occupant per day≤ 95 litres per occupant per day (24% better)
Indoor CO2 levels≤ 900 ppm
Indoor VOC levels≤ 0.3 mg/m3

Getting from my original design to this final design

Once it became obvious that Stephen’s design was much superior to my original (hardly surprising!), we dropped my design and focused on bringing into his the essential features we wanted.

Poor Stephen had to work very hard these past few weeks. Our initial round of feedback took me three hours to type out and it was pages and pages of text. As he modified things to meet our feedback, the amount I had to write each round of feedback iteration kept shrinking until it reached zero. There was also quite a fair bit of teaching, as what I’ve designed here is non-standard, and I needed to explain why what I wanted was sensible, or indeed how it even works at all. Because it’s an overall systems based design, everything relies on everything else to make sense, no single item makes sense on its own. Stephen in fairness to him kept plugging at it until we got over the line this past week.

Stephen has taken the Passive House Institute’s design course, but this will be his first Passive House. To be honest, Passive House is a touch overkill for the mild Irish climate, most of the value is their PHPP software for modelling the house which is orders of magnitude better quality than the 2019 NZEB DEAP model. I can see most clients getting the most value from generating a high fidelity PHPP model rather than actually going for full Passive House certification, which greatly limits your construction choices whilst also adding on cost.

Most of the changes to the original concept were induced by the master bedroom. In VR, it was originally obviously too small, and purely to solve that we ended up extending the ground floor house length from 18m to 20m. In order to add in a porch to prevent heat loss when entering and exiting the building, we ended up having to rotate the master bedroom en suite to the middle of the house, and combined with the added two metres that made the master bedroom wide enough and long enough. However in terms of compromise over our original design brief, it has been the master bedroom which has taken the brunt of things. Stephen very much wanted us to move the master bedroom upstairs where there was a lot more design freedom, so in the end we had to choose compromise if we were to stay on the ground floor.

The other significant design change was to raise the mezzanine upwards in order to form storage for the games room next door, but also to raise the reading and library area further away from the living space so it is more separated and peaceful.

Estimated materials cost of this final design

One can fairly easily estimate house shell areas from the plans: Total wall area: 301 m2; Total roof area: 285 m2; Total floor area: 181 m2; Total wall glazing area: 61 m2; Total roof glazing area: 9 m2. Total indoor volume: 1243 m3. Total living floor space: 269 m2.

Straight away from those one can calculate:

  • Heat Loss Form Factor (HLFF): 3.11
  • Surface to Volume Ration (SVR): 0.674
  • Glazing as a percentage of footprint: 39%
  • Percentage of roof is flat: 31%

A passive house aims to get HLFF below 3.0 and SVR below 0.8. As you can see, we achieve the latter but not the former thanks to the vaulted ceiling taking away a good deal of floor space, which hurts HLFF. SVR is well below 0.8 however, so the design is ‘compact’ relative to the typical Irish build which is around 1.0. Unfortunately energy requirements are per m2 of living floor space, so as you can see this vaulted ceiling will hurt us.

If one estimates the following materials costs inc VAT: Wall 0.15 W/m2K €250 per m2; Floor 0.11 W/m2K €100 per m2; Roof 0.13 W/m2K €300 per m2; Wall glazing 0.8 W/m2K €700 per m2; Roof glazing 0.7 W/m2K including mechanical external shutter €1,550 per m2, then we arrive at a materials cost estimate of €239,571 inc VAT.

They say for a typical Irish house that materials are usually 40% of the final all-in bill, so that suggests a total build cost of almost exactly €600,000 inc VAT. That is about €200k more than I am able to raise in terms of finance, so I’m really hoping I’ve overestimated my costs here. Another common ratio for passive house builds is that passive house grade materials will be 55% of the final cost excluding professional fees because most builds are manufactured in a factory offsite and assembled onsite in under two weeks which significantly reduces onsite costs. If so that is €436k, which is still €50k more than I can raise. I guess we shall see!

Estimated energy efficiency of this final design

What I’m about to do next will be very inaccurate compared to a DEAP energy model let alone a PHPP energy model, but let’s take a guess at energy efficiency.

Assuming:

  • There are 0.1 uncontrolled air changes per hour due to leakage, which for the above indoor volume is an uncontrolled ventilation rate of 124 m3/hr.
  • The indoor temperature is 21 C and the outdoor winter and summer temperatures are 2C and 15C respectively.

Then assuming air carries 0.33 W/m3K of energy and the component W/m2K listed above, the shell heat loss in winter would be -3.763 kW and in summer it would be -1.188 kW. Note the lack of time in those numbers: we are saying that if inside is 21 C and outside is either 2 C or 15 C, then that is how much heat is leaked from inside to outside by the shell materials and air leaking through the shell (note that 0.1 ACH for a passive house which cannot exceed 0.6 ACH in a hurricane would be quite a windy day, however don’t forget people opening and shutting doors).

Let’s go a bit further by assuming:

  • The MVHR unit has a heat recovery efficiency of 80%.
  • It runs at 150 m3/hr.

Then we can calculate that the heat loss due to intentional ventilation will be -0.188 kW in winter and -0.297 kW in summer. That might seem surprising – the reason why is that the MVHR in summer will be in bypass mode i.e. not heat recovering.

Let’s go even further by calculating heat gain from solar radiation. According to the PGIS database for our site location:

  • In winter 50 kWh/m2/month lands on the roof, and 10 kWh/m2 will land on a vertical window. As there are 730 hours in a month, and glazing might retain 50% of the heat entering the house, this is 0.034 kW/m2 and 0.007 kW/m2 respectively.
  • In summer 140 kWh/m2/month lands on the roof, and 80 kWh/m2/month will land on a vertical window. This is 0.096 kW/m2 and 0.055 kW/m2 respectively.

Applying this to my glazing:

  • In winter, the roof and wall glazing would add 0.724 kW to the house.
  • In summer, with the external shutters covering the roof glazing and plants in the greenhouse covering half of the ground floor southern glazing, the wall glazing would add 1.19 kW to the house.

What remains now is how much heat the house generates from being lived in. I can tell you that for my current two storey 60 m2 rented house, between cooking and various devices using electricity, we consume 0.534 kW, which excludes showers or heating. Add in five human adults’ body heat 0.38 kW and five 75 litre showers per day with wastewater heat recovery @ 75% = 0.182 kW, I reckon there is a minimum baseline heat generation of 1.096 kW, which may be an underestimate given just how much illumination I plan to fit to this future house.

If you now tot up this baseline internal heat generation with the solar heat gained by the glazing, the shell heat loss, and the ventilation heat loss, you get:

  • In winter, there is a negative 2.13 kW.
  • In summer, there is a positive 0.802 kW.

Or, put another way, in winter we must add 2.13 kW, and in summer we must remove 0.802 kW, to keep the house at 21 C.

You now may understand why I intend to fit an earth tube which I reckon will subtract -0.97 kW in summer, thus turning an overheat into a negative 0.168 kW. Most will point out that a heat pump can just as easily run in cooling as in heating, however note that my cooling here comes completely free of electricity cost, it’s just the considerable capital cost of installing an earth tube here (they cost only a bit less than a heat pump, though as a dumb pipe in the ground their service life well exceeds my lifetime).

It’s an interesting question whether a thermal store + earth tube + wastewater heat recovery will beat a heat pump. I think it will, which is why I chose this design, but for a BER A1 Irish house, because it uses twice as much energy, a heat pump really does make sense as its return on investment is much better. A heat pump does deliver up to five free kWh for every one kWh of electricity used, however a thermal store lets you capture all those occasional sunny days you get even in winter in Ireland, and an earth tube lets you cool your house without any electrical cost at all. Wastewater heat recovery means long showers aren’t dumping energy down the drain. So once you factor in how hideously expensive periodically topping up the refrigerant gas in a heat pump is vs the added expense on night rate electricity, and given a thermal store + earth tube + wastewater heat recovery unit has identical capital cost to a heat pump, I reckon they’ll come out pretty close in terms of total lifetime financial cost.

Indeed, from a passive house calculation perspective, the heat pump is definitely preferable because its embodied carbon cost (which is very significant) isn’t included, nor is the fact its refrigerant gas which slowly leaks out is a known climate warming gas. This is why the RIBA challenge is important – it makes you consider that exchanging improved energy efficiency for much worse impact on the planet is not a good deal.

Note in all of the above that our site is unusual for Ireland in that having two river deltas to either side makes an earth tube unusually effective, most sites in Ireland would see nothing like as much benefit from an earth tube. This made my choice here much easier than it would be for most other sites.

Note also that wastewater heat recovery makes sense only in a passive house where domestic hot water consumption is a large proportion of the total annual energy consumption. In an Irish BER A1 house, you effectively get hot water as a side benefit from the heat pump. It’s a different set of tradeoffs.

Estimated annual bills for this final design

Firstly, 31% of the roof being flat puts a fairly heavy loading on home insurance. One might expect to pay 40% more annually, maybe +€160 a year.

The baseline electricity load is what it is, including standing charge of €300 and assuming more of it lands in the expensive daytime rate (€0.25/kWh daytime vs €0.10/kWh at night) I’d estimate the baseline electricity bill at €1,118 inc VAT per year.

If it were winter constantly for three months of the year i.e. 2C throughout, and no space heating were needed for the rest of the year, and solar diversion from occasional sunny days supplemented 20% of the space heating during that time, I’d estimate the electricity needed for space heating charged at night time rates to cost €501. This gives an estimated annual bill of €1,619 inc VAT.

To put this into perspective, for my current two storey 60 m2 rented house I spend €840 a year on electricity and about the same again on kerosene for space heating, which is about 11,500 kWh in total giving 192 kWh/m2/yr which is a BER C2 rating, and I can absolutely guarantee you that the indoor temperature is nowhere near 21 C in winter e.g. as I type this right now at 3am it is 18 C in this room. This, incidentally, includes a solar domestic hot water collector which they say reduces your annual heating bill by 10-15%, without that this house might be BER D1 rated.

Can this design be passive house certified?

If any of the estimates above are anywhere close to correct, primary energy demand for the proposed house would be around 11,000 kWh, almost the same as for my current rented house. However, this is for 260 m2 of living space instead of 60 m2, which gives a 41 kWh/m2/yr which is well below the limit of 60 kWh/m2/yr required for Passive House Classic, and is even below the 45 kWh/m2/yr limit required for Passive House Plus.

That no doubt it an underestimate. If preplanning smiles on this proposed design, I look forward to seeing what PHPP returns for this house and how it compares to my very rough workings above!

#house #energy-modelling




Sunday 17 October 2021: 23:08. For several recent posts now in my series on my future house build I have been hoping to implement a custom Home Assistant integration for the custom logic I wrote in my keenly priced industrial grade scriptable PIC32-based Devantech dS3484 ethernet relay and input board. Last post three weeks ago I said I was feeling pretty burned out from all this post-day-job work, so I was going to take a weekend off, which I did. Alas, I then fell ill that following week, sufficiently badly that I had to take a few days off work, which is unusual for me. Since then I’ve been feeling rather under the weather, such that come end of day, I just go to bed, and similar early nights at weekends. This has made progress glacial.

Despite feeling crappy yesterday, today I was feeling energetic enough to finish off that custom integration for Home Assistant, and to write this virtual diary entry. The custom integration is a bit different to most Home Assistant integrations in that it asks the board what sensors and knobs it exports, and it then dynamically configures those items in Home Assistant according to whatever the board tells it. The custom integration starts off initially with a polling based update mechanism, but it asks the board for push subscription, and if the board says it supports that then the Home Assistant integration switches to push updates. From everything I can tell from Google, nobody appears to have implemented an entirely dynamic Home Assistant integration like this before, so I intend to properly write it up here and exactly how each bit of it works, for the benefit of everybody else on the internet, because it would save others several very late nights with coffee figuring this stuff out from first principles. Anyway, here’s the custom integration with push notifications in action – the potentiometer simulates a dimming switch, and my custom logic on the Devantech board appropriately dims the overhead LED strip cove lighting, but now ALSO pushes updates to any subscribed client. That, in turn, means Home Assistant is dynamically updated:

So that’s definitely working quite well then. I also updated the HTML dashboard published by my custom logic on the Devantech board to show push subscription details:

It’ll take me a week or two to write everything up properly, so watch this space!

Incidentally, for the past month the LED cove lighting automated by the Devantech board has become ‘the’ lighting for the main living space. It fades itself in when it gets dark outside, fades itself out when it gets light, automatically turns on when a person enters the room at night, turns off when no movement has been detected for five minutes. Everybody in the family likes the new ‘smart light’ a great deal, especially my son Henry who being a bit short struggled to turn on the light switch downstairs in the morning, and now he walks in and it turns on automatically. He’s very pleased with the improvement.


Last post I did a survey of the market for cheaper home automation with ethernet solutions and I settled upon the STM32F401 + W5500 as my ethernet microcontroller approach for €12 inc VAT each and the Raspberry Pi Zero + USB2 to Fast Ethernet as my ethernet microcomputer approach for €20 inc VAT. I mentioned in that post that the ESP32 is considerably more bang for the buck, if you can put up with its shortcomings in implementation quality. I thought that instead of assuming, I really ought to empirically test my assumptions, so I bought this, or rather, these:

This is an ESP32 wrapped into an Arduino compatible board for a mere €4.55 inc VAT delivered, which is a good bit cheaper than even the STM32F4 clone. Paired with it is a W5100 Ethernet shield for Arduino – or rather, a Chinese clone of the real thing (more later) – costing ~€11.50 inc VAT delivered, so the pair cost me €16 inc VAT. For this money, I get 250Mhz clock speed, 512Kb RAM, 4Mb flash, 11n Wifi, BT 4.2 and lots of flexible i/o, albeit that the Arduino compatible wiring limits me a lot on this. To my knowledge, there is only one prebuilt presoldered ready-to-go board cheaper than this with ethernet: the WT32-ETH01 which can be found for ~€14 inc VAT delivered, and my combination would appear to be better bang for the buck: same microcontroller but with proper power in socket, USB socket, existing Arduino IDE support – surely worth the extra €2 right?

Unfortunately, according to https://reedpaper.wordpress.com/2018/09/17/arduino-ethernet-w5100-how-to-fix-the-wrong-board/, the Chinese clone of the W5100 Arduino Ethernet shield has a wrong sized resistor on the ethernet port – it’s about 10x too big. This substantially weakens the signal on the LAN meaning you can’t use ethernet cables of any length without replacing the resistor. Using the information on that blog post, I have confirmed that my Shield is similarly flawed. So I suspect that apart from maybe a bit of poking at it to see how an ESP32 works in practice, this is probably €16 wasted, which is annoying. Had I known this before ordering, the WT32-ETH01 would have been my choice.

Anyway, I’ve received all the parts I spoke about last diary entry, but I discovered that the camera cable for the Zero is narrower than that for any other Pi board – thanks so much to whomever made that design choice, especially as the Zero board has enough space for the same connector as all the Pi boards. So I had to order special cables which connect the Zero’s narrow camera connector to standard camera connector. Those are still en route from China, and seeing as I’ve not been well anyway, I’ve done very little with all the new hardware yet apart from boot up Raspbian and get the Zero to hardware PWM dim a small LED via a MOSFET (and yeah hardware PWM is orders of magnitude better quality than software PWM, even on a 1Ghz CPU like the Zero’s).

Another thing that I need to do is port the ST time of flight software library to RaspPi, I bought the fancy software defined function ST VL52L3CX ToF sensor which basically returns raw data and you need a fairly substantial CPU plus the ST software library to interpret what the laser can see by doing lots of floating point math. The Raspberry Pi Zero is easily powerful enough, but no port of ST’s library to Linux exists yet as far as I can tell, though from inspection of the source code the port will be trivially easy. Anyway, once working, you should be able to ‘see’ everything within five metres of the sensor’s fifteen degree field of view, which is to say it yields (and I am paraphrasing here) how much of its view is obscured at what distance e.g. 10% of it is blocked at 1.0m, a separate 20% is blocked at 4.0m, and so on. It’s accurate down to the millimetre, and can tell when things have changed in its view i.e. it can take a sample of ‘empty room’, and tell when ‘empty room’ gains a new thing within it which doesn’t belong, and both how far that new thing is from the sensor AND how big it is. In other words, it should be able to tell when a human has entered a room, and whether that human is sitting or standing or lying down. I am hoping to use these instead of cameras for the bedrooms to detect the difference between an occupant sleeping in their bed, sitting up in their bed, and vacated their bed. We’ll see how empirical testing goes.


Finally, you may remember when I installed HEPA filters in multiple rooms throughout the house to improve the air quality in this quite mouldy and damp house with the added benefit of scrubbing the air of virus particles, such that the kids bringing covid home from school might not infect us adults quite as quickly. Those Xiaomi Air Purifier 3C’s which I automated with a Python script have proven themselves to be excellent – still no rattle off them, they are quiet and efficient and judging from the amount of lint they collect, they are plenty effective too.

The kitchen purifier gets by far the worst of it as it regularly has to spin up to maximum to scrub the air of PM2.5 generated by cooking. I noticed the grille on the top where the clean air comes out was getting dirty, so obviously the filter had become spent – unsurprising after eight months of cooking! So I replaced the filter (Xiaomi very helpfully place OEM replacement filters on German Amazon at RRP prices which are cheaper than Aliexpress prices, though they do go out of stock very quickly after new supply arrives), and that left me with a dirty filter heading for the trash.

So I, probably like all of you, was wondering what these Xiaomi filters look like on the inside, and just how dirty is this filter? So I cut it open to have a look:

The first layer after the outer plastic grille is a dense paper-like filter thickly folded in concertina. A brand new filter has dark grey outside and I would assume a clean white inside -- this filter has mottled grey outside and obvious discoloration inside. The concertina folding is held taut by a tensioned rubber string which is actually glue, very clever.

Peeling back the densely woven filter material:

Held in a dispersed lattice after the filter materials are granules of activated carbon arranged with holes in the middle.

As mentioned in the original post, the grey filter is Xiaomi’s highest end filter with a claimed HEPA specification of 99.95% efficiency. Unlike the EPA purple or green filters which have added filtration layers for other pollutants, the grey filter is more like the basic EPA blue filter: just activated carbon and filter, nothing extra. The +29% price difference (€31 inc VAT delivered for the blue filter, I paid ~€40 inc VAT delivered for the grey filter from Amazon Germany) reflects the difference in quality of filter material only, with no difference in feature set apart from claimed 10x better filtration efficiency.

As much as €40 for a filter seems a lot (about half the price of the entire purifier unit itself!), having cut one of these open I was impressed by its heft and quality – in fact, cutting it open took quite a bit more effort than you would think so dense are the materials. The way they’ve arranged the activated carbon granules in that pattern and with cleverly differently sized pores in the multiple layers of plastic mesh aids slow moving air ingressing past the filter material to hang around the activated carbon for a bit longer before getting sucked up and out. I’ve no idea how these filters compare in quality or effectiveness to ‘western’ filters, but in terms of what I think a HEPA filter ought to be these subjectively tick all the boxes. I also like that they’re simple and yet so clever: that’s the mark of good design.

I have four purifier units in total in the house, and I intend to replace their filters around the twelve month mark as they don’t receive anything like the gunk the kitchen purifier receives. As I was remarking to Megan last night, Xiaomi do a really great job of making consumer goods 80%-90% as good as western brands but for 50% of the price. We’ve now got smart watches, robot vacuum cleaners and air purifiers from Xiaomi or its subsiduary brands and we find them all so far to be excellent value for money, and we really like that Xiaomi makes available spare parts AND makes their stuff easily maintainable as a matter of course. Indeed, we only wish that Western manufacturers took more of a leaf from Xiaomi’s book – and if they continue to fleece the Western consumer with unmaintainable, expensive, products with built-in hard coded death times, then Xiaomi is going to supplant and replace them, and rightly so.

#house #home-assistant #air-purifiers #xiaomi




Sunday 26 September 2021: 23:11. In the last post in my series on my future house build I had hoped to get a custom Home Assistant integration implemented this weekend for the custom logic I wrote in its proprietary language dScript for my keenly priced industrial grade scriptable PIC32-based Devantech dS3484 ethernet relay and input board. I can say that its learning curve was too steep for me to conquer this weekend – though I made excellent progress and it’s just a question of more time to finish it – but ultimately there is only so much completely new material that one can grok through and master after midnight, even after drinking coffee (I honestly can’t think of the last time I drank coffee so late in the day, but it really was needed if I was to make any decent attempt at all that Home Assistant programming documentation).

Anyway, once finished that will be the topic of a future post here in the series. This post is more about what prototyping and empirical testing needs to come next after the Devantech board. Firstly, I want to be clear that my experience with the Devantech board has been very positive. Yes its dScript language definitely could do with a lot more polish – there are a lot of weird things missing or syntax not permitted for no obvious reason – I suspect a single person designed and implemented it, and it has never received much feedback which was acted upon with respect to the programming language itself. Still, it’s definitely powerful enough to get almost any job done – for this Home Assistant integration I am writing I created a small TCPIP control server in dScript which was quite straightforward, as was getting it to push state change updates to any arbitrary third party IP address which registers with it. Implementing that part took only an hour or so, what I got bogged down in this weekend was Home Assistant programming itself.

Still, the Devantech board isn’t the right solution to some of the things I need solving in my future home automation. Firstly, the lack of high frequency PWM was a showstopper for dimming the LED cove lighting in a quality way – the maximum 1Khz software PWM just isn’t enough. Secondly, there are a bunch of sensors I want to use which either can’t fit into the Devantech board (any I2C for example), or aren’t well suited to the volt free digital inputs (though note that the bigger Devantech boards do offer switchable volt free or TTL digital inputs, and I now wish I had bought one of those instead). Finally, these boards are way overkill for use cases not involving > 7A current loads, and as I’d expect we probably will need at least one board per two rooms, that’s excessively expensive given they’re about €100 inc VAT including case each. What I really want is one or two Devantech boards for the high current stuff, and something much cheaper everywhere else.

Cue thus lots, and lots, and lots of research to figure out a solution which can do:

  • high frequency PWM LED strip dimming.
  • can read light switch digital inputs.
  • have an I2C bus for ‘is there a person in this room’ sensing.
  • maybe an ADC for analogue sensors like temperature.
  • LAN connected.
  • PoE powered.
  • either no Wifi at all (security risk/spectrum interference), or can act as a decent enough local Wifi AP, which means ‘can run OpenWRT and can at least do 2x2 11ac (Wifi 5, 866 Mbps) and have true Gigabit Ethernet’.

And obviously do all of this for as cheap as possible both in terms of money and my precious free time in wiring it all up, commissioning it, and maintaining it!

Survey of the market as of Q3 2021

I went through many options: all the Small Board Computers (Raspberry Pi, Rock Pi, Orange Pi, NanoPi etc), all the Microcontrollers (PIC32, ESP32, STM32 etc), dedicated PWM boards, adapting Wifi AP boards to do GPIO. So I can say something about the current cost-benefit balance and tradeoffs in the market as of Q3 2021.

Firstly, the absolute cheapest board capable of true Gigabit Ethernet and 11ac Wifi is the Orange Pi Zero 2 currently going for €30 inc VAT for the board and €5 inc VAT for a 16Gb sdcard = €35 inc VAT. However it’s an Allwinner H616 chipset, it’s not well supported, and there are big question marks over its Wifi implementation quality.

The second cheapest is the venerable Raspberry Pi 4 Model B for €40 inc VAT, assuming you can find one in stock (I could not). It is Broadcom based, which isn’t the best story for being an AP under OpenWrt but thanks to its huge popularity it has been made to work. It has 1x1 11ac Wifi. You need €5 inc VAT for a 16Gb sdcard = €45 inc VAT.

The next cheapest is the Radxa Zero currently for €50 inc VAT, it’s Amlogic S905Y2 based so it’s got really really good software support (e.g. OpenWRT ‘just works’ on this board) and its Wifi AP implementation is excellent. It also has 8Gb of onboard flash saving me needing a sdcard. However it lacks an Ethernet port though it does have USB3, so you’d need to add a USB3 Gigabit ethernet adapter for €15 inc VAT, so it costs €65 inc VAT which is getting close to the Devantech board, and we still don’t have 2x2 Wifi, only 1x1 Wifi.

The next cheapest is the Rock Pi 3A currently for €57 inc VAT + €5 inc VAT for a 16Gb sdcard = €62 inc VAT. This has gigabit ethernet and two PCIe M.2 slots, so you can fit your own 2x2 Wifi card which is certainly another €20 inc VAT if you want Wifi 5 or another €40 inc VAT if you want Wifi 6, so now you’re at €82 - €102 inc VAT.

Add in a Gigabit PoE splitter for €15, and €100 per room is rather a lot of money when there are many rooms in the house.

So what about instead fitting fewer but better APs e.g. the TP-Link Mercusys MR70X is a 2x2 Wifi 6 AP with three gigabit ethernet ports for €45 inc VAT with an Amlogic chipset already with early OpenWRT support, share one of those between a few rooms each, and then per room fit something much much cheaper for the lights and sensors?

The choices for further testing

Out of all the microcontrollers and small board computers I calculated all the bits which would needed and these two are what I have chosen for further investigation:

  1. Microcontroller approach:

    • STM32F401: 84Mhz ARM Cortex M4F, 64Kb RAM, 256Kb flash. €5 inc VAT delivered. Nicknamed ‘the Black Pill’.
    • W5500 ethernet connected by SPI. €7 inc VAT delivered.

    Total: €12 inc VAT each

    Advantages:

    • Up to four hardware PWMs capable of > 20 Khz frequency, or up to five SPIs, or up to three I2Cs, or up to seven 12-bit ADCs, or up to twenty digital inputs or outputs.
    • No OS nor filesystem, so hard realtime, once debugged maintenance likely will be very low.
    • Arduino ecosystem available via STM32duino.
    • Cortex M4 is ARMv7 and there is even hardware single precision floating point, which is nice as you can avoid fixed precision integer arithmetic for say percentage calculations.

    Disadvantages:

    • I really can’t think of any, though I may find some once I actually use the board, and it’s been a LONG time since I last did work on a truly bootstrapped embedded microcontroller.


  2. Microcomputer approach:

    • Raspberry Pi Zero: 1Ghz ARM11, 512Mb RAM. €6 inc VAT.
    • USB2 to Fast Ethernet adapter. €9 inc VAT.
    • 16Gb micro sdcard for storage. €5 inc VAT.

    Total: €20 inc VAT each

    Advantages:

    • Up to two hardware PWMs capable of 250 Mhz frequency, or up to two SPIs, or up to one I2C, or up to twenty-four digital inputs or outputs.
    • Camera connector. And the GPU can hardware encode to h.264!
    • Full USB stack on USB ports, so anything USB is available to you.
    • Half the current cost of the cheapest Raspberry Pi with ethernet, the Raspberry Pi 1 Model B+ currently going for €30 inc VAT.
    • Passable hardware single and double floating point, which Raspbian jumps through a lot of hoops on your behalf to make it appear seamless.
    • Full Debian, so I have plenty of up to date experience using this.

    Disadvantages:

    • Despite how astonishing it is that you can nowadays get a full computer with full fat Linux for €20, it still costs 67% more than the Microcontroller option. Multipled many fold, that adds up.
    • No ADCs so no analogue inputs possible without additional hardware.
    • ARM11 (first gen ARMv6) is really ancient. Like twenty years old now. It’s full of weirdness and quirks, though Raspbian does a fabulous job at mostly papering over the cracks.
    • Runs a proper Linux and so will need security updates etc and other ongoing maintenance. It also won’t like sudden power loss much.

Why not the alternatives?

Why STM32F4 instead of Arduino? It’s simply a price-performance thing – that STM32F4 runs rings around an ATmega CPU, having orders of magnitude more RAM, Flash, performance, and being 32-bit not 8-bit, and having a modern C++ toolchain instead of a proprietary partial standard library compiler. Yes it costs 25% more – the STM32F4 is €5 delivered versus €4 inc VAT delivered for the ATmega – but am I going to sweat an extra euro here for how much more you get? No.

Why STM32F4 instead of ESP8266? For €3 inc VAT delivered – even less than the ATmega – you can get a comparable specification ESP-12E dev board, and for €2 more it can come with a really nice breakout adapter board which saves lots of hassle soldering. It also comes with built-in wifi and bluetooth, though only 2.4Ghz 11n, and I really have to hand it to Espressif that they’ve really thought through making it as nice as possible for people like me yet cheaper priced and better specced any other alternative. However whilst comparable in specification, there are fewer GPIOs, ADCs, I2Cs and so on which means I’d need to fit more them with more PoE power adapters which makes them more expensive overall.

Why STM32F4 instead of ESP32? This is much tougher to explain, because in most ways the ESP32 is far superior. Historically ESP32 cost a touch more and STM32 a touch less, so its better feature set was somewhat proportional to the cost increase. Recently though they’re both about €5 inc VAT delivered, and in most ways it’s not a fair fight: 3x faster clock speed, 2x more cores, 8x more flash, 8x more RAM, AND 11n Wifi and Bluetooth v4.2, plus up to sixteen PWMs, or up to five SPIs, or up to four I2Cs, or up to eighteen 12-bit ADCs, or up to thirty-four digital inputs or outputs – the ESP32 is a whole lot of microcontroller for the money.

But despite on feature set alone not being a contest, the STM32F4 still has a few big advantages:

  • It is ARM which has an enormous ecosystem, not Xtensa DSP which has not. This matters a lot – all my sensors have code examples, drivers or python modules written and tested on either ARM or ATmega, and usually both. Getting all of those working well on Xtensa with the current state of its ecosystem seems unlikely.

  • ESP32 makes better a lot of the quirks and surprises that were in ESP8266, but they’re not entirely gone. For example it still has non-linear and unstable ADCs, albeit less non-linear and unstable than the ESP8266, but you still get crappy resolution at the bottom and top i.e. they’re range constrained, a classic sign of a not fully mature solution, and they also experience a good bit of sampling and thermal noise normal ADCs do not. And it’s not just the ADCs which are quirky, ultimately Espressif just aren’t quite up there with the big boy league in terms of quality and predictability yet. Don’t get me wrong, they are constantly getting better, and every new product generation is another leap forward. But you’ll still be fighting their lack of ecosystem depth which just isn’t an issue if you’re on ARM.

  • Ultimately I don’t actually need all those features – I don’t have enough stuff to connect into them without running more cable than it’s worth. The STM32F4 has enough i/o for my use case, it also has enough RAM and enough flash. It’ll do.

If one day the ESP32 + RJ45 ethernet boards currently costing €15 inc VAT delivered came down to around €8 inc VAT, then I might see myself using ESP32 for various solutions e.g. it would be quite unbeatable for controlling irrigation in a greenhouse where accuracy isn’t so important. But at €15 the STM32F4 + RJ45 easily beats it at €12, even with the hassle of soldering and wiring.

Finally why the Raspberry Pi Zero? To be honest there is no close competitor at all in this choice of microcomputer – nothing else comes close to the bang for the buck you get for €6 inc VAT. Sure it’s two decade old and is quirks-ridden technology, but its ecosystem support is very, very deep and very, very wide. Even its Wifi edition which in my opinion is terrible value for what you get for doubling its price still has few good competitors for that price – the quality of the boards and their ecosystems on the market between the Zero W for €12 inc VAT and the Raspberry Pi 3 Model B for €30 inc VAT I don’t think are worth the money saved in terms of added hassle and working around poor QoI e.g. buggy USB stacks making your USB Ethernet dongle not work quite right.

Hybrid approach

You’re probably gathering that I’m currently favouring the Microcontroller approach, but I in fact expect to adopt a hybrid approach. Why? Well it’s that camera connector on the Raspberry Pi Zero, it means that I can fit to it a 5MP OV5647 camera with infra red lights for €10 inc VAT including delivery, thus saving me having to buy Hikvision cameras each costing €80-100 or so. Anywhere which is not a bedroom nor bathroom will have multiple cameras looking at it. This is partially for security, but it’s mainly because I believe I can estimate human motion and coordinates within a three dimensional reconstruction by combining images using something like https://github.com/alyssaq/reconstruction. This, in turn, means I don’t need to mount – and more importantly, not need to wire – distance sensors running along the walls to detect where people are within a room, and thus adjust the brightness of the lighting in that locality in order to conserve power (as my LED strips will consume rather a lot of power if fully bright).

There are, annoyingly, STM32F4 models also with a camera connector, but I don’t think the Chinese sell cheap clones of them yet. Also, even if I had a STM32 here, I very much doubt a ~200Mhz ARM CPU can do any meaningful compression on a 5MP video feed before it needs to be sent out on a SPI connected Fast Ethernet port, which at best probably can’t push more than 40Mbit, so that’s a max resolution of 1280x1024 @ 30fps (and likely less in practice). And even then, your Gigabit network will rapidly saturate with lots of 40Mbit video streams running along it. Whereas the original Raspberry Pi (which has the exact same SoC as the Zero) has h.264 hardware encoding, and for which there is a nice Python library to have the camera and video encoding acceleration hardware cooperate and write the output to a socket. It should be able to make at least Full HD @ 30fps for 8Mbit or so, and that seems to me a nice cost saving over standalone Hikvision cameras.

Thus, I expect Raspberry Pi Zeros in the public spaces wherever I also need a camera (approx three per space for triangulation), and Black Pills everywhere else including outdoors as they’re cheap and replaceable enough that I don’t need to care too much about them getting damp or full of spiders for example.

Conclusion

I have placed an order for both and a whole load of sensors for me to experiment with. Finding a Raspberry Pi Zero without wifi in stock for something approximating its proper price was tough, I ended up going with German BerryBase and they got it delivered with a bunch of sensors and cables where it was cheaper to get it from them than Aliexpress within a week for a good price. For the Black Pill and all the other sensors where after postage it was still cheaper, I went with Aliexpress and that’ll likely be in transit for a good few weeks yet.

After the next post likely on the custom Home Assistant integration, I’ll start testing sensors with the Raspberry Pi Zero and I’ll no doubt write a post on my experiences with each of those named by exact model number (I did a ton load of research choosing each of them very carefully). However next weekend I also intend to take a break from staying up until 4am doing this stuff, because I’m getting a bit sick of feeling like crap every weekend, and I’d like a break from the slog of it.

#house




Sunday 19 September 2021: 22:54. Last weekend in my series on my future house build, I looked at the physical board of the keenly priced industrial grade scriptable PIC32-based Devantech dS3484 ethernet relay and input board, and I got a demonstration LED being PWM dimmed using a small program written in its proprietary dScript programming language. This weekend my goal was to get an actual solution to automating my prototype cove lighting up and working, including user selectable PWM dimming and automatic on-off based on outdoor brightness and whether there is someone in the room.

Firstly let’s look at how I have wired up the board:

The Devantech dS3484 board controlling a 24v AC power supply and MOSFET to PWM dim the LED strip

My LED strip is 24v, so that AC power supply is a 24v model (the box taped to the top is a 24v to 12v buck converter for 12v LED strips to be added later). Both its live and neutral have been wired into the first two 16A relays of the Devantech board. Hanging between the 24v power supply and the board and the LED strip is a cheap chinese clone of an IRF520 MOSFET costing barely one euro which is claimed to be able to handle up to 5A, but as a clone I’d not trust it with more than 3A (and indeed my 24v LED strip can draw an absolute max of 3A, which is not a coincidence). You’ll note that I added inline 5A car fuses for both the 12v buck converter and the supply to the IRF520 clone, just in case, and since that photo was taken I have added a heatsink to the MOSFET, because those IRF520 clones do run hot even on half their claimed amperage.

The IRF520 clone will switch at around 3v, so I wired the 5v output from one of the analogue inputs on the Devantech board to power the MOSFET, and using a 470 Ohm resistor I routed the same 5v supply via a digital i/o and in parallel to the MOSFET. This is because the Devantech digital i/o are NPN rather than the PNP typical in Arduino/RaspPi type boards, so when on they connect their input to ground, and when off they do not connect their input to ground (i.e. they don’t source, they sink). So, after the resistor, when off there is approximately 3.3v @ 10 mA remaining from the 5v input to switch the MOSFET on; when on that 3.3v gets drained to ground, switching the MOSFET off.

(Incidentally, due to doing all this stuff at ~2am after a full workday having risen at 7am, I foolishly shorted the resistor which delivered the full 5v to the digital i/o. The board, being i/o buffered and industrial grade, blew a small fuse on the individual digital i/o rather than blowing the board. That digital i/o no longer works, but it proves the quality of the board – had that been a Raspberry Pi, I’d have blown the chip)

Along the analogue inputs, I have connected a cheap TEMT6000 photoresistor which runs on 5v, outputting a 0-3.3v signal depending on how much visible light it sees (and I taped it to the room’s window). Next is a potentiometer, to simulate a wall rotary dimming dial which are just potentiometers wired into a triac (if you snip the internal connection and wire in a DC cable to the potentiometer, you can use an ordinary wall dimming dial switch very nicely). Finally, I wired a cheap HC-SR501 PIR sensor into analogue, despite it being a digital i/o, because the Devantech board’s digitial inputs are volt free, meaning you can connect up any voltage you like within spec (I assume <= 12v?), and the input will sense a 0-2v difference from ground as a zero and anything more as a one. Volt free is great for most uses cases e.g. just connect a physical switch, no power needed, the input ‘just works’. But when the input is a TTL device, the problem is when the signal is zero it isn’t connected to ground in a way the volt free input can detect (it basically needs a small current to flow, and none does), so the Devantech digital input can’t work with TTL inputs without additional circuitry. Whereas the analogue input ‘just works’ here, albeit you’ll need to poll it for new values. Luckily, this particular PIR sensor holds its digital signal high for three seconds per detection, so if you poll the analogue input every second or so, you’ll definitely catch it.

Last night I wrote this somewhat more complex than the last time dScript program to run it all:

digitalport LED_STRIP_PSU_RELAY1 1 ; relay 1
digitalport LED_STRIP_PSU_RELAY2 2 ; relay 2
digitalport LED_STRIP_PWM_DIMMING_IO 47  ; i/o 7
analogport LED_STRIP_PWN_DIMMING_SELECT_IO 4  ; analogue 4
analogport PIR_SENSOR_IO 1  ; analogue 1
analogport WINDOW_LIGHT_SENSOR_IO 3  ; analogue 3
const TICKS_BETWEEN_DIMMING_LEVELS 500
const TICKS_BETWEEN_PIR_SENSOR 300000


; Increments monotonically at 1000Hz
int32 monotonic_count

; The current LED strip dimming. 0 = off, 8 = 100%
int8 led_strip_dimming_level_actual
; The desired LED strip dimming
int8 led_strip_dimming_level_wanted
int32 led_strip_dimming_level_wanted_ticks_remaining
; The last time we saw PIR movement
int32 last_pir_movement_monotonic_count

function set_led_strip_dimming_level(int8 newlevel)
  if newlevel != led_strip_dimming_level_wanted then
    if led_strip_dimming_level_wanted == 0 and led_strip_dimming_level_actual == 0 and newlevel >= 4 then
      ; fast start straight to 50%, spool up from there
      led_strip_dimming_level_wanted = 4
      led_strip_dimming_level_actual = 4
      software_pwm_dimmer_impl()
      threadsleep 250
      if newlevel == 8 then
        led_strip_dimming_level_wanted = 8
        led_strip_dimming_level_actual = 8
        software_pwm_dimmer_impl()
      endif
    endif
    led_strip_dimming_level_wanted = newlevel
    if newlevel != led_strip_dimming_level_actual
      led_strip_dimming_level_wanted_ticks_remaining = TICKS_BETWEEN_DIMMING_LEVELS
    endif
  endif
endfunction

int32 last_pir_movement_delta_returned
function int32 last_pir_movement_delta()
  int32 ret
  ret = monotonic_count - last_pir_movement_monotonic_count
  if ret < 0 then
    ret+= 2147483647
  endif
  last_pir_movement_delta_returned = ret
  return ret
endfunction

; Implements LED strip PWM dimming
; The i/o when on turns the lights off, so this is inverted
function software_pwm_dimmer_impl()
  int32 todo
  ; In case you're wondering why not compare the masked value to something to
  ; set todo as a boolean, dScript doesn't support comparison operations in
  ; variable expressions. No that makes no sense at all :(
  select led_strip_dimming_level_actual
    case 0 ; 0%
      todo = 1
    case 1 ; 12.5%, 125Hz
      todo = (monotonic_count & 7)
    case 2 ; 25%, 250Hz
      todo = (monotonic_count & 3)
    case 3 ; 37.5%, 125Hz
      todo = (monotonic_count & 7) - 2
    case 4 ; 50%, 500Hz
      todo = (monotonic_count & 1)
    case 5 ; 62.5%, 125Hz
      todo = (monotonic_count & 7) - 4
    case 6 ; 75%, 250Hz
      todo = (monotonic_count & 3) - 2
    case 7 ; 87.5%, 125Hz
      todo = (monotonic_count & 7) - 6
    case 8 ; 100%
      todo = 0
   endselect    
   if todo > 0 then
      LED_STRIP_PWM_DIMMING_IO = on
   else
      LED_STRIP_PWM_DIMMING_IO = off
   endif     
endfunction

; Turns the LED strip on
function turn_on_led_strip()
  if LED_STRIP_PSU_RELAY1 == 0 then
    ; Set the MOSFET off
    led_strip_dimming_level_actual = 0
    led_strip_dimming_level_wanted = 0
    software_pwm_dimmer_impl()
    ; Set relay 1 and then relay 2 on, wait for the PSU to initialise
    LED_STRIP_PSU_RELAY1 = on
    threadsleep 20
    LED_STRIP_PSU_RELAY2 = on
    threadsleep 105
  endif
endfunction

; Turns the LED strip off
function turn_off_led_strip()
  if LED_STRIP_PSU_RELAY1 == 1 then
    set_led_strip_dimming_level(0)
    do until led_strip_dimming_level_actual == 0
      threadsleep TICKS_BETWEEN_DIMMING_LEVELS
    loop
    ; Set relay 2 and then relay 1 off
    LED_STRIP_PSU_RELAY2 = off
    threadsleep 20
    LED_STRIP_PSU_RELAY1 = off
    threadsleep 20
  endif
endfunction

thread software_pwm_dimmer_tick(1)
  monotonic_count += 1
  if monotonic_count == 2147483647 then
    monotonic_count = 0
  endif
  if led_strip_dimming_level_actual != led_strip_dimming_level_wanted then
    led_strip_dimming_level_wanted_ticks_remaining -= 1
    if led_strip_dimming_level_wanted_ticks_remaining == 0 then
      if led_strip_dimming_level_wanted > led_strip_dimming_level_actual then
        led_strip_dimming_level_actual += 1
      else
        led_strip_dimming_level_actual -= 1
      endif
      if led_strip_dimming_level_actual != led_strip_dimming_level_wanted then
        led_strip_dimming_level_wanted_ticks_remaining = TICKS_BETWEEN_DIMMING_LEVELS
      endif
    endif
  endif
  software_pwm_dimmer_impl()
endthread


; This coroutine samples the analogue inputs, so we run it at 0.1Hz
int32 outside_brightness
;int32 board_temperature
thread pir_control_tick1(10000)
  outside_brightness = WINDOW_LIGHT_SENSOR_IO
  ;board_temperature = TS1
endthread

; This coroutine samples the analogue inputs, so we run it at 5Hz
int32 chosen_dimming
thread pir_control_tick2(200)
  int16 pir_movement
  pir_movement = PIR_SENSOR_IO
  if pir_movement >= 512 then
    last_pir_movement_monotonic_count = monotonic_count
  endif
  int32 delta
  delta = last_pir_movement_delta()
  ; If it is bright outside, or no movement at all for an hour, turn off the LED strip and we are done
  if outside_brightness >= 600 or delta > 1800000 then
    turn_off_led_strip()
    threadsuspend ; we are done
  endif
  ; If the whole unit is off, and it's dark outside, only switch on
  ; if there has been movement recently
  if LED_STRIP_PSU_RELAY1 == 0 then
    if outside_brightness <= 500 and delta < TICKS_BETWEEN_PIR_SENSOR then
      turn_on_led_strip()
      set_led_strip_dimming_level(8)
    else
      threadsuspend ; we are done
    endif
  endif
  ; Unit is on, decide what brightness it needs to be
  if delta < TICKS_BETWEEN_PIR_SENSOR then
    ; Set to whatever the potentiometer says
    chosen_dimming = LED_STRIP_PWN_DIMMING_SELECT_IO
    set_led_strip_dimming_level(1 + (chosen_dimming / 128))
    threadsuspend
  elseif delta < TICKS_BETWEEN_PIR_SENSOR + 10000 then
    set_led_strip_dimming_level(1)
    threadsuspend
  else
    set_led_strip_dimming_level(0)
    threadsuspend
  endif
endthread

thread main(const)
  ; upon boot, turn on LED strip immediately, but dim
  turn_on_led_strip()
  set_led_strip_dimming_level(1)
  threadstart software_pwm_dimmer_tick
  threadsleep 3000
  threadstart pir_control_tick1
  threadstart pir_control_tick2
endthread

Hopefully the above is fairly self explanatory with the comments explaining anything weird looking – basically we physically disconnect the 24v AC adapter whenever possible, but we keep it running for 30 minutes after nobody being in the room so lights can be quickly started within 100 ms if somebody enters. I took especial care to never do too much at a time in a coroutine to keep the software PWM smooth and thus the flicker as least obvious as possible – you will probably also note the hard coded eight possible PWM dimming level choices, which is probably the most practically possible with a 1Khz clock. Here’s a video of me cycling the dimming down and back up again using the potentiometer:

The 500Hz 50% dim seems to not flicker on the phone camera’s sensor, but the 250Hz and especially 125Hz levels do. As mentioned in previous posts, this isn’t the Devantech board’s forte – the hardware PWM of the PIC32MX chip isn’t available to dScript, and I think given this is an interpreted bytecode running on a 80Mhz CPU even achieving smooth 1Khz software PWM is pretty impressive. Speaking personally, I am rather flicker sensitive, and I can easily see flicker at 500Hz. I find it quite offputting, though it is a lot less worse than the 250Hz and 125Hz PWM – that latter looks to me like a light pulsing on and off. Meanwhile my wife couldn’t detect any flicker at all except a little at 125Hz PWM.

Finally, as I mentioned last post, these Devantech boards have the unique feature that they can serve a HTML page of your design with AJAX updating fields pulled from global variables in your dScript program. I didn’t go nuts here, I made a simple HTML table and had it fill in various values to make a simple status dashboard:

All in all apart from the occasional head scratch all this work went smoothly, albeit that the low resolution software PWM dimming isn’t really good enough for my house build, so I’ll need something better. I didn’t get around this weekend to integrating this with Home Assistant, so next weekend that’s exactly what I’ll be doing: I’ll probably write a very simple local push integration for Home Assistant that lets this dScript push status changes to Home Assistant. I may also allow Home Assistant to override the board’s default logic e.g. put lights to 100%, or turn everything off.

Something else I’ll need to make a start on is researching alternatives for home automation. Something rather noticeable in this prototype is basically all the analogue inputs are full already, and given each of these boards costs at least €75 inc VAT, that’s rather too much money to be expending per room in the house. I need something much cheaper which can also do high resolution hardware PWM dimming and isn’t a pain to wire up and/or configure. I’m also minded that I have a bunch of sensors I want to test for my house build which require I2C, and the Devantech board doesn’t expose that.

Don’t get me wrong here, this Devantech board is absolutely great for automating high current stuff such as immersions, pumps, home heating water valves, that sort of thing – anything involving 12v DC or 230v AC and lots of current. The volt free inputs are perfect for wall switches etc. but not suited for wiring in Arduino/RaspPi focused sensors. This implies that my sought after cheaper alternative probably is going to be an Arduino or Raspberry Pi, exactly because the whole breakout board sensor ecosystem is designed around them, but also because they have the deep software support for enthusiasts which makes the experience a whole lot less painful than is usually the case with embedded systems programming.

#house




Monday 13 September 2021: 01:25. I received my industrial quality Devantech dS3484 board which cost me €75 inc VAT, a fraction of near equivalent boards from National Control Devices or National Instruments, yet provides similar functionality and uses proper 12v powered industrial grade components same as they do. As I described in the last post on the topic of my future house build, this board is capable of running a proprietary BASIC-like scripting language called dScript which lets you program it to carry out a fair bit of local automation, thus reducing how much control complexity you need to encode into a network controller such as Home Assistant. As the last post mentioned, there is a lack of detail online about the Devantech boards, and whilst the Devantech website contains a board specification, description and you can glean more detail from its dScript programming manual, there is a definitely lack of subjective user experience of these boards i.e. people who have had a go off them, and wrote up their experiences on line somewhere where search engines can find them. Let’s hope this virtual diary post is therefore useful to others!

Firstly, high resolution pictures, because there aren’t any online that I could find and without these it’s very hard to figure out how the board is routed:

The overall dS3484 board, in its optional extra case

The processor, a PIC32MX795F512L, with a 2Mb flash from Microchip to its left

Above you can see the Ethernet PHY chip, the RS485 serial chip, and the 12v buck converter to 5v.

The board has very good build quality. Soldering and traces are clean, every input and output is buffered, and a very wide range of voltages is therefore tolerated. The Hongfa 16A relays are considerably better quality than the cheap Chinese 10A claimed relays normally in tinkerer boards and I think I’d trust them with 230V AC. I tried out the relays, the digital i/o both as input and output, and the analogue inputs. Analogue inputs looked very stable when fed a potentiometer, no noise, drift nor random walk, and the full 10-bit range was clearly present with equal resolution at the extreme low and high as in the middle (unlike ESP8266 for example). Ethernet came up and worked without issue. I plugged a cheap 12v AC adapter into it, found no issue. 5v output from the board measured at 5.1v, which is fine. I haven’t tested the RS485 port nor UARTs, but I intend to do so soon. The USB socket, incidentally, appears as a serial port to your computer. I don’t think you can use it for anything other than with the dScript IDE, which seems rather unfortunate.

All in all, I think the hardware great value for €75. This board is maybe 20% more expensive than the cheapest ethernet relay boards off Aliexpress, but it’s an absolute world of difference in build quality. I’d trust this to switch an immersion, which I don’t think a good idea at all with any of the typical relay HATs for the Raspberry Pi.

Regarding the software side of things, I didn’t get too much time to play with that this weekend – you’ll need to wait until next weekend for me to have a proper go off the proprietary programming language. On the one hand, this isn’t some dumb board with no locally programmable logic blindly obeying commands hitting its Ethernet port – it is quite programmable e.g. if five conditions are satisfied, connect to another computer and write some arbitrary payload to that socket, or accumulate statistics, analyse them and email a summary every day. On the other hand, its proprietary dScript programming language is a weird mix of features and capabilities, some big fat ones like the ability to send email, yet no time keeping better than a second unless you implement your own.

However I did write this little dScript program in the dScript IDE to test the board:

const STEPS 16
const DELAY 1000

int32 on_count
int32 off_count
int32 on_max
int32 off_max

thread main(const)
  int32 N
  off_max = STEPS
  off_count = 1

  threadstart Timer1
  threadsleep DELAY
  for N = 1 to STEPS - 1
    threadsleep DELAY
    off_max = N
    on_max = STEPS - N
    if on_count == 0 and off_count == 0 then
      on_count = 1
    endif
  next
endthread

thread Timer1(1)
  if on_count > 0 then
      on_count -= 1
      if on_count == 0 then
        IO1 = off
        off_count = off_max
        threadsuspend
      endif
  endif
  if off_count > 0 then
      off_count -= 1
      if off_count == 0 then
        IO1 = on
        on_count = on_max
        threadsuspend
      endif
  endif
endthread

Which yields this on a RGB LED I hooked up to digital i/o 1 which uses PWM to reduce the brightness of the LED from 100% to 6.25% in even steps over sixteen seconds:

The video makes it look far worse than it is to the human eye, where any PWM flicker isn’t noticeable until the dimmest setting, and even then, only from the side of the eye’s focal point. The PWM flicker is due to the 16 ms duty cycle, which is only 62Hz, barely any better than a cheap diode based LED AC bulb flickering at 50Hz. But it’s the best possible on a millisecond granularity timing system, which is the finest timer granularity dScript exposes. This is unfortunate as even though dScript is an interpreted language running on an 80Mhz CPU, it should be able to pulse an i/o at 50Khz in software if the board isn’t doing much else.

In case you were wondering, yes the PIC32MX has hardware PWM. However dScript doesn’t expose that, and when I asked Devantech support if it could, I was told that the PWM capable pins are not routed to digital i/o, which seems to me a missed opportunity. Again, that weird mix of features and capabilities at work. Incidentally, I also asked how much current the 5v outputs could supply as it isn’t documented anywhere, and I was told around 500 mA. Which is very useful to know.

In any case, timers do appear to reliably fire bang on 1 millisecond – the PWM, despite the video where the phone camera’s own refresh rate is colliding with the PWM refresh rate – appears to my eye absolutely regular. No stutter, though obviously this is not a loaded system.

The proprietary language dScript seems to be a reasonable attempt at a coroutine based BASIC-like embedded systems language. What the language calls ‘threads’ are actually coroutine event handlers, so you declare what event you are interested in e.g. timer elapse, TCP/IP input, board boot, i/o state change and so on, and you write code which will be called when that event occurs. Digital i/o appear to be non-blocking (instant), but analogue input read, serial port read, TCP/IP read and so on appear to suspend the coroutine’s execution until the blocking input completes, upon which execution is resumed. Most writes go into asynchronously flushed buffers and so don’t usually block. Whilst your coroutine is suspended, other coroutines may run. The scheduler is cooperative, so if any coroutine executes for too long, it blocks the execution of other coroutines, and events for a given input after the first event may get dropped as there is no buffering, as befits a hard realtime implementation which cannot allow unbounded dynamic memory allocation.

This coroutine based fixed-at-point-of-compile approach suits well deterministic programming, though it is unavoidably a bit awkward to write code in as a result (think WinRT programming, but minus any dynamic memory allocation). As there is no preemption, there are never races on shared state, which is good because all non-local state is globally visible like say in a single translation unit of C. As all possible memory allocations are known at compile time in the dScript IDE, memory is preallocated for volatile and non-volatile RAM and program bytecode. Strings are supported, but you cannot create new ones programmatically at runtime i.e. with runtime determined length – anywhere you format numbers into a string it preallocates string space for the maximum possible formatted value. There is no floating point support, which is to be expected for such a low end CPU which would lack hardware floating point, but there is what appears to be an optimised boolean expression evaluator which I assume is expanded out into a finite state machine rather than sequences of bytecode for the logic, so if-then-that type logic can be tersely and very efficiently encoded into a constant state table.

An unexpected feature of these Devantech dScript boards is that they can serve a user defined website of your choice on HTTP and moreover, said website can call arbitrary dScript via AJAX from Javascript. This lets you build web based UIs or reporting or summary dashboards for your particular setup, which is very nice. In fact, the whole system config and setup web UI for the board is written entirely in dScript, which shows what is possible if you are willing.

Anyway, next weekend I’m going to have a go at writing an actual piece of control software for my particular project in dScript. It’ll have a summary dashboard served as HTTP, so you can always see what state it is at and why. I may or may not also have it push state changes to Home Assistant, e.g. current light brightness, and if I get the time, add remote automation by Home Assistant of the project. I’ll no doubt report on my progress here!

#house




Friday 3 September 2021: 11:57. I’ve made a start building prototypes of the Home Automation described in the first post of in the series about my future house build. This is my prototype, hand made, cove lighting:

My hand made cove lighting prototype

This is five metres of 120/m density 3000K warm white > 95 CRI (Colour Rendering Index) 2835 LED strip mounted into an alumnimum heat sink and diffuser firing along the direction of the ceiling. To shield the eye from glare and to make it look pretty, standard polystyrene coving runs underneath (glued to wooden mounts to prevent the LED heatsink melting the polystyrene), leaving a gap of about 1.0 - 1.5 cm along the top (it varies because the roof plaster varies in thickness). The heatsinking sits about 1mm from the wall, and air can flow from underneath around the back and out the top. This is 24v DC LED strip, which is unusual as most comes in 12v or especially 5v, but as a result it doesn’t draw more than 3A which makes for much less brightness fade along the strip, and less thick wiring needed – power injection every five metres is eminently doable with 24v LED strip, rather than the more usual one metre if say you had 5v LED strip. This saves an awful lot of time and hassle by reducing to one fifth the amount of wiring you need to do. The strip achieves > 95 CRI by randomly varying the colour temperature of each LED mounted on the strip such that the average comes out at 3000K, this creates a very nice light indeed, far better quality than your typical household LED bulb which may have a CRI less than 80. Indeed, this exact type of strip is more typically used for illuminating artwork in a gallery – it is total overkill for household lighting, and in practicality we probably will in the end use a cheaper LED strip as this stuff costs 60% more than say a CRI 90 strip.

In case you’re in the market for high quality LED strip, the vendor is Gree Lamps on Aliexpress run by a lady called Lucia. I was very pleasantly surprised during testing that my LED strip exactly matched her description, which is very rare for Aliexpress vendors who tend to inflate specifications. She is expensive compared to others, but what you get is spot on in terms of spec, power consumption, and quality. It’s very noticeable the difference between the light quality from this strip and our ceiling light, a Philips ‘high CRI’ LED bulb.

Having lived with the cove lighting for a good few weeks, we decided that we really like it. Much better quality of room illumination than ceiling point lighting. It’s really quite subtle the difference, and initially you don’t see it and feel underwhelmed. But after you get used to it, well, you become quite sold on this being the only possible lighting for your house.

To that end, we need to automate it, because on full this stuff consumes ~12w/metre or so, and thus my five metres here is ~60w which is the same as an incandescent bulb! Indeed, my ceiling point light only consumes ~15w, so this is consuming 4x more power and it only covers half the room! So we are going to need to dynamically dim this stuff using Pulse Width Modulation (PWM) based on proximity of humans i.e. each strip would be brighter the closer a human is sitting to it, and as you move around, the lighting automatically brightens around you as you move. This, in turn, keeps the electricity bill down, and obviously rooms without people automatically go dark. We can also have this stuff only illuminate barely in the middle of the night, so when you’re going to the toilet, it won’t blast you with so much light that it interrupts your sleep.

All that said, in order to not be anti social to human beings, the wall light switches still need to do something, so if somebody turns off a wall light switch, it ought to turn off the lights and/or change their brightness. And I want conventional light switches here, it needs to appear to not be fancy as that too would be anti-social.

Choosing your automation hardware

Home Assistant integration is an absolute hard requirement here. So most of the proprietary home automation systems are therefore out. I don’t like Wifi for anything reliable, I want everything on Ethernet, ideally PoE. I also don’t want to spend much money, but as well I don’t want to spend much of my precious little free time, which includes that I’d like to never have to maintain the thing if possible over the years to come. What I want needs to be cheap, but safe, and if one can spend a little extra to save my precious free time, I’ll spend it.

Most people in the enthusiast community would choose something like a Raspberry Pi Model B+. It has an ethernet port with add-on PoE hat, a wide range of i/o, it’s cheap enough at maybe €30 inc VAT for the Model B+ (or for the exact same money you can get instead the rather impressive Orange Pi Zero 2 which I very seriously pondered going with). However, for switching things with useful current and voltage you need to wire relays into the GPIO, and whilst those are cheap enough (maybe €1 per pair of 10A relays capable of being switched at 3.3v), you also would be wise to fit protection circuitry between the relay and the rather sensitive 3.3v TTL GPIO on the CPU, as if it ever saw more than 3.5v for even a fraction of a moment it would blow the port or maybe the whole CPU. It’s also a fair bit of hassle to wire up a relay if you want to have it powered by an independent loop – fine if you’re doing one or two, painful if you’re doing dozens. I am also not entirely trusting of cheap Chinese relays, I would view their claims of 10A with suspicion – maybe 7A is more like reality. I’m also mindful that all this stuff can catch fire if it shorts, though I’ll be fitting inline car fuses to hopefully prevent that.

Now don’t get me wrong: via RaspPi hats you can add everything I listed above in one convenient bundle. But a decent hat costs a good €45 inc VAT, so now you’re spending €75 inc VAT. And for just a little more than €75 there is a whole world of alternative options.

Why decent hats cost more than the board is because these little enthusiast boards aren’t really designed for rough environments e.g. hanging off long cable runs containing varying quality of voltages in a dusty corner. They are mostly mobile phone SoCs or cut down derivatives thereof – they were designed to be behind a decent PSU or a battery supplying a stable, regulated power and that almost all of what they deal with is the same e.g. Ethernet, a phone line, a satellite LNB, and so on, all with tightly bounded voltages and lack of EM noise. They are chalk and cheese to industrial CPUs like the ones in your car, or in factory plant where the CPU would be designed to tolerate sudden voltage droops of maybe 30% or spikes of maybe 10%, or for inputs to be 5v instead of 3.3v because a lot of industrial equipment uses 5v. What you swap with these industrial facing CPUs is clock speed, so where a 700Mhz CPU might be absolute rock bottom for those enthusiast boards, in order to tolerate voltage ripples you might expect one tenth of that in an industrial CPU. Your washing machine, for example, may well be running a 48Mhz CPU which constantly endures PF spikes from motors and switches turning on and off, but because it’s running so slowly, it don’t care. In the end, so long as your washing machine works, who cares if it runs at 48Mhz?

To that end I went looking for something more affordable than industrial boards, like say the cheapest National Instruments eight relay with Ethernet system I could find which costs a mere €1,500 inc VAT and total proprietary lock-in. A well known cheaper alternative to National Instruments is National Control Devices, a four relay system of theirs starts from €250 inc VAT onwards and a four MOSFET system of theirs starts from around €300 inc VAT onwards. But far cheaper again are boards from a small British company called Devantech, who have been making for many of the past thirty years now a bunch of Ethernet connected relay and GPIO boards out of industrial grade components for very reasonable prices if compared to NI or NCD. Despite being encumbered by Brexit, Devantech boards are very widely available all over the world via local resellers – the United States has an agent, as does Germany, as even does Iran. With a bit of searching, their local distributor can be found pretty much anywhere in the world.

Devantech provide two variants of their ethernet connected boards: (i) the traditional NI/NCD type boards which are generally fixed function and require an externally connected device to tell the board what to do or (ii) where the board has software defined function, using a custom programming language designed by Devantech called dScript, and whose programming manual can be found here.

Now this scriptability intrigued me. Obviously by now I had done an enormous amount of research, mostly involving ruling things and options out. Looking through the dScript manual I came to feel that these variants were worth the punt: 99% of the Home Automation I needed to do was totally doable on a 8Mhz ARM2 CPU which was the Acorn A3000 CPU back around 1990, so on anything similar or better, it ought to be a cinch. Morever, because this stuff is scriptable, for those 1% of situations where the local board can’t make a decision, it can explicitly do an upcall to Home Assistant and ask for direction because dScript lets you send and receive TCP or UDP messages.

The current range of Devantech dScript capable boards are these. All include USB 2.0 and 10-100 Ethernet, and they’ll accept an unregulated 12v DC input (i.e. I can use a cheap chinese PoE 12v splitter and not worry about the 12v DC quality):

ModelApprox price
(inc VAT)
16A
relays
Digital inputs
and outputs
Analogue
inputs
Serial
ports
CountersCPUFlash
storage
RAMTDP
(12v DC)
Other notes
dS1242€5924x VFC input or NPN output2x 10-bit1x TTL8x 32-bit trigger, 20 Hz input count80Mhz PIC32MX795F512H
(guessed)
512Kb128Kb6WSoC datasheet says there are five not eight counters
dS3484€7548x VFC input or NPN output4x 10-bit2x TTL, 1x RS4858x 32-bit trigger, 20 Hz input count80Mhz PIC32MX795F512L
(source)
512Kb128Kb12WSoC datasheet says there are five not eight counters
dS378€8887x software defined i/o, your choice of VFC input, NPN output or 10-bit ADC input2x TTL, 1x RS4858x 32-bit trigger, 20 Hz input count120Mhz PIC32MK0512GPK064? (guessed)512Kb?128Kb?12WHas seven ADC inputs, but datasheet for guessed SoC says 12-bit ADC. Also no Ethernet in the PIC32MK. So maybe a PIC32MZ?
dS2824€147 - €186248x software defined i/o, your choice of VFC input, NPN output or 12-bit ADC input1x TTL, 1x RS4858x 32-bit trigger, 10 Hz input count200Mhz PIC32MZ0512EFE064? (guessed)512Kb?128Kb?18WOptional integrated relay snubbers for inductive loads. Guessed SoC datasheet says there are four not eight counters
dS2832€184 - €233328x software defined i/o, your choice of VFC input, NPN output or 12-bit ADC input1x TTL, 1x RS4858x 32-bit trigger, 10 Hz input count200Mhz PIC32MZ0512EFE064? (guessed)512Kb?128Kb?24WOptional integrated relay snubbers for inductive loads. Guessed SoC datasheet says there are four not eight counters

Firstly, note that the Devantech 4-relay board is about one quarter the cost of its equivalent NCD board, and the 8-relay board is about one seventeenth the cost of its equivalent NI system. You might think that they reduced the quality of components to achieve that, and in some ways this is true: the NCD boards have 20A relays whereas the Devantech boards have 16A relays. Both are 12v industrial grade relays however, not the usually lower quality 5v relays in the RaspPi hats and cheap chinese relay boards. And in Europe, with our 230v AC versus US 115v AC, 16A relays are worth 32A relays in the US, so we here in Europe really don’t need 20A relays when almost all our AC use cases are bound by a 13A fuse in any case.

It is true that comparing the NI boards to anything else isn’t really comparative. I saw the NI boards in action during my work on the EuroFighter project back in year 2000 and there is no denying their extreme robustness. Sure, they cost a fortune, but they are built like a nuclear bunker compared to their cheaper competitors.

It is also true that from Aliexpress and other places you can obtain cheap chinese ethernet relay boards for about 20% less money than the Devantech boards. Whilst you may accept their 10A relays (likely really 7A), multiple internet forums report that they don’t play well together on the same ethernet subnet because they have a borked firmware. I have found no reports that the Devantech boards and firmware have any such issues. So if you’ll only ever use a single board, the cheap chinese alternatives might be worth a look, otherwise I’m fairly confident that the Devantech boards are about as good as you’re going to find for the price-feature benefit.

Secondly, there is a lot of guesswork in the table above, so until the board actually arrives and I can examine what’s on it, treat everything above with a pinch of salt, though note the link above that confirms that the dS3484 uses a PIC32MX795F512L. I will say that the cheapest Euro denominated reseller of Devantech kit I could find was Dutch https://www.antratek.com/, they’re a good 10% cheaper than most of the other Euro denominated resellers, and that’s from where I bought my board for prototyping.

Thirdly, the NCD board almost certainly uses a PIC32 processor just the same as the Devantech board does – maybe even a similar model. The PIC is, of course, the classic industrial CPU for many decades now. It is very hardy, accepting gladly really poor quality power supplies, and comes with oodles of relatively sophisticated i/o, like ample Analogue to Digital (ADC) inputs which you won’t find built-in on any mobile phone or PC facing CPU. However the PIC 32 CPU is not at all like the PIC chips of yore, which had a reputation of being horrible, and deservedly so in my opinion. The PIC 32 is really a MIPS chip, which is a very very good thing compared to that god awful PIC 8, which is probably the worst CPU I’ve ever seen in my career. The PIC 32, being MIPS, is quite sane and logical. No it ain’t no powerhouse, that there 80Mhz of clock speed gets you almost nothing compared to any desktop or mobile CPU, even an 80Mhz ARM Cortex A53 would run rings around it, but for my needs of ‘if this then that’ it ought to be sufficient.

The dScript manual claims that individual dScript instructions can scale between 40k per second and 400k per second, with 100k per second being a reasonable average assumption. On that basis, assuming that the built-in PWM hardware of the PIC32MX795F512L isn’t available to dScript so I’ll have to toggle outputs manually, I certainly think that 10Khz PWM is doable. This might not be quite enough to prevent flicker from the LED strips on a mobile phone camera, but once I get the board in my hands and have a go off it, I’ll see how far I can push it.

I have submitted a support request to Devantech to ask about less-than-1ms support in dScript, which from the dScript manual appears to be lacking. I’ll report back here in a subsequent post what they respond with.

#house




Monday 30 August 2021: 20:49. It occurred to me that I haven’t posted an update on my P2P earnings #mintos in about six months, so I thought I would do so now:

MonthMintos annualised return for each monthMintos non-earning capitalMoncera annualised return for each month
December 202011.29%11.4%
January 2021 10.21%11.4%
February 202112.82%11.4%
March 2021 17.57%11.4%8.54%
April 2021 10.63%17.1%8.59%
May 2021 10.46%18.8%5.97%
June 2021 12.97%22.7%9.39%
July 2021 11.70%27.4%11.53%
August 2021 10.91%27.4%11.42%

That non-earning capital, to remind readers, is the money I had invested in Polish Capital Service which is currently under a covid restructured debt repayment plan and during which it isn’t paying out. So considering that this drags down the annualised return, the returns from Mintos on the earning capital have been very healthy indeed such that the typical annualised return has barely dropped over this time last year, and that is even as I have been drawing out about half of my Mintos total investment – as evidenced by the proportion of non-earning capital more than doubling as a relative share. This is mostly because I was lucky – last post on Mintos I mentioned that I was moving away from car loan giant Mogo (since renamed to Eleving Group) into DelphinGroup and IuteCredit. Around March DelphinGroup bought back all my loans and stopped issuing new ones on Mintos, so I decided to take a punt on investing in Creditstar who https://explorep2p.com/mintos-lender-ratings/ think fourth best on Mintos, despite their 6-7 rating by Mintos. I thus locked in a bunch of loans at 14-15% APR, and to date neither IuteCredit nor Creditstar have bought back their loans, so I’ve been doing rather a lot better than the typical 9% APR on new loans in Mintos last few months. Eleving Group/Mogo began buying back my high APR loans in dribs and drabs over several months, and I think I became completely clear of them in July through doing absolutely nothing, which suits me fine as their new loans pay peanuts. On Mintos, I am now about 41% IuteCredit, 39% Creditstar and 24% ESTO (ranked 11th by explorep2p, yet rated 8 by Mintos), albeit on less than half the total investment when compared to January.

You will notice a new column up there for Moncera. This is a fairly new P2P investment site exclusively for Placet Group, who are rated the best quality P2P lender by explorep2p, but because they pay such paltry APRs on Mintos I’ve never invested with them. However the exact same loans on Moncera pay considerably better than on Mintos, and indeed were paying better than anything somewhat safe on Mintos (> 10% APR), so from March onwards I moved over half of all my investment to Moncera. Moncera appears very good if you don’t mind the fact that it’s a single loan originator and that if it did ever go bust you’d have no one to fight your battles for you, whereas Mintos have at least proved that they’ll go to bat with their own solicitors to recover at least some of your money from loan originators who try to shirk their obligations.

All in all though, all my P2P investments shall be getting wound down during 2022 as I’ll need every penny that I can lay my hand upon to build my house. The goal of all this P2P investing was simply to preserve some value from inflation on a cash pile, and I never risked more than would earn about 1% per annum on the total cash amount. That cash pile mostly just got sunk into buying a site, the remainder will be paying professional fees to reach planning permission and then maybe if there is enough left it might just about pay for site clearing and groundworks. All the remainder will come from a mortgage, and as that won’t be enough either, several upcoming years of future income which means I’ll be saving absolutely nothing. So, to put it plainly, the days of there being any cash pile to lose value upon from inflation have already begun to end.

Once the P2P investments start to make up a fifth of all my remaining cash I’ll stop their automatic reinvestment and let them cash themselves out slowly. I’ve noticed that they buy back about one third of your original investment every six months just from churn or whatever, so that’s about one fifteenth of your total cash pile every six months. If I need it to go quicker I can always sell the loans on the secondary market, though that comes with a 0.9% exit fee (Mintos) or 0.5% exit fee (Moncera).

I may or may not do another post on P2P investing in the future. I hope you all enjoyed the series of posts and it gave you some new investment ideas.

#mintos #p2p-lending




Click here to see older entries


Contact the webmaster: Niall Douglas @ webmaster2<at symbol>nedprod.com (Last updated: 2019-03-20 20:35:06 +0000 UTC)