How would you convert an anolog signal into a on/off switch?a little background. i would like to use a metal detector (hobby type) on a conveyor system. when metal is detected i would like it to signal and shut down the conveyor. aside from the speaker there is also a headphone plug.
I was told that this was easy
The simplest way would be to use a LM339 comparator IC.:
To reduce the interference element, the speaker headphone would be preferable to use.
A small diode bridge would be used to bring the audio signal all in positive territory. A small capacitor could be used to smooth the "DC" signal (not too big a capacitor or the response time of the system might become to slow. With LM339 and a little variable DC level (a knob on a potentiometer), you could be able to set the sensitivity.
You will need something to latch that metal detection. That can be made with logic gates: Or with relay logic.
If you don't implement a latch, the conveyor may start right after it detected something, barely slowing down.
Problem....Can anyone show me how they connect ? Thanks
Audio detector and latching comparator. Close switch momentarily to reset it once tripped. As shown, it detects about 6 cycles of a 2Vp-p 1kHz sine input.
If you can tell me what the frequency/amplitude of your tone burst is, I can optimize it for that.
If you need to drive a relay or some other load, a buffer may be needed. The "LatchedAlarm" output signal is not suitable for driving a relay directly.
Audio detector and latching comparator. Close switch momentarily to reset it once tripped. As shown, it detects about 6 cycles of a 2Vp-p 1kHz sine input.
If you can tell me what the frequency/amplitude of your tone burst is, I can optimize it for that.
If you need to drive a relay or some other load, a buffer may be needed. The "LatchedAlarm" output signal is not suitable for driving a relay directly.
U1 is a generic comparator/opamp, but it is a good representation of a LM339.
The program is the free LTSpice (search these forums or google it)
You need to determine the minimum amplitude (Vp-p) that you want the circuit to respond to. If is less than 2Vp-p, we may have to add an opamp amplifier ahead of the rectifier.