Thursday, 31 December 2015

Home Heating IoT Project - MQTT? Node.js? Both? - Initial Thoughts

This is the plan:

In my house, I have 4 Redwell heaters in upstairs rooms. They were installed inexpertly (not by me) with the receiver/relay units downstairs, so the room thermostat's RF send signal is not always picked up. This results in heaters staying on all day sometimes.

An IoT solution would solve this problem as well as giving me a host of other useful features. Most desirable:

  • Programmable on/off times (very desirable option: with thermostat control)
  • Manual on/off override of timing program.
  • All on / all off override for if we are out on an evening.
  • Webpage interface.
  • Internet access from outside the home.
From what I have read so far, it looks like MQTT could be very useful, as could node.js. (see also here)

First step is to build a mini-mock-up. On current form this will take months!

Monday, 21 December 2015

MQTT - Mosquitto - To control IoT stuff

I'm coming to realise that MQTT is probably the tool I need to get my head around for basic home automation / monitoring.

On reading up a bit here:

I saw a link to Andy Standford-Clarks ' House that Twitters':

with the audio from the talk at oggcamp here:

 Less Technical talk by ASC:

Things I want to check out further:
X10 appliance control signalling via mains cables:

Also useful:
(And lots of other stuff from @chemicaloliver )

Idea: AIS - Ship-plotter - Condor??

Further research needed: Websockets.

Monday, 14 December 2015

Wearable Tech - Daughter's Christmas Jumper

Daughter #1 needed to jazz up her Christmas jumper for school. We had a cheap set of 50 blue LED lights with 3xAA battery pack attached, and she was going to use them as they were.

Itching to use my Arduino Nano I'd acquired a couple of months previously, I suggested an upgrade!

Fastening the lights to the jumper was the hardest bit.

I used this code to program the lights:

// Dim an LED using a PWM pin
int PWMpin = 10; // LED in series with 470 ohm resistor on pin 10

void setup()
  // no setup needed

void loop()
   for (int i=0; i <= 255; i++){
      analogWrite(PWMpin, i);

   for (int i=0; i <= 3; i++){
     analogWrite(PWMpin, 255);
     analogWrite(PWMpin, 0);
   for (int i=0; i <= 10; i++){
     analogWrite(PWMpin, 255);
     analogWrite(PWMpin, 0);
   for (int i=0; i <= 255; i++){
      analogWrite(PWMpin, 0-i);

Tuesday, 1 December 2015

Arduino Autonomous Boat

This is what I built for the 2015  Jersey Tech Fair:

When discussing the Tech Fair, and the probability of there being a large pool for the open ROV (link), my colleague, Max, suggested some surface craft, to make further use of the pool. Intrigued, I volunteered to make one too, thinking it would be a relatively simple thing to do with a Raspberry Pi.

Instead it turned into a great learning experience with the Arduino platform. I LOVE the Arduino now, almost as much as the Pi! I was looking for an excuse to try programming the Arduino with Flowol, which I use in schools with children for my day-job . This proved the perfect project.

Build Stage 1:


Build Stage 2:

Completed Build: 

Having used Flowol extensively in schools with children, and knowing it could program the Arduino, it seemed a quick win to use it for this project. I could refresh my 'C' language skills another time.


Bluetooth Remote Control - could not get this to work. Still haven't. Tried various bits of code and apps.

Camera Module - just ran out of time to make it a 'glass-bottomed boat' with a Pi and camera module included. Mark 2 will have!


Air propulsion was decided upon early. Initially we'd discussed using battery powered pocket cooling fans. In the end we went for motors with propellers attached. All three boats use different steering mechanisms. Mine uses a traditional rudder. Max went for a pair of motors on one model and a pivoting motor on the second.


I used expanded polystyrene wrapped in black duct tape. Max went for Kingspan insulation, which I would go for next time. It's stiffer, easier to source, and nicer to work with and shape. The electronics are in modular form with each section in a business card box, to try and keep it dry. The motors and prop were from a school DT cupboard. I ordered the battery pack online.


Biggest problem - noise on the ultrasonic sensors, caused by either the motor or the servo. I partially solved it by averaging three readings. Still too erratic though.

I recorded this while I investigated the noise problem with an oscilloscope at work.

The other main problem, which was actually of little import in the end, was that after the first test in Coronation Park, I must have damaged my Arduino board, as I could no longer connect to reprogram it. However, it ran the existing program perfectly, and since it worked, there was no real need to change it. I turned the prop round to a 'pull' rather than a push, but I just swapped the wires so no reprogramming was necessary.