# detect increasing or deacreasing pot output

#### Sumit Aich

Joined Dec 3, 2016
100
I want to detect whether potentiometer output voltage is increasing or decreasing and convert this to a digital signal.
the circuit must be able to sense tiny voltage changes (order of 10mV) and with high speed.
all im interested is if Vout increases or decreases not by how much
increasing V =high output
decreasing or stable V =low output
how can i achieve this?

#### Alec_t

Joined Sep 17, 2013
11,526
How rapidly does the pot output change?

#### shteii01

Joined Feb 19, 2010
4,644

#### GopherT

Joined Nov 23, 2012
8,012
I want to detect whether potentiometer output voltage is increasing or decreasing and convert this to a digital signal.
the circuit must be able to sense tiny voltage changes (order of 10mV) and with high speed.
all im interested is if Vout increases or decreases not by how much
increasing V =high output
decreasing or stable V =low output
how can i achieve this?
How long do you want the output to stay low or high? Until the next change? Only while it is changing? What level does it stay at while the pot position is not changing?

#### AnalogKid

Joined Aug 1, 2013
8,536
Analog comparator with an R-C delay into one input.

ak

#### Sumit Aich

Joined Dec 3, 2016
100
How long do you want the output to stay low or high? Until the next change? Only while it is changing? What level does it stay at while the pot position is not changing?
increasing V =high output (stays high until V stops increasing )
decreasing or stable V =low output (stays low until V starts increasing)

#### Sumit Aich

Joined Dec 3, 2016
100

#### MrChips

Joined Oct 2, 2009
21,666
Interesting problem.

Build a peak detect circuit with an opamp, diode and capacitor.
Detect when the capacitor is charging. Discharge the capacitor with a resistor across the capacitor with the appropriate RC time-constant.

#### Alec_t

Joined Sep 17, 2013
11,526
What are the max and min output voltages from the pot?
What power supply is available for the detection circuit?

#### Sumit Aich

Joined Dec 3, 2016
100
What are the max and min output voltages from the pot?
What power supply is available for the detection circuit?
max Vout =+10v
min Vout =+5V
power supplly =10vdc (from ac-dc power adapter 10v , 2amp)

#### Sumit Aich

Joined Dec 3, 2016
100
will this circuit work , how do i improve it

#### AnalogKid

Joined Aug 1, 2013
8,536
Your overall approach is a good start, but it needs adjustments to make up for real world components.

You need a slight DC bias difference between the two input pins. With your circuit now, when the input is not changing, both inputs are exactly the same, and the output will not be the same every time. Depending on the input offset voltage, it might be high, low, or a noise burst.

Besides a bias difference, you will need a better comparator. You want to detect a change as small as 10 mV, but the 339 internal errors add up to more than that.

ak

#### Sumit Aich

Joined Dec 3, 2016
100
Besides a bias difference, you will need a better comparator. You want to detect a change as small as 10 mV, but the 339 internal errors add up to more than that.
can you suggest a better comparator(of same cost give or take)

#### Sumit Aich

Joined Dec 3, 2016
100
You need a slight DC bias difference between the two input pins.
will this work

#### crutschow

Joined Mar 14, 2008
25,267
Below is the LTspice simulation of my take on a circuit.
It uses an opamp differentiator circuit to convert the slope change into about a 1V step signal to minimize offset effects. This goes to an opamp comparator circuit to give the desired positive pulse output for a positive slope on the input, and zero volts otherwise.

#### Attachments

• 2.3 KB Views: 1
Last edited:

#### Sumit Aich

Joined Dec 3, 2016
100
thanks boss

#### Sumit Aich

Joined Dec 3, 2016
100
Below is the LTspice simulation of my take on a circuit.
It uses an opamp differentiator circuit to convert the slope change into about a 1V step signal to minimize offset effects. This goes to an opamp comparator circuit to give the desired positive pulse output for a positive slope on the input, and zero volts otherwise.

View attachment 116463
but in my case Vin is not a Voltage source.
will this circuit work for pot output

#### Sumit Aich

Joined Dec 3, 2016
100
this circuit will detect the slew rate of the voltage from the pot. It will not detect slow changes of absolute voltage.
is this alright

#### Alec_t

Joined Sep 17, 2013
11,526
That circuit won't detect the polarity of the voltage change.

#### crutschow

Joined Mar 14, 2008
25,267
but in my case Vin is not a Voltage source.
will this circuit work for pot output
Yes, it will work with a pot output.
Your pot outputs a voltage, thus it is a voltage source (with a maximum series equivalent resistance equal to 1/4 of the pot resistance).
What is the pot resistance?
The voltage source in the simulation just simulates the change in pot output voltage.