> A cap C-B in that circuit is stupid, > a cap B-E will fix his problem. Maybe. It depends on where the feedback is coming from that causes the oscillations. He said the relay was "vibrating" or something like that during the transition. The circuit is just a DC amplifier driving the relay, and as you said, relays do have some inherent hysterisis. We also know his input signal varies very slowly (outdoor ambient light at dusk). So, why does it oscillate at the threshold input? One possibility could be AC noise coupled back into the amplifier from the switching transients. Your cap from B to E should help with that. However, I suspect at least part of his problem is DC feedback via the power supply when voltages change due to the relay switching on significant power. A B-E cap won't fix that, only decrease the oscillation frequency. I think the best way to address both problems together is to spend a few more cents and add another transistor stage. This will give him more gain and provide an easy opportunity for some deliberate positive feedback in the amplifier to get some hysterisis. This will always drive the relay solidly on or off, and should provide the necessary noise immunity. It will also make insensitive to small variations in light level at the thresholds, like a cloud momentarily passing over the sun shortly after it has set. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.