background image

CK3 Alarm Clock and Thermometer

(C) Lucid Technologies

13

half of the case.  

2.6 Switches 

The switches must now be wired to the CK3 circuit board.  Remove the 74HC165 chips (U7

and U8) and store them in a safe place while soldering to the CK3.  Schematic sheet 5 shows the
switch inputs to the CK3.  One side of each switch is grounded and this ground can be daisy-
chained around the switches, reducing the total number of wires going to the CK3. The row of pads
closest to the labels (SW1-SW7) are the ground pads, the row closest to RN2 are the signal pads.
Allow enough slack in the wires so that the case can be opened to change option jumpers. 

Lucid Technologies standard software for the CK3 expects all the switches to be normally-

open, in other words, the input is active when the signal line is grounded. The software also assigns
the following functions to the switch inputs.

Switch Function

SW1

Alarm1 set (A1set)

SW2

Alarm1 enable (A1enb)

SW3

Alarm2 set (A2set)

SW4

Alarm2 enable (A2enb)

SW5

Hours set (Hrset)

SW6

Minutes set (MNset)

SW7

Time set (Tmset)

The alarm_set and alarm_enable switches may be combined into one switch in the form of a

center-off toggle.

6.2 Final Checkout

Put the 74HC165s back in their sockets. Connect the DB1 as it was for the functional

checks.  Plug-in the wall transformer and attach it to CK3, J1.  Try setting the time-of-day and
alarm-time.  If none of the switches work you may have inserted a 74HC165 upside down. Check
that the alarm LEDs blink when setting the alarm-time and are on continuously when the alarm is
enabled.  If switches don’t perform the anticipated function you may have wired them to the wrong
SWX pad on the CK3.  Correct any errors and check again.  

6.3 Final Assembly

The last construction step is to clean the board.  If you used organic core solder just rinse the

board in warm water.  If you used acid core solder try scrubbing it with an old toothbrush and
rubbing alcohol. 

Attach the CK3 circuit board to the bottom half of the case using the four self-tapping

screws that came with the kit.  Insert the front panel into the most forward slot such that the red
plexiglass window is on the inside.  Insert the DB1 circuit board into the slot behind the front panel. 
Insert the rear panel into the rear slot so that the hole lines up with the connectors.  Place the top on
the case being sure not to pinch any wires in the seam.  Use the long self-tapping screws that came
with the case to securely close the case.  Attach the wall transformer to the clock via the hole in the

Содержание CK3-1

Страница 1: ... However Lucid Technologies makes no warranty for the use of its products and assumes no responsibility for any errors which may appear in this document Lucid Technologies reserves the right to make changes in the products contained in this manual in order to improve design or performance and to supply the best possible product Lucid Technologies assumes no liability arising out of the application...

Страница 2: ...Circuit Board Construction 6 0 Installation 7 0 Customization Appendix A CK3 Parts List Appendix B CK3 Board Layout Appendix C Chassis Parts List Appendix D Chassis Details Appendix E RS 232 Serial Interface Connector Appendix F RS 232 Communications Setup Appendix G MIDI Current loop Interface Connector Appendix H References Appendix I Schematics ...

Страница 3: ...ta memory RAM 256 bytes of EEPROM memory a 16 bit timer with prescaler TMR1 an internal clock oscillator a universal asynchronous receiver transmitter UART and 16 multi functional input output I O lines Lucid Technologies standard software for the CK3 sets the internal oscillator to 4 MHz The PIC operates at one fourth of the oscillator frequency or 1 MHz The 1 MHz operating frequency is provided ...

Страница 4: ...es 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 log...

Страница 5: ... MPASM documentation if you are unfamiliar with any of these concepts 3 2 Interrupts The next part of the source code is the interrupt service routine Only one interrupt is active in the standard CK3 software that is the Timer 1 TMR1 overflow interrupt The TMR1 prescaler clocks the 16 bit counter at 500 kHz which produces an overflow interrupt every 131 milliseconds 7 629 Hz The interrupt service ...

Страница 6: ... set the flag for the Alarm1 LED and tests the Alarm1 interrupt bit from the previous read of the input shift registers If the Alarm1 interrupt is active the program sets the Alarm1 audio flag resets the Alarm1 interrupt on the DS1305 then adds 30 to the current minute count and stores the sum in variable A1end The program then follows the same process for Alarm2 Next the program checks the Alarm1...

Страница 7: ...be set via serial host communications 3 Year 00 99 09 Month 01 12 01 Day of month 01 31 22 Day of week 01 Monday 04 Hour 00 23 17 Minutes 00 59 30 Option 4 allows one to check the current time 4 Time 17 30 07 Day of week 01 Monday 04 Day of month 01 31 22 Month 01 12 01 Year 00 99 09 Option 5 will display the temperature in Celsius and Fahrenheit 5 Temperature 22C 072F Option 6 will display the al...

Страница 8: ...re three times that can be set time of day Alarm1 time and Alarm2 time Assuming normally open pushbuttons are used for the set switches to set any of the times press and hold the set pushbutton for that time While the set pushbutton is held press either the minute set or hour set pushbutton Hold the second pushbutton down until the minutes or hours increment to the correct value If you miss the co...

Страница 9: ...larm occurs the tone will sound for 30 minutes or until the enable switch is toggled off If the sounding of the alarms overlaps Alarm1 will take precedence 5 0 Circuit Board Construction 5 1 Preparation You will need the following tools A low wattage soldering pencil approximately 10 to 20 Watts Flux core solder wire organic flux core preferred Lead benders Lead wire clippers Before beginning asse...

Страница 10: ...quare pad ____ RN2 10k 10 pin SIP pin 1 goes in the square pad ____ D1 1N5818 banded end toward square pad ____ D2 1N5818 banded end toward square pad ____ C1 560 pFd radial ____ C2 0 1 uFd radial ____ C3 0 1 uFd radial ____ C4 0 1 uFd radial ____ C5 47 uFd positive lead toward square pad ____ C6 100 uFd positive lead toward square pad ____ C7 100 uFd positive lead toward square pad ____ C8 0 1 uF...

Страница 11: ...e wall transformer at J1 then insert the 78S40 in socket U3 Reconnect the wall transformer then measure the voltage at the 5V test point The voltage should be between 4 9 and 5 1 volts If there is a problem disconnect the wall transformer and inspect the CK3 Be sure the 78S40 is not backwards in the socket Check that diodes D1 D2 and capacitors C4 C5 are not installed backwards Refer to schematic ...

Страница 12: ... go through the bottom half of the case The posts that these screws pass through are toward the rear of the case as shown in Figure D1 There are four short posts for mounting the CK3 board inside the case The next step is to add the red window to the front panel Make a rectangular cutout two and five eighths 2 625 by seven eighths 0 875 inches centered in the front panel see Figure D2 Smooth the e...

Страница 13: ... Final Checkout Put the 74HC165s back in their sockets Connect the DB1 as it was for the functional checks Plug in the wall transformer and attach it to CK3 J1 Try setting the time of day and alarm time If none of the switches work you may have inserted a 74HC165 upside down Check that the alarm LEDs blink when setting the alarm time and are on continuously when the alarm is enabled If switches do...

Страница 14: ...ernal selection of the time display format The CENT jumper determines whether the temperature is displayed in Fahrenheit or Centigrade format It was made an internal jumper with the idea that the user would always want the same format Wires can be run from the CENT jumper to a SPST toggle switch allowing external selection of the temperature display format With the J5 jumper in the ALARM position ...

Страница 15: ... the upper right of the circuit board see Appendix B These inputs can be used for any function you can program There are two uncommitted I O lines RA0 and RA1 locate just above U1 on the circuit board see Appendix B These connect directly to the PIC and can be used for any function you can program The software can be modified to dim the display at night See the DB1 manual and MC14489 data sheet fo...

Страница 16: ...n black brown gold 3 1 1K 0 25W 5 R6 R7 R8 brown brown red gold 1 4 7K 0 25W 5 R9 yellow violet red gold 4 220 ohm 0 25W 5 R12 R13 R14 R15 red red brown gold 2 10K 10 SIP pin 1 common RN1 RN2 2 1N5818 30V D1 D2 1 PIC16F87 I P 18 DIP U1 1 MAX232CPE 16 DIP U2 1 78S40 16 DIP U3 1 DS1305 16 DIP U4 1 74HC00 14 DIP U5 1 74HC03 14 DIP U6 2 74HC165 16 DIP U7 U8 1 DS18S20 TO 92 U9 1 18 DIP socket U1 5 16 D...

Страница 17: ...CK3 Alarm Clock and Thermometer C Lucid Technologies 17 APPENDIX B CK3 BOARD LAYOUT ...

Страница 18: ...uired PacTec www pactecenclosures com 1 610 361 4200 Model CM5 125 Simco www simcobox com 1 800 780 9090 Model 150X5 Challenger series Time Set switches 3 required Radio Shack 275 1571 Submini momentary pushbutton SPST Time Set Hours Set and Minutes Set Alarm switches one per alarm Radio Shack 275 325 Center off mini toggle switch SPDT Alarm Set and Alarm Enable Wall transformer Voltage output 9VD...

Страница 19: ...CK3 Alarm Clock and Thermometer C Lucid Technologies 19 Figure D1 Position of the CK3 circuit board and DB1 circuit board in the bottom half of the alarm clock case APPENDIX D CHASSIS DETAILS ...

Страница 20: ...rt Figure shows dimensions in inches 2 625 67mm 1 0625 27mm 0 875 22mm 0 2175 5 5mm Figure D3 Position of the red plexiglass window glued to the inside of the front panel Figure D4 Rear view of the case s rear panel insert Figure shows dimensions in inches 0 925 23 5mm 0 75 19mm 0 625 16mm 0 5 12 7mm APPENDIX E ...

Страница 21: ...o send CTS from DCE 6 CC Data set ready DSR from DCE 7 AB Signal ground SG n a 8 CF Data carrier detect DCD from DCE 20 CD Data Terminal ready DTR to DCE 22 CE Ring indicator RI from DCE In recent years all personal computer have migrated to the use of a 9 pin male D connector instead of the 25 pin connector The pin assignments for such a DTE device are shown below Pin Circuit Description Directio...

Страница 22: ... Terminal ready DTR to CK3 5 AB Signal ground SG n a 6 CC Data set ready DSR from CK3 7 CA Request to send RTS to CK3 8 CB Clear to send CTS from CK3 9 CE Ring indicator RI from CK3 None of the handshake lines are actively controlled by the CK3 DTR is not connected and thus is ignored DSR and DCD are hard wired to the ON condition ON spacing voltage at all times RTS is received buffered and looped...

Страница 23: ...n Add Remove_Programs Select the Windows_Setup tab then under Components click the Communications line and the Details button Be sure HyperTerminal is selected and click OK When the Add Remove_Programs window returns click OK For Windows XP HyperTerminal can be found at Start All Programs Accessories Communications When you first start HyperTerminal a Connection_Description window will come up Ent...

Страница 24: ...eck that the file name is correct for example CK3 ht and click on Save The next time you want to run HyperTerminal you can simply double click on the file name CK3 ht and HyperTerminal will begin with all the correct settings Connect your CK3 to the COM port and turn it on the initial menu should appear in the HyperTerminal window ...

Страница 25: ...ocol it is notable for its widespread adoption throughout the industry MIDI compatible devices have DIN 5 180 female connectors MIDI cables use DIN 5 180 male connectors There are three types of MIDI ports found on MIDI compatible instruments MIDI IN MIDI OUT and MIDI THRU The difference between the MIDI OUT and MIDI THRU ports is that data coming from the MIDI OUT port has been generated on the d...

Страница 26: ...y The MIDI current loop connector on the CK3 board J3 is a MIDI OUT connector With the J5 jumper in the UART position the UART s TX output is routed to both the RS 232 connector J2 and the MIDI OUT connector J3 To send MIDI data the software must be changed to set the PIC16F87 s UART to 31250 baud ...

Страница 27: ...roller Application Note 2420 1 Wire Communication with a PICmicro Microcontroller Application Note 3517 Estimating Super Capacitor Backup Time on Trickle Charger Real Time Clocks Application Note 3816 Selecting a Backup Source for Real Time Clocks Microchip www microchip com PIC16F87 88 Data Sheet DS30487C AN1199 1 Wire Communication with PIC Microcontroller DS01199A Motorola Freescale www freesca...

Страница 28: ...CK3 Alarm Clock and Thermometer C Lucid Technologies 28 ...

Страница 29: ......

Страница 30: ......

Страница 31: ......

Страница 32: ......

Страница 33: ......

Отзывы: