-->
Page 1 of 1

Infrared Proximity Sensor in Sunlight

PostPosted: Thu May 21, 2020 5:24 pm
by alexzs
Hey guys,

We are trying to program an Arduino UNO (also a ESP8266) with an infrared proximity sensor that will be used in front of a store.
The sensor receives the influence of sunlight. At night it triggers the DC motor as expected, only when a hand is 3-5 cm. close to the sensor.
But during the day the DC triggers ON by itself because of the sunlight interference.

We used lots of combinations of Infrared emitters and receivers, phototransistors, photodiodes, modules, etc.
We even tried to use a dark filter without any success. Now we are trying to code the infrared emitter using the IRremote library to see if remote control technique would work.
We think we already understood the basic principles of this library. We were able to read codes from different remote controls to capture and to send them through the infrared emitter.

Within the sketch loop we send the code an on the next line we use an if condition to check if a hand reflected the signal.

We are trying to figure out a programming technique that, at the same time, sends an infrared code and its reflects on a hand are captured by the infrared receiver.
Any clues?

Thanks a lot,
Alexandre

Re: Infrared Proximity Sensor in Sunlight

PostPosted: Fri May 22, 2020 2:23 am
by Bonzo
If you are having problems with the PIR why not try something else:

Distance sensor - when something is at a set distance activate the door.

Pi with motion eye software - you can have a camera that works at night and will run code on activation. You also get the benefit of extra security. Although it may need some tweeking of the software as my camera is sometimes set of by bright light or shadow.

I have a Pi setup which works in series with a PIR light to reduce the amount of false activations. The PIR and motion detector both have to work to activate the light.

Re: Infrared Proximity Sensor in Sunlight

PostPosted: Fri May 22, 2020 3:50 am
by schufti
PIR won't work in direct sunlight, especially when the sun heats the surrounding to approx. body temperature. that is one of the true stories behind some crime & suspense movies where they heat the room to 37°C to outsmart the burgler alarms.
Try some radar or capacitive proximity sensors instead.