Temperature Sensor

To know whether it is freezing you only need to measure the temperature. This has to be done accurately, of course, and therefore we need to choose a temperature sensor that we have some confidence in. The choice has again been made for a type that we have already used in many previous Elektor circuits, the LM35CZ (-40 to 110 °C). This sensor is not expensive and generates an output voltage that is proportional to the temperature in degrees Celsius (10 mV/°C).

Sensor
An LM35 is normally powered from a single-ended power supply and 0 °C corresponds to an output voltage of 0 V. It is therefore not possible to measure negative temperatures with an LM35 in the standard application circuit. It is however possible to measure negative temperatures if its output is connected to a negative supply voltage via a resistor. There needs to be a current of 50 μA through this resistor (R2 in the schematic).

We only need to detect the freezing point with this circuit. That is why there is a comparator after the temperature sensor, which turns an LED on if the temperature has dropped below 0 °C during the course of the night. To ensure that the comparator operates properly it is necessary that the measurement value can become slightly more negative with respect to the input. To solve this problem, a diode (D1) has been connected in series with the ground connection of the LM35. The voltage drop across D1 (because of the small current through the LM35 this is only 0.47 V) acts as 'negative' power supply. Since the non-inverting input of comparatorIC2 is connected via R3 to the anode of D1 it functions as the 0°C-reference level for the comparator.

Comparator
The comparator is a standard opamp type TLC271, which we configured for minimal current consumption by
connecting the bias-select input (pin 8) to the power supply voltage. There is no need for the detector to be fast and it will therefore work well with the opamp operating in its most economical mode.

LED D3 provides the frost indication. It is the intention that the LED stays on once the temperature in the room drops below freezing or when it has been below freezing. To realise this, an asymmetric hysteresis is created with the aid of R3, R4 and D2. The instant that the output goes high, the non-inverting input goes more positive via D2 and R4, and the output therefore stays high. The temperature would now have to increase to more than about 30° before the LED will go out by itself. In practice this probably means that it is summer and that it is not likely to freeze anyway. If need be, the hysteresis can be increased by increasing the value of R3.

Capacitor C2 is added to make sure that the LED remains off (the circuit is reset) when the power supply is connected. The non-inverting input of the opamp is briefly connected to ground and the output is therefore low. R1 and S1 are only required if the circuit needs to be reset when the battery is connected. Instead of S1 you could also use a power supply switch or even just simply disconnect the battery for a moment.

Thrifty Power supply
Since the circuit is assumed to be powered from a battery there was a conscious effort to minimise the power consumption. The current consumption of the prototype, at a power supply voltage ranging from 6 to 9 V, was less than 120 μA. When the LED is on, the current consumption rises to only 1 mA at 6V and 1.8 mA at 9V, because a low current LED is used. In our prototype we used a green, low-current LED.

If four AA penlight batteries (with a capacity of about 2 Ah) are used, then the circuit will run for about two years in standby mode. When the LED is on this is considerably shorter, of course (about two months, this is easily long enough to run through a severe winter period). A standard 9-V battery will also last a single winter, provided you frequently check whether the LED is on.

Finally, a comment about the TLC-271CP used here. The version with the C-suffix is specified for an operating range from 0 to 70 °C, but will continue to work at lower temperatures, particularly considering that the IC is not used in a linear application. If in doubt you can always try to get your hands on a version with the I-suffix (that is, TLC271IP: –40 to 125°C). But that is only necessary if you expect it to be real cold in the monitored room...

Quick assembly
The circuit contains very few parts and can therefore be easily built on a small piece of prototyping board. There is no need to calibrate anything, once built it is ready to go. Author: Ton Giesberts, Elektor Magazine, 2008.

Light dark sensor with relay circuit

Light Dark Sensor With Relay Circuit Using LM741
Above is a schematic diagram of an LM741 light/dark sensor circuit (from the excellent 741 Op-Amp Tutorial by Tony van Roon).
The ECG128/NTE128 transistor stipulated can be substituted with any NPN transistor rated at sufficient gain and current for the chosen relay coil.

1st Nov 2007 Update - We have modified the schematic diagram above with the addition of a 220uF smoothing capacitor between the base of transistor Q1 and ground. Without this capacitor, the relay chatter (relay switching on and off many times per second) was terrible around the switch on/off light level. By adding the capacitor, relay chatter was completely eliminated.

According to the designer of this circuit, the relay will be closed only when "NO light falls on LDR1", however, in testing this circuit proved to work very well with the user able to adjust the potentiometer (P1) to automatically close the relay at whatever light level they chose.

By swapping the postitions of the 10K resistor (R1) and the LDR (LDR1), the relay will be closed when the LDR is under light rather than under darkness. Therefore a device can automatically be switched off at nighttime.

Since this circuit still contains a relay we need to make some changes* to reduce the amount of power to make it more suitable for renewable energy powered low-current applications.

Time Delay Circuit

In the design of analog circuits, there are times when you would need to delay a pulse that came into a circuit before being used for the next process. This time delay circuit uses a 555 timer to delay a pulse that comes in to a maximum time of 75 seconds. The timing of the delay can also be changed by changing the resistor value of VR1 and the capacitor value of E based on the time delay formula of t=0.69RC.

In order for the output to go high, the reset pin of 555 timer (pin 4) must be high and the TRIGGER pin (pin 2) voltage level must be below a third of the level of the power supply to the IC. When there is no pulse being applied to the input, transistor Q1 will turn ON and capacitor E is charged.

IC 555 Time Delay Relay Circuit

Once a pulse is applied to the input, transistor Q1 will turn OFF and pin 4 reset pin is held to high. This caused the capacitor E1 to be discharged through VR1 resistor. The time delay will depend on the discharged of capacitor E to a third of the supply before the output of 555 goes high. Experiment with different values of VR1 and E to get different time delay.

If the maximum value of potentiometer is set to 5M ohm, the time delay of the pulse will be 75 seconds.