Theory of operation
The ripple control frequency used here is quite high, 1050Hz, and at our house is around 4-5V peak-to-peak. Because we want to pick out a continuous burst of this from a background of other noise, I use an LM567 tone decoder. This can’t do the whole job though, because if you read its specs it can’t cope with other signals that are more than 6dB above the signal its trying to detect. In this case the 250V 50Hz mains is at least 60 times larger than the signal we want to detect. We would like to be able to detect down to 1V, so we need a high-pass filter with at least 20dB rejection at 50Hz. This isn’t terribly difficult to do. Here I use an LM358 to build a two-pole high-pass Butterworth filter. The -3dB point is 720Hz, which gives us better than 40dB rejection at 50Hz. The 22nF capacitor on the input of the LM567 forms a third high-pass pole with a -3dB point of about 360Hz, so we have tons of margin. This is a Good Thing because there will be all kinds of other noise on the mains which we don’t want going into the detector.
The other half of the LM358 is used as a pulse stretcher with a time constant of about ten seconds so we don’t start and stop the fan on every ripple control pulse. Switching the mains on and off silently is handled by a MOC3063 which is a clever optically isolated zero-crossing triac driver, coupled to a suitable triac. The circuit reacts within a few cycles of the 1050Hz tone starting, which doesn’t give the fan enough time to make any noise other than a very faint click before it coasts to a halt.
At power-on, both LEDs should be off. The green LED should come on after ten seconds or so. The red LED should come on and the green go off when ripple control signals occur, and the green should then take ten seconds or so to come back on.
This circuit operates on mains voltages, which are potentially lethal. If you do not have experience in mains-rated construction and know how to comply with your local electricity regulations, do not attempt to build this.
I built the main circuit on Veroboard in a small plastic box. It looks like this:
The triac switch and MOC3063 were mounted seperately in another very small box inside the fan housing, with a cable to the detector which is plugged into a wall socket in the attic. Seperating the detector from the EMF noise created by the fan motor might be important; I don’t know because I didn’t try an all-in-one installation.
The power supply is not critical; any small transformer with one or more 9-12V windings will do. The LM2930T8 (which I think is obsolete) was used because I happened to have one – an LM317L with appropriate programming resistors for an 8V rail would do fine. The transformer can be the smallest you can get, because the whole circuit draws no more than 50mA.
VR1 should be a multiturn cermet type for stability and accurate adjustment. Adjust it to set the free running frequency of the PLL in the absence of a signal. This can be measured at pin 5, and should be the same as the frequency you are trying to detect. Adjusting VR1 requires that you (a) know what your local ripple control frequency is and (b) have a scope or a DFM. I used the frequency meter built into my cheap multimeter and it worked fine. I found out what our ripple frequency was by looking at the relay in our fuse box, which helpfully had 1050Hz written on it.
Testing the device is a bit tricky, as for a real test you need to wait for the ripple control to come on and see if LED1 comes on. If it doesn’t there isn’t much time to make changes. You can however test with a signal generator by disconnecting C3 from the transformer and feeding say 100mV of 1050Hz into the front end. My prototype triggered at 35mV input, which is just under 1V sensitivity on the mains.
The triac requires no heatsink to handle the load of the fan, higher-powered appliances might well want one. A mains-rated relay would probably do just as well.
This circuit will almost certainly work as-is for frequencies other than 1050Hz, assuming you tune the PLL appropriately. Below 700Hz it might be advisable to move the low-pass filter down by scaling C3 and C4 (e.g 15nF will give 480Hz cutoff).