Pulse train comparrison/matching

Hello Guys.I'm working on a home security project, having a text sent to me if certain events occur. One of those events is the detection of smoke. I purchased a Kidde wireless (433Mhz) smoke alarm and am currently able to receive it's signal via a cheap receiver and was successful is using the Arduino's Pulsein(negative transition) to collect pulse data from the alarm. Below are 3 groups. Each group shows pulse width data for different user switch settings on the alarm.

I'm seeking advice on how to compare the incoming data to fixed data in a constant variable. The first number in each row below is the pause between signals sent by the alarm. I suppose that detecting the length of that first number would be the start of collecting data. I'm imagining that any pulse width between a range of say, 360-420 could be assigned a 0 and any pulse width of a range of 780-820 be considered a 1. When determined to be 0 or 1, could those bits somehow be arranged into a binary number? How would that be done? Afterward I could compare it to a binary number stored in the previously mentioned variable. I'm seeking a direction to go with the programming. Please suggest a good way to go about this. Thanks - Scotty

30147	380	392	388	1573	402	402	393	394	401	401	401	800	402	802	810	804	802	402	405	398	397	405
48734	373	389	389	1587	403	390	393	400	400	400	393	806	401	801	802	801	808	402	394	397	405	402
37169	382	394	382	1572	397	396	400	394	396	402	401	800	397	801	802	802	804	397	400	403	405	396
																						
41406	373	400	397	1572	398	397	402	397	401	809	801	397	810	802	812	804	400	398	405	804		
39944	367	396	397	1568	405	396	396	401	402	804	799	405	802	805	805	800	407	401	400	804		
35690	376	398	390	1579	407	392	400	403	402	801	804	402	809	802	801	805	406	396	406	806		
																						
31026	384	397	397	1579	398	397	401	385	402	398	394	401	410	792	802	802	801	410	405	405	394	397
35777	376	398	398	1578	402	398	402	402	400	397	398	405	402	795	804	804	812	406	403	403	398	394
40726	368	397	397	1565	400	397	401	401	401	397	402	403	410	796	804	806	805	410	405	403	398	394

You need to understand how this data is encoded i.e. when an event of interest occurs, how is this represented in the data? Looking at those numbers, it's not obvious what the corresponding signal represents and I have no idea how to derive the data that you're interested in.

I agree with @PeterH.

What would normally receive the data and what would it do with it? Could you interface to that device?

Can you get a specification for the data? Is it, perhaps, a fire protection industry standard system?

The data you posted seems to fall into 4 categories - a very large number, a number of about 1500, a number of about 800 and a number of about 400. If you think of the data in those terms can you reliably identify which type of signal is being sent?

Even if you can, will your insurance company be happy?

...R

From your data, it looks like 3 events are in fact occurring and the repeatability is very good. The numbers 400, 800 and 1575 seem to jump out (within +-2%) without any anomalies.

When determined to be 0 or 1, could those bits somehow be arranged into a binary number? How would that be done?

Sure - you could use Arduino's bitwise operators and functions.

Thanks for responding, Gentlemen. Perhaps I've not been clear enough. My post is concerning only one event, a smoke detector going off, sounding an alarm. The smoke detector is a type that, when it goes off, transmits an RF signal to other smoke detectors and they will also sound an alarm. The data shown represents the output of an RF receiver that has captured the RF signal when the smoke detector goes off. The RF signal, as viewed on a scope, looks like this:

The Pulsein function sees the low, short pulses as approximately 390usec and the longer low pulses as approximately 800usec.

The output of the receiver is fed to an input pin (7) of an Arduino. The code is below. One line of the data shown in the original post is what is seen, over and over, in the serial monitor.

/*
  PulseIn sketch

 */


const int inputPin = 7;   // analog output pin to monitor
unsigned long val;  // this will hold the value from pulseIn

void setup()
{  
  Serial.begin(115200);
}

void loop()
{
  val = pulseIn(inputPin, LOW); 
  Serial.println(val);

Does this clear things up? - Scotty

Are you saying that when there is no smoke detection there is no signal, and when there is smoke detection there is the signal you displayed above?

Does the device also put put any other signals that you need to identify as NOT being a smoke detection signal?

Patent Reference - Assignee: Walter Kidde Portable Equipment, Inc.
Radio frequency communications scheme in life safety devices

Are you saying that when there is no smoke detection there is no signal, and when there is smoke detection there is the signal you displayed above?

Yes.

Does the device also put put any other signals that you need to identify as NOT being a smoke detection signal?

No.

scottyjr:

Are you saying that when there is no smoke detection there is no signal, and when there is smoke detection there is the signal you displayed above?

Yes.

Does the device also put put any other signals that you need to identify as NOT being a smoke detection signal?

No.

Then all you need to do is to characterize enough of the pulse train to make sure that detection would be unique. A few sequential on/off times should suffice.