background image

CK3 Alarm Clock and Thermometer

(C) Lucid Technologies

12

backwards, or components soldered in the wrong place. 

If there is no display on the DB1 you can check the power and control lines going to the

display.  With the power off measure the resistance between the GND test point and ground on the
DB1, J1(3). The resistance should of course be almost zero. With the power on check for +5 volts
on DB1, J1(5). Using an oscilloscope or logic probe look at DB1, J1(1), this is the display select
line which should pulse low about once a second.  Next look at DB1, J1(2); this is the synchronous
data clock to all SPI peripherals which should be low the majority of the time with frequent series
of high pulses.  Finally, check DB1, J1(4); serial data to the display board and clock chip.  The
serial data should exhibit a series of pulses.  If these pins are functioning normally we can be
confident the PIC is good, and any problem is with the DB1. If the PIC is the problem, be sure it is
not installed backwards in the socket.  

Use the schematics to check for various faults. If the PIC oscillator isn’t functioning then no

program instructions are being executed. The oscillator is functioning normally if test point RA6 is
approximately a 1 MHz square wave. The pad labeled RST on the CK3 is an input that can be used
to reset the PIC. Grounding the RST pad will reset the PIC. 

6.0 Installation

Take a look at Section 7 (Customization) before wiring your switches. Depending on how

you want to use the CK3 you may need more or less switches than you might imagine.

6.1 Prepare the Case

Begin by identifying the bottom half of the case.  The two screw that hold the case together

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 edges of the cutout and remove any plastic burrs.  Place the front panel face down on a
work surface.  Position the red plexiglass window on top of the panel, centered on the cutout, see
Figure D3.  Place a drop of super-glue at the left and right edges of the window, the glue should
seep between the window and front panel.  This will bond the red plexiglass window to the inside of
the front panel.  Don’t pick up the front panel until the glue has dried. 

Holes must be drilled in the rear panel for the power plug (J1) and the current-loop

connector (J3). The hole for J1 can be used to start the cutout for the DB-9 connector (J2).  Figure
D4 shows the position of the holes and cuts. 

Now we can start working on the top half of the case.  First we’ll drill the holes for the

switches.  There is no specific location for switches, you can put them wherever is best for you, but
pay attention to two things.  First, identify the front and rear of the top half, if you drill the holes in
the wrong place you can’t just turn it around, the case only fits together one way!  Second, watch
the vertical clearance between the bottom of your switches and parts on the CK3 circuit board. See
Appendix C for suggested switches.  Temporarily place the CK3 and DB1 in the bottom half of the
case so you can measure clearances.  After marking the switches’ locations on the top, drill the
required size mounting holes for the switches you are using.  Securely mount the switches in the top

Содержание 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: ......

Отзывы: