Timer software Home Julian Rogers Home

The case is from Maplin (because there is a branch nearby - Maplin used to be a bit like a poor man’s RS-Components but now it’s all drones and snow shovels). The 230 volt rated plug and socket is from Rapid Electronics and is shielded so that there are no exposed parts of either. I keep the 230VAC physically separated as far as possible from the low voltage parts and try and make it impossible to accidentally touch any live parts with lid off. A 230 volt shock is no joke and across the chest is often fatal! I use nylon screws where possible to avoid any shorts or physical damage to PCBs

I design my PCBs using free DesignSpark software. I generally don’t use auto-route and just bang the design together by eye to look as much like my hand-drawn circuit diagram as possible. One day I’ll move on up to the 21st century!

I print out the designs on inkjet transparency film from Rapid Electronics. I generally stick two designs together to ensure the best opacity. 2½ minutes in my UV box does the trick.

To connect to the Arduino, I use pieces of copper strip board (Veroborad) with headers soldered on. I pass multi-strand wires down through one hole then back up an adjacent hole for soldering. This provides strain relief for the wire. (See picture left).

The system shown above is not quite complete because in this picture I have not yet fitted sockets for the temperature sensors. The sockets and cables I have used are RJ45 network types as they are really cheap. The sensors communicate by I2C and need SDA, SCL, 5 volts, 3.3 volts and ground so a five-way cable at least is needed. I wanted to transmit over about 10m and was not sure whether I should use a twisted pair for the SDA and SCL lines or whether I should use screened cable (and incur a lot of capacitance).

Apparently I2C is intended for short-range connections within equipment but using the RJ45 twisted pairs it seems to work ok for me.

Shown on the right is my prototype temperature sensor. It uses an I2C sensor breakout board and logic level translator (3.3 to 5 volt etc.) from SparkFun.

I have plugged the boards into a PCB using headers and that makes it too bulky. Next time I will solder the wires directly to the boards and design a more compact board to connect to the RJ45 socket.

Incidentally, I have not provided a temperature adjustment on the sensor itself for simplicity (and also to prevent tampering!) Simple implementation of such a feature might be tricky. It would have to be done digitally because of the problem of voltage drop in a long cable with analogue. (Although 4-20ma is possible but perhaps not practical.) How would the desired temperature be input? To avoid inaccuracy feedback in the form of a display indicating set (desired) temperature and actual temperature would be great but would require a microprocessor etc. Maybe in the future…

Timer construction

Boiler PCB layout

Next: PCB layout

Further developments

After running the timer for about six months, I found there were a couple of occasions when the Arduino hung up and needed to be reset. Exactly why this should happen is not clear but it could be connected with memory being over-written by the program as it runs.

To prevent this being a problem, I have fitted a watchdog timer which resets the Arduino if a hang up is detected.

I have described the watchdog timer here.

The watchdog monitors pulses on pin 2 which is Tx for serial communication. If nothing happens for about two seconds, the watchdog takes the reset pin to zero volts for about 0.01 seconds.

Watchdog timer

Ethernet shield on top of Arduino

7805 regulator

230 VAC rated socket

Relays & ZTX450 drivers

Real time clock

PCBs for switches & LEDs