Pages: [1]   Go Down
Author Topic: Comparator, rotary encoder and resistors  (Read 1868 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
****
Karma: 1
Posts: 259
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've been following this schematic to create a circuit for amplifiy signals from rotary encoders which are actually HDD motors:



There's one thing I don't get - why are those 1k resistors there in series with + signals? What is their purpose?
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8967
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The 1K and 10K resistors set the amplifier gain to 10 (multiply the signal by 10).
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Sr. Member
****
Karma: 1
Posts: 259
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks. What are the electronic consequences of removing 1k resistors?
Logged

Anchorage, AK
Offline Offline
Edison Member
*
Karma: 42
Posts: 1176
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Positive feedback.  Huh, haven't seen much of that.  Browsing around here makes me realize how shallow my bag of tricks actually is.

Simulating the circuit in question (with a generic AC voltage source), without the 1K resistor, you get traditional comparator behavior.  Signals above the - terminal voltage swing to V+, Signals below swing to V-.  Without the 10K resistor, you get an output latched at whatever level it happens to start at.  (0V in the simulator, but I imagine it could just as easily be anything.)  With both 1K and 10K, you get 10x gain over the input, tracking the input waveform rather than the square wave you get from an open loop.

Are you building a back-EMF detector by chance?
Logged

0
Offline Offline
Shannon Member
****
Karma: 215
Posts: 12489
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The 10k resistors provide positive feedback to give hysteresis - nothing to do with gain.

If the supply voltage is 5V then the 10k resistors provide a 0.5mA step when the output swings,
and the 1k resistors thus require the motor to provide 500mV to switch back.

The hysteresis voltage is R1/R2 * comparator supply voltage, and its fixed.

If you bypass the 1k resistors you'll get almost no hysteresis as the motor windings will be
a few tens of ohms at most.

[also you may destroy the LM324's if the motor voltage goes too high (from spinning too
fast), the 1k resistors provide some protection against that]
Logged

[ I won't respond to messages, use the forum please ]

Anchorage, AK
Offline Offline
Edison Member
*
Karma: 42
Posts: 1176
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Clearly I have some studying to do.   smiley-sweat
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 259
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the answers! There is still much I need to learn. I'm using those motors to build MIDI controller actually, so I need high sensitivity.
Logged

Pages: [1]   Go Up
Jump to: