Controlling a potentiometer (not reading it!)

I want to use an arduino to control a potentiometer.
My idea is to take a video game controller and let the arduino control it's trigger button.

The trigger button is a potentiometer and I want to know if anyone has a good idea of a way to control it.
It doesn't have to be too accurate, perhaps just create 2 or 3 different levels of resistance.

My first idea is to use a handful of relays and resistors to override the potentiometer's resistance at various amounts but perhaps there's a tidier way?

I've heard of a chip called a digital potentiometer but have zero knowledge about that.

I suggest you google "digital potentiometer" and learn something.

First non-ad hit:

Unless you need one that goes to 11, those are extra.

Boom, ordered. That'll do nicely.

I guess I'll put it.. in.. series.. with the other pot.

That's right isn't it?

entozoon:
Boom, ordered. That’ll do nicely.

I guess I’ll put it… in… series… with the other pot.

That’s right isn’t it?

You need to put it in place of the other pot. Otherwise you’ll get the average of the two pots.

Also, digital pots can’t have the pins exposed to voltages higher than the chip’s Vcc or lower than Gnd, so make sure you don’t do that.

Yeah but no but why can't I just keep both ?

Because they will affect each other. If the current pot is set to 0 ohms, no setting of the digital pot will affect it. Use a switch to switch between them.

@DrAzzy Surely not,
If you have resistors in series, the total resistance is the two values added together, not an average.

@KeithRB If the current pot is 0 ohms, then it's just like a wire, right? So the total resistance would be the value of the digital pot in series.

Fine, Don't believe us. Try it.

entozoon:
@DrAzzy Surely not,
If you have resistors in series, the total resistance is the two values added together, not an average.

Sorry, I thought you said in parallel - because connecting that in series wouldn’t make sense, when you’ve got two three-pin devices and a single line going to the output. I don’t know how you’re planning to connect them, but it’s not going to work - you need some way to switch between them, otherwise the output of the two pots will fight eachother.

Lol Keith, love the drama!
I will give it all a go, here to learn after all. Learn by doing as they say.

Perhaps my understanding of potentiometers is a little off.. I thought I could do something as simple as:

Hope you enjoy my amazingly bad diagram abilities

What you drew depicts the pot in parallel with R1, not in series, and R1 in series with R2.

Where does the wire the contoller measures to figure out the position of the control stick come from? Have you looked at the wiring it has now and traced it out?

Usually for analog game controls, they connect the ends of dthe potentiometer to Vcc and Ground - and then measure the voltage on the wiper - so they use all three pins…

Nah, the picture of the pot on the right is R1.. just to show how I'd wire it. Sorry again, it's a bad diagram.

I didn't realise controller pots measure the wiper voltage like that - now I understand what you meant earlier about using all three pins.

Since when is a trigger button a potentiometer?

Einen Schaltplan vom XBOX Controller habe ich bisher nicht gesehen,
aber das Foto des Innenlebens könnte vielleicht helfen.

Einen Schaltplan vom XBOX Controller habe ich bisher nicht gesehen,
aber das Foto des Innenlebens könnte vielleicht helfen.

Ah, this clarifies everything. :smiley:

Haha brilliant.
Well, the trigger button is a potentiometer. We're talking about the squeezable trigger on the back of the xbox controller, which uses a potentiometer like this: