So my students are still struggle with potentiometers and before suggesting some extreme measures, I’d though I’d try to ask teams here for their experience and suggestions.
They have RD4B with a one potentiometer on each side. Left goes to analog2, right to analog3. They use that for driving the RD4B lift, including compensation for uneven lift. This approach worked well for them, their code is well tested and reliable.
But they get frequent issues with the right pot - The readout value oscilates between the expected value and a nonsensical reading of typically around 250 (they have them mounted that the full working range of RD4B is between 1200-3200 on both pots).
This only happens on the right pot.
We have tried replacing the pot - worked better (not 100%) for some time, but we’re at 5th new pot.
We have tried replacing the cable (there is just one 36" extension between the brain and the pot).
They now have 2 layers of filtering in place (1st layer - replace recognized bad value with the value from the other side, 2nd layer - average 4 readings), but still observe really bad jitter on the lift (I have yet to verify their filtering).
(Note: This is all with a brand new pot that was never pushed out of its working range. Not even close to the edge of the range)
We have a datalog (unfortunately I don’t have a png, just the CSV this time) from the last matchload practice, where the left pot was showing perfect smooth curves, while the right looked literally like a comb. Thanks to the filtering, both the driver and their automation is still mostly able to use the lift, but it’s frustrating. We can’t replace the pot for every match, can we?
Possible extreme measures:
a) Abandon balacing, only use left pot for PID
b) Add extra pot or two to the right side, pick more reasonable value
c) Keep replacing the pots with new ( we’ve got few new packs for words, at least pots are cheap)
So, are there any known issues with pots, analog ports or something (like there is this interrupt thing with digital4 vs. digital10)?
They have most of analog ports used - 5 pots, gyro, voltage feedback from expander.
Any suggestions how to avoid this class of problems?
Datalog sample (5th row is the right pot, 6th is left, lift was moving down):
1945, 20.110, 73 , 127 , 1728 , 1797...
1946, 20.120, -44 , 10 , 1771 , 1785...
1947, 20.130, -44 , 10 , 1886 , 1776...
1948, 20.140, -54 , 0 , 270 , 1769...
1949, 20.150, -54 , 0 , 250 , 1763...
1950, 20.160, -54 , 0 , 1862 , 1760...
1951, 20.170, -40 , -34 , 702 , 1758...
1952, 20.180, -40 , -34 , 648 , 1756...
1953, 20.190, -10 , -4 , 1839 , 1752...
1954, 20.200, -10 , -4 , 1771 , 1746...
1955, 20.210, -10 , -4 , 1063 , 1740...
1956, 20.220, 73 , 127 , 249 , 1730...
1957, 20.230, 73 , 127 , 1846 , 1726...
1958, 20.240, -62 , -52 , 342 , 1720...
1959, 20.250, -62 , -52 , 586 , 1718...
1960, 20.260, 55 , 109 , 1392 , 1711...
1961, 20.270, 55 , 109 , 1812 , 1700...
1962, 20.280, 55 , 109 , 1563 , 1699...
1963, 20.290, 73 , 127 , 776 , 1694...