Our spa is used every morning for less than two hours, so it is worth-while enhancing it. It had been already provided with a thermostat using a PICAXE 14M2 because the bulb-type thermostat had failed. This thermostat measures the water temperature using a digital sensor, and provides a periodic serial RS-232 output of this temperature. While this was provided for diagnostic or monitoring, I decided to use it to display the temperature continuously.
The spa does have a Radio Shack digital temperature gage, but it is an LCD display and not easily read, and it is positioned so that it cannot be seen through the glass patio door. This project therefore uses a large, bright LED readout and is mounted on a rod permitting it to swivel so as to face either the spa or the house. To increase its usefulness, when the spa is off it displays the ambient temperature instead from a LM335 analog sensor.
I had bought very cheaply a large discontinued circuit board with four LED displays. The largest had already been used for a clock. The next-largest (0.8”) was cut out of the board for this project. This accomplishes mounting and matrix interconnection. A ribbon cable connects to the projecting pins of one of the units and to the anodes of the others. It has a header connector for the circuit board containing the rest of the circuitry.
Unfortunately, the display units are common-anode, so I could not use the single-chip solution I used for the Mobile Logger. I really hated going to the trouble of making the display multiplexer with discrete ICs, but went ahead anyway since I had them at hand. It is a mixture of types: A resistor-input UDN2981 anode driver level-shifts to the unregulated 9+ V, a 7447 TTL drives the cathode segments and decodes the BCD inputs, a 555 oscillator, a 7474 TTL dual D-flip-flop to count the four LED anodes, and a 7402 quad 2-input NOR gate to drive the UDN2981. A 16-bit serial input from the PICAXE is converted to parallel by two CMOS 74HC595s, whose latched and tri-state outputs are selected by a 74LS244 LSTTL dual 4-bit tri-state buffer. This lot is conveniently directly controlled by the 7474’s true and complement outputs. This totals eight ICs, and a lot of wiring. The M2 version of the PICAXE is needed for its SERIN command with timeout, which enables automatic switching between spa and ambient temperature display types.
The only problem with the program was that the PICAXE could not handle the serial input when used with named variables. For some reason it does work using the storage variables with auto-increment between input bytes. It is not a good solution to run the PICAXE at 8M, since it’s speed then is too inaccurate for SERIN.