Insulating our suspended floors

As we’re renovating our new house, one of the things I wanted to do was to insulate the floors of the downstairs rooms. When we renovated our first house, not doing something about the floors was something I regretted. At the time, we didn’t think about it, due to the looming deadline of our first child’s arrival and once the engineered floor went down, our hands were tied.

This time around, I decided it would be something worth doing.

The insulation and materials

I spent quite a few hours researching the insulation of suspended floors and settled on the use of PIR. This is a solid foam insulation that has foil backing. It’s more efficient than rock wool, meaning you need less of it for the same level of insulation.

I used a few insulation calculators and came to the consultation that 60mm of PIR would be enough to meet building regulations. I set myself a budget of £500 and after shopping around, I found some 75mm PIR. I reckoned I would use around 12 sheets, so I purchased 14, for any wastage etc. In terms of brand, I went for the cheapest one that had the desired U-value. This happened to be Ecotherm.

I ordered 25×38 tanalised timber lengths from Wickes, which would be cut into 6″ lengths to serve as batons for the insulation.

For screwing down the floorboards, I went for No.8 (4mm) x 50mm screws. I estimated 1400 screws (I was short) so I end up with nine boxes and used seven and a half.

Tools

I also got some expanding foam, for sealing any gaps and rolls of foil tape for sealing up all the joints in the insulation. I already own a proper foam gun, so I just needed some canisters of foam.

For cutting the insulation, I ordered an Insulation saw. This doesn’t teeth like a normal timber saw and the results were nice clean cuts (albeit not straight!) with no dust.

I purchased this floorboard lifting tool to try and make the job a little easier.

I used a DeWALT Cordless drill and Cordless Impact Driver for pilot hole drilling and for driving in the many, many screws.

To speed up the pilot holes, I picked up some special drill bits. These include a special countersink head, so you get two for one in terms of the pilot holes. I didn’t have this when doing my deck and that involved switching from drill bit to countersink bit over 1000 times!!!

Image 1 - TREND CRAFT PRO 5PCE HSS DRILL & COUNTERSINK SET CR/QR/CS/SET

I treated myself to an Evolution mitre saw. I’ve wanted to add a mitre saw to my inventory for quite some time and this seemed like the perfect excuse. This saw was recommended as best value for money on several websites and it offered a large 80 x 300mm cutting size, which would be perfect for all my DIY needs.

I got an Evolution 255 SMS+

During the course of the work, I also treated myself to a DeWALT Multitool as well. I opted for a battery powered one to provide me with future flexibility.

This is a battery powered multitool, which I think will come in handy for other projects too.

The front room aka the practice room

The room itself was 3.6m x 3.6m with 10 floor joists and 26 floorboards. It had a small bay window. My plan was to give this room a go and see how difficult it would be. If it turned out to be too difficult, I could abandon the project without too much damage. If all went well, I would tackle the large back room too.

Image 3 of 20 for 59 Naseby Road
Before carpet lifted and radiators removed

The floor boards in the house dated back to around 1960, but were in excellent condition.

The electrician and plumber had already lifting some of the boards during their first fix, so we had some space to work with.

I made a time lapse of the job lifting the boards. I roped my father-in-law into help.

It was really difficult work. The boards themselves were tongue and groove and this made it really hard to cleanly lift them.

We used a mixture of hammers, crowbars and the lifting tool. After more than four hours, we had them all lifted.

Floorboards lifted (broken shadow wall visible in the centre)

The joists were in amazingly good condition, which was nice. A part of the shadow wall had collapsed, so we made a note to fix that. You can just make it out in the picture. One of the joists was also resting in the airbrick’s space, so we made a note to fix that up too.

First step was fixing the batons. These were 6″ long, with two screws, one at either end.

My father in law always created a little jig to help with the batons.

I invested in a special insulation saw, which minimised the dust generated (basically none)

By working in short lengths of 1.2m (cutting the boards width ways) we achieved a very tight fit. Some of the edges weren’t straight and sometimes the manufactured edge bowed inwards, but overall they fit very snugly. We also made sure to fix up the fallen shadow wall using some loose bricks. I mixed up a small batch of mortar to help ensure our repairs didn’t fall down again!

You can see the noggins installed

Once we had installed all the PIR, the next step was taping up the filling any gaps with expanding foam. Along the edges, where the spaces were wide, we cut and inserted thin strips of PIR, before filling the remaining spaces with foam. I also made sure to fill any of the larger gaps between the joists and PIR and in some of the large seams where PIR met each other.

Once the foam had set, we then we about taping up all the joints. I had 100mm wide foil tape which we covered the joists with, sealing up each seem. I got a cheap seam roller to help with this as I wanted to make it as airtight as possible.

WIth all the joints taped, I then laid them out to ensure every fitted and was spaced out. Then starting at the end, I worked backwards. My process was this:

With all the boards laid out I started work on the three boards to at the far end of the room. These were boards, 26, 25 and 24. I lifted them out, hoovered up any dust, taped up any marks or mistakes in the foil tape and then laid them back down. I then lifted boards 23 and 22. This showed me where the joists where, and using my square, I drew a pencil line onto the boards. I then drilled pilot holes and screwed the boards down. I wasn’t very particular where I drilled the holes, but I made sure to put two on either side, avoiding any existing nail holes.

I was complicated in places by the fact the electricians and plumbers had cut some of the boards for access, but I did as good a job as I could.

I continued this process all the way back along the floor until the final three boards, where I worked the other way. I did this because the board right along the wall wasn’t cut very well and was difficult to adjust. The tails for the radiator also came up through this board and I wan’t sure of their eventual position (radiators were removed for painting) so I needed to leave myself access so I can make good any gaps once the tails are reconnected.

Laying out the floorboards before screwing them down

All told, I think it probably took me five or six hours to screw them all down. I had plenty of practice when this as I installed a cedar deck at the back of my old house. I didn’t have the benefit of the countersink bit back then, so the 1200 screws took a long time with a lot of bit switching.

It took 600 screws to put down this floor.

The back room aka I’ve enough confidence to do this again

I was happy with the outcome on the front room, so I moved onto the bigger back room. This room is the same width, but about 1.5m longer.

This time around, I decided for a different approach when lifting the floorboards. The big problem was the tongue and groove boards. We knew they’d be difficult, but I underestimated how difficult. We broke so many of the groove and tongues that I figured, why not just cut the tongues first? This should make lifting the boards much easier.

I considered using a circular saw for cutting the tongues, but decided against it (blade thickness and cost of mistakes). Instead, I opted for a multitool.

With lots of help from my brother in law, we cut the tongues and lifted the boards. It was *mush* easier this time around. Using the big rough tool, we would just work up and down the board popping it up. We still needed the hammer along the sides, where we couldn’t fit the tool.

Progress was very swift compared to the front room.

My brother-in-law did most of the work, but don’t tell him that 🙂

I numbered the boards in the same way, this time I wrong on the top of the board, rather than the underside. There were less small boards and no funny angles to contend with. The only problem was that the length of the boards made them a little unwieldy.

It went really well, until we hit the fireplace. Marble and fixed into the brick work.

The marble fireplace
Dropped it off the wall onto some underlay. It was very, very heavy
I hit it a lot with a hammer to break it up. A hammer that we actually found under the floor.

Once the fireplace was out, we removed the last few floorboards.

With the floorboards up, I checked the pipe work was all insulated, taped the joints and added some support to the pipes by using wires fixed to the joints. The shadow wall was in good condition and I just fixed some of the slate spacers where there was movement.

It was then I realised that I should have ran speaker wire from the TV location to the the opposite wall! I’d completely forgotten to do this in the front room, much to my annoyance.

In addition to an ethernet cable (who knows!) I pulled four speaker wires and fed them through some conduit. If I ever add surround sound to this room, I’ve got four speakers covered.

Then it was a case of following the same process as before, attaching the little noggins and cutting the insulation to size.

Work in progress!
All board down and expanding foam put into the gaps.

With it all foamed, next came the tape. I got a different brother-in-law to help with this. I made a little time-lapse of this too.

As with the front room, I moved all the floorboards back in and laid them out to ensure even spacing. Having the number on the top of the board was much better as I could easily see any mistakes.

This time, with the help of my wife, I worked four boards at a time, piloting and screwing down. It took about six hours to get them all screwed down. For this floor, we used around 900 screws. I had estimated 1400 for both floors, so the wife had to make an emergency trip to Screwfix!

We had the same issues with the radiator tails, so those boards remain uncut. I’ll sort that out once the walls are painted and the radiators are back on the wall.

All screwed down!

Conclusions and lessons learned

I consider this project to be a success. Sure, it took longer than expected, but I think we’ll reap the benefits of this during the winter months.

In terms of materials, I ended up only using 10 sheets of insulation. I think that’s because of the joist thicknesses and the area occupied by the fireplaces in both rooms. I will probably try and sell the four sheets as they are in pristine condition.

Could I have used thicker insulation? I think the argument here is that more is always better, and whilst I agree with that, cost has to be factored in. I could have spent £700 or £800 on 100mm thickness boards, but the extra thickness probably wouldn’t have made much difference. The house is old with cavity walls, so the money might be better spend elsewhere to get more bank for my buck.

In terms of the actual work involved, cutting the insulation was probably the part I got least right. It was very tricky to make straight cuts and more often than not, we had to trim the sections of insulation to make them fit. No matter what approach we tried, we always almost always had a wonky cut.

When it came to lifting the boards, the second approach of cutting the tongues worked much better than just trying to force the boards up. I wish I’d done that in the front room too. Not only did it make lifting the boards much easier, it made it easier when laying them back down. Cutting the tongues was an option since we weren’t planning on exposing the floor, so any marks and gaps will be hidden by carpet or floating floor. I toyed with the idea of sanding and varnishing the floor, but as we have a beautiful hardwood floor in the hallway, we decided we’d probably carpet anyway. I

I’m worried about the central pipes freezing in the winter. They were lagged by the plumber, but I’m still a little nervous. I’m going to drop two temperature probes into the cavity underneath and use that to give me a reading of the temp. If I drops below zero, I can always have HomeAssistant turn on the heating for 15 minutes or something during the night to stave off the cold.

The other concern is any condensation. I took care when taping down all the joints and when foaming the gaps, so it should be unlikely, but I took the easier option, so if the joists do rot, I’ll naturally blame myself for taking the easy option 🙂

I’m also annoyed at myself that I didn’t run speaker cables in the front room. I’ve considered trying to fish cables under the floor, but the shadow wall would make that very difficult, so I’ll just leave it for now.

Overall, we won’t feel the effects of the insulation until winter hits. We won’t know what exact effect it will have since we won’t have experienced the house in the winter, but I’m very confident that the insulation will make the house much warmer!

New House – Technology Choices

I’ve recently bought a new house.

We completed renovated our first house and, in the process, we made an awful lot of mistakes. Don’t get me wrong, we got an awful lot of things right too, but we’ve always had some annoyances. These were born of inexperience and naeivaty.

With this new project, we have an opportunity to do another renovation and we can put some of the lessons learned into practice.

I want to write a few blog posts covering the renovation, so to kick that off, I want to start with technology. Obviously.

Readers of my blog will know I love smart home technology. I got to try out various bits of kit in this house, such as Den Switches, Shelly Relays and Aqara odds and ends. I build temperature sensors for my hot water tank and a salt sensor for my water softener. I learned about Home Assistant, MQTT, Z-Wave and Zigbee. I installed and then removed a Nest camera. I upgraded my home network with Ubiquity gear and learned about PoE and cable crimping.

What will I not do again?

Nest Thermostat

This was the first piece of home technology I ever purchased. It was great to begin with, but after a few weeks, I turned off the “learning” mode. It was turning on the heating at random times during the night, when I felt it just wasn’t necessary. Another problem I had was that hot water could only be operated in blocks of 30 minutes or more. During the height of the summer, 10 or 15 minutes would have been enough.

The smart home/away feature was great and it has some limited interaction with Home Assistant. Google then killed off the API program, so all that support went away. I decided I wanted something just a little more flexible.

Cloud based cameras.

When we first moved in to the house I had it wired for security cameras, but against my instructions the electrician put in Coaxial instead of ethernet I wanted. When he then asked for £1000 to install the cameras, I politely declined. At around the same time, Maplin was going into administration, so I picked up a Nest Outdoor camera and two indoor cameras during their sale.

I was very impressed with the Nest outdoor camera’s quality, but it always felt slow to access and the movement notifications always had a noticeable delay. I always thought it was dumb that I was streaming the video from a server (probably in the US) when the camera was *literally* connected to the same WiFi.

After Nest released their video Doorbell, I picked one up and installed it, figuring I’d stay in the same eco-system. This was when I really started to notice the delay in notifications e.g. doorbell would ring and 20 seconds later my phone would chime.

Then there was the cost for storing the video. It was costing me over £100 a year for the four cameras I had. As I became more and more aware of privacy issues with cloud video, I decided enough was enough. I took down the Nest Outdoor and replaced with a Ubiquity G3 bullet. I added three more of them over time. All my video is now stored on a local server and offers almost instant when I’m at home. Access when I’m away from home is also pretty snappy.

Smart light bulbs.

I tried a pair of Ikea Smart Downlighters in my downstairs loo. They were easy to install and use, but light switch muscle memory proved too strong and I had to take them out. I ended up using an Aqara switch in their place and that worked an absolute treat!

Den Light Switches

I bought into Den Automation’s crowd funding via Seedrs and preordered a few hundred pound’s worth of their stuff. After lots of delays in manufacturing, it eventually arrived. I’ve written about the installation and my first impressions of the kit. It worked pretty well, but after a few months the company went into administration and their cloud was switched off. Thankfully I’d figured out a way to make it work with MQTT so I was able to use them for a while longer. Some of the units eventually lost connection and couldn’t be re-paired without the cloud. They did eventually restore the cloud, but I’d lost interest at that point.

An expensive lesson in the perils of both early adopter hardware and investing in startups.

Get somebody useless to wire my alarm.

This isn’t really a technology issue, rather a human issue. I added a Konnected board to my wired alarm and made some shocking discoveries.

What will I do again?

Home Assistant

I’ve had a Home Assistant installation in my previous home for more than a year. The MQTT and Zigbee services ran on the same small tower. I was also using NodeRED for some more advanced workflows. I found it very stable and it never once failed, not in all the time I had it installed.

Smart lighting with the Shelly1

The Shelly1 relays I installed were absolutely fantastic. I could not recommend them enough. Installing them requires some knowledge of wiring, but I had no issues installing them into several of the lights in my house. The pendant housing was the only real problem, so this time around I’ll have to find something a little larger.

I’ll also make the electrician aware at the beginning that I’m planning on installing them and ensure that the wiring is suitable. There will be a few places (outdoor lighting) where there won’t be a ceiling rose, so we’ll have to figure something out for those.

I also plan on installing some of their Dimmer models, so we can have some mood lighting and potentially enable low level lighting at night, for the kid’s nocturnal trips to the loo etc.

Smart Thermostat

As noted above, I was not planning on a Nest Thermostat. This time I’ll be installing a Tado system. It’s completely wireless, with the control unit operating off batteries, which means we’ve more flexibility in choosing where we install it. The company also make smart TRVs, which can be operated remotely. Best of all, I think, is that individual TRVs can turn the boiler on, rather than relying on one central thermostat, we essentially get a zone per room.

It also has an API, integrates with Home Assistant and works with HomeKit too. Offers lots of flexibility. The advanced features require a monthly subscription, but I feel happier paying £30 a year than using the Nest.

Install an alarm

Rather than going for a wired alarm this time around, I’ve decided to go for a wireless model. I wanted flexibility and smart home integration. Some wired alarms offer this, but the newer generation are far more integrated and connected. I’ve settled for the Abode alarm, down to its broad compatibility and Homekit support.

Smart Hot Water

In my last house I had an unvented cylinder for storing hot water. Pretty standard.

One of the major pains we experienced was running out of hot water. This happened on and off, usually when we wanted to draw a bath for kids. I improvised a way to measure the temperature in the tank using some probes and this sort of solved the problem. Assume we checked, we learned that particular temperatures across the tank gave a rough indication as to whether we had enough water or not.

Whilst watching the great Fully Charged on YouTube, I happened across one show about the Mixergy hot water tank. I was really impressed and when the purchase of the house went through, I ordered one.

The idea is that the tank can maintain a certain amount of hot water in the tank, rather than having to heat the entire tank. You can schedule it during the day, heating enough for showers in the morning and than maintaining some for use during the day. It’s about 50% more expensive than a standard tank of the same size. I’ve opted for one that can support Solar PV, so in the future I hope I can heat the water with some solar panels. If I get a smart meter installed, I hope I can also use cheaper electricity at night to heat the water, rather than just relying on gas.

Progress updates

Once the work has begun, I’ll post a few updates as I go.

Installing Konnected Alarm

Back in February of this 2020 (This post has taken me a year to write!), I preordered an alarm panel from Konnected.io.

The idea with the Konnected alarm panel is that you can take your existing wired alarm and connect it to your smart home setup. It’s a very clever bit of kit, which I came across accidentally.

It took a little longer to arrive as I there were some delays in the manufacturing process, but a little box was delivered containing a power supply, some cables and two boards; the alarm panel and the interface board.

Interface board (left) and alarm panel (right)

Current Alarm

To see what I was dealing with, I opened my alarm panel after entering the engineer’s code.

My panel. Nothing labelled.

I was hoping to see something labelled, which was let me know what wires connected to what sensors. I knew how many door and motion sensors I had and that lined up to the number of zones being used. Unfortunately, I had no idea what was connected to what.

After reading the manual, I discovered that tamper detection was disabled.

Using my multimeter I had my wife go around the house, triggering the motion sensors. Oddly, some of them didn’t seem to have any effect. They were getting power as the lights turned on, but no voltage change was registered at the panel. To help me understand what was going on, I opened one of them up.

The fucking sensor circuit wasn’t even connected. HOLY FUCK. I mean HOLY HOLY FUCK. I connected that one and the panel showed the voltage change as expected.

Sensor circuit shorted with resistor, which would normally be okay if using tamper detection

Opened another sensor to find the circuit shorted with a resistor. Normally this is fine when using resistance based tamper detection, but my panel wasn’t configured for this.

I double checked the Zones configured and found that two of them weren’t even used. A few clicks here and there and that was rectified. A walkthrough confirmed all the zones were wired up and responding.

Not only were some of them not wired up, others weren’t even included in the panel.

I had to go outside at this stage because my language wasn’t suitable for the ears of children.

After putting everything right, I proceeded to actually connecting the Konnected Alarm Panel.

Installing the Konnected Interface Panel

After calming down and having labeled the various zones, I started installing the Konnected Interface Panel.

Pulling in the interface cable
Inserting the reference voltage wires into the panel
Adding the zones

Thankfully, this step was pretty straight forward and didn’t take very long. It was a case of adjusting the little resistors until the red light went off. When the circuit was triggered, the light would turn on.

The Alarm Panel itself. I left this outside the panel so it had a good WiFi connection

Setting up Home Assistant

I use Home Assistant for most of my Smart Home stuff and Konnected was fully supported with its own Integration.

Once I had connected the Panel to the WiFi using the iPhone App, the Home Assistant setup pretty much took care of itself.

You indicate which zones are used and what they are
The sensors configured on my dashboard

Summary

The Konnected hardware is really solid and was really easy to setup. As I understand it, they are a very small company, but what they’ve done here is really clever. Setup was faultless and it’s never gone wrong.

One of the most interesting uses of this product is that it can enable remote arming/disarming of your alarm (if the panel supports it). I never got around to doing this, but the idea is simple. You install a small relay, connected to the Konnected panel. By turning on and off the relay, you can use the Key Switch feature of a standard alarm panel to arm/disarm it. Home Assistant supports this via it’s Alarm extension, but I think it would only really work if this could be used in tandem with the existing keyboard panel. It’s possible to have your panel emit high voltage via one of the Zones, but as all the zones on my panel are full, I couldn’t try this out.

If you have a wired alarm and you’re looking to make it smart, I’d highly recommend this product.

LED Clock, Part III: Alexa?

Whilst I await delivery of more WS2812 LEDs, I wanted to start investigating how I can leverage the Alexa Gadget Toolkit integration, so that when I set a timer using Alexa, my LED clock can show the countdown.

Amazon make an Echo Wall Clock which does just that.

I found an open source project called nixie-timer, which had an Alexa Integration and was written for the ESP32

After a few hours of digging around, I had a very basic idea of what the code was doing. I started by trying to replicate the flow using the OOB ESP-IDF.

After many, many, many hours, I realised that I really didn’t know what I was doing, so I went back to the nixie-timer code and added the btstack ESP32 port into my code. This meant I could at least follow the samples provided.

I began trying to run some code myself, but the Bluetooth radio wouldn’t even start. I then took one of the BTStack examples and used that as a starting point. At least they worked.

After more hours, I got the code running, with the occasional kernel panic as I figured stuff out..

Eventually, I got it responding to the Alexa queries and receiving the messages for wakeword, timeinfo and timer.

Exactly what I wanted to achieve. I’m not 100% sure I know what’s going on, but I’ll get more understanding over time.

For starters, I want to use timeinfo to set the internal clock and then I want to use the timer command to display the countdown of an alexa timer.

Now that I’ve moved back to ESP-IDF, I’m going to have to bin my existing Arduino code which powers the LED strip and look at how to make that work.

Happy with progress.

My other WS2812 strip arrived the other day, so I’ve got to look at cutting and connecting the two strips to form one long 180 LED strip. Then I get get a feel of the overall diameter and cut some MDF to house the damn thing.

LED Clock, Update!

I managed to rework the time calculation and hour hand movement!

The clock is ticking!

I removed the RTC component and just let the loop run, with simple counters to simulate the passage of second, minutes and hours.

I think the transition of the “hands” needs to be smoother, more analogue. I’ll have to investigate if FastLED can do this.

LED Clock, Part II: Tick, Tock

In Part I, I covered the basics of controlling the LEDs. This covered the hands of the clock.

The second part of my investigation covers time and how to make the clock tick. The ESP 8266 I am using for this prototyping work doesn’t include a Real Time Clock, so I was required to add an external one.

Connecting the RTC module to my Wemos D1

With the module connected, I turned to the code. I’m using Arduino for this as it’s easy to prototype and there are lots of libraries!

#include <Wire.h>      //I2C library
#include <RtcDS3231.h> //RTC library

Setup is achieved in a couple of steps. To get me started, I just set the time.

RtcDS3231<TwoWire> rtcObject(Wire);

void setup()
{
  Serial.begin(9600);

  rtcObject.Begin();

  RtcDateTime currentTime = RtcDateTime(20, 04, 22, 0, 0, 0);

  rtcObject.SetDateTime(currentTime);
}

This starts the clock. In reality, as the module I’m using is battery backed, this step should only be performed once, but I found that having a fixed “time” would make debugging the lights a little easier.

I plan to revisit this code to ensure that I grab the current time from the internet when required.

Using the time is achieved by reading it.

void loop()
{
  Serial.println("Loop()");

 //get the time from the RTC
  RtcDateTime currentTime = rtcObject.GetDateTime();

  char str[20]; //declare a string as an array of chars

  //print the time for debugging.
  sprintf(str, "%d/%d/%d %d:%d:%d", 
          currentTime.Year(),       //get year method
          currentTime.Month(),      //get month method
          currentTime.Day(),        //get day method
          currentTime.Hour(),       //get hour method
          currentTime.Minute(),     //get minute method
          currentTime.Second()      //get second method
  );

Each part of the time is available in a named method, so to get an idea of where my LEDs should be, I grabbed the hour, minute and second.

// Fetch the current time
//
hour = currentTime.Hour();
minute = currentTime.Minute() * 2;
second = currentTime.Second() * 2;

I multiply them as I’m using a strip with 120 LEDs on it.

Building on my LED control code, I make the clock tick by turning off LEDs in the right place.

fill_solid(leds, NUM_LEDS, CRGB::DarkGreen);

// Fetch the current time
//
hour = currentTime.Hour();
minute = currentTime.Minute() * 2;
second = currentTime.Second() * 2;

// Hour
leds[hour - 1] = CRGB::Black;
leds[hour] = CRGB::Black;
leds[hour + 1] = CRGB::Black; 
leds[hour + 2] = CRGB::Black;
  
// Minute
leds[minute] = CRGB::Black;
leds[minute + 1] = CRGB::Black;

// Seconds
//
leds[second] = CRGB::Black;
leds[second + 1] = CRGB::Black;

FastLED.show();

I use multiple lights to make it more visible. With it now ticking, I hastily assembled the LED strip into a circle using cardboard and sellotape. I ran a length of alarm cable from the strip to the breadboard. To see it in action, I sellotaped it to the wall!

After letting it run for quite a while, I was surprised the hour “hand” hadn’t moved. It took my wife to point out that there aren’t 60 hours on a clock face 🤣

I’m pleased with these initial results.

As for my next steps, I’m not 100% sure. I’ve got to refine the “hands” code. I also need to think about how to mount it on the wall. I suspect it won’t be self contained and I’ll probably have a control box somewhere.

I’ve ordered another strip from the excellent Pimoroni and this will, I hope, let me add another 36 LEDs to the strip, taking it up to 180, which I think will give me a nice resolution.

I’ve got to think about power too. My estimate is that I’ll need around 3.5A to power the whole affair.

Expect another blog post soon!

LED Clock, Part I: Hands

The first part of making an LED clock was actually learning how to control the LEDs in the strip.

I had experimented with the LED strip before, flashing a rainbow, before realising I had no practical use the damn thing. At the time, I had used a Neopixel library.

Upon googling the subject again, another library came recommended, called FastLED. I had a quick look at the library and decided to give it a go.

#include <Arduino.h>
#include <FastLED.h>

#define NUM_LEDS 144

CRGB leds[NUM_LEDS];

void setup()
{
  Serial.begin(9600);

  FastLED.addLeds<NEOPIXEL, D4>(leds, NUM_LEDS);

  fill_solid(leds, NUM_LEDS, CRGB::Black);
}

void loop()
{
  leds[0].red   = 255;

  leds[1].green   = 255;

  leds[2].blue   = 255;

  leds[3] = CRGB::White;

  FastLED.show();
}
Four LEDs lit with different colours

Flashing an LED was just a case of turning it “black” and blue.

#include <Arduino.h>
#include <FastLED.h>

#define NUM_LEDS 60
CRGB leds[NUM_LEDS];

void setup() 
{ 
  Serial.begin(9600);
  FastLED.addLeds<NEOPIXEL, D2>(leds, NUM_LEDS); 
}

void loop() 
{
  Serial.write("On");

  leds[1] = CRGB::White; 
  FastLED.show(); 
  delay(30);
	
  Serial.write("Off");

  leds[1] = CRGB::Black; 
  FastLED.show(); 
  delay(30);
}
Flashing between white and “black”

I experimented a little more and ended up with a moving yellow light and a pretty static red slash of colour. This was sort of how I imagined the clocking running.

Power consumption was also on my mind. I had read that the each WS2812 on the strip would consume around 80mA. With my intention to power 180 of these, the power requirement was around 12A. This seemed very excessive, especially given the puny wires that were soldered to the strip. If somebody had tried to light them with that power consumption, the wire would have evaporated.

With my initial experimentations, a year before, I was sure I had run a LED rainbow lighting program through it and I new my 3A supply did the job and nothing went on fire.

I hooked it all up and lit all 144 LEDs.

It was only consuming 2.7A, including 200mA required to run the ESP8266 that was controlling it. I knew I’d need another 0.7A to power the intended 180 LEDs. This put the consumption at a little under 20mA for each WS2812.

With the LEDs under control, my next area of investigation was Real Time Clocks. I’ll do a post about that, once I’ve got something to report!

Lockdown LED Clock

A year or two ago, I picked up a WS2812B LED strip, but, for the life of me, could never think of anything useful to do with it.

Recently, however, I came across these LED powered clocks.

This feels like a project that will combine a few things:

  • ESP MCU
  • Real Time Clock
  • WS2812B strip
  • Maybe some Alexa integration?

Since I’m working from home for the duration, due to COVID-19, I get to recoup my usual commute time and put it towards something.

My starting point will be hooking up the strip to an ESP32 and trying to light one of the LEDs. I plan on a series of posts as I work towards my own clock!

Part I – https://tomasmcguinness.com/2020/04/14/led-clock-part-i-the-leds/

Part II – https://tomasmcguinness.com/2020/04/25/led-clock-part-ii-tick-tock/

Do we have any hot water?

A common occurrence in our house is bath time.

Another common occurrence is not having enough water for afore mentioned bath.

Our hot water is provided by a system boiler/unvented cylinder arrangement and I use a Nest to control the hot water (more on that later). The current schedule has it running the boiler for thirty minutes each day.

What is very annoying is that on some bath days we have ample hot water and on others, we don’t. We end up boiling the kettle to make up the difference. I don’t like the idea of just turning on the hot water as we might just be heating water that is already hot enough.

How much hot water do we have?

The first thing to figure out is how much how water we actually have. As I’ve mentioned, one some days we have ample and on other days we run out. Why does this happen?

Here are a few of the main factors that spring to mind:

  • The duration of the showers in the morning.
  • The ambient temperature in the loft.
  • How much washing up we’ve done.

The image above shows the basic operation of an unvented cylinder. Cold water enters the tank at the bottom and hot water exits at the top. The coil inside the tank is connected to the boiler and is responsible for actually heating the water in the tank. The whole thing works off the principal that the hot water will sit on top of the cold water and be pushed out the top.

My plan, therefore, was to attach temperature probes to the cold water entry and hot water exit and see what I could measure.

I was also interested in trying to measure the effect of the loft temperature on heat loss.

The Sensor

With my requirement of three sensors, I set about building a circuit that included an ESP-8266 and three DS18B20 temperature probes.

The DS18B20 uses something called the OneWire protocol, which means you can connect multiple sensors in parallel and use a single GPIO to read all the values. I found an excellent tutorial on the subject here – https://lastminuteengineers.com/multiple-ds18b20-arduino-tutorial/

With the long DS18B20 probes attached
The three temperature probes connected to the D1

For power, I wanted to use an off the shelf power supply. As these are mostly 5v, I added an LV1117V33 LDO. This little device accepts up to 7v input and outputs 3.3v, which was perfect to power the D1 and the sensors. To this, I connected a barrel input.

Powering the device with a 5v power supply

Software

I had originally planning on writing my own software to read the values from the sensors and send via MQTT to my HA instance. I actually did write my own software and even got the auto-discovery working, but as I wanted a web UI running on the device, so I could change easily change WiFi and MQTT settings, going down the custom road made little sense.

I was vagly aware that the excellent Tasmota Firmware (which I use in lots of smart sockets) did have some form of sensor support, so I did some reading. It turns out that not only did it support the DS18B20 sensor, it supported multiple ones 🙂

I flashed it onto the D1 mini and, after setup, navigated to the Configuration page.

You can select Module type as Generic (18) to gain access to the various GPIO pins on the device. I had connected the data wire of my sensors to D4, which is GPIO2. I choose teh DS18x20 option.

Setting up GPIO2 to handle the temp sensors

Once I hit save, the device rebooted and, lo and behold, the temperature started flowing into the UI!

Housing

Knowing how dusty my attic can be, I wanted to house the electronics in something, just to keep it clean and tidy. I had some Hammond enclosures (https://www.hammfg.com/electronics/small-case) and one of them seemed perfect.

I drilled four holes. One for each of the temperature probes and one for the power connector. The probes are held by three IP68 glands. Not necessary at all, but I just had them and thought they’d suit.

All the holes drilled and the sensor glands added
Circuit board installed
Lid on.

Once I had it all assembled, I plugged it in. It was at this point I wished I had some sort of indicator light to tell me it was powered or connected to the internet. I had to wait a minute, but eventually the Tasmota appeared on my list of connected clients.

Installation

I have a pretty standard unvented cylinder. There are two pipes entering at the bottom, the cold water inlet and the hot water return to the boiler. The hot water outlet is at the top.

My hot water tank in all its glory!
I stuffed one of the probes under the lagging at the top
The cold water inlet at the back – It isn’t even fully lagged!
I stuff another probe up against the cold water.

The third probe I just left hanging in the air, supported by a piece of furniture. My loft really is full of junk!

The data

The reading from the probes

From the three probes, I could have a guess as to which probe was were!

The 15.8 was the ambient temperature in the loft, with the 19 and 48 degree measures pointing to the inline and outlets.

Measures taken first thing in the morning

My hot water turns on for 30 minutes each morning (30 mins because the Nest Thermostat won’t let me do anything shorter). I looked at the temperatures when I got up around 7am and I could see the top temp was at almost 60 degrees.

Next Steps

I’m going to let this setup run for a few weeks and note the days we run low/out of hot water.

Combined with better control of my hot water (I’m thinking of replacing my Nest’s control), I think there is an opportunity to reduce the time my hot water needs to actually be turned on.

Other things might be possible, such as extra hot water when we have guests over (using their connection to the house WiFi as an indicator of presence). Or ensuring these is hot water for washing the dishes at 6pm each night.

I’ll post an update, once I’ve got some findings!

Update 24th Feb

With the sensor installed for over a week, I pulled a graph from Home Assistant.

A week’s worth of readings

The green line, which reaches the highest values is the outlet temperature. You can see the rather pronounced peaks and troughs. The orange line represents the inlet temp and that does spike a little, each morning, when the heating is turned on. The red line is the ambient temp of the loft. It does vary by a few degrees.

From the graph, it’s very obvious when we’re very low on hot water!

I also find the temperature loss over the course of the day to be interesting. This is obviously a function of the ambient temperature in the loft, but also, I suppose, of the temperature of the incoming water.

I’m in the process of upgrading my Home Assistant instance and I hope to be able to retain more data than I can do right now. I’d like to be able to compare summer months to winter months, so I need a few months of stored data to perform that comparison.

More to come!

Shelly 1 Relay

With Den Automation facing immanent demise, I’ve been looking at alternatives.

I came across the Shelly 1 relay, quite by accident, whilst looking at some Sonoff stuff. It immediately piqued my interest, mostly because it taught me that I didn’t know anything about lighting circuits in the UK.

I’ve installed my fair share of lighting fixtures during the rennovation of my home and whilst I was astonished at the number of connections in a ceiling rose, I never really took any time to investigate why.

Image result for ceiling rose wiring
Typical ceiling rose wiring arrangement in UK home

I had made my own attempts at automating lighting when I first moved in. This was a crude affair, which involved putting a Sonoff Basic relay in between the rose and bulb.

Whilst functional, the downside was that flipping the physical switch turned the relay off. Bye, bye, remote switching.

This is where the Shelly 1 comes into play.

Shelly 1 Wi-Fi WLAN switching actuator 16 A SHELLY SHELLY 1
The Shelly 1 relay. Small, but powerful 🙂

I came across an excellent post, which explained how to connect the little unit to a UK ceiling rose, which is well worth checking out – https://gist.github.com/lordneon/aecf24035a4dc5e6b950977e37aeb930

Essentially, the Shelly 1 is connected to the permanent supply, so it’s always on, regardless of the physical switch. The Shelly is also connected to the physical switch, so it knows when it’s been flipped.

This means that the light can be turned on and off via an API *and* by the existing light switch! I immediately ordered some.

A Christmas tree of relays.

My order included two Sonoff Minis, but I choose the Shelly1 to begin with as it supports MQTT control out of the box (which bypasses the Shelly Cloud – local control all the way). I know the Minis have to be flashed with Tasmota firmware to support MQTT and I didn’t want to get distracted!

Installation

WARNING! Please don’t attempt anything related to mains electricity unless your confident in your ability. Always remember to isolate circuits from the fuse board before doing anything!! I am not responsible if anything happens.

Installation was very straight forward with the help of the excellent WAGO connectors. Following the diagram, I installed the Shelly 1.

Wiring Diagram
https://gist.github.com/lordneon/aecf24035a4dc5e6b950977e37aeb930
The Shelly 1 wired in!

Once I’d restored power from the fuse board, I went through the configuration process. This followed the standard pattern of connecting to the Shelly’s WiFi network, connecting to my own WiFi network and then entering the MQTT server address and credentials.

It worked first time!

I set it’s Switched Live mode to edge, so that means that any change in the physical switch will turn it on or off, perfect for my needs.

Adding the Shelly to my Home Assistant required the addition of an MQTT entity with the appropriate topics.

  - platform: mqtt
    name: "Shelly-1"
    state_topic: "shellies/shelly1-B8B728/relay/0"
    command_topic: "shellies/shelly1-B8B728/relay/0/command"
    payload_on: "on"
    payload_off: "off"   

I repeated the process on another light in my house.

This was installed into a standard plastic ceiling rose, but unfortunately the cover wouldn’t close due to the thickness of the Shelly.

As this is pretty unsightly, I’ve decided to find a nice ceiling rose with the space to hold the Shelly before I install any more.

I’m so happy with these, they are a perfect replacement for my defunct Den switches. I’ll be replacing all of Den’s switches with these Shelly 1s once I find a good rose.