This is a smoke detector alerting system that can notify me whenever and alarm goes off in my wired smoke detector.
The notification uses SMPT so that it can send to email or text via a typical carrier's email-to-text service.
I prototyped the project on a Raspberry PI4 and then ported it to a RPi Zero W without having to change any
pins or code. The pins use the Broadcom designation.
I have seen other smoke detector implementations that use a transistor as a switch for the 9 volt signal coming
off a wired smoke detector, and that technique is fine and I am sure works great; however, I wanted to avoid
spurious signals and having to accommodate fine tuning of component values. My approach uses two relays that
either activate or don't activate based on high threshold voltages on their coils.
As my attached wiring diagram shows, the first stage relay is a Kidde Relay module SM120X which detects the signal
on the red wire when smoke is detected and closes a normally open contact that puts 120v AC, coming from the smoke
detector hot and neutral, onto the contacts that close and subsequently energize a stage 2 120v coil relay.
This stage 2 relay, when energized, places ground on pin 23 of the RPi Zero and satisfies the Python code to send
an SMTP message.
The LED blinks to indicate that the Python program is running and has not been halted for any reason.
The cathode connects to a GPIO ground pin and the anode connects to pin 25 through a 1k resistor.
I used the hot and neutral wires from the smoke detector to also power an outlet that I installed for
the RPi Zero. although not show in the diagram, the RPi Zero is plugged into an Alexa compatible 120V
adaptor so that I can reboot the RPi remotely if necessary. I am using VNC and SSH for remote access,
but there are times when they do not work, and the Alexa adapter allows me to do a hard power-down,