HEIMAN HM-601PC smoke detector - alarm goes off by it self

Hello,

I'm working on a project (fire alarm) with using

--Arduino MEGA

--Heiman HM-601PC smoke detectors (using this brand because it's alarm and power pins are seperated)

My Schematic :

My Code :

int ses        = 2;//buzzer
int erkekb1    = 7;//zone 1
int kadin      = 5;//zone 2
int erkekb1led = 52;//zone 1 led
int kadinled   = 50;//zone 2 led
int sirenrole  = 51;//siren relay
void setup() 
{
pinMode(ses,OUTPUT);
pinMode(erkekb1,INPUT_PULLUP);
pinMode(kadin,INPUT_PULLUP);
pinMode(erkekb1led,OUTPUT);
pinMode(sirenrole,OUTPUT);
digitalWrite(erkekb1led,LOW);//turn off the led
digitalWrite(kadinled,LOW);//turn off the led
digitalWrite(ses,LOW);//turn off the buzzer
digitalWrite(sirenrole,HIGH);//i don't know why but my relays works opposite, when i write LOW it turns on and when i write HIGH it's shutting off
}
void loop() 
{
if (digitalRead(erkekb1) == LOW)  
{
digitalWrite(ses,HIGH);
digitalWrite(erkekb1led,HIGH);
digitalWrite(sirenrole,LOW);
}//erkek bölge 1 den tetik varsa
else if (digitalRead(kadin) == LOW)
{
digitalWrite(ses,HIGH);
digitalWrite(kadinled,HIGH);
digitalWrite(sirenrole,LOW);
}//erkek bölge 2 den tetik varsa
else
{

}//do nothing
}

Zone 1 has : 6 detectors -- Zone 2 has : 2 detectors, system works fine except alarm goes off by it self on every 5-10 minutes without any smoke detection. When arduino opens relay and starts sirens i'm checking detectors to see is there any smoke detection (in idle mode it's led flashing in every 1-2 minutes, when detector sense smoke it's led turns to constant i mean it doesn't flashing just keep lighting) but it seems all detectors in idle mode.

According to technical document(attached) of the detector zone needs to be ended with resistor, when i attach the resistor to last detector of the zone then arduino getting trigger all the time but without resistor arduino getting trigger only when there is smoke(at least it was before i find this self triggering problem).

I'm rookie about electronics but i'm guessing maybe it needs an diode between zone's digital port & gnd or something?

20200118123617475.pdf (1.05 MB)

If the led flashes every one to two minutes, I would expect that to trigger the alarm, perhaps the Arduino doesn't always catch it, though I can't see why not.

I suggest that when you see the 3 pin go LOW, you delay for a short while and then check it again. If it's still LOW, then you can trigger the alarm.

What voltage do you get between detector pins 3 and 4 when it detects smoke ?

UKHeliBob:
What voltage do you get between detector pins 3 and 4 when it detects smoke ?

oh i didn't check the voltage,i've allways tested with buzzer mode. Let's assume that i'm having 5 volt (tomorrow i'll check the voltage and will let you know) when detector sense smoke, then should i change my code or any components?

wildbill:
If the led flashes every one to two minutes, I would expect that to trigger the alarm, perhaps the Arduino doesn’t always catch it, though I can’t see why not.

I suggest that when you see the 3 pin go LOW, you delay for a short while and then check it again. If it’s still LOW, then you can trigger the alarm.

i don’t know the exact logic that flashing leds but i assume that, detectors checking it selfs for any smoke detection and sending trigger or not regarding the detecting status, maybe sometimes when they self checking it causing little feedback signals as you mentioned, delay before start to alarm seems a good idea i’ll try tomorrow.

UKHeliBob asked if i checked the voltage when detector detected smoke and i didn’t i’ve allways checked with buzzer mode, maybe it’s sending 5V while self checking and sending 12V when smoke detected and that 5V while self checking is triggering the arduino(Just thinking outloud).

If it is the case then how i can program arduino to understand voltage difference from digital port ?

Let's assume that i'm having 5 volt

Don't let's assume anything. The detectors have a 12V supply so all bets are off

UKHeliBob:
Don't let's assume anything. The detectors have a 12V supply so all bets are off

another lesson to allways remember :slight_smile: ok tomorrow i'll measure the voltage when detectors IDLE and when TRIGGERED. Then i'll update the subject, thanks Bob you are allways kind and helpfull.

wildbill:
If the led flashes every one to two minutes, I would expect that to trigger the alarm, perhaps the Arduino doesn't always catch it, though I can't see why not.

I suggest that when you see the 3 pin go LOW, you delay for a short while and then check it again. If it's still LOW, then you can trigger the alarm.

seems like @wildbill's approach solved my problem, today i had limited time to deal with project so i just changed my code and didn't find time to measure voltage when detector triggered but i'll measure in couple days, only problem i have when a zone triggers both of the leds are turning on, i mean i've connected red led for zone 1 and blue led for zone 2, when zone 1 triggers the system both red and blue leds are turning on, when zone 2 triggers happening the same both red and blue leds turning on as well, what may cause this problem ?

my new code is;

int ses        = 2;//buzzer
int erkekb1    = 7;//zone 1
int kadin      = 5;//zone 2
int erkekb1led = 52;//zone 1 led
int kadinled   = 50;//zone 2 led
int sirenrole  = 51;//siren relay
void setup()
{
pinMode(ses,OUTPUT);
pinMode(erkekb1,INPUT_PULLUP);
pinMode(kadin,INPUT_PULLUP);
pinMode(erkekb1led,OUTPUT);
pinMode(sirenrole,OUTPUT);
digitalWrite(erkekb1led,LOW);//turn off the led
digitalWrite(kadinled,LOW);//turn off the led
digitalWrite(ses,LOW);//turn off the buzzer
digitalWrite(sirenrole,HIGH);//i don't know why but my relays works opposite, when i write LOW it turns on and when i write HIGH it's shutting off
}
void loop()
{
if (digitalRead(erkekb1) == LOW)  
{
delay(15000);
  if (digitalRead(erkekb1) == LOW)  
  {
digitalWrite(ses,HIGH);
digitalWrite(erkekb1led,HIGH);
digitalWrite(sirenrole,LOW);
  }
}//erkek bölge 1 den tetik varsa
else if (digitalRead(kadin) == LOW)
{
delay(15000);
    if (digitalRead(kadin) == LOW)
	{
digitalWrite(ses,HIGH);
digitalWrite(kadinled,HIGH);
digitalWrite(sirenrole,LOW);
	}
}//erkek bölge 2 den tetik varsa
else
{

}//do nothing
}

i just realised that i forgot to seperate and turn off zone's leds when alarm goes off, edited my code accordingly and works perfectly;

int ses        = 2;//buzzer
int erkekb1    = 7;//zone 1
int kadin      = 5;//zone 2
int erkekb1led = 52;//zone 1 led
int kadinled   = 50;//zone 2 led
int sirenrole  = 51;//siren relay
void setup()
{
pinMode(ses,OUTPUT);
pinMode(erkekb1,INPUT_PULLUP);
pinMode(kadin,INPUT_PULLUP);
pinMode(erkekb1led,OUTPUT);
pinMode(sirenrole,OUTPUT);
digitalWrite(erkekb1led,LOW);//turn off the led
digitalWrite(kadinled,LOW);//turn off the led
digitalWrite(ses,LOW);//turn off the buzzer
digitalWrite(sirenrole,HIGH);//i don't know why but my relays works opposite, when i write LOW it turns on and when i write HIGH it's shutting off
}
void loop()
{
if (digitalRead(erkekb1) == LOW)  
{
digitalWrite(ses,HIGH);
digitalWrite(erkekb1led,HIGH);
digitalWrite(kadinled,LOW);
digitalWrite(sirenrole,LOW);
}//erkek bölge 1 den tetik varsa
else if (digitalRead(kadin) == LOW)
{
digitalWrite(ses,HIGH);
digitalWrite(kadinled,HIGH);
digitalWrite(erkekb1led,LOW);
digitalWrite(sirenrole,LOW);
}//erkek bölge 2 den tetik varsa
else
{

}//do nothing
}

thanks everyone for their help.