CK3 Alarm Clock and Thermometer
(C) Lucid Technologies
4
the super-capacitor power backup is a big improvement over the battery backup used on the CK2.
As batteries age they can lose capacity, resulting in short backup times, or leak, resulting in circuit
board damage. Use of a super-capacitor solves both of these problems.
The DS18S20 thermometer chip is a 3-lead TO-92 package. It communicates with the PIC
via a bidirectional “1-wire” interface. The DS18S20 is accurate from -10 to 85 degrees Celsius but
most of the other chips on the CK3 are rated for the standard commercial temperature range of 0 to
70 degrees Celsius (32 to 158 degrees Fahrenheit). The software limits the temperature readout to
the commercial range.
2.4 Alarm Circuitry and Current-loop
The alarm and current-loop circuitry are shown on sheet 4 of the schematics.
Alarm audio is produced by the piezoelectric speaker, PS1. The terminals of the speaker are
driven by U5.1 and U5.2 respectively. The Alarm_Audio signal from the PIC is inverted by U5.3 so
that the terminals of the speaker are driven in opposition. This increases the volume compared to
the CK2 where only one speaker terminal was driven against ground. If desired, speaker volume
can be reduced by increasing R12 and R13. On the CK2 board, digital noise on the supply could be
heard in a quiet room even when the alarm was off. The CK3 eliminates this with the Alarm_Gate
signal from the PIC. When Alarm_Gate is logic-0 both terminals of the speaker are driven to logic-
1, thus there is no differential voltage across the speaker to be heard as noise. Lucid Technologies
standard software for the CK3 turns on the Alarm_Gate whenever the alarm is sounding.
The current-loop connector (J3) is configured as a MIDI-OUT connection (Appendix G).
The signal routed to J3 is determined by the jumper on header J5. One, and only one, of the three
positions on J5 should have a jumper. The current-loop is also controlled by the Alarm_Gate signal
from the PIC. When Alarm_Gate is off (logic-0) no current flows, when Alarm_Gate is on (logic-1)
current will flow according to the signal selected on J5. When J5 is in the GATE position, current
flows when Alarm_Gate is on. This can be used to activate a remote alarm such as a shaker for the
blind, or a light for the deaf. When J5 is in the AUDIO position, the current flow replicates the
Alarm_Audio signal. The optically isolated audio signal can be amplified to sound a remote alarm.
When J5 is in the MIDI position, the current flow replicates the PIC UART transmit. If the PIC
baud rate is set to 31250 baud then valid MIDI messages can be sent. Lucid Technologies standard
software for the CK3 does not implement MIDI messages.
2.5 Shift Register Inputs
To implement dual alarms the CK3 needs to read seven switches. It also needs to read five
option jumpers and two alarm interrupts. To do this two 74HC165 8-bit parallel-input/serial-output
shift registers were configured as a 16-bit SPI input port. Schematic sheet 5 shows the circuit.
Parallel load of the shift registers happens when the SR_Select signal goes high. Data is clocked out
of the daisy-chained shift registers by the SPI_Clock signal. The inverted output is used because the
shift register data is inverted again by the open-drain output gate, U6.3. An open-drain output is
required because SPI_In is a wire-OR’ed signal.
3.0 Software Description
3.1 Assembler source code
Summary of Contents for CK3-1
Page 17: ...CK3 Alarm Clock and Thermometer C Lucid Technologies 17 APPENDIX B CK3 BOARD LAYOUT ...
Page 28: ...CK3 Alarm Clock and Thermometer C Lucid Technologies 28 ...
Page 29: ......
Page 30: ......
Page 31: ......
Page 32: ......
Page 33: ......