I am making a security system with sensors that communicate with a central control box using HT12E and HT12D RF. I have the communication working, in the sense that when I switch on the sensors it immediately sends the message to the control box to trigger the alarm. however, when I tried to limit the sending of the signals to when a sensor is triggered, it still sends the signal as soon as its powered. The sensor is connected to the base of a 2n2222 transistor, which is supposed to trigger the signal only when the sensor is triggered. I have tested the Signal pin on the PIR motion sensor used with a multimeter and it is outputting about 0.64 volt even when the sensor isn't triggered. here is the schematic:
You don't seem to have any base resistor in that circuit so the first thing I would try is to put a 10K resistor between the sensor and the base.
Also make sure that pin AD11is configured as an input and has the pull up resistor enabled. If you can't then add a 10K resistor from the transistor's collector to +3V3.
Thanks for providing a real schematic with your problem Karma point for that.
If the PIR sensor is a HC-SR501, then it's OK to not use a base resistor.
Because those sensors already have a 1k5 resistor in series with the output.
Leo..