Position Sensor Drift/Voltage Spike

random spike with pot

Do you have a breadboard?
Can you fit in your potentiometer in that breadboard?

Why is soldering (by far the most reliable method) not allowed?

Wrapping with hot glue is not a method I would rely on.

Can we have a picture of your setup?

What else is connected to your arduino?

Is there large motors, large coils, welding machines, plasma generators or anything else like that nearby?

Did you put a 100 nF capacitor from the wiper to ground?

What value is your potentiometer?

Your link does not link to a potentiometer...

The link works for me, but that thingy is not a potentiometer...

Potentiometers have a value. Usually around 10kOhm for cases like this. They are available in several types: log, semilog, linear. You probably want a lin version...

Usually this info is somewhere printed on the housing... otherwise you can measure with a dmm.

Time to share your code, a schematic and a picture...

In my opinion, this has everything to do with not soldering wires to your position sensor. The contact resistance between the wire and the terminal of the sensor can change suddenly for many reasons including slight movements, changes in temperature or humidity, EMI from the environment, etc. Also, intermittency will get worse over time as the wire builds up a layer of oxidization on the surface.

If the project truly calls for no soldering, then you should try to find a creative solution to get you around that requirement. For example, is it that there is no soldering in the whole project, or just no soldering to the sensor? Can you solder the wires to a plug, then plug the pins of the sensor in to the wire for example, using something like https://www.digikey.com/en/products/detail/sparkfun-electronics/PRT-14322/7364982 )?

There is also another (old) technology known as wire wrap ( Wire wrap - Wikipedia ), which involves a tool that wraps a single wire around a terminal or post many times. This is an option for you, but you may need to find an old timer that still remembers what wire wrap even is, and also has the tool to do the wire wrapping.

I feel pretty confident that your problem is in the contact between your sensor and the wire, you just really need to focus on a way to make a solid connection there without violating the constraints of the project. Even something like a Wago connector might do the trick ( https://www.amazon.com/gp/product/B07NKSHVF6/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 ).

Send pictures of your setup so we can see if there is something obvious that you can try!

Using a larger wire isn't really going to help. Its actually based on the surface area of the wire because there is only a connection where the surface of the wire touches the terminal. In fact, you might be better off using a smaller wire (think 28AWG or smaller) just so you can make more wraps and get more surface area to make contact. If I recall, wire wrap usually uses something pretty small like 28 or so.

Do you have the recommended 1k to 10k load resistor installed?
Do you have a 100nF (or so) ceramic capacitor from input pin to GND to bypass noise?

Well, first, make sure ALL connections are clean, tight and secure, then...

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.