Drobe :: The archives
About Drobe | Contact | RSS | Twitter | Tech docs | Downloads | BBC Micro

Using an A3010 as a central heating controller

By Dave Higton. Published: 17th Oct 2005, 12:25:58 | Permalink | Printable

Should have used an Intel processor to heat the water, snicker

Many people rely on RISC OS and its software to look after their email and browse their favourite websites. But could you trust RISC OS to make sure you wake up to a warm shower every morning? Electronic engineer Dave Higton describes his RISC OS powered central heating system.

I've often felt that the central heating controller I had could be improved on. It turns the heating and hot water on and off, with different times available for each day of the week; but the central heating and hot water tap go on and off together. The only choice I get is Off, Twice, Once and On, with an override available if they are set to Once or Twice.

I started to build a controller based on a simple, single-chip microcomputer, although after a while I gave up because it became obvious that I'd not chosen an appropriate one. I was programming in assembly language, and it was obvious that I was going to need a lot more memory to hold the program - and a lot more time to write it.

There's still life in an A3010
After abandoning the first approach, I received a telephone call from someone who had two old Acorn computers to sell, and asked for my advice on where and how to sell them. My advice was to give them to the charity stall at a forthcoming RISC OS show, and so I duly collected them. Later, while examining them, I realised that one of them, an A3010, had two joystick ports, a parallel printer port, and a serial port. Later still, it dawned on me that this was close to an ideal embedded microcomputer system for the heating controller, as it is also silent in normal operation (no fans), has its operating system in ROM, has an excellent BASIC interpreter in ROM, and has a floppy disc drive for storage of my program and its non-volatile data. The joystick ports not only provide obvious interfaces for switches, but also provide a +5 volt supply that could be used by external relays and a display. The parallel port has enough data and strobe pins to drive a display module and some relays. It also has an expansion port that could have an Ethernet interface fitted. This was the only bit that I wanted that wasn't supplied.

I donated £5 to the charity stall at a show - when I consulted the people running it, this was the maximum they expected to make - kept the A3010, and gave them the other computer. I bought an Ethernet interface on eBay and a 4MB RAM expansion card from a RISC OS company.

I made a control box as the 'human interface' part. This is a black plastic box from Maplin that has five switches to navigate through the menus (up, down, left, right and enter), two switches for override (heating and hot water), a 24 character x 2 line LCD module, and two relays to control the boiler's components with an LED each. I spent a long time searching for components and a layout that would provide excellent electrical safety. The main contributors were relays with large spacing between the coil and contact pins, and a cover (made by sawing a similar but much smaller box into a complex shape) over the mains wiring. When the control box front is removed, it isn't possible to touch any live wiring or parts - in fact you can't get anywhere near them. This is in stark contrast to the original controller; when the front of that is removed, several large brass contacts at mains voltage are completely exposed.

Photo of front controller panel
The joystick interface is wired directly to the buttons. The LCD module is driven by the parallel port, which is also wired to a digital latch that enables and disables the relays. These control the boiler to begin heating the hot water tap supply and central heating.

Photo of A3010 mounted against a wall, with ethernet and IO cables visible
The A3010 in the utility room: The cables through the wall go into the back of the control box.

I began writing the software in BBC BASIC. It turns out to be quite extensive - far bigger than I had expected for what I had regarded as a simple task. Of course, when all the requirements are taken into consideration, it isn't such a simple task after all. What matters is that it is simple to use, and reliable. You don't want to wake up in winter with no heating on. I can have any reasonable number of on and off times per normal day of the week, with central heating and hot water times separately controllable. I can have special days (specified by year, month and day) on which the times are different, and this can include having neither service turned on or all on. So, if I need to be up early one Tuesday morning, I can set the heating and hot water to come on early that day, but on all other Tuesdays, everything happens at the ordinary times. We can go off on holiday, and the house will be warm on the morning we leave and the evening we come back, but with everything off to save money in between - or on a special programme to make sure the house doesn't freeze, perhaps.

I made it possible to control it remotely via TCP/IP over a network. This was primarily so that I can do testing and upgrades from my normal desktop computer, but it also means that I can access it over the Internet, subject to the router being switched on and allowing traffic to and from it. Now, if we are away and change our plans, I can connect via a laptop and mobile phone and change the on and off times to suit the new time we're coming back. I use my Acorn A4 laptop - 1992 vintage, although I've only owned it for a couple of years - to access the Internet. I divided the software into client and server sections. The client is much simpler, really just a specialised intelligent terminal, is much smaller than the server, and only needs a much smaller Wimp slot.

Putting it all into place
I ran the software on test for some months before finally installing the whole system over the Christmas 2004 break. The control box goes on the kitchen wall where the original controller went. On the other side of the wall is the utility room, which was probably originally built as a coal house but now houses our washing machine and the A3010. I had to install an Ethernet cable from the network switch in the computer room; this crosses the loft and drops down the cavity of the back wall of the house, and was very much the most difficult part of the installation. The A3010 will boot and run entirely independently of the network, of course, as the network connection is mainly there for the optional extra of remote control. It does allow a refinement, though; the A3010's software real time clock, in common with that of many other computers, is not very accurate - this one loses several seconds a day. My program makes it attempt to connect to an NTP time server once a day to correct the RTC, at a time when the router is usually on, so the error never grows to a significant value.

As for backup: the A3010 is long obsolete; I can't expect it to run for ever, and when it fails, there's no guarantee that spares will still be available - although, they are at the moment, but who knows what the situation will be some years from now? So, I bought a second A3010 as a spare, and as a test bed for software upgrades. If all else fails, I could fit the original controller again - I haven't burned any bridges. When all is said and done, all my new control system does is to switch the central heating and water heating on and off, subject to the same thermostats they have always had.

To the future
I can already see a couple of possible enhancements. I would like to change the meaning of 'Off' to 'Don't allow the place to freeze'. I would like to do this with a variable temperature setting. This needs a thermometer that the A3010 can read periodically and turn the heating on if the temperature falls below the setting. Since the logical place for this electronic thermometer is nowhere near the A3010, and I don't want to install another cable over this route (which would make the difficulties of the network cable seem easy by comparison), I could use data transmission over the mains with a small box in the hall. The A3010 has a spare serial port that would be perfect for the interface to the master mains modem. And since the A3010 is permanently on and connected to the master modem, it might as well become the 'Home Automation Gateway'. It could turn anything on and off, or up and down, either from stored timed commands, or by translating commands from the Internet arriving over Ethernet, and delivering commands over the house's mains wiring.


What do you use RISC OS for?

Previous: Running a fashion label with RISC OS
Next: A9home compatibility list open for all


Viewing threaded comments | View comments unthreaded, listed by date | Skip to the end

Yes, I've often thought central heating systems don't leave enough control. One enhancmenet I would suggest would be you to say you want it to be 20 degrees in the house when you wake up, and it will turn on the heating far enough in advance by measuring the temperature overnight. How many times have you had the heating coming on half an hour before you get up, and then on one really cold day that isn't enough time to get it warm?

 is a RISC OS Userjohn on 17/10/05 12:39PM
[ Reply | Permalink | Report ]

This may sound over simplistic, but surely the way to do the 'Don't allow the place to freeze' facility, is simply to fit thermostatic radiator valves?


 is a RISC OS UserDS1 on 17/10/05 1:29PM
[ Reply | Permalink | Report ]

Nice one, it may well turn those A3010s on the charity stand at the SE show next weekend, from skip fodder to gold dust. Just goes to show, that just becuse an old machine doesn't the umph to run FireFox, it can be put to good use on other things.

 is a RISC OS Userdruck on 17/10/05 2:40PM
[ Reply | Permalink | Report ]

Like running NetSurf? :o Note that NetSurf has the BiCaps, whilst Firefox doesn't.

 is a RISC OS Usermrchocky on 17/10/05 3:16PM
[ Reply | Permalink | Report ]

Interesting stuff this. Why dont you use X10 to control the heating and to read a thermometer over the mains? I would love to see X10 software for Riscos as the PC is too complex and prone to lock ups to leave on all the time. There are X10 thermometers available just needs a bit of software to read them.

 is a RISC OS Userrfm on 17/10/05 4:32PM
[ Reply | Permalink | Report ]

Can you get X10 stuff for UK mains (or France for that matter)?

I used it a lot in the USA, but their wiring is so shoddy that I gave up as there was too much interference (and brown outs) my brother-in-law has used the USA->UK adaptors with some degree of success.

 is a RISC OS Usersimo on 17/10/05 5:22PM
[ Reply | Permalink | Report ]

Re simo: Yes you can get x10 for the UK, dunno about France thou. See [link] for an idea of what x10 stuff you can get, I don't know if that site is good prices or not but it's a start :-)

 is a RISC OS UserWookie on 17/10/05 6:02PM
[ Reply | Permalink | Report ]

Yes, you can get X10 stuff here - my son uses some, and there are a couple of people where I work who use it too. Its communication protocol is somewhat limited, though.

 is a RISC OS Userdavehigton on 17/10/05 7:47PM
[ Reply | Permalink | Report ]

I have lots of X10 stuff mostly bought from the UK and Belgium. Our house is a new build and so the wiring is reasonable good and so I have had good success with it. My only gripe is if you want to control it by computer you are stuck with PCs which envitably lock up or loose interest. I would love to use my RiscPC for this task.

 is a RISC OS Userrfm on 17/10/05 10:16PM
[ Reply | Permalink | Report ]

In reply to DS1: but a thermostatically-opened valve on a radiator won't help if the boiler has not been fired up to provide warm water to the system, which is what (AIUI) the A3010-controller would enable.

 is a RISC OS UserAndrewWickham on 18/10/05 9:44AM
[ Reply | Permalink | Report ]

Theres no reason why it has to be a PC, X10 controllers were being used from BBC B's 20 years ago. These were serial interfaced rather than USB, but a RISC OS driver should be possible, its been done for <a href="[link]">Linux</a>

 is a RISC OS Userdruck on 18/10/05 9:48AM
[ Reply | Permalink | Report ]

Just what I was thinking. Problem is I dont have the skill or time to write such an interface. I really like the idea used by Harmony and HomeSeer on the PC of using a web server as the front end.

 is a RISC OS Userrfm on 18/10/05 9:12PM
[ Reply | Permalink | Report ]

I too have always thought the normal Central Heating controllers were far far too basic. After some investigation I decided on a commercial one, which does much as Dave's does, apart from remote control. However, as it also has proportional inside and outside temperature gauges (ie not just on/off at a single temperature) it also enables different temperatures at different times, and it builds up a profile of how long it takes to heat up. Using this it decides the optimum time to start heating to meet your specified temperatures depending on the outside and inside temperatures (as John suggested above), and it also enables far better temperature control than the on/off thermostat allows, avoiding overshoots and wide swings.

These optimisation facilities can actually save money, as heating costs are reduced, and also the house feels much more 'comfortable' somehow.

Presumably these facilities could be added to the A3000 version, with some considerable effort.

 is a RISC OS UserMartinA on 19/10/05 1:11PM
[ Reply | Permalink | Report ]

Martin: you feel more comfortable knowing that you're saving energy and always going to be warm :)

Where did you get this controller, and what make/model is it?

 is a RISC OS Userjohn on 21/10/05 12:36PM
[ Reply | Permalink | Report ]

john: It was from DCD Systems - a small company dedicated to their controller. See www.dcd.co.uk for further details. Email me if you want more info from me.

 is a RISC OS UserMartinA on 21/10/05 1:09PM
[ Reply | Permalink | Report ]

The standard controller that came with my central heating has it all including the possibility of remote control. And the boiler is the most sold one in the Netherlands at the moment. When your central heating boiler has only on/off then it is time to buy a new modulating high efficiency gas condensing combination boiler. The money you save that way can be used to buy a Iyonix or A9-home.

 is a RISC OS Useregel on 21/10/05 2:33PM
[ Reply | Permalink | Report ]

egel: for some reason the central heating controller that most builders fit for new houses in UK is still rather basic, with a simple on/off timeswitch and on/off thermostats. Penny pinching, I suspect!

However, surely the *boiler* is always either on or off, and this discussion is about the *controller*. The advantages of a condensing boiler are a separate issue. The controller determines when the boiler is on, depending on the heating requirements, and may be anything from simple to sophisticated. The latter should be more efficient.

ds1: I would have thought that thermostatic radiator valves were for stopping a room getting too hot, not stopping it getting so cold it freezes? Anyway, if the rooms are not near freezing, there is no point in running the boiler at all, as it just heats water for no purpose, thus is inefficient.

 is a RISC OS UserMartinA on 21/10/05 4:02PM
[ Reply | Permalink | Report ]

Please login before posting a comment. Use the form on the right to do so or create a free account.

Search the archives

Today's featured article

  • Archive booklets review part three
    Ovation Pro, VirtualRiscPC and hardware tips
     Discuss this. Published: 4 Feb 2006

  • Random article

  • Pace internal ROS 4 uncovered
    We're so nosey
     5 comments, latest by druck on 19/2/05 5:16PM. Published: 10 Feb 2005

  • Useful links

    News and media:

    Top developers:
    RISCOS LtdRISC OS OpenMW SoftwareR-CompAdvantage SixVirtualAcorn

    CJE MicrosAPDLCastlea4X-AmpleLiquid SiliconWebmonster


    RISCOS.org.ukRISCOS.orgRISCOS.infoFilebaseChris Why's Acorn/RISC OS collectionNetSurf

    Non-RISC OS:
    The RegisterThe InquirerApple InsiderBBC NewsSky NewsGoogle Newsxkcddiodesign

    © 1999-2009 The Drobe Team. Some rights reserved, click here for more information
    Powered by MiniDrobeCMS, based on J4U | Statistics
    Page generated in 0.119 seconds.