Devices & Components
Arduino Uno Rev3
5 mm LED: Red
Momentary Push Button small PCB mounted
General Purpose Transistor PNP
Shield Custom PCB as per fritzing file included in this project
Capacitor 100 nF
1N5819 – 1A Schottky Barrier Rectifier
JST Pair of Female & Male connectors with wire cables
Smoke Alarm with Escape Light e.g. Kiddie i9080EU.
Resistors 220 ohm, 820 ohm, 10k, 15 ohm, 4k7, 220 ohm; 5k6
Stacking Headers 1x10; 1x6; 2x8
Hardware & Tools
Mastech MS8217 Autorange Digital Multimeter
Ear Muffs
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Plier, Long Nose
Soldering iron (generic)
Project description
Code
Smoke Alarm Input Output
arduino
Monitor Modified Smoke Alarm and print on the serial monitor if it's triggered Activate Smoke Alarm Remote Buzzer when the Shield Test button is pressed Show status LED flashing when running or On when alarm sounding
1/* 2 Example Program to 3 Monitor Modified Smoke Alarm 4 Activate Smoke Alarm Remote Buzzer 5 Show status LED when running or alarm sounding 6 7 Hardware Schematic, PCB file and assembly Instructions for this code is here: 8 http://Tek4um.com/smokeAlarm 9 10 Release: 11 10 May 2021 v1.0 Initial version 12 13 14 15 © karl grabe Tek4um.com 2021 www.tek4um.com 16 For personal use only. 17*/ 18 19#define SMOKE_ALARM_INPUT_PIN 2 // connect to R3 (see circuit diagram) 20#define BUZZER_OUTPUT_PIN 3 // connect to R4 21#define SMOKE_ALARM_LED_STATUS 4 // on if Smoke Alarm input is active 22#define SMOKE_ALARM_TEST_BUTTON 5 // for testing 23#define HARDWARE_SERIAL_BAUD 115200 24#define On true 25#define Off false 26#define TEST_TIME_DURATION 1000 // Time duration in ms to sound buzzer and status led for testing 27 28 29void setup() { 30 pinMode(SMOKE_ALARM_INPUT_PIN, INPUT); // Connected to the modified Smoke Alarm 31 pinMode(BUZZER_OUTPUT_PIN, OUTPUT); // Connected to the Remote Buzzer, active LOW 32 pinMode(LED_BUILTIN, OUTPUT); 33 pinMode(SMOKE_ALARM_LED_STATUS, OUTPUT); // active HIGH 34 pinMode(SMOKE_ALARM_TEST_BUTTON, INPUT_PULLUP); // active LOW 35 36 Serial.begin(HARDWARE_SERIAL_BAUD); 37 delay(500); 38 Serial.println(F("Monitoring Smoke Alarm... ")); 39 40 // Test: Turn on the remote buzzer & Status LED briefly on startup 41 setBuzzer (On); 42 setStatusLED(On); 43 44 delay(TEST_TIME_DURATION); 45 46 setBuzzer (Off); 47 setStatusLED(Off);; 48 delay (100); // Allow C1 capacitor to discharge, otherwise a false alarm on startup 49} 50 51void loop() { 52 boolean testButtonState = !digitalRead(SMOKE_ALARM_TEST_BUTTON); // read the test button, active LOW so invert it 53 if (testButtonState) { // if test button presses sound buzzer and LED on the PCB 54 setStatusLED(On); // turn on LED 55 setBuzzer (On); // turn on transistor Q1 to sound buzzer via cable 56 delay (TEST_TIME_DURATION); 57 setStatusLED(Off); 58 setBuzzer (Off); 59 } 60 61 // Check if the smoke alarm is triggered, print it's state to serial monitor 62 boolean smokeAlarmState = digitalRead(SMOKE_ALARM_INPUT_PIN); // true: alarm is on so it's triggered (e.g. Fire!!) 63 64 if (smokeAlarmState) { 65 String AlarmStateText = smokeAlarmState ? "On" : "Off"; // get text of smoke alarm state, true: On, false: Off 66 Serial.print(F("A Smoke Alarm is: ")); 67 if (testButtonState) 68 Serial.print (F("(test button)")); // test button is pressed 69 Serial.println(AlarmStateText); 70 setStatusLED(smokeAlarmState); // status led is on when smoke alarm is on 71 delay (500); 72 return; 73} 74 75// *** to do: add background timer to flash LED 76 delay(100); // delay before repeating messages 77 flashStatusLED (); // show program is running 78 delay (100); 79} 80 81 82 83void setBuzzer (boolean state){ // pass true to sound buzzer 84 digitalWrite(BUZZER_OUTPUT_PIN, !state); // active low 85} 86 87void setStatusLED(boolean state) { // pass true to turn on LED 88 digitalWrite(SMOKE_ALARM_LED_STATUS, state); 89} 90 91void flashStatusLED(){ // flip the status led 92 digitalWrite(SMOKE_ALARM_LED_STATUS, !digitalRead(SMOKE_ALARM_LED_STATUS)); 93} 94
Downloadable files
Alarm Arduino Shield Interface Circuit Diagram
Alarm Arduino Shield Interface Circuit Diagram

Alarm Arduino Shield IO Interface v7
A PCB Shield and circuit to interface a modified smoke alarm to an Arduino Uno
Alarm Arduino Shield IO Interface v7
Alarm Arduino Shield IO Interface v7
A PCB Shield and circuit to interface a modified smoke alarm to an Arduino Uno
Alarm Arduino Shield IO Interface v7
Alarm Arduino Shield Interface Circuit Diagram
Alarm Arduino Shield Interface Circuit Diagram

Comments
Only logged in users can leave comments