i have resistor based sensor, when i test it using arduino connect to PC using serial monitor without sharing ground to other circuit it has a nice value between 300-650 in adc range and the error/ accuracy reading just have about 5 value (ex: 607-612) if there is no condition change in the sensor.

But the problem comes when i sharing the ground to the other circuit. The accuracy is messed up bigger than 60 adc value (570-660) with the same condition without sharing ground.

My circuit is powered by PSU 24V and 24V driver to produce input signal for electric pressure regulator. The arduino ground is sharing because to control the input of the 24V driver. Here my circuit in the attachment.

So there is two ground from PC (i need it to use serial monitor) and the PSU 24V

How to eliminate the noise? Is there any way to control the 24v driver and read the sensor at the same time without sharing ground? Maybe using two controller with master/slave? Or there is any advice?my circuit

  • You could use an opto-coupler between the arduino and driver. Then you don't need to have a common ground. I'd also try putting a 1-10kOhm resistor between the arduino output and driver input.
    – Gerben
    Nov 2, 2018 at 16:04
  • What you have shown in the schematic is insufficient in determining your problem and a possible fix. What needs to be seen is exactly where are the wires are run to and from. The exact routing of the wires. And a schematic does not show that.
    – Rudy
    Dec 2, 2018 at 22:15
  • Can you tell me what Arduino board you are using? Uno, Nano, etc. And what sensor.
    – Rudy
    Dec 2, 2018 at 23:05
  • I had the same problem with communication between a Rasberry Pi and an Arduino Mega. Ultimately I solved the problem by powering the Pi from the Mega. You may need to separate the power and communication lines to the PC. Aug 29, 2019 at 21:42
  • Thanks @Gerben i solved my problem by using an optocoupler. Before My arduino UNO PWM output go through PWM driver, I separate this line using Optocoupler so the ground from power supply doesn't contact to my controller that preventing from ground loop.
    – rachael
    Dec 1, 2019 at 4:33

1 Answer 1


You've created what's known as a "Ground Loop". You have 2 grounds in your circuit, your 24v PS has a ground and the PC supplying 5V to your Arduino has a ground. They are not likely to be equivalent and will cause many unwanted side effects.

You can reduce some noise using RC or RLC circuits on your power supply pins. It's probably best to use only a single power supply (and ground).

  • "You can reduce some noise using RC or RLC circuits on your power supply pins." How will this eliminate the ground loop?
    – Rudy
    Dec 2, 2018 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.