I got my hands on a quorum RR-150 PIR sensor from Electronic Goldmine. My goal was to make a receiver for the sensor. The PIR sensor uses a PT-2262 encoder chip connected with a DIP switch to generate random variations. The signal generated is 434 MHz
First things first. I needed to make sense of the signal pattern that was coming out of the PT-2262 encoder chip. I connected a RCR-433-AS receiver module to the DisCo USB oscilloscope I took a couple of screenshots of the pattern with different DIP settings to decipher it.
The DIP switch has 6 switches out of which 2 through 6 are connected to the PT2262 encoder. The 1st switch appears to control whether the remaining 5 switches are connected to Vdd or Vss. Turning on the DIP switch sets the port to Vdd or Vss (depending on switch 1) and turning it off leaves the port floating which is detected as a distinct state by the encoder.
The output pattern looks similar to this. There is a total of 25 bits in the pattern. The last 15 bits seem similar irrespective of the DIP switch setting. So that would be the signature to look for when detecting for this particular PIR sensor.
The datasheet for PT 2622 indicates the following patterns for '1', '0' and floating
DIP switch set at: 1-off 2-off 3-off 4-off 5-off 6-off
The first 5 bits all show floating patterns.
DIP switch set at: 1-off 2-on 3-off 4-on 5-off 6-on
Since the first switch is set to off the switches are all connected to Vss. So 'on' is represented by a '0' and a 'off' is represented by a floating pin.
DIP switch set at: 1-on 2-on 3-off 4-off 5-off 6-off
Since the first switch is on, all the switches are connected to Vdd. So 'on' is represented by '1' and off is still floating pin.
So there is it...With this, we can now detect a unique signature pattern off the PIR and also detect the DIP switch setting.
Operation:
The pic I choose for the project is a midrange 12F683. Its perfect for this project because for its compact form fact (8 pin DIP) and Timer gating capability. (Timer gating is when the timer is incremented only when there is an input on the Timer Gating pin)
In order to read these signals, The output from the RF receiver module is connected to the T1G port of the pic. This will increment timer when the input goes high. After a full pulse is received, the pic checks to see if the pulse is a long pulse or a short pulse based on the duration of the pulse.
After determining the type of the pulse, the bit type (1, 0 or floating) is constructed based on the sequence of the pulses. (ie. 2 shorts pulses is '0', 2 long pulses is '1', a short pulse followed by a long pulse is floating 'f') and store it in an array. Holding the push button down for 5 secs enables 'learning mode' which is used to store the code into the EEPROM.
Schematic:
Parts List:
- IC1 - 12F683 PIC
- LED1 - 3mm LED
- R1 - 220 Ohm resistor
- R2 - 39 Ohm resistor
- S1 - Push button switch
- K1 - Relay (170 ohm)
- IC2 - 78L05 5v Voltage regulator
- C1 - 0.1uF capacitor
- Radiotronix RCR-433-RP RF receiver module
To request the programmed chip, click here
Source code link not work can you make new please!
ReplyDeleteThis is a project please fix the download link, I would love to play with your code.
ReplyDeletecan you share your code? good video
ReplyDeletethe link to the code is in the posting.
Deletethe link to the code is in the posting.
DeleteHi Deepak,
ReplyDeleteI have an Arduino Uno board.
Is it difficult too rewrite the program for the Arduino?
Greetings,
Jack
for arduino library is:
ReplyDeletehttp://code.google.com/p/rc-switch/
I want to know if you can build a device that receives infrared motion sensors from all of a building and then send them to the alarm panel and alarm in this way can no longer trigger ......... my email address is andres.andres23 @ yahoo.es
ReplyDeleteI am so glad that I have found your post. I have a number of these sensors as well as window/door open sensors from the same company that broadcast on the same frequency for a long time now but can not use them. I would like to buy the programmed chip from you but the above link did not work. I have learned that it is not as easy to build a receiving unit like I thought it would be, but am still willing to keep trying. I hope that you can get back to me about obtaining the coded chip. I would really appreciate it. My email is: greedy42dave@yahoo.com and I look forward to hearing from you.Thanks.
ReplyDeleteHi, This project is really interesting. Please could you post a working download link for the 12f683 code, it does not work here. Thanks.
ReplyDeletenice concept and the design of motion sensor is easy for making?
ReplyDeletevery clean and neat explanation
ReplyDeleteif you are interested in earning some money hacking 869Mhz please contact me direct tony-hunter@hotmail.com thanks
ReplyDeleteHi...the link to the source code is broken...could you share the code please?...thanks in advance
ReplyDeleteThe link for the code isn't working can you send it by mail info@tehag.nl thanks
ReplyDeleteThe link for the code isn't working can you send it on mail niho22@gmail.com
ReplyDeleteIS ANYONE OUT THERE
ReplyDeleteNot this code - but PT2262(Tx) - PT2272(Rx) code can be found at:
ReplyDeletehttp://www.enide.net/webcms/index.php?page=2262-2272-codec
This comment has been removed by the author.
ReplyDeleteThis academic report functions The sunshine by which we can unquestionably recognize the reality. This may be very outstanding just one and supplies indepth information. Thanks for this brilliant submitting.บา คา ร่า วอ เลท
ReplyDelete