The Siemens heating system is meant to work with intermittent electric power to take advantage of lower electric rates.
The prior controller was analog, and used a capacitor to average outside temp and control the heaters. The heaters were nearly 30 years old, and it was not possible to get a replacement controller.
I thought it would be possible to replicate the controller with an 8 bit MCU (68HC908QY4). This MCU has 256 bytes of RAM and 4K Flash, and comes in a 16 pin DIP.
When the controller is first powered up, it begins to collect data on the power company’s intermittent cycle and begins operating immediately. I found that the power company followed a fairly regular pattern of providing power that repeated on a weekly basis.
The controller collects 14 half-days (1 week) of historical data samples capturing whether the power company is supplying power in that time period. The controller used this info to control how much to charge the heaters.
The controller provides power to control resistors in the heaters based on the outside temperature and weekend setback. The power applied to the resistors heats them up affecting the thermostat in the heater and dials the heater back.
The controller tracks its own performance counting the number of times the controller entered setback control and its prediction failed, leading to undercharging.
The circuit was soldered on a proto board with some point to point wiring on the back. It had battery backup and surprisingly controlled the heaters with no problems for 12 years.
The manual I put together gives some more details.