Digital Potentiometer and Rotary Encoder Direct Control X9C103

Поделиться
HTML-код
  • Опубликовано: 12 дек 2024

Комментарии • 51

  • @GnuReligion
    @GnuReligion 6 лет назад +5

    Excellent! I did not have the imagination to figure that one wiper would clock, and the other determine the direction. So simple. Seem to remember from the datasheet that it allows you to elect if it keeps its setting on power-down? Yes, this is sweet.
    Now, thinking that you can use your dual-D's and a 2-channel switch (maybe a CD4066B) that sets levels on several X9Cxx chips with the same (expensive) rotary encoder, and a few inexpensive buttons -- all without using an MCU. May be good for something like a PWM generator that uses multiple resistance values -- frequency, amplitude, duty cycle etc.

    • @GadgetReboot
      @GadgetReboot  6 лет назад +1

      Yeah it took me a while to realize we don’t really need a circuit as long as we’re only controlling one device at a time and we don’t care about Chip select we just keep the thing enabled. I forgot to mention in the video that I was keeping chip select enabled and we would need another way to control that if we wanted multiple devices.

    • @annybodykila
      @annybodykila Год назад +1

      Could wire the encoder press button to a binary counter and use the output of the counter as chip select. Then its easy to add or remove devices, as you just wire (number of devices + 1) to reset of counter.

    • @GnuReligion
      @GnuReligion Год назад +1

      @@annybodykila Hmm, like a CD4017 decade counter, where Q0 is no device, and Q9 resets, to select 0 to 8 devices? Some debounce circuitry, indicator LEDS, and maybe even one of those cheap 3-digit voltage meters, that would be a useful device.

  • @sreejith5319
    @sreejith5319 4 года назад +9

    How good this can be for audio applications? Any signal quality losses?

  •  6 лет назад +4

    Nice scope shots of the (de)bounce.
    Have seen a similar circuit to drive a binary counter from a rotary encoder.
    Maybe the target application of this digipot is to replace a (expensive) multiturn potentiometer with a (cheaper) rotary encoder.

    • @GadgetReboot
      @GadgetReboot  6 лет назад +1

      Yeah I never thought of this as a multi turn pot. My encoder has 20 detents per revolution so this is a five turn pot with 100 positions on the digital pot.

  • @pileofstuff
    @pileofstuff 6 лет назад +1

    Nice demonstration.
    Much cleaner then my mess of jumper wires when I tried to demonstrate the digital pot chip.

    • @GadgetReboot
      @GadgetReboot  6 лет назад +1

      I don’t think I saw that video. I will have to go search it out. You should see the mess of wires and other things on the work bench outside the video frame. I really need to do something about that it’s been building up for half a year.

    • @pileofstuff
      @pileofstuff 6 лет назад +1

      I like to think that everyone's shop is a jumbled mess just outside the camera's view. I know mine is.
      I didn’t do a separate video about the digital pots, it's part of my Dec 17 (2017) mailbag Monday.

    • @MusicalBox
      @MusicalBox 5 лет назад

      Guys, it is reassuring to know that beyond the 1920 x 1080 pixels of relative cleanness I see in your videos, there is a mess that looks the same as the one I have on my own bench :D

  • @mac_uk5464
    @mac_uk5464 3 года назад +1

    I know you said no CPU's but you could use a Tiny 85 or something, that would give you software debounce & you could set the resistance increments to 1 decoder click?.

    • @GadgetReboot
      @GadgetReboot  3 года назад

      yeah a small cheap processor is always more practical and robust but it’s always a fun exercise to think about other ways, and then maybe those other ways can lead to other ideas for different projects too.

  • @JohnEastonFishTecCharts
    @JohnEastonFishTecCharts Год назад +1

    AWESOME!!!! Thank you

  • @dhanjeetchetia282
    @dhanjeetchetia282 4 года назад +1

    Very good solution to replace mechanical pot. What addition to be done for control multiple digital pot connected with same bus. Please replay.

    • @GadgetReboot
      @GadgetReboot  4 года назад

      if multiple pots are going to be controlled separately with one encoder, the target pot would have its chip select controlled some way in order to select which one the encoder controls at the time and the up down and increment pins of all the pots would be connected in parallel.
      if all the pots are intended to be controlled simultaneously by the one encoder, all of the increment and up down pins are still connected in parallel and all the chip selects are permanently enabled so all the pots respond at the same time.

    • @dhanjeetchetia282
      @dhanjeetchetia282 4 года назад

      @@GadgetReboot Thanks a lot, any circuit/codes available with you, to control 4nos of digital potentiometer individually with single encoder.

  • @djbablu633
    @djbablu633 4 года назад +1

    How to control the X9C103 digital potentiometer directly from a rotary encoder with optional switch debouncing I want this conding pless reply me

  • @funatall20s
    @funatall20s 6 лет назад +1

    I'm trying to replace a 24v step-up converter's pot with a digital pot so that the user can select the voltage digitally via program instead of manually. I don't know if I make sense but is that possible?(converter is connected to the VCC of arduino and terminates to a 3-24v buzzer)

    • @GadgetReboot
      @GadgetReboot  6 лет назад +1

      The two limiting factors would be the maximum voltage allowed across the terminals of a digital pot as well as the maximum wiper current allowed. If I remember properly, the maximum voltage across this digital pot is +/-5 V and the maximum current allowed through the wiper is about a little over 4 mA.
      I was thinking about doing something similar but when I put a volt meter across the terminals of the existing trimmer pot on the regulator, the voltage was beyond this safe value so I couldn’t do it, but other circuits may work differently. So you could do a quick test measuring the voltage across the pot as you adjust the converter through its range and see what the maximum voltage is across the terminals on the pot.

  • @madhukeshnp
    @madhukeshnp 5 лет назад +1

    HELLO !!
    There are 3 resistors on board of the rotary encoder. I am using the same module as you are using. So even though we have those resistors , should we use the 1k and 100ohm resistor ? What is the actual function of the on board resistor ?

    • @GadgetReboot
      @GadgetReboot  5 лет назад +2

      The three resistors on the encoder are 10K pull ups for Clock, data, and the push button switch to give us our logic high signal or ground when the switch is closed. So when using the encoder we don’t need the external pull up 10 K resistors but it wouldn’t hurt anything it would just be in parallel with the encoder resistors and end up giving a 5K pull up resistance.
      We do need the 100 ohm because that combined with the capacitor provides the debouncing and filtering on the mechanical switches to give us a filtered output instead of all kinds of bouncing high and low signals so it’s a different function than the pull up.

    • @madhukeshnp
      @madhukeshnp 5 лет назад

      @@GadgetReboot thank u for the detailed explanation 😊

    • @madhukeshnp
      @madhukeshnp 5 лет назад

      @@GadgetReboot I used the same schematic with the nodemcu. But the reading is not stable . The output is jumping around. I am trying to dim a light with the rotary encoder. But not with the digital potentiometer. Is this schematic only for digital pot ??? or can be used for other purposes ??

    • @GadgetReboot
      @GadgetReboot  5 лет назад

      This schematic happens to work with the digital pot because of the way the two controls work on the digital pot. Increasing or decreasing the digital pot with the two available signals directly matches how the rotary encoder outputs look and we just denounce the switches with the resistor and capacitor.
      If you were connecting the encoder to nodeMCU and using software to look at the two encoder signals, you shouldn’t need that extra resistor and capacitor for de bouncing, it should be done in software.
      And software will also need to look at the encoder signals to determine if it is moving and in which direction. A library like this makes it easy to use the encoder.
      github.com/PaulStoffregen/Encoder

    • @madhukeshnp
      @madhukeshnp 5 лет назад

      @@GadgetReboot Yes. I tried it before with the software and couldn't achive a better result. So i tried your schematic to achive a better results. I went to the link you have provided and there is pic where in they have used capacitors. I guess its a must to have for debouncing. 😕

  • @Electronieks
    @Electronieks 5 лет назад +1

    If you switch power off , is de wiper in memory when you restart the power?

    • @GadgetReboot
      @GadgetReboot  5 лет назад

      To store the wiper position, the data sheet shows what state certain pins have to be in before powering down, otherwise it will just put the wiper at whatever was previously properly stored.

    • @Electronieks
      @Electronieks 5 лет назад +1

      @@GadgetReboot so you have to initialisate the potmeter on forehand ... okay...
      ( kind of preset , and then never use the memory to store)

    • @GadgetReboot
      @GadgetReboot  5 лет назад +1

      The device would only be able to handle so many memory storage operations as well so it’s not really intended to be used regularly to store position, more like a calibration that will stay the same for a long time.
      So when I use it I make sure when I power up I configure the wiper to the position I will want and then I tweak it if needed.
      That means the circuit needs to be able to tolerate the resistance value changing and going possibly close to minimum or close to maximum resistance as part of the wiper adjustment process and not all circuits will want that so these potentiometers have to be used with that in mind. Rather than being a drop in replacement for a regular pot they are more like their own unique device.

    • @Electronieks
      @Electronieks 5 лет назад +2

      @@GadgetReboot indeed , if you have volume control , that the default position is stored at 50% for once and always for ever

  • @howellschan
    @howellschan 4 года назад +1

    nicely explained, thanks

  • @matthewurquiza6591
    @matthewurquiza6591 3 года назад

    would a schmitt trigger work as a de-bouncer also?

    • @GadgetReboot
      @GadgetReboot  3 года назад

      It would just help make a single edge itself less likely to re-trigger on noisy inputs as they rise and fall, but a delay is still needed for debounce to check much later after a transition and be sure it's still in that state.

    • @matthewurquiza6591
      @matthewurquiza6591 3 года назад

      @@GadgetReboot got ya

  • @dwalden74
    @dwalden74 5 лет назад +1

    Can you please post a link to the code for this project?

    • @GadgetReboot
      @GadgetReboot  5 лет назад +3

      There is no code because there is no processor. The whole purpose was to use a rotary encoder just in hardware hooked directly to the digital pot so you turn the knob and it changes the pot wiper all in hardware.

    • @ccook31
      @ccook31 3 года назад

      @@GadgetReboot ... yes.. and can we get the pcb layout, parts list, guitar tab, and lyrics?...I'm also lactose intolerant in case that makes a difference. please and thank you

    • @slashing_S
      @slashing_S 3 года назад

      @@ccook31 Lmaoooo, people really be doing him like that 😂

  • @electronic7979
    @electronic7979 6 лет назад

    Excellent

  • @bangunsetyoanggoro6156
    @bangunsetyoanggoro6156 3 года назад

    How many res ohm per pulse Man..
    Thx

    • @GadgetReboot
      @GadgetReboot  3 года назад

      There are 100 wiper position taps, so depending what pot value is used, divide by 100 and that's the resistance change per pulse. With mine being 100K pots, it changes 1K per pulse.

    • @bangunsetyoanggoro6156
      @bangunsetyoanggoro6156 3 года назад

      @@GadgetReboot well.. That is Very weak resolution

  • @electroumit
    @electroumit 4 года назад

    Thank you.

  • @t1d100
    @t1d100 Год назад

    Interesting.

  • @nazarenosantos8811
    @nazarenosantos8811 2 года назад

    Muito bom...