>> Sorry for the wrong format before but here I=B4m attaching a shema in .GIF format on a circuit I have some problem with. The relay don=B4t switch over directly without stands and vibrations before it changed. What is wrong? << The gain is low and there is no hysteresis. When the light level changes slowly the relay will be slowly driven thru the on/off range. One additional transistor stage would get you lots of gain and an opportunity to supply a little bit of positive feedback. This will make the relay snap on or off, although there will be a small difference in the on->off light threshold as the off->on light threshold. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body