I put together a little logic circuit that tells me when we have mail in our mailbox and it has been working pretty good. I used two TCRT5000 proximity sensors and ran them through an op-amp and then to an OR gate, so if either sensor picks up the reflection of the mail, it would close the circuit on an Ademco wireless switch. The datasheet mentioned that the photo-transistor blocks visible light, but sunlight immediately trips the circuit. This really isn't much of a problem, because once the door is opened, then sensor trips the alarm and if mail is placed inside, once the door closes, the sensor sees the mail and stays in a tripped status. If no mail is placed and the door is closed, then the alarm will not remain tripped. I configured the alarm system to only chime & print "MAIL IN MAILBOX" on the keypads in the house, but to not activate the alarm in any other way. I chose this method, because I had the parts and I was bored during our COVID lock-down last year. I could not find a mailbox alarm that would notify me if there was actual mail inside. Most of them only alerted when the door had been opened. The whole reason behind this was to let my wife know the minute that the mail was delivered, so she could retrieve it as soon as possible. We routinely get heat-sensitive items and even during the Winter, the inside of the mailbox can get pretty hot.
This worked great until it started getting very hot outside (above 95 degrees Fahrenheit). Then the sensors get so hot that they trip the alarm sensor and the alarm panels chimes. This only happens briefly and the alarm sensor resets. Sense it only happens a few times during the hottest times of day, I just disabled the chime. We can still see the message on the keypads, but I'd like to get the chime back on, so she can hear when the mail gets delivered.
In hindsight, I should have used a selective IR sensor at ~38kHz, 1) to keep ambient light from tripping the alarm when the door is opened and 2) to keep the sensor from falsing. I'd like to redo the sensor circuit to only trigger if the photo-transistor receives a 38kHz signal from the IR emitter. Can a PIC be configured to look for a 38 kHz square wave on one of its input pins and then only output a high/low on a selected output pin if the 38kHz is a match for what is programmed? One of my problems is that I epoxied in the TCRT5000s to the top of the mailbox, so I'd like to retain the use of these sensors if possible. I don't mind buying another mailbox if the TCRT5000s just won't work, but if I can make it work, that would be great. Other than that, the rest of the circuitry is in a NEMA waterproof enclosure that is mounted to the 4x4 post.
Is there a "best" PIC for this application? I have several different types on-hand, but can order new if there is a best-case PIC for this purpose. The end goal is to trip the alarm sensor if either of the two TCRT5000s see a piece of mail without tripping on false readings. Bonus for allowing the circuit to be put to sleep and to remember its last state before it goes to sleep, then to wake when the door is opened. Any input is very much appreciated.
This worked great until it started getting very hot outside (above 95 degrees Fahrenheit). Then the sensors get so hot that they trip the alarm sensor and the alarm panels chimes. This only happens briefly and the alarm sensor resets. Sense it only happens a few times during the hottest times of day, I just disabled the chime. We can still see the message on the keypads, but I'd like to get the chime back on, so she can hear when the mail gets delivered.
In hindsight, I should have used a selective IR sensor at ~38kHz, 1) to keep ambient light from tripping the alarm when the door is opened and 2) to keep the sensor from falsing. I'd like to redo the sensor circuit to only trigger if the photo-transistor receives a 38kHz signal from the IR emitter. Can a PIC be configured to look for a 38 kHz square wave on one of its input pins and then only output a high/low on a selected output pin if the 38kHz is a match for what is programmed? One of my problems is that I epoxied in the TCRT5000s to the top of the mailbox, so I'd like to retain the use of these sensors if possible. I don't mind buying another mailbox if the TCRT5000s just won't work, but if I can make it work, that would be great. Other than that, the rest of the circuitry is in a NEMA waterproof enclosure that is mounted to the 4x4 post.
Is there a "best" PIC for this application? I have several different types on-hand, but can order new if there is a best-case PIC for this purpose. The end goal is to trip the alarm sensor if either of the two TCRT5000s see a piece of mail without tripping on false readings. Bonus for allowing the circuit to be put to sleep and to remember its last state before it goes to sleep, then to wake when the door is opened. Any input is very much appreciated.