View Single Post
  #24   Spotlight this post!  
Unread 11-05-2013, 01:49
Levansic's Avatar
Levansic Levansic is offline
Registered User
AKA: Len Evansic
FRC #0585 (Cyber Penguins)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Tehachapi, CA
Posts: 186
Levansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud of
Re: Arbitrary Quadrature Encoder

Quote:
Originally Posted by calvin909090 View Post
Why are you guys using op-amps instead of comparators? Comparators output a direct digital signal...
That's a good question!

There are several reasons that are tied together, but I'll start with the easiest first. Comparators are specialized op-amps. Our original circuit was attempted with comparators, and didn't "work". Switching to more general-purpose LM741 op-amps, which were available at the local Radio Shack, made it work, and the LM324 is a quad version of this op-amp.

In reality, the first phase probably worked fine, but we couldn't sink or source enough current to drive the second phase LED's for feedback. That's the problem with using comparators for this circuit. They are typically connected to high-impedance logic inputs and not driving current consumers. Using the LM339 for example, it sources nil current at high signal, and only sinks 15 mA at low signal. While this will light our indicator LED's, it would be at a much lower intensity. In our circuit, we source the current for the LED's from the op-amp, rather than sinking or switching a transistor.

There are comparators that can sink or source comparable current to what the LM324 can supply, but they are much more expensive than the LM324. We could have split the phases apart and used a dual comparator for the first phase and a dual op-amp for the second, but we wanted to reduce component count.