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.
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.
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).
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.