Hacking a Genie Garage door sensor for Propeller use
T Chap
Posts: 4,223
I needed a beam break method and had spent way too much time trying to get a 38k detector and IR LED to work well beyond 4'. So I went to Home Depot and got a Chamberlain IR replacement kit and took it apart. There is a detector and an emitter board. Both have 2 wires for power. On the detector, they are probably doing some trick such as applying power and reading the pulsed output on power off, not sure what frequency they are pulsing the power with, but there are large caps on the detector and if you disconnect either 5v or gnd and read the power lines, you can see the pulse signal for a brief time indicating it sees the IR emitter. The caps allow the emitter to operate for a second after power loss, so a processor can use a method of turning on power to charge the caps, kill power and read the lines to see if IR signal was present. I am not sure if their intent was to save running a 3rd wire for the output of the sensor or not, but that is my guess.
The detector sensor is a TSOP31236. The output is 5v if no IR signal is seen. I used 5vdc on both modules for power. I tried a method of pulsing the power and reading the lines but what I found was that it was a slow method of triggering compared to just applying power and reading the sensor output signal. There is a low going pulse at approx 176hz if it sees the emitter. I ran a 3rd wire off the sensor to the Prop via a 1k. Here is the code:
This system has a great range, is very directional, and triggers fast. The kit costs 37.00. Maybe someone might find use of this experiment.
The detector sensor is a TSOP31236. The output is 5v if no IR signal is seen. I used 5vdc on both modules for power. I tried a method of pulsing the power and reading the lines but what I found was that it was a slow method of triggering compared to just applying power and reading the sensor output signal. There is a low going pulse at approx 176hz if it sees the emitter. I ran a 3rd wire off the sensor to the Prop via a 1k. Here is the code:
PUB IRsensor | mmm Repeat until ina[auxin2] == 0 ' wait until the pulse goes low to determine if IR is present if mmm > 250 ' escape route if it never goes low do something ' if using the escape route, this means the beam was broken as it never saw a low return 1 ' 1 means there was a break in the IR, since the counter timed out mmm++ 'bump the counter, 250 is more than enough time for a pulse to have been seen if it were going to be seen
This system has a great range, is very directional, and triggers fast. The kit costs 37.00. Maybe someone might find use of this experiment.
Comments