• Getting some good data now

    RobG10/25/2019 at 08:45 0 comments

    After something like two weeks, the plots are showing some really interesting stuff, like the effect of sunlight hitting the temperature sensor at about 10:45 each day.

    Might see if I can add a second temperature sensor for logging outside temps.

  • Data visualisation

    RobG10/16/2019 at 08:17 0 comments

    Everything seems to be logging nicely, and I've added a DS18B20 temperature sensor to grab indoor ambient temperature too. The only minor niggle so far is that the logs are not quite 60 seconds apart (perhaps the resonator clock isn't very accurate) but that's easily accounted for.

    I've written a bunch of Matlab code to read in the log file and produce pretty plots like this:

    Now I just need to wait for the cold weather to arrive so I can switch the heating on!

  • Gas meter sensor done

    RobG10/07/2019 at 10:33 0 comments

    I found an OPB704 kicking around and added a couple of resistors to bias it up for 5V operation.

    390Ohms on the diode side biases it at about 10mA forward current from 5V supply. A 10kOhm on the phototransistor (collector) results in an almost complete rail-to-rail swing when something white is placed in front of the sensor.

    Here's a screenshot of the ADC values as the 1/10ths wheel goes round on the meter:

    Also just bought a light sensor module (with on-board comparator and threshold adjust) for £2 for the electricity meter sensor - perfect! Won't even need an analogue input pin for that.

  • First thoughts

    RobG10/06/2019 at 07:46 0 comments

    This page describes basically what I'm planning to do for the gas meter:


    ...which gives a strong pulse every 10dm3 of gas consumed (and nine weaker ones for the in-between digits).

    The method is not too dissimilar for the electric meter (which has a flashing LED for every 1Wh consumed).

    I might use an Arduino instead of RPi (if I can get logging to SD card working easily) because it offers analogue inputs so I can easily add e.g. temperature sensors later, and maybe do all the optical sensing in software instead of needing a couple of opamps. This page looks useful: 


    We'll see...