Panasonic Analog PIR Sensor EKMC2693112K

Using an Arduino Nano board. The system is designed to turn on a relay when the sensor is triggered. There are 2 EKMC2693112Ks hooked up to pins A0, A1. For testing purposes, I use a PULLDOWN 10K on A0, and INPUT_PULLUP on A1. Without the sensor being hooked up to A0, but using the PULLDOWN resistor, the analogRead(A0) function returns 0, as it should. Without the sensor being hooked up to A1, but using the INPUT_PULLUP, the analogRead(A1) function returns 1023, as it should. After I hook up the sensor, it reads ~250. According to Digi-Key support, the idle should be .08v, or about 16 on the readout. On A1, the readout is 1023 without the sensor attached, but ~250 with the sensor attached at idle. It should be reading in the 10xx area. When triggered, the sensor puts out a sine wave, which I can detect from about 80 on the low end and 300 on the top end. These small differences between idle/high/low allow for many false triggers, which is not acceptable. Questions:

  1. Why is idle ~250? Why doesn’t A0 read between 0-16 with the PULLDOWN resistor at idle? Why doesn’t A1 read between 1007-1023 when using a INPUT_PULLUP setting at idle?

  2. Am I doing something wrong, or is there another way to achieve my goal?

Thanks!

Dick

Hi Dick,

I wish the datasheet offered a better variety on it’s timing characteristics. They only show a short time detecting a ā€˜present’ target, but they show this output as being quite sine-wave all the time…

After the 30 second ā€˜warm-up time’, looks like a "target now present’ would give a minimum of 1.9V as what you’d want to read as your ā€˜high’ threshold, and a ā€˜target has left’ when it reads well below 1.0V

As I see it, I don’t find a recommendation of a pullup resistor.

I hope it helps.

Thanks, Brian.

I spoke to David, one of your tech reps, before I posted today, and he recommended this forum.

As am I, he’s unsure why I’m getting an idle value of about 250. It should be close to 0. That’s why he recommended the PULLDOWN resistor, and without the sensor hooked up, that pin does indeed read 0 instead of going up/down as an open pin will do.

When the sensor is hooked up, it reads about 250, when it should read about 16 or so. That’s my issue, and it’s driving me nuts.

If you’re around any of the other techs at coffee, maybe you could ask them if they have any ideas?

Thanks,

Dick

Okay Dick, maybe I’m off, but humor me- If reading 5V = 1023, so 1.1V (idle) should read about 225 (been along time since algebra) without any resistor, yes?

This appears to be the point of misapprehension; the 80mV figure would seem to be the typical noise amplitude, whereas the expected output in a non-detection state would be about 1.1V.
image

3 Likes

rick_1976 is correct – a detection will produce a sinusoidal voltage about a center value of around 1.1V. Additionally, though you really shouldn’t need pull-ups or pull-downs, if you do use them, they should probably be of a higher value, as the maximum output current is 200uA. 10K with a 2V output gets you to 200uA, so you would be pushing the limits of the device.

Unless you really need the analog output type, I generally prefer the digital output versions, such as these, because they do not require the use of an ADC on the MCU, simplifying the interface to just a logic pin.

2 Likes

Absolutely 1.1v should read about 225, but idle is rated by mfg. at .08v, so should read about 0-16.

OK, I now see the green highlighted area. So, apparently the readings I’ve been getting are valid and the thing just works that way? I chose analog because I could better fine tune the device to trigger on the small animals I’m detecting (not humans as it’s designed to do). If I got the digital unit, how tunable would that be?

Yes, that’s the way it works. A digital one would not be tunable, so based on your application, this probably is the way to go, but it will definitely require careful tuning to be useful.

Thanks to everyone for helping! Are there other sensors better for detecting small animals? I’ve used a variety of others (cheaper PIRs and radar sensors) but they had lots of false triggers due to changing light or moving plant leaves/branches.

That’s a difficult problem. The required field of view and the definition of the term ā€œsmall animalsā€ can have a great effect on what might be the best solution.

There are infrared array sensors which might do a better job, with a trade-off of higher cost, possible requirement of higher performance processor, and significantly more complex software algorithms.

If interested, a few to consider are the Panasonic Grid-EYE family of 8x8 IR arrays and the Melexis MLX90640ESF family of 32x24 IR arrays.