Two potentiometers seemingly connected together by their wipers! - Page 1
Forum section: electronics / projects

author: heliosphan
author_rank: Newbie
timestamp: August 25, 2020, 01:04:13 pm
content: 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 isnotUSB, 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!

author: ledtester
author_rank: Super Contributor
timestamp: August 25, 2020, 02:16:12 pm
content: QuoteI 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.

author: tunk
author_rank: Super Contributor
timestamp: August 25, 2020, 02:26:35 pm
content: Maybe you could open the wheel itself and see how it's connected to an ADC/MCU?

author: heliosphan
author_rank: Newbie
timestamp: August 25, 2020, 03:02:17 pm
content: 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.

author: heliosphan
author_rank: Newbie
timestamp: August 25, 2020, 03:27:55 pm
content: 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!

author: Ian.M
author_rank: Super Contributor
timestamp: August 25, 2020, 04:01:44 pm
content: 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_TouchScreenspecifically 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.

author: ejeffrey
author_rank: Super Contributor
timestamp: August 25, 2020, 04:04:52 pm
content: 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.

author: capt bullshot
author_rank: Super Contributor
timestamp: August 25, 2020, 04:24:38 pm
content: 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.

author: FenTiger
author_rank: Regular Contributor
timestamp: August 25, 2020, 04:44:29 pm
content: Maybe something like this would work?

author: heliosphan
author_rank: Newbie
timestamp: August 26, 2020, 04:11:02 pm
content: @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.

author: grumpydoc
author_rank: Super Contributor
timestamp: August 26, 2020, 04:56:44 pm
content: Quote from: ejeffrey on August 25, 2020, 04:04:52 pmIf 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.

author: FenTiger
author_rank: Regular Contributor
timestamp: August 26, 2020, 05:07:41 pm
content: (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.

author: mikerj
author_rank: Super Contributor
timestamp: August 26, 2020, 05:09:41 pm
content: Quote from: grumpydoc on August 26, 2020, 04:56:44 pmThe 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.

author: ledtester
author_rank: Super Contributor
timestamp: August 26, 2020, 06:22:05 pm
content: 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.