• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP32 with PIR Motion Sensor – Interrupts and Timers

Q&A Forum › Category: ESP32 › ESP32 with PIR Motion Sensor – Interrupts and Timers
0 Vote Up Vote Down
ChinGuan Quek asked 2 years ago

I noticed that the PIR sensor would take about 35 seconds to be able to sense motion once the time setting turns off the LED.
What is the reason for the code to have such a long delay

Question Tags: PIR Sensor Performance
7 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Hi.
It shouldn’t have such long delay.
Which PIR motion sensor are you using?
Regards,
Sara

0 Vote Up Vote Down
ChinGuan Quek answered 2 years ago

Hi Sara,
Thanks for your prompt response.
I don’t have the mini-PIR unit as shown in the example but have the HC-SR 501 that I have acquired as part of an Arduino training kit.
What would be the typical delay?
I also noticed that the program would turn off the LED on set time, despite me frantically waiving to the PIR and have to wait for the 35 sec lapse before the program would respond to the motion. I can imagine if one should go into a dark room and have the same experience.
Perhaps the example should also demo PIR use in its practical use?
 

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Hi.
That PIR motion sensor comes with two little orange potentiometers.
 
The first potentiometer, labeled as “Sensitivity” or “Range,” controls the detection range of the sensor. By adjusting this potentiometer, you can set the sensor’s sensitivity.
 
The second potentiometer, labeled as “Time Delay” or “Duration,” controls the duration of the output signal. This is the potentiometer you need to adjust to change that delay time.
 
I hope this helps.
 
Regards,
Sara

0 Vote Up Vote Down
ChinGuan Quek answered 2 years ago

OK I see them.
Will fiddle with the two potentiometers and obesrve.
 
Thanks

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Ok.
Then, let me know if it worked out.
Regards
Sara

0 Vote Up Vote Down
ChinGuan Quek answered 2 years ago

Hi,
Sara, 
I adjusted the time Potentiometer to max. The 35 second delay is very much shortened.
If i keep waiving at the sensor, LED remains on all the time.
I could further improve it increasing the sensitivity of the PIR on the other potentiometer.
I suppose the PIR model I have is sued with standard lighting unit that provides a low voltage signal to the PIR when power is supplied to the lamp, the timer potentiometers are tweaked to get the desired sensitivity and “Light ON” duration.
Issue resolved and closed.
Thanks
 
Thanks.

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Great.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.