Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Robust edge detection

Status
Not open for further replies.

PIG80085

New Member
Hi
I'm using an optical sensor to detect a home position of a motor. Basically the sensor picks up the grub screw holding the axis to the motor shaft. The shaft is aluminium and the screw is black. The sensor feeds into a basic op-amp comparator circuit ie. if the voltage goes over 2.5V, it outputs a "1". It works just fine for 3 of my 4 motors but the other one gives a weak signal.

I'm thinking of using an integrator to give a positive or negative spike when it reaches a positive or negative edge and then something else to convert the positive or negative spike into a "1" or "0", in order to give more robust detection without having to bodge the sensor (put a shroud on it or whatever).

So pretty much I'm wondering if anyone's played around with this kind of thing and what kind of results they got. Any suggestions?

Thanks,
Pig.
 
What you are talking about is a differentiator, not an integrator.

What's the signal level out of the weak unit? Could you just lower the threshold below 2.5V to better detect the weaker signal?
 
Hi PIG80085,

you didn't post what kind of sensor you use.

Using an IR-reflective barrier, e.g. CNY70 it procuces clear output signals.

Boncuk
 
Rather than just changing the threshold for one of the sensors I wanted to use a more general solution, not least because the four sensors I have share the one comparator circuit. The sensor I am using is an SG-2BC, it looks fairly similar to the CNY70. On the axes that work, the output goes from ~<1V for a "0" and ~4.5V for a "1". The problematic one gives around 0.5V up to ~2V. By putting a shroud on the sensor and darkening the are around the grub screw on that particular shaft, I have gotten the output to give a value >2.5V. I was hoping for a more elegant solution. I've already replaced the sensor and I'm satisfied that there are no electrical problems in the system.
 
Did you darken the area around the grub screw with a matt black type paint? If not look for such a paint with minimum reflection. It will have a flat black, no shine appearance and will look very black even under normal light. That will help improve the amplitude of the signal.
 
By putting a shroud on the sensor and darkening the are around the grub screw on that particular shaft, I have gotten the output to give a value >2.5V. I was hoping for a more elegant solution.

By elegant I meant a robust electronic solution.
 
By elegant I meant a robust electronic solution.
You have a low signal from that one sensor. There's no "elegant" electronic solution, I'm more into simplicity. I was suggesting a possible simple solution to improve the signal level. You could amplify the signal but that adds electronics and doesn't improve the signal to noise ratio which is a basic concern. But you do seem to have a reasonable S/N so why not do as Roff suggests and lower the threshold for all the sensors?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top