Rotary encoder without a micro

Discussion in 'The Projects Forum' started by Gregfox, Oct 5, 2013.

  1. Gregfox

    Thread Starter Member

    Jul 23, 2011
    Well, I finally finished my project of making a 0 to 15V battery powered lab supply. It's powered by 4 Li-oN batteries and will turn it's self off if the voltage gets too low(10V) I has low ripple and current limiting, and I use it all the time.
    I’ve included the last schematic, and picture.
    Now onward, I want to do three things.
    1. I want to replace the two 10 turn pots with rotary encoder, without using a micro controller.
    2. When that’s complete I want to again improve the design by replacing the two meters with a single volt/amp meter
    3. Add a Parallax P8X32A microcontroller to run the encoders, and maybe a little ADC action.
    Step 1, does anyone know of a way to interface an encoder to a digital pot without a micro?
    Step 2. I found a meter that does both.
    Step 3. Later.
  2. MaxHeadRoom


    Jul 18, 2013
    To what end??
    Gregfox likes this.
  3. Metalmann

    Active Member

    Dec 8, 2012
    You built that from scratch?

    Great job!
  4. Gregfox

    Thread Starter Member

    Jul 23, 2011
    To what end? Life is one big exercise. If you stop you will atrophy.
    I want to see if it’s possible. I can easily do it with a micro, there’s lots of code out there, but doing it in straight digital is a challenge.
    Yes I built it myself with much design help from Kris Blue.
  5. JohnInTX


    Jun 26, 2012
    Its possible. If you are using an absolute encoder, you could decode its outputs to a DAC to generate the target voltage. For a quadrature (relative) encoder, you only get a count and direction indication. You could use this with up/down counters to drive a DAC but... why?

    It really doesn't fit. You want to replace an analog solution (10 turn pots) with a digital one but not use a microcontroller because its too easy. But.. once you go digital, you're digital for the most part and shouldn't you employ a realistic approach to the problem?

    I appreciate your grit, but anyone can make a problem harder. It takes talent to arrive at a simple and elegant solution.

    If you still think a uC is too easy, consider adding things like ballistics to the encoder i.e. big changes to the output when turning fast and trim changes when turning slow. Maybe add a trimmer to the ADC to be added to the DAC output for tweaking the output. Add soft-start, current detection/limiting and programability.

    Now its hard.

    Have fun!

    EDIT: If you insist and are using a quadrature encoder, use one of the phases as the up/down input to a counter. Use the other phase to clock the counter. Turn one way it counts up. Turn the other way it counts down, assuming you've debounced, schmidt-triggered the count clock etc. etc. Need more bits? Buy more counters.
    Last edited: Oct 5, 2013
  6. strantor

    AAC Fanatic!

    Oct 3, 2010
    I recently saw a post here where someone used an encoder interface chip that decodes the direction and outputs two separate pulse channels;one for up and one for down. Seems like this could easily interfaced with a digipot. I can't remember where I saw that. If I find it again, I'll post it.
    Edit; here you go:
  7. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    Let's see... a 10 turn pot has ten turns, and each turn must have at least 72 "states" or a distinct resistance for every 5 degrees (guesstimate) making 720 states in a 10 turn pot... and I would also guess that is a very low estimate.

    The digital pots I've seen have 256 states. back feed that iknto the 10 turn pot yields a state every 14 degrees... which is a very crude pot.
    strantor likes this.
  8. strantor

    AAC Fanatic!

    Oct 3, 2010
    Agreed. IMO the traditional pot is the best solution, but OP wants something else. Resolution requirements have not been stated. OP, do you need more than 256 steps of resolution?
  9. Gregfox

    Thread Starter Member

    Jul 23, 2011
    Thank you, that was precisely what I was looking for.
    Remember, in a 10 turn pot there is a fair amount of play, no so with an encoder.
    Thanks again.
  10. Gregfox

    Thread Starter Member

    Jul 23, 2011
    My friend who repairs commercial robots had a LS7184 he gave me. I wired it up and it works great.
    strantor likes this.
  11. MemT

    New Member

    Mar 1, 2013
    hello, some time ago i used a rotary encoder to make aun up/down counter with out micro, it only took two 74LS191, debouncing (offcourse), and a F`F to know where is turning, there shematics are also in my post, hope it helps.