Im getting some interference on my waterproof DS18B20 sensor due to relays etc and want to add a capacitor to help solve this, now everywhere i look it says to add it at the sensor side but my sensor is encapsulated as its waterproof...
Shoud i then add the capacitor at the arduino end?
How long is your cable? Are you using parasite mode?
Its 2m long and its not using that mode, powered by 5v
The best way to eliminate noise is from the source - hopefully your relays are Not powered from the Arduino, and have diodes across the coils. Power and signal wires separated.
You can try the capacitor at both ends , Arduino end or at the termination of your sender . I’d probably put say 10 microfarad electrolytic and 0.1 microfarad across the power supply at the end that works !