Author Topic: Two potentiometers seemingly connected together by their wipers!  (Read 1757 times)

0 Members and 1 Guest are viewing this topic.

Offline heliosphanTopic starter

  • Newbie
  • Posts: 4
  • Country: gb
Hi All,

I'd appreciate some advice for connecting up a set of pedals from a PC steering wheel controller to an Arduino.

So the wheel is an old Logitech Formula Force GP USB device, and it has a set of pedals that connect to the wheel via a cable with an RJ11 connector (4 pins) on the end.

I've confirmed this connection from the pedals is not USB, in fact it's just to a couple of potentiometers inside the pedals, one for brake, one for accelerator.

The wheel connects to the PC via USB and I've confirmed each of the pedals has its own independent 'analog' value when configured to do so.

I've taken the pedals apart to look at the wiring, so I assumed that one wire will be +3.3v or +5v, one will be ground, one will be the brake pot wiper, and the other will be the accel pot wiper. Maaan was I wrong!

There are Red, White, Green and Yellow wires. Each pot left and right sides have their own wires on the cable, brake I think has Red and White, accel is Green and Yellow.

The pots middle connections (I'm assuming the wipers) are both on black wires, and actually connected to each other! I've measured as near enough zero ohms across them.

Somehow the wheel is able to grab an individual pot value from each pedal, and I've no idea how.

I've wired up an Arduino and I can easily get either the brake or accelerator working by connecting up three wires, generally speaking you connect up red and white to + and -, then either green or yellow to the analog in. For the other pot, wire up green and yellow to + and -, then either red or white to the analog in. This works fine but as soon as I try and get both working, I'm having issues.

I tried using digital ins and outs to sink and source each side of the circuit to read that side, and flip between the brake and accelerator by 'energising' each side in synchro with the analog read, no joy but I didn't use any transistors to do so, which I suspect I should, but I'm not sure how to go about doing it.

Nowhere else on the Internet can I find anybody discussing connecting pots together at their wipers and using the other pins to get all the info they need, it's pretty unique from what I can tell.

I'd appreciate some basic circuit designs that'll make this work.

Thanks!
 

Online ledtester

  • Super Contributor
  • ***
  • Posts: 3286
  • Country: us
Re: Two potentiometers seemingly connected together by their wipers!
« Reply #1 on: August 25, 2020, 02:16:12 pm »
Quote
The pots middle connections (I'm assuming the wipers)

I would verify your assumptions. Desolder the wires to the pots if you need to.

Then draw up a schematic - that will make it a lot easier to communicate what is going on and what you're doing.
 

Online tunk

  • Super Contributor
  • ***
  • Posts: 1099
  • Country: no
Re: Two potentiometers seemingly connected together by their wipers!
« Reply #2 on: August 25, 2020, 02:26:35 pm »
Maybe you could open the wheel itself and see how it's connected to an ADC/MCU?
 

Offline heliosphanTopic starter

  • Newbie
  • Posts: 4
  • Country: gb
Re: Two potentiometers seemingly connected together by their wipers!
« Reply #3 on: August 25, 2020, 03:02:17 pm »
Thanks, yes but I don't want to alter the pedals in any way, if I can figure out the existing method of reading them, I can plug it into my Arduino for rudders for my flight sim, then switch it back to the steering wheel for a racing game. I could use it with the steering wheel and only use the pedals, in fact I'm currently doing this, but its a bit of a faff with lots of cables and big boxes.

Fortunately though, there's a simple connector type they use inside that plugs into each pot. I've disconnected them from both pots then continuity tested them all, including the link between the two wiper connections. These are now just wiring, so I'm 99% certain the wires are where I said they go, but as for the three pins on the pots, now that's where I'm not sure the middle pin really means the wiper - I'm not sure.

Sure I can see that visualising the problem is difficult, sorry I can't provide photos as its a sealed unit and I've put it all back together again now for good. I don't want to crack it all open again with it's hundred screws, and the pots themselves are quite small and fragile and they're mounted to the casing in a terribly weak manner!

All I need is for somebody to go about explaining how I can read analog values from two pots using only connections to the + and - sides of both pots, with the 'wipers' interconnected, if that makes any sense. It should be possible as the wheel does it.

Thanks.
 

Offline heliosphanTopic starter

  • Newbie
  • Posts: 4
  • Country: gb
Re: Two potentiometers seemingly connected together by their wipers!
« Reply #4 on: August 25, 2020, 03:27:55 pm »
Actually I came up with a very small schematic, pretty sure this is how its wired up -



Pins 1, 2, 3 and 4 go up the wire to the RJ11 connector. Thats it inside the pedal box.

So if anybody can figure out a decent method of being able to read both Pot values from an Arduino, provide a very basic schematic (I should be able to sort out the code) I'll owe you a beer.

Thanks!

« Last Edit: August 25, 2020, 03:30:37 pm by heliosphan »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13218
Re: Two potentiometers seemingly connected together by their wipers!
« Reply #5 on: August 25, 2020, 04:01:44 pm »
That 'looks' like a resistive touch screen, permanently pressed to the controller.

I had no problems reading two 10K pots so connected using the Adafruit resistive touch screen library: https://github.com/adafruit/Adafruit_TouchScreen specifically the touchscreendemo sketch.

N.B you need to change the X plane resistance (X+ to X-) used to initialize the TouchScreen object from the sketch default of 300 to the pot's total track resistance. 
 
The following users thanked this post: heliosphan

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 4034
  • Country: us
Re: Two potentiometers seemingly connected together by their wipers!
« Reply #6 on: August 25, 2020, 04:04:52 pm »
Try multiplexing.  Apply v+ and GND to pins 1 and 3 with pins 2 and 4 as analog inputs.  Then excite 2 and 4 and measure 1 and 3.

No idea why you would build something like that and there is probably a better way to measure but if you aren't super concerned about update rate this should work.

Edit fixed pinout.
« Last Edit: August 25, 2020, 06:57:23 pm by ejeffrey »
 
The following users thanked this post: heliosphan

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: Two potentiometers seemingly connected together by their wipers!
« Reply #7 on: August 25, 2020, 04:24:38 pm »
That's the ancient "Game Port" method.
Ancient PCs (and sometimes Sound Cards) provided you with a 15pin (standard size) DSUB connector. This connector had some "analog" inputs for pots, and a few digital inputs for buttons or switches. The analog inputs were routed to a simple 555 timer circuit that converted the resistance applied from the analog pin to GND (afair) or VCC into a variable width pulse. Software had to trigger the 555 timer and measure the pulse width to do the "analog to digital" conversion.
Typically a 558 (four 555 in a single package) was used.
So most probably the wipers were connected to GND or VCC, and one end of the pots connected to this kind of "resistance to pulse width converter", while the other end simply was left open.

Anyway, I'm just guessing.
« Last Edit: August 25, 2020, 04:26:21 pm by capt bullshot »
Safety devices hinder evolution
 
The following users thanked this post: heliosphan

Offline FenTiger

  • Regular Contributor
  • *
  • Posts: 88
  • Country: gb
Re: Two potentiometers seemingly connected together by their wipers!
« Reply #8 on: August 25, 2020, 04:44:29 pm »
Maybe something like this would work?
« Last Edit: August 25, 2020, 04:49:00 pm by FenTiger »
 
The following users thanked this post: heliosphan

Offline heliosphanTopic starter

  • Newbie
  • Posts: 4
  • Country: gb
Re: Two potentiometers seemingly connected together by their wipers!
« Reply #9 on: August 26, 2020, 04:11:02 pm »
@FenTiger,

Thanks for putting that together, I'm a bit confused by that schematic. Not sure what a current source and two OpAmps will gain me - was kind've hoping to only use minimal extra components like transistors to try the multiplexing method as per ejeffreys suggestion, but still wouldn't know how to wire them up.

Can you explain how yours works?

Thanks for all the input.
 

Offline grumpydoc

  • Super Contributor
  • ***
  • Posts: 2932
  • Country: gb
Re: Two potentiometers seemingly connected together by their wipers!
« Reply #10 on: August 26, 2020, 04:56:44 pm »
Try multiplexing.  Apply v+ and GND to pins 1 and 3 with pins 2 and 4 as analog inputs.  Then excite 2 and 4 and measure 1 and 3.

No idea why you would build something like that and there is probably a better way to measure but if you aren't super concerned about update rate this should work.

Edit fixed pinout.

If I understand your suggestion this means reading one pot wiper voltage "through" the other pot - so you will have 0-25k between the voltage that you want and the A2D (?) input. Wouldn't matter if the analogue input had a suitably high resistance but it sounds potentially (sorry) a bit high to get an accurate reading from a typical microcontroller A2D input. Just looking at a random data sheet suggests an analogue source resistance in the order of 2.5k is the spec.
 

Offline FenTiger

  • Regular Contributor
  • *
  • Posts: 88
  • Country: gb
Re: Two potentiometers seemingly connected together by their wipers!
« Reply #11 on: August 26, 2020, 05:07:41 pm »
(Hmm. This might be a bit easier to explain if I'd numbered the four sense resistors.)

The idea is that the amplifier inputs are high impedance, and so the current entering at the top, the current that flows between the two wipers, and the current leaving to ground at the bottom are all the same.

Looking at the top half: the total current flowing in the top two sense resistors is constant, regardless of the position of the wiper. If it's all the way to the left then most of it flows through the left hand resistor; if it's all the way to the right, most of it flows through the right hand resistor. The position of the pot thus shows up as the difference between the voltages at the upper amp's inputs.

The bottom half works the same way: the sum of the currents is equal, and independent of the position of the upper pot, but their ratio depends on the position of the lower pot.

Perhaps the op-amp symbol is a bit misleading; they're meant to be differential amplifiers, and you won't want an op-amp's full open loop gain in practice, so you'll want to add some resistors there to reduce their gain to something realistic.

The outputs of the two amps would connect to two analogue inputs on your Arduino.

I don't actually know if it would work. It was just a quick thought.
 

Online mikerj

  • Super Contributor
  • ***
  • Posts: 3384
  • Country: gb
Re: Two potentiometers seemingly connected together by their wipers!
« Reply #12 on: August 26, 2020, 05:09:41 pm »
If I understand your suggestion this means reading one pot wiper voltage "through" the other pot - so you will have 0-25k between the voltage that you want and the A2D (?) input. Wouldn't matter if the analogue input had a suitably high resistance but it sounds potentially (sorry) a bit high to get an accurate reading from a typical microcontroller A2D input. Just looking at a random data sheet suggests an analogue source resistance in the order of 2.5k is the spec.

The Atmega328 has a very high ADC input impedance (~100Mohms) but it will take a gulp of current during acquisition to charge the internal sample cap.  A low value capacitor on the ADC pin can help with this, provided a suitable delay is used to ensure the cap is charged.  Since the cap will have to be charged/discharged by the GPIOs when powering one of the pots for measurement it should kept low in value, maybe a few nF.
 

Online ledtester

  • Super Contributor
  • ***
  • Posts: 3286
  • Country: us
Re: Two potentiometers seemingly connected together by their wipers!
« Reply #13 on: August 26, 2020, 06:22:05 pm »
If you don't care about compatibility, just break the connection between the two middle pins and bring out your own connector. You can also break the connection with a switch to retain compatibility with the original Logitech steering wheel.

ejeffery's idea would also work.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf