false triggering on distance sensor

Thread Starter

dyogram

Joined Mar 31, 2022
4
Hello All
I am new here and somewhat new into designing. I know super super basics and can usually fabricobble something together with enough tinkering. I was looking for advice on a circuit I am designing.
I created a circuit using an infrared distance sensor E3F-DS30C4 NPN NO. (labelled Sen). There is ground and power to it and the sensing wire goes to a BC516. This triggers a relay when the sensor hits a specified distance.
I am having a slight problem. I am using this sensor to detect when a dust bin is full. When I am using this and sucking up small particles it does fine but when I use this and suck up big particles and they pass in front of the sensor. it will flip the sensor on for a super short moment. I have feedback using a relay, when it's not full Green led is on (Gled) then when full Red Led (rled) flips on. This is not a huge problem but would like to fix it if possible.
I was trying to come up with a solution where if the sensor detects something is in front of it for more than lets say 1 second. This would mean it is full and not just a particle passing by.
I would call this a "normalization circuit" but I know that's not right terminology. I was trying to come up with ideas on how to solve it but I don't even know what to call this type of addition i would be adding which is making it hard to find existing solutions to see if I can implement it into mine.

My thoughts were to maybe have some sort of gate with capacitors where they have to charge up fully before the gate opens? I don't know, this is really me taking stabs in the dark. Any ideas would be helpful or points in the right direction for me to research. Thanks for the help in adv
image_2022-03-31_125237.png
 

Ya’akov

Joined Jan 27, 2019
9,070
Welcome to AAC.

It sounds like a simple RC low pass filter with one resistor and one cap will work to solve your problem. It's not a one second time out but it will suppress the short pulses from the sensor.

To get the right values you will need to have some idea how long those pulses are. Do you have an oscilloscope?
 

DickCappels

Joined Aug 21, 2008
10,152
I think you have a good idea. Something like a 10 uf or larger capacitor between the base and emitter of PNP Darlington transistor would probably solve your problem.
 

Thread Starter

dyogram

Joined Mar 31, 2022
4
There we go! Exactly the terminology I was looking for. Low pass filter. have heard of those but completely did not enter my mind when thinking about how to solve this. I always thought those high and low pass filter were mainly for audio stuff :)
I am indifferent about the "1 second" that was mainly an example
I will give the low pass filter a go :)
Thanks guys
 

Thread Starter

dyogram

Joined Mar 31, 2022
4
Well! All I had was 47 uf for my rated voltage so I put this on. I put this between the base of the bc516 and ground.
I will need to do more testing as I can't make noise now... too late :p but it has made a noticeable difference already. The start up sequence now upon receiving power from pswitch, the red led turns on for about .5 seconds then the relay will disengage and flip the green light on. This confuses me a little as the green led is on the NC section of the relay and should instantly receive power once Pswitch is flipped on. Another guess here but since the cap has to charge up is it pulling the base of the bcc516 to ground flipping the relay till it is charged up then once fully charged it disengages the relay as it's not pulling to ground anymore?

Not sure if I want to change this, I sort of like that start up sequence as it confirms to me that the relay is working upon power up. If I were to want to change this any suggestions on preventing that? I will need to think on this.

For the false triggering I can swing my hand in front of the sensor the led on the sensor flicks on but my red led does not turn on unless I hold my hand underneath for a longer duration. I think best course of action would be for me to do more testing report back with big particle count. Will have to look for a lower cap value as think mine might be a little high
 

DickCappels

Joined Aug 21, 2008
10,152
(some text removed for clarity)

Not sure if I want to change this, I sort of like that start up sequence as it confirms to me that the relay is working upon power up. If I were to want to change this any suggestions on preventing that? I will need to think on this.

(some text removed for clarity)

You can't hurt much by experimenting. Go for it!
 

Thread Starter

dyogram

Joined Mar 31, 2022
4
Well I'd say this is pretty much solved! I used it in real world environment and I can see the led blink on the sensor and the lights/relay did not blink so all is good :)
 
Top