Electronics > Projects, Designs, and Technical Stuff

Simple voltage differerential to logic conversion ?

(1/2) > >>

bithead9:
I have a device that is generating between 5 and 6V DC as the result of breaking an LED beam.  I would like to turn this into PULSES that can be read as ON/OFF (digital)  - I was thinking of possibly using a 741 OP AMP in bi-stable mode.  The designs I find so far will work with HALF the +VCC (VREF) and trigger when  the voltage goes above that VREF.  Ideally when the input if +6V that would be an ON state and +5V would be OFF.  Is there a way to use the OP AMP in this way or should I be looking for another IC or circuit?  The non-inverting comparator is what I thought might work:
https://www.electronics-tutorials.ws/opamp/op-amp-comparator.html
Any suggestions?

magic:
741 - only if you increase VCC to maybe 9V or more. And then the output will swing up to 8V.
On 6V supply and out of classic parts, TL071/TL072 might perhaps work. It's a rare opamp which works with its inputs close to VCC, but not close to ground.

Normally though, dedicated comparator ICs exist which are like opamps but switching faster. You would be looking for some comparator with rail to rail input, whatever you can get wherever you buy parts.

Gyro:
Most comparators are open-collector output too, meaning that you can power them at a higher voltage if you need to and just use a pullup resistor between the output and your logic supply.

Look at an LM311 or LM339 (quad) datasheet as a starting point.

SiliconWizard:

--- Quote from: bithead9 on July 29, 2019, 02:59:56 am ---Ideally when the input if +6V that would be an ON state and +5V would be OFF.

--- End quote ---

Ok. A comparator with a 5.5V threshold would do. I don't know what the power supplies are in your system. What is VCC? (5V? 3.3V?)

If you don't want to bother with power supplies, instead of going higher, you'd just have to attenuate the input voltage so that 5.5V gives for instance half-way VCC? Set your threshold voltage accordingly.
(Eg: a resistor divider that divides by 2. 5V will give 2.5V, 6V will give 3V. A second resistor divider - but from VCC - to generate the 5.5/2 = 2.75V threshold.)
Take care of the operating range and working supply voltage of the comparator or opamp you're going to select. Power it at VCC.

You can also do the same but add some hysteresis to your comparator (so for instance use two thresholds such as 5.25V and 5.75V) to avoid spurious toggling if the input signal is a bit noisy and/or could be too close to the middle voltage (5.5V).

Zero999:
The LM311, LM393/LM339 have a common mode range of +V-1.5V, so 4.5V with a 6V supply.

Attenuating the inputs is with a potential divider is a sensible enough solution. Alternatively use a comparator which will work with its inputs closer to 5V. The TL072 is a possibility, although 6V is a bit low and it's optimised for use as a linear amplifier, rather than a comparator.

There are plenty of comparator ICs which will work near or all the way up to the positive rail. The TLC3702 is specified to within 1V of +V, at room temperature and the MIC7211/7221 will work with its inputs up to 0.3V outside the supply rails, so -0.3V to 6.3V with a 6V supply.
https://www.ti.com/lit/ds/symlink/tlc3702-q1.pdf
http://ww1.microchip.com/downloads/en/DeviceDoc/mic7211.pdf

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod