problem with potenciometers and diy simrig
what should i do about this? a0 should be gas, a1 should be brake and a2 should be clutch, but only the a0 is working i guess and it somehow changes the value of all 3 analog ports
23 Replies
the pedals cable


im sorry for the bad wiring
If you're running long wires, you can have "crosstalk" between the wires in the cable. Analog signals like potentiometers are particularly susceptible to this.
My suggestion would be to keep that cable as short as possible, getting your length/distance from PC from the Arduino's usb-B cable.
Your solder joints there also look really suspect, they'd need at LEAST a check with a multimeter to make sure none are shorted
got a wiring diagram/schematic?
oh yes i got one
wait
sorry for the late response
something like tis

ok ill try to charge my 9v battery to run the multimeter
so maybe the problem is that the cable is almost my size
That's a reasonable wiring diagram but you're running a LONG cable
The symptoms you were seeing look a lot like floating analog inputs, but with wires this long you'll probably have problems regardless
Using the multimeter on continuity mode (or resistance mode) you can check to see if your solder joints are good, but... from the video they look sketchy at best
You want the solder to "wet" the thing being soldered, and be shiny and relatively flat
Lemme get an inage
i thought it was okay with a long cable because its one of those internet cables
it might be fine, but it'll be somewhat sketchy because of "crosstalk"
Long cables, like ethernet cables, only work because they use differential signaling where the difference between the voltages of two wires is measured. you're technically doing "single-ended" stuff where it's being measured referenced to ground
This is the solder wetting I was mentioning

Lemme get a video to show what it looks like as it happens
I think you were getting the lower of the 3

GreatScott!
YouTube
How to Solder properly || Through-hole (THT) & Surface-mount (SMD)
Support me for more videos: https://www.patreon.com/GreatScott
Previous video: https://youtu.be/69G522AeRq8
Facebook: https://www.facebook.com/greatscottlab
Twitter: https://twitter.com/GreatScottLab
Tools/Materials that I recommend (Affiliate Links):
Aliexpress:
Soldering Station: -
Solder (0.5mm): https://s.click.aliexpress.com/e/_dWS2USx
So...
This is a timestamped video showing solder actually "wetting" to the copper
note how it looks a lot like water sticking to paper in a way
good solder joints should not be possible to scrape off
The pins of this connector look good, as in the "data" pins
The ground pin is a little dubious though, you would need to try and "scrape" it off to see
I'd also check this side of the USB connector's GND

none of the gnd (white cable) cables seems like can be removed or scraped, its not coming of
tl;dr: check ALL of your connections using your muiltimeter (make sure wires are connected where they should be AND not connected where they shouldn't)
If everything checks out, try it with shorter wires for a test and see if it works then
when using scrap/dubious lengths of wire you always need to test it with something to make sure it's unbroken. A meter, an LED, etc.
that's a good sign, means the solder probably "took" pretty well
ngl
now i know why my electrical enginner friend has some white hair in his 20s
man, jumper connectors would make my life SOO much easier
me with my anger issues trying to make this work, its just making the voices order me to break everything :skullcry:
If you're using ethernet cable like I suspect, sometimes that stuff is solid core wire. You can stick that into the "pins" of the Arduino boards just fine
If it's stranded wire, then for quick tests you can sometimes tin the strands with solder to make a solid mass, but it can be hard to make the strand blob small enough to go into the holes.
Also can lead to stresses that make the wire snap off in the hole on the Arduino, which is annoying to remove from said hole
Personally, 20-gauge tin-coated copper "hookup" wire is my go-to. Works in breadboards, works in Arduinos.
Not great for things that move (solid core wire doesn't like to bend as easily as stranded), but it works
I bought this YEARS ago and it's still going strong

and can verify that it plugs into Arduino boards (Unos) just fine
My bad, this is #22 gauge not #20 gauge
It might be more efficient to use screw terminals instead of soldering for something like wiring a USB plug.
This USB plug has five screw terminals for easily plugging in wires - and the terminals are removable from the plug!
https://www.adafruit.com/product/3628
USB-A Male Plug to 5-pin Terminal Block
This is the USB-A Male Plug to 5-pin Terminal Block. If you need to connect to a device with a USB Jack, maybe make your own USB stick or custom cable of sorts - this adapter will ...