Counting People Using PIR Sensor

Hello everyone,

I'm doing research to count people greeting the room using the HC-SR051 PIR sensor. But this sensor output is digital and I want to use analog to feed into machine learning. I refer to this paper where they are using the same Sensor with analog output and Arduino Mega and I want to use esp32 for my project. My question is how did they get the analog signal from the PIR sensor? Did they modify the HC-SR05 or use a DAC (digital analog converter)? I am not sure. Is there someone who understands better. thank you.

i see the question from skatun but I dont wonder what the end solution was.

Counting people by using convolutional neural network and a pir array.pdf (1,8 MB)
https://ieeexplore.ieee.org/document/9162221

PIR sensors don't have an analogue output.

Person is either sensed or not sensed. Two boolean states, hence digital output.

Let's say that that PIR sensor doesn't have analog output exposed.

You have to modify the sensor little bit.
There is pyroelectric sensor, amplifier and comparator. You should ideally get output after amplifier, before it's going to comparator. Would be much easier to purchase sensor with analog output.
proximity_pirfocal.gif

See if this helps at all.
"PIR sensors: HC-SR501

Yes, I have looked at the datasheet and block diagram of this pear sensor and found that before the digital vout, there is an ADC block. I want to take this analog signal before entering this ADC block. but I don't understand how to modify it where the analog pin is located (red line).

1 Like

Getting that signal may be possible, but it would be much easier if you posted a make, model and hopefully a schematic of the sensor circuit. You may have to actually measure that voltage to get its range and level.

Here is the data sheet for the BISS0001 in the HC-SR501 PIR sensor.

As you can see from that, the analog signal is available from the outputs of both first and second stage op amps (pins 16 and 12 respectively).

2 Likes