another IR object avoidance detector. issue

Thread Starter

cornishlad

Joined Jul 31, 2013
218
Hi.. I note there is a fairly current thread (I am trying to make a simple IR detector ) involving a cheap ir object avoidance detector.
detector.jpg

I am working on one at the moment which is meant to count the passes of a 1 metre clock pendulum. The output goes low on detection. It is connected to another cheap Chinese module sold as a kit to time 30 or 60 seconds.
kit.jpg
which I have modified it to count input pulses up to 24 and then reset to zero. The problem I'm getting is that upon detecting an object the count advances at superspeed by a random amount as though it was being fed with a relay with contact bounce. So I wondering if the OP amp comparator built in to the detector could be oscillating during the transitions. has anyone had any experience like this with this particular detector ?
 
Last edited by a moderator:

jpanhalt

Joined Jan 18, 2008
9,755
Seems like a possibility as the break beam may not be a "snap" action. Add more hysteresis? Or, trigger a one-shot (e.g., 555) with a duration less than your pendulum period and count those.
 

Thread Starter

cornishlad

Joined Jul 31, 2013
218
I've done another test. I have a identical counter board to which I had already made a similar mod and which had been successfully in use with a working clock. This one was fed with a DIL relay which did exhibit contact bounce and I HAD added a 555 one-shot to the input as you, jpanhalt, suggested..
btw I had also noticed that in this new board, the faulty count advanced on both the rising and falling edges of the detector output.
With temporary jumpers, I put the 555 into circuit from that one and the board counts exactly as it should. This would appear to prove that the IR detector does oscillate as it's changing state. I'm thinking that if the oscillations are full amplitude, hysteresis correction might just square them up ? But I've ordered some 4093's to replace the 4011 ( with perhaps some hf cut) on the counter input to find out.
 

Thread Starter

cornishlad

Joined Jul 31, 2013
218
Robojax, in the video above, pointed out hat there is an error in the circuit diagram. I have yet to decide on a solution but meantime here's what the diagram should look like - and also shows that the ones I have uses a LM393.
Thank you both for your help..

det.schematic.jpg
 

Thread Starter

cornishlad

Joined Jul 31, 2013
218
As a follow up to this I'll share this information for what it's worth. I did substitute the 4011 input gate(s) for a 4093 schmitt gate and filtered the output of the IR sensor. It was crude, uncalculated and not scrutinised by a scope - but the counter now counts properly and doesn't count on the trailing edge of the input pulse. To me that's a result. :)
INPUT copy.jpg
 

Thread Starter

cornishlad

Joined Jul 31, 2013
218
Dooh.. soon after posting my last, I returned to working on the counter board. Straightaway I realised the sensor input does not go to the 4011 quad gate at all but goes direct to the 4018 BCD Up counter. So why was it now working ? I downloaded the 4018 TI datasheet which says the "Schmitt trigger action on the clock line permits unlimited rise and fall times" I am actually using the ENable line because of the negative going i/p but that must be similarly equipped.
So the solution is still valid so long as a schmitt trigger is there.. A close shave !
 
Top