Monitor 24V smoke sensor with PICs ADC

Thread Starter

LewisMF

Joined Nov 15, 2014
100
Hi everybody,

I am trying to monitor an optical smoke detector with the ADC of a PIC18F4520. The sensor feeds off a +24V rail and when they sense smoke, the resistance of the sensor will drop making the consumption go up to about 4mA.

The problem I am having is that I don´t know how to interface the PIC with these sensors to be able to monitor the current safetly and know when they are active.

Could anyone give me some ideas?

I appreciate all your help. :)
 

MikeML

Joined Oct 2, 2009
5,444
Are there just two wires going to each sensor?

What is the current into the sensor before it detects smoke?

What is the current into the sensor after it detects smoke? (4mA?)

What is the lowest voltage you could feed to the sensor and still have it operate properly?
 

Thread Starter

LewisMF

Joined Nov 15, 2014
100
Are there just two wires going to each sensor?

What is the current into the sensor before it detects smoke?

What is the current into the sensor after it detects smoke? (4mA?)

What is the lowest voltage you could feed to the sensor and still have it operate properly?

Hi Mike,

First of all I would like to thank you for your quick response.

There are just two wires to the sensor +24V & GND.

The quiescent current is very low, according to the datasheet 95uA @ 24V.

Alarm current (after it detects smoke) is 40mA @ 24V (I missed a zero after the four earlier, sorry)

The minimum "detector active" voltage is 6V according to the datasheet, but as standard I need it to work at 24V.
 

BobTPH

Joined Jun 5, 2013
8,942
Connect the sensor to ground through a 100 Ohm resistor. That will give you a 4V signal when it is sensing smoke, which can be fed directly into your micro as a digital input.

This assumes your micro is running at 5V. If at 3V use a 68 Ohm resistor.

Bob
 

MikeML

Joined Oct 2, 2009
5,444
Here is something to try. You can just use a port pin; not the A/D converter. I'm assuming that the Pic is running on 3.3V.

13.gif
 

Thread Starter

LewisMF

Joined Nov 15, 2014
100
Connect the sensor to ground through a 100 Ohm resistor. That will give you a 4V signal when it is sensing smoke, which can be fed directly into your micro as a digital input.

This assumes your micro is running at 5V. If at 3V use a 68 Ohm resistor.

Bob
Hi Bob,

The problem is that there is only two wires to the sensor, 24V & 0V. Would it be possible to measure the resistance on the negative wire with the uC? If yes, how could this be done?
 

Thread Starter

LewisMF

Joined Nov 15, 2014
100
Here is something to try. You can just use a port pin; not the A/D converter. I'm assuming that the Pic is running on 3.3V.

View attachment 80760
Hi Mike,

I will definitely give this a try!

To give you a better idea of what I want to do, is a conventional fire alarm panel. Where the detectors connect between a 24V and GND rail and on the last detector there is an end of line resistor (i.e. 10K). The sensors dont consume hardly any current while in normal mode but when they sense smoke and go in to alarm their resistance will drop causing the uC to stop monitoring the end of line resistor and this way interpretting the alarm.

So I actually do need to use the ADC of the PIC which runs at 5V.

As I said before, as 24V is too much for the uC, would there be any possibility to measure the resistance on the negative wire?

I have searched on google but I have no other information on how these conventional fire panels monitor the detectors.

Best regards.
 

#12

Joined Nov 30, 2010
18,224
I actually do need to use the ADC of the PIC which runs at 5V.

As I said before, as 24V is too much for the uC, would there be any possibility to measure the resistance on the negative wire?
Is there any possibility of using the intended signal and using 1 or 2 resistors to decrease its voltage to 5 volts?

You, "digital only" people need to learn some basic electricity.
 

MikeML

Joined Oct 2, 2009
5,444
You are running the sensors in parallel, right?
Therefore, there is only one resistor, and if any of the detectors alarm, the voltage drop across the resistor is what the A/D input sees? If you want to make it so that you can "count" how many sensors are alarming, then use a smaller resistor, and the voltage across it would be 0.04*n*R, where n is 1,2,...5
 

Thread Starter

LewisMF

Joined Nov 15, 2014
100
You are running the sensors in parallel, right?
Therefore, there is only one resistor, and if any of the detectors alarm, the voltage drop across the resistor is what the A/D input sees? If you want to make it so that you can "count" how many sensors are alarming, then use a smaller resistor, and the voltage across it would be 0.04*n*R, where n is 1,2,...5
Hi Mike,

Yes the sensors will be in parallel.

The only thing I need to monitor is alarm, open circuit and short circuit. Maybe I could just use a simple voltage divider?

I am a bit confused :S
 

joeyd999

Joined Jun 6, 2011
5,283
It looks like he is sensing the 'alarm current', which I doubt is proportional to 'smoke level' and is likely noisy. An A/D is not going to do much. Digital I/O is the way to go.

I'd run the return wire to an optocoupler to ground (I get nervous tying long wires to CPU pins), and use the opto output to a digital pin.
 

Thread Starter

LewisMF

Joined Nov 15, 2014
100
It looks like he is sensing the 'alarm current', which I doubt is proportional to 'smoke level' and is likely noisy. An A/D is not going to do much. Digital I/O is the way to go.

I'd run the return wire to an optocoupler to ground (I get nervous tying long wires to CPU pins), and use the opto output to a digital pin.
Hi Joeyd999,

You are right, I am only sensing alarm current which is a threshold. Nothing to do with smoke level.

Would you be able to post an example of a schematic if it´s not too much to ask :)

Thanks for your help.
 

MikeML

Joined Oct 2, 2009
5,444
Let me try it again...

Assuming that you can tie the 0V end of the 24Vdc supply that runs the smoke detectors to the 0V of the 5V supply that runs the PIC, the circuit I posted back in post #7 is all you need. Here it is again, this time showing two Sensors going off at the same time:

Each sensor draws 40mA if active. I am showing what happens at the PIC A/D input if first one goes on, and then the second one goes on, then the first goes off, and finally the second goes off. Note that with a 33Ω load resistor, you get 0V with none on, 1.3V with one on, 2.6V with two on, 3.9V with three on, and 5.2V with four on. I'm guessing that the likely-hood of four going off at the same time is unlikely. The AD has more than enough resolution to determine if it is one, two, three or four...

The upper plot pane shows the voltage into the AD input, and the lower pane show the current through the two simulated sensors.

13a.gif
 
Last edited:

Thread Starter

LewisMF

Joined Nov 15, 2014
100
Here are some component values to get you started. It'll likely need a bit of tweaking.

View attachment 80763
Hi Joeyd999,

Thanks for yor help, this schematic is very usefull for me.

I just have a couple of questions, what is the 1K pot just on top of the ADC line to the PIC?

How would the PIC detect if a SD is in alarm? What is the threshold? I need to have an end of line resistor on the last SD to supervise the line.

Best regards
 
Top