Making a VEX pot

How would I make a potentiometer for VEX? I saw some potentiometers at Radio Shack but I don’t know where to start. It’d be nice to make these in abundance and readily available to FIRSTers until VexLabs builds some. :smiley:

Well you can always start at http://www.potentiometer.com/ for homemade potentiometers. I think they have PWM out. Tell me how this turns out.

I asked this same question.
Sanddrag made a great suggestion and the result is in that post as well. I did make a few refinements after the post was made that really helped stabilize the system performance. It is called a Tie-wrap . I placed a small tie-wrap around the heat shrink on both the square shaft and the pot shaft. It drastically reduced the slipping.
A couple hints: 1) Get pots with very little rotational resistance. 2) Place the two shaft ends as close together as possible.
I also found “Spider” couplers from Jameco. The problem with them is that they introduce play. Not a good idea when trying to position something.

Surely it’s because I’m a bit daft, but what exactly is the question? Is it how to interface a potentiometer shaft to a vex shaft? Or how to connect a pot to the Vex controller? How to assemble a ready-made pot for Vex folks to use? Or something completely different?

I’m not trying to be sarcastic or anything - I’m just puzzled as to what problem you’re trying to solve :confused:

Don

Yeah… due to my lack of knowledge of many things like electrical parts and sensors I don’t know the exact questions I want to ask. I think all of those apply. :o

OK, then. Lesson Time. :smiley:

A potentiometer is merely a variable resistor. Most pots (as they are called) are rotational (the kind you turn, like a volume control), but there are other types, such as linear (which move in a straight line), pressure-sensitive, bend-sensitive, and more. We’ll talk about rotational here, but this applies to other types as well; the differences are mechanical and not electrical.

Pots vary their resistance according to the angle you turn its shaft. The resistance versus the angle can have either a Linear or Audio taper. Linear has a constant relationship to the angle: each ten degrees of turn equals xxx ohms. Audio has a (essentially) logarithmic relationship: for the first ten degrees it varies xxx ohms, the next about twice that, and so on.

When you want to measure movement on a robot, you use a Linear pot.

Most pots will have about 330 degrees of mechanical rotation, almost a full turn, with about 270 degrees of electrical rotation, where the electrical (resistance) values actually change, about 3/4 of a turn. Some pots have full 360 degree rotation, some 90 degree rotation (the joysticks use these, for example), and there are many variations available. You select what you need based on mechanical requirements.

Pots come in different resistance values. The value is the maximum resistance that the pot can have when the shaft is turned to a maximum. Of course, when you turn it to a minimum, the resistance is at or near zero. For a Vex controller, you want to use a pot with a value of about 2000 or 2500 Ohms, but values up to about 10,000 (10k) Ohms can be used.

Too low a value allows too much electrical current to flow through the pot, exceeding the capability of the Vex controller to supply current. Too high a value does not allow enough current to flow, allowing electrical noise to dominate the desired signal.

Pots are also rated by how many Watts they can safely dissipate: This shouldn’t be a concern in this case, but anything less than 2 watts is fine. No harm with larger values, but these tend to be expensive and large. I use 1/2 watt pots that cost about a dollar.

Pots have three terminals: The ones at each end are connected across the resistance material inside the pot, and the terminal in the middle is connected to the ‘wiper’, the little brush-like thing that moves across the resistance material as you turn the shaft. This means that the resistance varies between one of the end terminals and the center terminal (from near zero to the maximum) as you turn the shaft.

So, if you connect the left-most terminal and the center terminal to an ohm meter, the resistance will increase as you turn the shaft clockwise. If you connect the right-most terminal and the center terminal, the resistance will decrease as you turn the shaft clockwise.

To connect a potentiometer to a Vex controller, you need three wires: one on each terminal. To measure the pot’s resistance at a certain position, you put a voltage across the entire resistance and then measure the voltage at an in-between point. What you do is put a voltage across the two outer terminals, and use the center terminal to measure the voltage the wiper ‘sees’ at that point in the rotation. This voltage varies between about 0 volts to about whatever voltage you are supplying.

From the Vex controller, the black wire is Ground (0 volts), the Red wire is +5 volts, and the white wire is the return signal. You must set up the controller “Analog/Digital” port as an Analog Input (I suggest Port 1).

Make a PWM-type cable that plugs into the Vex controller on one end, and connects to the pot on the other end. The black wire goes to one end of the pot, the red to the other end, and the white to the middle. If you find the value increases when you turn the shaft in a certain direction and you want it to decrease instead, just swap the red and black wires on the pot.

The terminals on the Vex controller can’t be changed around, so make sure you use a Vex sensor (like a bump switch) to see which side gets the black wire and which gets the white. The red is always in the middle.

As you get the analog input value in your program, you will see it vary between about 0 and about 1024. This can be used to do something in your program.

That’s the electrical part of the info. To interface a typical pot’s 1/4" round shaft to a Vex 1/8" square shaft, you can:

  • Make a square hole to round hole adapter of some type
  • Cut a 1/8 slot in the shaft, put in the axle, and tape/glue/heat-shrink it in place
  • Glue them so they rotate together (but might not be durable)
  • File the end of the pot shaft to a 1/8" square shaft
  • Or anything else you might think of

Good luck, and ask more questions now that you have some basic info.

Don