Mounir,
However,
if you have the phototransistor turning on/off a relay. And you have a
piezo on the other side of the realy, the this resitance shoulder matter.
Cause the relay can only be on or off, nothing in between.
Yes, but it the photo transistor is not conducting enough to operate the
relay or it's on the raged edge of conduction it might not work as well
as it should. I would try dumping the relay and putting the alarm device
in series with the collector and Vcc.
Jim