Adding a resistor to a PWM cable?

Hi! I need to a add a resistor to a PWM cable, would I just add the resistor to the red cable (power)? Just want to clarify.

That really depends on why you need to add a resistor to the PWM cable. Care to explain?

It’s a potentiometer that’s overheating quite a bit.

Can you describe how you’re wiring it? It sounds like something’s trying to draw a lot of current, which should not be the case.

You probably don’t want to do this. It is a viable solution to your problem, but it will severely limit your range of input values on an already noisy sensor.

A potentiometer is a voltage divider. It divides voltage V_out (signal) = V_in * R_top / (R_top + R_bottom). You can change how the resistor divides voltage by spinning the knob, which changes how much of the total resistance is allocated to R_top and R_bottom.

For shorthand now that we’re getting to power calculations, let the total resistance be R_pot = R_top + R_bottom.

The total power dissipated in your potentiometer is P = IV = P = V^2 / R. If you add a resistor in series here, then it becomes V^2 / (R_pot + Rseries). However, note how this changes the voltage divider equation: V_out = V_in * (R_top + Rseries) / (R_top + R_bottom) if on the top side, and R_out = V_in * (R_top) / (R_top + R_bottom + Rseries) if you put it on the ground side. In either case, you lose Rseries / R_pot of the range. For this series resistor to have any serious effect on the power draw, it would have to be fairly large relative to the potentiometer resistance R_pot, meaning that you’re losing a good amount of range and thus resolution.

Of course, if you’re on a time crunch or can’t spare the $0.50 for a pot at the hobby shop, and only care that you know 2048 different positions instead of 4096, go wild.

TL;DR if your potentiometer is heating up, get a larger value potentiometer, which will reduce power draw without limiting range.

3 Likes

Also if your pot is spending most of it’s time at one extreme, and that happens to be the 0 ohm side you might be able to mitigate the problem by switching the legs that are connected so that instead of it sitting at 0 and increasing the resistance to measure it’s sitting at max and reducing the resistance.

Seems odd that it’s getting enough current to make it warm though, my gut says this is a symptom of something else being set up wrong.

^^ what @dydx said. For FRC robots and other 5V systems, 10kΩ is commonly used, which will draw 0.5mA and only dissipate 2.5mW, assuming you’re using the potentiometer in the usual fashion (+5V and 0V at the ends, with the sweep going to the Analog signal Input). Even at 1kΩ, it’s only a quarter watt. With the wire lengths in FRC, you shouldn’t need a lower impedance than that.

How have you connected the potentiometer?

Are you are connecting it to the Roborio it to sense the position of an arm? If so, refer to figure 1 in this document. You would connect your PWM cable to one of the one of the Analog Inputs (section 16). Follow the cable from the Roborio out to your potentiometer.

One of the outside terminals of the potentiometer should connect to the Roborio pin with the Ground symbol. The other outside terminal of the potentiometer should connect to the middle “5V” pin on the Roborio. The middle terminal of the potentiometer should connect to the “S” pin on the Roborio.

If you have connected the middle terminal of the potentiometer to either the 5V or Ground pins of the Roborio, you can make the potentiometer get hot.

2 Likes

It’s a 25k potentiometer

Either you have the potentiometer wired wrong or you’re doing something else that’s heating it up (that is, not electrically). @philso has a wiring guide up there.

And just to be clear, the pot you’re using is a simple ~ 3/4 turn pot, that looks something like this https://en.m.wikipedia.org/wiki/Potentiometer#/media/File%3APotentiometer.jpg rather than a pot whose shaft turns more than one full rotation? There are less common multi-turn pots whose electrical connections are different.

Normally a pot is connected power to one side, ground to the other end, and the signal is taken from the middle.

I bet you have power or ground in the middle, which is incorrect and will cause overheating.

Also note @GeeTwo comment below: Verify the pin-out of YOUR component.

1 Like

Expanding on what @garyk said: on most partial-turn potentiometers, the sweep is the middle terminal. On most full-turn potentiometers, it’s the one farthest from the handle. To be sure, put the potentiometer in approximately the middle position, and measure the resistances from A-B, B-C, and C-A. The terminal which is NOT involved in the greatest resistance is the sweep. The sum of the two smaller resistances should be roughly equal to the largest*.

Like @DonRotolo and others above, I suspect that you have one of the voltages connected to the sweep, and the other voltage connected to the terminal near the sweep when the elevator is in the position where the arm/lift spends most of its time (likely the bottom). If this is not the case, it’s time to look for shorts.

* [added] Oh, by the way: if the two smaller resistances aren’t approximately equal (within say 50% of each other), verify that your potentiometer has a “linear taper” as opposed to an “audio taper”. Audio taper is logarithmic in nature, and great for controlling a stereo or similar amplifier, but for mechanical feedback for an arm or lift, whether FRC or otherwise, you want a linear taper.

It is not incorrectly done, I’ve connected PWM cables before - ground, signal, and power, in that order. It is not that. I’ve also added a resistor to the power side with no results. What could this be?

Please post some photos of the potentiometer showing the wiring and the wires going into the Roborio.

Potentiometers are pretty simple devices. There is no other way to make it heat up other than connecting it incorrectly as I described in my previous post or something else is heating it up as @dydx is suggesting.

And the connector is plugged into an Analog Input of the roboRIO, with the white wire to the inside of the roboRIO, lined up with the S symbol? Forgive me if you’ve done this a thousand times before, we’re puzzled by the overheating. And please unplug that connector and with your multimeter, ohms scale, measure the resistance between the red and black pins on your PWM connector. After that, please turn the pot about halfway and tell us the resistance from the white wire to black, and again from white to red.

PWM cables should be ground, power, signal, in that order. You have power and signal swapped.

That is usually the correct order for potentiometers of less than one full turn. Most multi-turn potentiometers have the sweep/signal pin at the end away from the knob, not the one in the middle. Set the potentiometer to mid-stroke and measure the resistances to be sure.

image

While the cable may be wired correctly, plugging it in backwards results in the Wiper of the pot connected to 5 volts instead of the sense input to the roboRio. Use a multimeter and measure the voltage on each terminal on the pot with reference to the negative lead of the battery. Only the outside terminal of the pot should have 5 volts. the center terminal should only have 5 volts when the shaft is turned all the way to one end.
Just as a check, you said the pot is 25K. What is the marking on the pot? Is it perhaps 25K0?