Silicon ChipFridge-Door Open Alarm - June 2004 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Macrovision on DVDs is not "Merchantable Quality"
  4. Feature: Instrument Landing Systems: How They Work by Daniel Field
  5. Review: Microsoft Flight Simulator 2004 by Ross Tester
  6. Project: Dr Video Mk.2: An Even Better Video Stabiliser by Jim Rowe
  7. Review: Encarta 2004 Multimedia Encyclopaedia by Peter Smith
  8. Project: An RFID Security Module by Peter Smith
  9. Project: Fridge-Door Open Alarm by John Clarke
  10. Project: Courtesy Light Delay For Cars by John Clarke
  11. Feature: How Much Power Are Your Appliances Using? by Peter Smith
  12. Project: Automating PC Power-Up by Peter Smith
  13. Project: Upgraded Software For The EPROM Programmer by Jim Rowe
  14. Vintage Radio: Restoration tips and techniques by Rodney Champness
  15. Advertising Index
  16. Book Store
  17. Outer Back Cover

This is only a preview of the June 2004 issue of Silicon Chip.

You can view 17 of the 96 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Items relevant to "Dr Video Mk.2: An Even Better Video Stabiliser":
  • Dr Video Mk2 PCB [02106041] (AUD $10.00)
  • Dr. Video MkII Video Stabiliser PCB pattern (PDF download) [02106041] (Free)
  • Dr. Video MkII front and rear panel artwork (PDF download) (Free)
Items relevant to "An RFID Security Module":
  • AT90S2313 firmware and source code for the RFID Security Module (Software, Free)
  • RFID Security Module PCB pattern (PDF download) [03106041] (Free)
Items relevant to "Fridge-Door Open Alarm":
  • Fridge-Door Open Alarm PCB pattern (PDF download) [03206041] (Free)
Items relevant to "Courtesy Light Delay For Cars":
  • Courtesy Light Delay PCB pattern (PDF download) [05106041] (Free)
  • Courtesy Light Delay front panel artwork (PDF download) (Free)
Items relevant to "Upgraded Software For The EPROM Programmer":
  • Upgraded Software for the EPROM Programmer (Free)
  • Windows-Based EPROM Programmer PCB patterns (PDF download) [07112021-5] (Free)
  • Panel artwork for the Windows-Based EPROM Programmer (PDF download) (Free)
Articles in this series:
  • A Windows-Based EPROM Programmer (November 2002)
  • A Windows-Based EPROM Programmer; Pt.2 (December 2002)
  • A Windows-Based EPROM Programmer; Pt.3 (February 2003)
  • Upgraded Software For The EPROM Programmer (June 2004)

Purchase a printed copy of this issue for $10.00.

Is your fridge or freezer door often left open for too long? Or does it sometimes not close properly? Ensure it’s closed when it should be by building this nifty Fridge Alarm. FRIDGE DOOR-OPEN ALARM By JOHN CLARKE A REFRIGERATOR OR freezer door that is left open or ajar may cause the food contents to spoil. In some cases, the internal temperature of the fridge or freezer will be maintained if the refrigeration system can cope with the open door. But without the door sealing in the cold air, it may be a losing battle. Running costs will certainly rise. Typically, refrigerators and freezers are in constant use in the summer months and so it is important to ensure that the door is not open for any longer than is necessary. Otherwise the fridge or freezer will not be able to keep the siliconchip.com.au contents cool. And it will cost more money to needlessly run the fridge’s compressor in a futile effort to keep the contents cool. Even the most diligent fridge user may sometimes leave the door of the fridge or freezer open without realising it. And tilting the fridge or freezer slightly backward so that the door will fall shut is not completely fool proof as there may be an obstruction inside the door. The obstruction could be because an item inside the compartment has moved or fallen over or because the compartment is too full. This is where the Fridge Alarm is useful. It warns when the door of the refrigerator or freezer is left open for longer than a preset time period. It is great for indicating when someone is standing with the door open for too long and a real asset in warning when the door looks shut but is still partially ajar. The fridge alarm operates by detecting when any light enters the compartment area. Therefore it is just as useful for freezers (which normally do not have a light) as it is for fridges (which normally do). As long as there is some ambient light which the alarm can react to, it will operate. June 2004  59 door is left ajar since the internal light is switched off via the door switch before the door closes. The circuit You don’t have to house it in a transparent box, as we did . . . but if you don’t, you’ll need another hole in the appropriate place on the box wall so light can strike the LDR inside. The alarm will sound if the light is present for longer than the preset period and will continue to sound until the door is closed. In practice, the preset period is adjusted so that in normal use the alarm will not sound. It will sound when the door is left wide open for too long or if left slightly ajar. Commercial coolrooms and freezers While the Fridge Alarm is primarily intended for domestic fridges, it has its applications for large (ie walk-in) commercial coolrooms and freezers. If you think that your fridge at home costs a lot of money to run, try paying the bill for one of those walk-in models that clubs and restaurants use. And in a busy club or restaurant, it is very common for staff to leave the door open. Because the door is so large, bulk cold escapes very quickly. If the walk-in coolroom or freezer has a door-operated light, the Fridge Alarm will work in exactly the same way as in a domestic fridge. If the light switch is manual (as many are), it will warn that the light has been left on. And if it doesn’t have a light inside, you could set it up near the doorway and have the alarm triggered by natural light from outside. Note that the alarm cannot be used 60  Silicon Chip with display refrigerators or freezers that have a glass door. Does the light really go off? Do you or members of your family have doubts whether the fridge light really goes off when the door is closed? Does the little man in the fridge really do his job? Or is he sitting in there goofing off? This Fridge Alarm will finally dispel any doubts on this score. If you open the door and can hear the alarm sounding immediately, it means that the light has remained on while the door was closed. Disbelievers will say it’s a fault in the alarm unit itself rather than the light remaining on. Perhaps we will never know. The Fridge Alarm is battery operated and so does not need to be connected to any wiring inside the compartment. It comprises a small transparent box with the alarm circuit and battery housed inside. The box is placed within the freezer or refrigerator near to the door opening. In this way it can monitor both the light from the internal lamp and also light entering from the outside. Monitoring light from the outside is important since it allows detection of the door being left only slightly ajar. Monitoring the internal light only will not indicate when the Circuitry for the Fridge Alarm comprises a single IC package, a Light Dependent Resistor (LDR), a siren plus a few resistors, diodes and capacitors. The low temperature operation has meant that all components need to be rated for sub zero temperatures. The IC is rated to –40° C, while the piezo siren is rated to –20°C. Other components such as the capacitors, diodes, LDR and resistors will operate to below -20°C. The battery is specified as an alkaline type to provide the necessary current at lower temperatures. And current drain is not very high. When the circuit is in the dark, quiescent current is typically less than 6µA and this low current will prevent the battery discharging before the end of its shelf life. Current consumption when the alarm is sounding is a mere 2mA. Operation of the alarm relies upon light detection using the LDR. This device has low resistance below 10kΩ when there is sufficient light on its surface and a high resistance of more than 1MΩ when in darkness. We use this change in resistance in a voltage divider with a 1MΩ trimpot and a 150kΩ resistor across the 9V supply. Voltage across the LDR is monitored at the pin 1 input of Schmitt trigger IC1a. IC1a has two threshold voltages which are nominally 1/3rd the supply and 2/3rd the supply. These thresholds are 3V and 6V with a 9V supply. If voltage at pin 1 is 6V or more then the output at pin 2 will be 0V. If the pin 1 voltage falls below 3V, then the output at pin 2 will be at 9V. In the dark When the fridge or freezer door is closed, the LDR is in complete darkness and so it has a high resistance. The total resistance of the 150kΩ resistor and VR1 is now smaller than the LDR resistance and this causes the voltage at pin 1 to rise above the upper threshold of the Schmitt trigger. As a result, the output at pin 2 will be at 0V. Capacitor C1 is held at 0V via diode D1 and the series connected 2.2kΩ resistor. Schmitt trigger IC1b monitors the voltage across C1 at its pin 3 input. Since pin 3 is at 0V, pin 4 is at 9V. siliconchip.com.au Fig.1: the circuit is basically a light trigger, timer, oscillator and piezo driver. It’s all based on one low-cost IC. Diode D2 and the series 2.2kΩ resistor pull the pin 5 input to IC1c close to 9V and so pin 6 is at 0V. The output of IC1c drives paralleled Schmitt triggers IC1d, IC1e and IC1f and since IC1c’s output is at 0V, the paralleled Schmitt outputs are at 9V. Outputs of IC1d, IC1e and IC1f at pins 8, 10 and 12 respectively drive the (-) side of the piezo siren. At this stage the siren will not be driven since the (+) terminal of the piezo siren connects to the 9V supply and the (-) terminal is at 9V. This is the Fridge Alarm’s normal state when in darkness. Current drain from the battery is very low and is caused by several current paths. The first is the current flow through the LDR, VR1 and the 150kΩ resistor. The LDR will be about 2MΩ or more in darkness and the current will be less than 4.5µA for this part of the circuit. Another current path is through diode D2, and the series connected 2.2kΩ resistor and the 10MΩ resistor connected between pins 5 and 6 of IC1c. Current flows because pin 4 of IC1b is at 9V and the pin 6 output of IC1c is at 0V. Current drain here is less than 1µA. The final current drain is the supply to IC1 itself and the 100µF capacitor across the supply (after D4). For that reason we specify that both 100µF capacitors should be low-leakage types. IC1 is a CMOS device that has a very low supply current of typically below .05µA. The total current drain is therefore expected to be around 6-7µA. Door open When the fridge or freezer door is opened, the resistance of the LDR drops and this pulls pin 1 of IC1a below its lower threshold and pin 2 goes to 9V. Diode D1 becomes reverse biased and so capacitor C1 now begins to charge via the 9V at pin 2 and through the 100kΩ resistor and VR2 trimpot. Charging time for C1 can be adjusted using VR2 which allows timing values from around 10s through to 100s. When the capacitor voltage reaches about 6V, the voltage becomes more than the positive going threshold for IC1b, and the output goes to 0V. Diode D2 is now reverse biased and the already charged capacitor C2 now discharges via the 10MΩ resistor between pin 5 and pin 6. When C2 discharges to about 3V, it reaches the lower threshold voltage for Schmitt trigger IC1c and its output at pin 6 goes to 9V. Capacitor C2 now charges Fig.2: there’s not much you can get back-to-front on the PC board – just the IC, diodes, electrolytic capacitors and the piezo siren (and of course the battery snap wires). The LDR is not polarised. Use this component layout along with the photo at right when putting it together. siliconchip.com.au June 2004  61 Power for the circuit is obtained from a 9V battery. Diode D4 provides reverse polarity protection if the battery is connected in reverse. A 100µF capacitor decouples the supply and provides energy for the piezo siren when it draws bursts of current. Construction The plastic box needs to have two holes drilled in the bottom (for the mounting pillars) and one in the top (to let the sound out). Here’s how it all goes together in the box. It’s a nice snug fit with the battery held in place by the PC board. up via the 1MΩ resistor and diode D3. This charge time is about 10 times faster than the discharge time and when the voltage reaches the upper threshold of IC1c’s input the output at pin 6 goes to 0V. IC1c thus forms a burst oscillator where the output is at 9V for only a short time compared to its low output period. When IC1c’s output is at 9V, the resulting 0V output of IC1d, IC1e and IC1f drive the piezo siren with a 9V supply and the siren sounds. When IC1c’s output goes to 0V, the IC1d, IC1e and IC1f inverter outputs are at 9V and the siren is off. This sequence of signal drives the siren with bursts of sound. When the refrigerator or freezer door closes again, the LDR goes to a high value of resistance. Thus pin 1 of IC1a 62  Silicon Chip rises toward the upper threshold of the Schmitt trigger. This may take several seconds because the dark resistance of the LDR slowly increases over time until it reaches its ultimate value. It is a rather slow responding device to low ambient light levels. VR1 is included to adjust the sensitivity to darkness. It is adjusted so that the alarm will still operate even with very low light levels which are typical when the door of the fridge or freezer are left ajar. Ultimately, when in complete darkness, pin 1 of IC1a will reach 6V and the IC1a output will go low to discharge C1. The resulting 9V at pin 4 of IC1b charges capacitor C2 via D2 and the 2.2kΩ resistor. This holds the burst oscillator off with the pin 6 output at 0V. Parts for the Refrigerator Alarm are assembled on a PC board coded 03206041 and measuring 78 x 32mm. The PC board is mounted inside a translucent box measuring 83 x 54 x 31mm. The box can either be uncoloured or tinted. We used the new blue style case available from Jaycar and Altronics. Begin construction by checking the PC board for any shorts between tracks or breaks in the copper. Check hole sizes and file out the corner section of the PC board on two corners if not already removed. These cutouts are required to allow access for the internal pillars in the box. The mounting holes need to be 3mm in diameter. Now install the resistors, diodes and IC1. This IC and the diodes must be oriented as shown. Resistors are marked with a colour code and these are shown in the accompanying resistor code table. You can use this table as a guide to selecting each value. Also it is a good idea to check the value with a digital multimeter. Install the two trim pots VR1 and VR2. These have a 1MΩ resistance and may have a 105 marking on the side. The two 100μF electrolytic capacitors should be low leakage types, as previously mentioned, and must be oriented with the polarity shown in the overlay diagram. Place the PC stakes at the 9V battery lead connection points and in the holes allocated for the piezo siren. The siren is mounted by soldering its leads to the PC stakes. Note that the PC stakes and siren leads will need to be shortened so that when installed the top of the siren is 14mm above the top of the PC board. The LDR is mounted by inserting its leads into the PC board leaving a 10mm length between the LDR and PC board. After soldering, the LDR is carefully bent over at right angles to face the edge of the PC board. The PC board is mounted within the case using two 10mm long spacers to support the outside edge of the PC siliconchip.com.au Parts List 1 PC board coded 03206041, 78 x 32mm 1 UB5 translucent box, 83 x 54 x 31mm 1 panel label 1 piezo siren, 12mm diameter, 7.6mm pin spacing (-20°C operation) (Jaycar AB3459) 1 9V alkaline battery 1 9V battery clip lead 1 LDR with greater than 1MΩ dark resistance (Jaycar RD3485, Altronics Z1619 or similar) 2 10mm M3 tapped spacers 2 M3 x 6mm countersunk screws 2 M3 x 6mm pan head screws 4 PC stakes Semiconductors 1 MM74C14, CD40106BC (-40°C to 85°C) hex Schmitt trigger (IC1) 4 1N914, 1N4148 diodes (D1-D4) Capacitors 2 100µF 16V low leakage electrolytics 1 220nF MKT polyester (code 224 or 220n or 0.22µF) Resistors (0.25W, 1%) 1 10MΩ (10%) 1 1MΩ 1 150kΩ 1 100kΩ 2 2.2kΩ 2 1MΩ horizontal trimpots (VR1, VR2) board while the edge that have the pillar cutouts is held within the integral side supports on the case. Place the PC board in the case with its edge pressed into the side supports and mark out the hole positions for the outer edge mounting holes. Drill out these holes in the base of the case and countersink them from the underside of the box suitable for countersunk screws. The side supports on the other side of the case need to be removed to provide space for the battery to mount between the box side and PC board. Full-size etching pattern for the fridge door-open alarm PC board. These are removed with a pair of pliers twisting them sideways until they break out. Alternatively side cutters could be used or a chisel. Use safety goggles when doing this as pieces can fly out as they break. Secure the 10mm tapped spacers to the base of the case with the countersunk screws. The PC board is secured to the top of the spacers using M3 pan head screws. Solder the battery leads to the supply PC stakes as shown on the overlay diagram. Place the lid onto the case and mark out the centre position of the piezo siren. The siren will have a label attached that says, “remove after washing”. This label can be removed now. The hole in the lid needs to be about 6mm in diameter to ensure the full sound intensity can be emitted from the siren. Testing The alarm is now ready to be tested. Adjust VR1 to centre position and VR2 fully anticlockwise. Connect up the battery. The alarm should sound after about 10 seconds giving short bursts of sound. If this does not happen, Make sure you are not working in the dark. Also check that the parts have been correctly placed on the PC board. Also measure the voltage at pin 2 of IC1. This should be close to 9V. Pin 4 of IC1b should be at 0V. Voltage between pin 7 and pin 14 of IC1 should be about 9V. Adjust VR2 for the desired timeout before the alarm sounds. Fully clockwise will provide a nominal 100 seconds before the alarm will sound. The alarm needs to be placed in complete darkness before the siren can be silenced. Simply placing a finger over the LDR is not sufficient. Note also that the alarm may take some 10 to 20 seconds to switch off in darkness as the LDR slowly increases its dark resistance. In a freezer, this time might increase to several minutes! You can test the alarm by placing it inside a drawer instead of the refrigerator. Adjust VR1 so that the alarm sounds if the drawer is opened slightly. Now place the alarm unit inside the fridge or freezer and check that it operates correctly after its temperature has stabilised. You will need to readjust VR1 if the alarm is placed inside the freezer. This is because the threshold voltages for IC1a change with temperature. Also the dark resistance of the LDR does not rise to the same value found at room temperatures. Variations If you want a longer delay time, increase the value of capacitor C1. A 220µF capacitor will double the delay time. If you want to increase the alarm burst rate, decrease C2 in value. The Refrigerator Alarm could also be used as a locker or drawer alarm. In this case, a shorter delay time may be better. Reducing C1 will reduce the time. Also an on and off switch could be placed in the supply to the battery SC to disable the alarm. Resistor Colour Codes o o o o o o siliconchip.com.au No.   1   1   1   2   3 Value 10MΩ (10%) 1MΩ 150kΩ 100kΩ 2.2kΩ 4-Band Code (1%) brown black blue silver brown black green brown brown green yellow brown brown black yellow brown red red red brown 5-Band Code (1%) brown black black green silver brown black black yellow brown brown green black orange brown brown black black orange brown red red black brown brown June 2004  63