inexpensive string potentiometer

All sensor specific discussions! Temperature, pressure, steering angle, brake and throttle, etc. Post adaptations of OEM-style sensors, and also your clever DIY hacks and custom designs here too!

Moderators: JeffC, rdoherty, stieg

Post Reply
jakekooser
Posts: 64
Joined: Wed Apr 16, 2014 11:03 am
Location: Florida
Contact:

inexpensive string potentiometer

Post by jakekooser »

Going to give this a shot http://www.andymark.com/product-p/am-2674.htm after I tried building my own unsuccessfully because the reel I used was too rough. Also going to try and print a case and reel on my 3D printer eventually, since the files are free.

Using it for throttle position initially, and if it works, steering position.

rdoherty
Posts: 215
Joined: Fri Mar 08, 2013 3:32 am

Post by rdoherty »

Awesome, let us know how it goes!
Ryan Doherty
Autosports Labs

jakekooser
Posts: 64
Joined: Wed Apr 16, 2014 11:03 am
Location: Florida
Contact:

Post by jakekooser »

Got the string pots in and built them. You basically take apart an existing reel for the string and the spring and build it along with the pot in their new housing. It's pretty slick. I made a bracket to mount it to my intake manifold and got it hooked up.

I'm only seeing a difference of 1/4 volt though. At closed throttle, I see .73 / .74 flickering and at full throttle, I see .9 volts. I set up a map with the first two blocks filled in with .73 equal to 0 and .9 in the second block equal to 100, with the remaining boxes 1.1, 1.2, and 1.3 equal to 100. That appears to work, but when I started the engine, the voltage at closed throttle jumped up to .8 which really blew my whole idea.

I am running this through the sensor breakout board, which according to the instructions has pull-up resistors in it already.

Does what I'm describing sound correct? I'm not sure how I will calibrate this if the voltage jumps up with the engine running. Also, the sweep part of the gauge on the dashboard goes full scale very early, is that adjustable?

toga94m
Posts: 127
Joined: Wed Jun 05, 2013 1:57 am
Location: Upstate NY

Post by toga94m »

How do you have it wired? The terminal furthest from the shaft is the output (goes to RCP's input channel), while the other two should go to common and your reference volts (+5V). Wired like this, there should be no change when the car starts/stops. If you're coming off the battery voltage, it might bounce around like you're seeing.

Those pots (we use them at work) are 10-turns, so make sure you're mechanically using as much of the pot / string travel as possible. If the pot shaft is only getting turned 1 turn, you're only going to see 1/10th of the voltage range you'd expect. Their webpage says their string is about 27" long, but the spool is 3" circumference so you've got 30" of string travel (if their string was longer) for 0V-5V signal out of the pot.

If you're connecting to the same pickup point on the throttlebody as the throttle pedal cable, you're probably only moving about 2" length (guessing based on throttle cable cranks I've seen lately). So you're getting about 8% of the available 0-5V range. If you can shrink the spool diameter at the pot, or put a larger diameter wheel on the throttlebody mount, that'd help. Or if you can mount a single-turn pot right on the throttlebody, that'd be the best. Throttleplate is only going to have about 90 degrees rotation from closed to wide open.

For people looking to buy just the 10-turn 5k pot, that exact same part (Bourns 3590S-2-502L) is $8.95 at Jameco, or $7.75 at onlinecomponents.com vs $12 here. But I love their 3d-printed housing - $40 complete is a great alternative to pro stringpots.
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC

jakekooser
Posts: 64
Joined: Wed Apr 16, 2014 11:03 am
Location: Florida
Contact:

Post by jakekooser »

I have it wired correctly, just as you describe. There is not a lot of movement of the string, that is for sure. I am feeding it from the sensorX board from our hosts with 5VDC, ground, and the signal is passing through that board to the RCP. I've attached a photo of the mounting and the throttle itself, there's not much chance of mounting something to that shaft that I can see. This might not be a good application for this device. It would be nice to figure out if I can get TPS information from my pre-OBD motronic ECU without angering the system.

can't upload a file for some reason, here are some photos of the pot and my setup https://www.dropbox.com/sh/cswwyr49xt7k ... naI8a?dl=0

toga94m
Posts: 127
Joined: Wed Jun 05, 2013 1:57 am
Location: Upstate NY

Post by toga94m »

If the throttlebody already has an electrical TPS on it, have you tried hooking that to the RCP input, assuming it stays in the 0-5V range? You'd only need 2 wires, as you wouldn't be feeding the 5V ref out to their sensor. The RCP won't blow anything up that way, but it might load down the signal slightly, which might confuse the existing ECU slightly.

You can check it out with key on/engine off, just to be safe. Take voltage measurements on the TPS with throttle closed and wide open, then power off & hook the wire to the RCP, and repeat the tests. If the voltages aren't affected, you're golden - just need to set scaling in RCP.

This will work best if the RCP and ECU have their power commons tied together to a single point, so there's no voltage drop between different grounds, due to current flowing in the ground wiring.
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC

toga94m
Posts: 127
Joined: Wed Jun 05, 2013 1:57 am
Location: Upstate NY

Post by toga94m »

jakekooser wrote:I am running this through the sensor breakout board, which according to the instructions has pull-up resistors in it already.
I just saw this... the stringpot sensor (and other things that require the 5V supply) won't need the 2.2k resistors offered with the SensorX. Those are for passive 2-wire sensors like a temperature sensor, which is really just a resistor that varies value with temperature. The 10-turn pot gives you 0-100% of the applied 5V reference voltage based on position.

The RCP schematic shows an analog input will apply about 15kohm load to common. But without knowing what your existing ECU's TPS is made of, I don't know how much the RCP additional load will affect the ECU's understanding of throttle position.
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC

jakekooser
Posts: 64
Joined: Wed Apr 16, 2014 11:03 am
Location: Florida
Contact:

Post by jakekooser »

Throttle Switches
The original Motronic ECU has two throttle switches rather than a variable potentiometer. These switches tell
the ECU whether the throttle is either fully open or fully closed. Using these two settings, you can force the
ECU to use a separate 2D map for fuel quantity and ignition timing whenever the throttle is fully open or fully
closed.
It looks like I'm bunked on using the existing TPS, since it's not really a TPS but a pair of switches. Can't quite afford to go nuts with fuel injection upgrades right now, so I'll try eliminating the pull-up resistor tomorrow and playing with the calibration.

toga94m
Posts: 127
Joined: Wed Jun 05, 2013 1:57 am
Location: Upstate NY

Post by toga94m »

Yeah - as I was looking around for Porsche info, I realized it might be like the first gen Miata 1.6l engines - an idle switch and a WOT switch, not a true linear TPS. Our Miata solution was to upsize to a new throttlebody with a true TPS. I think in your case you might do well to just wrap the string right to the pot shaft (smaller diameter), which will get you more pot turns for a given string deflection.

Or you might be able to add a larger lever arm on the throttle crank (to get more string travel), but it's going to be some wierd trigonometry to convert crank angle to string length (= pot volts to RCP) unless you can add a circular section to the throttle shaft.

(edit) Looks like your string is attached to a threaded hole in the throttle shaft actuator. Just below it is a second threaded hole. If you put a 6" long straight plate on there, with a new string pickup hole at the far end, you'd get a lot more string travel for your 90-degree throttle shaft rotation. Still not the full 30" of travel, but better than the <1" you're getting now. I'd go as long as you can without scraping the inside of the hood/trunklid. Might have to make a little clearance on the stringpot mounting bracket too, so the string has space to move since it'll be angled higher up.
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC

jakekooser
Posts: 64
Joined: Wed Apr 16, 2014 11:03 am
Location: Florida
Contact:

Post by jakekooser »

I saw the second hole in one of the pictures, too. I can probably whip something up and trim that mount, I left it oversize for some weather protection. Going to be interesting to see how much lever I can get in there without getting into the A/C condenser (ultimately, it's a street car in Florida).

I'm guessing the accuracy goes up with the amount of travel we're able to get, correct?

toga94m
Posts: 127
Joined: Wed Jun 05, 2013 1:57 am
Location: Upstate NY

Post by toga94m »

jakekooser wrote:I saw the second hole in one of the pictures, too. I can probably whip something up and trim that mount, I left it oversize for some weather protection. Going to be interesting to see how much lever I can get in there without getting into the A/C condenser (ultimately, it's a street car in Florida).

I'm guessing the accuracy goes up with the amount of travel we're able to get, correct?
Yeah.. the trimpot itself is analog, but still has resolution limits (0.025% for the 5k part) because it's wirewound instead of a cermet film http://files.andymark.com/am-2619.pdf
The A/D input of the RCP is going to be the limiting factor, if you're only feeding it a small portion of its range. It digitizes 0-5V at 12-bit (1/4096) resolution.. so one bit step equals 1.22mV (5v/4096).

If your original mechanical setup moves 1" of a 30" string, that's 3% of the full 0-5V range so let's say you're sending 1.00V-1.15V to the RCP input.. so you'd be covering 150mV/1.22mV = 122 bits out of 4096 possible A/D readings. That's still enough to give you a unique number reading for each 1% of throttle travel, but it'll be jumpy/sensitive. If you can extend the crank arm so the string moves further out from the throttle shaft, say from 1" to 6" length, then you'll increase string travel and therefore resolution 6x. If you can remount the stringpot lower on the engine, you could have the arm pointing more horizontal and still get a lot of travel.

7-bit resolution (1 in 128) sounds crappy, but it's enough to resolve 1% changes. How accurate do you really need to know throttle position?
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC

jakekooser
Posts: 64
Joined: Wed Apr 16, 2014 11:03 am
Location: Florida
Contact:

Post by jakekooser »

toga,

I have one of these as well: http://www.etisystems.com/mh22.asp in 3 turns, 5Kohm. I haven't had a chance to look at the lever yet, but would having fewer turns and the same 5K value help the resolution? Might go for a combination of the two.

Thanks

toga94m
Posts: 127
Joined: Wed Jun 05, 2013 1:57 am
Location: Upstate NY

Post by toga94m »

Yep, that would help! The full voltage range (0-100%) is set by the full range of the pot. If that's 10 revolutions and you're only turning 1/2 turn, then you're using 5% of the available range (string length). If you switch to a 3-turn pot, and your string moves it 1/2 turn, suddenly you're using 16% of the full range - 3x better resolution.

3 turns on the 3" circumference stringpot spool gives you about 9" of usable string travel. If you can also change the crank arm on the throttle shaft to something longer, so you use more of that 9" string travel, you make things even better.
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC

jakekooser
Posts: 64
Joined: Wed Apr 16, 2014 11:03 am
Location: Florida
Contact:

Post by jakekooser »

Cool, that should help. I'm not really unhappy about the way it is working currently, but then I remembered I had that pot and wondered if it could make it more stable. I'll rebuild that string pot with the 3-turn one and give it a try.

Thanks again.

cyotani
Posts: 13
Joined: Thu Mar 05, 2015 3:22 pm
Location: United States

Post by cyotani »

Thanks for sharing this! I'm going to give it a try as a steering angle sensor.

Post Reply