Go Down

### Topic: Comparator, rotary encoder and resistors (Read 2543 times)previous topic - next topic

#### kustom

##### Sep 18, 2013, 02:58 pm
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?

#### johnwasser

#1
##### Sep 18, 2013, 03:46 pm
The 1K and 10K resistors set the amplifier gain to 10 (multiply the signal by 10).
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

#### kustom

#2
##### Sep 18, 2013, 03:55 pm
Thanks. What are the electronic consequences of removing 1k resistors?

#### SirNickity

#3
##### Sep 18, 2013, 10:37 pm
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?

#### MarkT

#4
##### Sep 19, 2013, 02:34 am
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]
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

#### SirNickity

#5
##### Sep 19, 2013, 02:51 am
Clearly I have some studying to do.

#### kustom

#6
##### Sep 19, 2013, 12:38 pm
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.

Go Up

Please enter a valid email to subscribe

### Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy