Interfacing with a dual element Pyroelectric Infrared Radial Sensor

Andrew Cowan

Senior Member
I've got a PIR sensor module here, and I'm hoping to interface it with a PICAXE.

Dippy - I hear you're the resident expert on this.

Am I right in thinking that I can just stick a gain op-amp (equivalent to 72.5dB, whatever that is) on the output? I want to feed it into a PICAXE.

If I put a high gain op-amp on the output, will I get a digital signal, or an analogue signal? I've looked at the typical circuit in the datasheet, but I think it has timing, and is more complex than I need.

Many thanks

Andrew
 

Dippy

Moderator
I'm no expert but I have used PIRs in designs before.

Actually even dual element PIRs allow you to do direction sensing.
If you viewed the output on a 'scope you see it go up then down or down then up depending on direction - obv you will need some kind of focussing onto element if you want a reasonable range.

If you don't want to follow the suggested circuit you will still have to do something similar. i.e. mixing the output with a biased op-amp so you can see ups and downs i.e. superimposing the output with considerable AC gain onto a DC bias.
(Imagine an AC signal on a DC offset... I like single rail)
Once you've done that you could use a comparator (hardware) method to convert the output to logic and then use PICAXE see whether it did a down before an up or vice versa. Or forget the comparator and use ADC.
Trying to do all that on one op-amp and an ADC will be quite a challenge :)


An op-amp is an op-amp and amplifies analogue, but op-amps can also be congured as comparators... analogue/digital ... ooeerr. So a lot of this depends on you op-amp skills.

But as I haven't used that particular device I'll leave it to the experts who have.
For most people it's time to dig out the breadboard and read up on op-amp applications.
 

Andrew Cowan

Senior Member
Thanks Dippy.

My confusion with their typical schematic was it includes a relay output, and I (guess) that it has a timer (to turn on for x seconds).

If I follow their circuit, would it be the output of op-amp B that I feed into the PIC? I've also got a fresnel lens for it.

Thanks

Andrew
 

sghioto

Senior Member
Andrew,

Use output "B" for analog. "B" will have about a 2 volt dc offset with no signal detected.
A digital output is available from "C" and/or "D". From the components values shown in the schematic, "C" should switch HI when "B" drops below 1 volt dc and "D" will switch HI when "B" exceeds 3 volts.

Steve G.
 

Dippy

Moderator
I agree with Steve.
Basically, a DC coupled and the AC coupled pair og gain stages.
I haven't got time to check values to work out the AC gains nor the filtering/damping effects. I'll leave that to retired people with plenty of spare time.
Then into CD configured as comparators with different thresholds providing a Window in the middle where it ignores small changes.
I can't see a 'timer' per se , but PIRs are slow old things and need a little rest between sensing.

The section C/D could be replaced by code quite easily- this would allow easy adjustments for sensitivity.
It's not beyond the wit of man to use PICAXE to switch earlier compnents to adjust system senitivity too.

Note: If you use certain micropower op-amps for this design the limited GBP will give you a built-in medium to HF filter which is handy.

Go for it. EasyPC + Etch tank and you'll have it done by tomorrow morning :)
 

BeanieBots

Moderator
You should be able to feed the output of the first op-amp (LM324 pin1) into your PICAXE and work on that signal. The rest of the circuit is just looking for rate of change. That can all be done in code.
Just keep track of the ADC value and see by how much it has changed. If greater than X amount in Y seconds then activate an output for Z seconds. That's the basic PIR operation. You could get a little more fancy and count the number of 'trips' to avoid false triggers.

72.5dB gain is high and will require care with layout, component choice and decoupling. Typical open loop op-amp gains are only ~100dB.
 

womai

Senior Member
To get 72dB of gain and not run a high risk of oscillation it would probably be better to split the chain into at least 3 stages, i.e. 3 op-amp stages with a gain of 24dB each. 24dB is approx. a factor of 15, that's much more doable. If you use a quad op-amp (4 op-amps in a 14-pin DIP package) that's only one chip and six resistors.
 
Top