#88 Digital Potentiometer aka Volume Control - Easy (X9C103)

preview_player
Показать описание
If you ever wanted to adjust a circuit using a digital version of a potentiometer (variable resistor) controlled by an Arduino then this is the easy way to do it - and at a price that won't break the bank either.

Even better, it remembers the last setting if you switch it off, but do watch the video for some caveats of this feature.

It would be straightforward to use an infrared remote control to control the volume, for example, of an amplifier by using one of these devices.

There are only three control wires and of course the three wires that represent the variable resistor too.

In my GitHub there's a link to the PDF for this device (I'm using the 10K version - X9C103, but other values are available, see the video for more details).

Also, of course, there are the two demo sketches I use, simplicity itself and ones that a beginner could easily use.

If you like this video please give it a thumbs up, share it and if you're not already subscribed please do so :)

My channel is here:
------------------------------------------------------------------
------------------------------------------------------------------
How can I remember this? Memory tip: "See" Ralph Bacon, geddit?
Рекомендации по теме
Комментарии
Автор

Hello Ralph😊Been researching these beasts, you vid was pointed to me after watching ´GreatScott’ Chanel about the same topic….but your’s precedes his by 4 YEARS ! And I must say🤫🤐I preferred yours😊, Complete and concise and ´What I was looking for’ !! Thanx👍🏻

flashcorp
Автор

Hi Ralph, nice seeing your channel growing; this was a very good and thorough tut. Thanks for the videos.

ronalddhs
Автор

well after watching this one...I'm SUBBED and now I have allot of catching up to do...I hope all you're vids are detailed like this...even the simplest broken down explanation is beneficial to new people like me...I'd rather watch a long, all inclusive video than fifteen, 2 min vids and still have not a clue....hope your channel grows like a bean stalk...if it's all like this one it deserves to. thanks for taking the time to put it together. a zoomed view of code screens would be great for us mobile users. thanks Shaun

MyBigThing
Автор

If Benny don't slow down on these projects, I'll never catch up! Never mind Ralph, keep'em coming!

danljohnston
Автор

always a pleasure to watch your videos. I had these ICs in my ebay wishlist and now i'll take the plunge.

Friendroid
Автор

@Maurits I can't reply to your comment (I've tried a dozen times now) and YouTube says no! What I tried to post was: Yes, there is Maurits, just keep the INC line LOW whilst you bring the CS line HIGH. This brings the device into standby mode but doesn't write back the current value to non-volatile RAM. Sounds like an interesting project you have in mind there!

RalphBacon
Автор

nice video. It's given me an idea for a mod for my DIY bench power supply.

maxximumb
Автор

Hello! Your sketches are one of the cleanest and most elegant source codes that I've seen. I was a programming teacher and dev professional for 1.5 decades. I stopped doing that for the same period, now I have to "go back". I'm using Digital Pot for Cruise Control in my converted EV. Sometimes the chip does not respond to "up and down" buttons and some times the Nano does not obey to anything. If I "reflash" (upload) the compiled code to the Nano, it all works again. Why is that? I'm using the same pot chip, but another code.

hectorruiz
Автор

Keep in mind for an audio volume control you normally use logarithmic taper potentiometers. As such using this 100 position linear digital pot will be limiting in usefulness. Remapping and jumping in logarithmic steps will help but you won't end up with many steps or much range. A higher resolution digital pot is recommended.

ElmerFuddGun
Автор

I have 2 of the following units. I plan to build a dual output power supply
where the outputs are floating in respect to each other so they could be
used separately or in series...

I have a 20A, 1.2v to 36v 300W Buck converter with separate pots
for adjusting volts and amps..
The control chip has it's label sanded off, but I found info that
the chip might be a LM5116, if that datasheet would help. But the
datasheet does not give an example of this type of supply.

The board uses 20 turn screw adjust pots on the PCB.
The picture shows 104 pots, but the unit came with 503 pots.
I do not know what volts are applied to the pots,
but assume it is within their limits.

So if I want 2 supplies to be floating and controlled by i2c from
the same esp32, that means I need each digital pot to be opto-isolated,
to control them using i2c.

I plan to control it with a esp32 that fetches values from json.
Then it measures the output volts with an ADC to ensure output
matches requested value..

Is there a digital pot that fits my use case?

Or would the voltages at the POTs be able to be PWM controlled,
eliminating the need for a digital pot?

Could I replace the original pots with a opto-isolator that
I can send PWM control into to adjust volts and amps?
This seems like the simplest solution if it works at all..

WagonLoads
Автор

I tried using a Dpot on the output of a waveform generator project I did for a college class last year to make the output amplitude adjustable. Strangely, I found that the version that is sold on the board with the caps was frequency sensitive. When the output sine wave frequency increased the the amplitude decreased. I assumed it had something to do with the presence of the caps ( perhaps a low pass filter effect?) because I repeated the setup with a stand alone X9C103 that I inserted into the circuit and there was no attenuation with change in frequency.

So now I'm building an audio power amp for fun and I want to put a volume control on it so it doesn't turn on crazy loud if the input happens to be high. I can use an old school audio pot no problem but I'm thinking about a Dpot again because 1) this is a portfolio builder project and 2) Great Scott has a video where he demos how to hack a hard drive to create a rotary encoder. The amp is built and works great. I'm in the process of building a case for the components and now is the time to figure out the volume control. I'm thinking nano to interpret the encoder and to drive a Dpot but I'm a little worried about the frequency sensitivity thing I encountered last year. I'm encouraged that you are recommending these for audio applications. I'm wondering what is the purpose of the caps on the X9C103 board?

hummusdude
Автор

The problem with digital pots is limits on voltage levels and
if you want to control 2 devices that could have a potential difference
of 100's or 1000's of volts between unit 1 and unit 2..

There are a ton of videos on how to control a servo with a pot,
but what if you want to turn a pot with a servo?
I don't know what kind of link to get..
Are there servo to (1/4 inch pot round shaft) adapters?

My only thought is to use a continuous rotation servo to turn a 10 turn pot.

WagonLoads
Автор

Hi Ralph,
Whats IDE are you using? Eclipse for Arduino? looks better then the tradicional IDE.

agaelema
Автор

I have just ordered 10 of the 8 pin DIL version for £4-45 from Ebay . I used them many many
years ago, perhaps when they first became available ( when I expect they cost a lot more ).

alanknight
Автор

Im a new subscriber due to you detailed vids.
I have a question, i have a 8 ch amplifire and wanted to use digi pots like the one you just tought me about. Could i use 1 arduino to control 8 of these modules. Thanks

mahlonkarpaiya
Автор

Hi ralph, can the adder circuit use a variable resistor to replace the existing potter in the adder circuit??

luthfiajjabbar
Автор

About he changing of volume all the time. With this digital pot meter driving and amplifier and a microphone measuring the average decibels it should be possible to sort of keep the volume sort of the same (normalized) automatically? It would be great for those noisy you tube adds. Thinking about that, If it were that easy we would have normalizing audio drivers in windows there days I guess.

hansdegroot
Автор

I initially though to use two of them to implement a "precise" timing for a 555 in astable mode (well, more precise than with analog potentiometer), but given the low amperage they can drive, so extra elements needed to add, I will probably go with a crystal and digital counters for a much better precision.

They can probably be used with a shunt voltage regulator (such as the TL431), since they will be in parallel to the main current, their limitation will be less of a problem there, and then I could easily obtain a "relatively precise" (digitally controllable and stable) voltage output.

snnwstt
Автор

I just bought 5 of these for that same price but its the IC's and surface mounts too, looking forward to having a play.

thepvporg
Автор

SO, if you choose not to store the resistance value with the CS pin HIGH, What value does the Chips wiper reset to each time? VL (0), half way or VH +5V?

NeonblueIndustries