4
\$\begingroup\$

I have 0-5 V analog value coming in, and I need to convert it to a high or low 5V digital signal. Essentially, I need to create a 1-channel A/D converter. The idea is that when my analog voltage goes above a certain threshold, it will set the digital output high, and vice-versa. I saw something about being able to do this with op-amps, but I don't remember where I saw it. I also want to do this without using a microcontroller. Any ideas?

\$\endgroup\$
  • 1
    \$\begingroup\$ perfect job for a comparator \$\endgroup\$ – m.Alin Mar 14 '14 at 14:39
  • \$\begingroup\$ Are you just requiring one-bit resolution i.e. the analogue signal is above or below a certain threshold voltage? \$\endgroup\$ – Andy aka Mar 14 '14 at 16:17
  • \$\begingroup\$ Yes, @Andyaka, that's all I need \$\endgroup\$ – crocboy Mar 14 '14 at 16:19
  • \$\begingroup\$ Then you have an answer but think about how much hysteresis you need as shown in the answer. \$\endgroup\$ – Andy aka Mar 14 '14 at 16:23
4
\$\begingroup\$

Typically you'd use a comparator for this. Or you could make a transistor version with a long-tailed pair.

A Schmitt-trigger would be a nice solution for a 0 to 5V input:

enter image description here (Source)

But you pointed to an op-amp circuit...

Here's the idea. An opamp as a comparator with logic output.

enter image description here

It's worth reading through ADI's application note on that (source for the picture).

Their Conclusion is accurate in my opinion and worth bearing in mind:

"In conclusion, although op amps are not designed to be used as comparators, there are, nevertheless, many applications where the use of an op amp as a comparator is a proper engineering decision. It is important to make an educated decision to ensure that the op amp chosen performs as expected"

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.