Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Detect increasing or decreasing pot output

  1. Dec 5, 2016 #1
    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?
     
  2. jcsd
  3. Dec 5, 2016 #2

    Nidum

    User Avatar
    Science Advisor
    Gold Member

    Easiest is convert the incoming voltage signal to digital as first operation . Then use some simple software to compare latest sample with previous sample . Usually best to do comparison using values averaged over several sequential samples rather than just spot values .

    Any of the low cost single board computers available now with on board ADC could be used to do this .

    Just for interest this was done in older times using an analog drift comparator . Using only op amps and RLC circuitry the short term average value of the test signal was compared with the rolling longer term average .
     
    Last edited: Dec 5, 2016
  4. Dec 5, 2016 #3
    is there any alternative to adc, i dont want to use a microcontroller.
    will a data slicer opamp circuit do the job ?
     
    Last edited: Dec 5, 2016
  5. Dec 5, 2016 #4
    will this circuit work , how do i improve it

    ads.png
     
    Last edited: Dec 5, 2016
  6. Dec 5, 2016 #5

    berkeman

    User Avatar

    Staff: Mentor

    You should be using feedback in pretty much any opamp circuit. Look up "opamp differentiator" to find what you are looking for... :smile:
     
  7. Dec 5, 2016 #6

    Baluncore

    User Avatar
    Science Advisor

    Your example circuit will oscillate and amplify any supply noise.

    A differentiator circuit will detect the slew rate of the voltage from the pot. It will not detect slow changes of absolute voltage.
    You need to use a window detector. https://en.wikipedia.org/wiki/Window_detector
    The LM339 is a comparator with a positive internal feedback of a few mV.
    It also has open collector outputs that can perform a negative-logic wired-OR function.

    Window_1.png
     
  8. Dec 5, 2016 #7

    davenn

    User Avatar
    Science Advisor
    Gold Member

    well, for a start, the DC voltage from the pot isn't going to go through C1

    you said you wanted a digital signal ... that isn't going to produce it
    You need an ADC chip followed by a microprocessor to work on that data or use a PIC or micro of your choice that has an ADC built in


    D
     
  9. Dec 6, 2016 #8

    Baluncore

    User Avatar
    Science Advisor

    My previous post assumed you wanted to detect any change. "detect increasing or decreasing pot output".
    This circuit only detects a rising voltage.
    If you must do it with analogue then you must also specify how you will signal that the voltage is stable. In this circuit you press a momentary switch to load the input set voltage into C1.
    How the circuit works.
    If not yet buffered, this circuit uses op-amp U1 to buffer the potentiometer output voltage.
    Q1 and R1 with the +5V supply makes a current sink of about 440uA. The 440uA flows through resistor R2=47R and so drops about 20mV from the buffered input voltage.
    That slightly lower input voltage is compared with the set voltage. If the input rises by more than 20mV then the comparator U2 output goes high. U2 must have very low input bias current so it needs to be a CMOS or JFET input comparator or possibly an op-amp.
    Changing the value of R2 will set the rise above the set voltage before detection. R2 can also be adjusted to compensate for the offset voltage of U2. Maybe R2 should be a 200 ohm trimpot.

    window_2.png
     
  10. Dec 6, 2016 #9
    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.
    upload_2016_12_5_14_57_45.png
     
  11. Dec 6, 2016 #10
    That circuit won't detect the polarity of the voltage change.
     
  12. Dec 6, 2016 #11

    Baluncore

    User Avatar
    Science Advisor

    True, my first circuit actually detects both polarities of change, then ORs them together. If you separate the outputs you get two independent outputs, one for a rise, the other for a fall.

    You wanted to detect a tiny step change as small as 10mV but you have not specified what positive slew rate you want to detect. Is it +10mV/second?
     
  13. Dec 6, 2016 #12
    positive slew rate is +10mV/0.1s = +100mV/s
     
  14. Dec 6, 2016 #13

    berkeman

    User Avatar

    Staff: Mentor

    It would help us a lot if you would post what the heck you are trying to do. In engineering, we start with specifications on the circuit performance. You are making us guess what you want to do, which is not a good thing. I will close this thread until you PM me what your goal is and what your circuit specifications are. I will re-open the thread then so you can post that for others to be able to help you better.
     
  15. Dec 8, 2016 #14

    berkeman

    User Avatar

    Staff: Mentor

    After a PM conversation, the thread is re-opened. The OP will post more information to help us help him with this project... :smile:
     
  16. Dec 8, 2016 #15
    project details --
    pot rotating clockwise (from any initial angular position)=high output
    pot rotating anti clockwise (from any initial angular position)=low output
    pot not rotating (stable at any angular position)=low output
     
  17. Dec 8, 2016 #16
    my rotatory pot has stops
     
  18. Dec 8, 2016 #17

    berkeman

    User Avatar

    Staff: Mentor

    So talk about using an opamp differentiator circuit followed by some other circuitry. What would that look like, and how would you design it to reject noise and have the desired logic level output?
     
  19. Dec 8, 2016 #18

    Baluncore

    User Avatar
    Science Advisor

    I have three specific questions.
    What sense of rotation increases the pot output voltage ?
    Do you want to detect the positive or the negative voltage changes from the pot ?
    Does the detected situation produce a high or low voltage output from the circuit ?
     
  20. Dec 8, 2016 #19
    resistance of pot is 50k
    that will require the addition of a buffer at the pot output to handle the maximum equivalent pot output impedance of 12.5k.
    The modified circuit is shown below:
    The added buffer at the pot output is configured as an inverter since the LM324 has a maximum output of about 9V when used as a non-inverting buffer and a 10V supply.can i use lm358 in place of lm324?

    upload_2016_12_6_21_11_45.png
     
  21. Dec 8, 2016 #20
    pot rotating clockwise (from any initial angular position)=increasing voltage = high output
    pot rotating anti clockwise (from any initial angular position)=decreasing voltage=low output
    pot not rotating (stable at any angular position)=stable voltage=low output
    i want to detect the positive voltage changes from the pot
    detected situation produce a high voltage output from the circuit
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted