Serial Monitor causing erratic sensor behavior

Hi! I'm a pretty experienced Arduino user but I just encountered something that's kind of blowing my mind... I have an analog sensor circuit I made that works as expected until I open the Serial Monitor. When I open the Serial Monitor it immediately jumps to the high rail.

I'm using an R3 Uno, the sensor circuit is connected to A0, and I'm just running the ReadAnalogVoltage example code.

Has anyone else ever experienced this? What could be causing it?

One more detail, if I use a USB isolator between my laptop and the Arduino, the Serial Monitor works fine. Even weirder is that it doesn't happen if I use a Sparkfun Artemis Nano board instead of the Uno.

Thanks in advance!

You may have too few or too many connections, ground loops or something else. Please provide a circuit diagram that really reflects all your connections, including power sources.

Why would opening the serial monitor cause ground loops or connection issues that wouldn't already be present?

How do you know the voltage without the serial monitor?

I have an LED display and have used a multimeter

My crystal ball lacks required information.

Does opening the serial monitor cause a controller reset?

Yes it does

So why does your controller not properly get out of the reset?

I don't know what you mean. It does get out of the reset. Does the Serial Monitor cause a bunch of noise artifacts in the ground/power or something? That's the only thing I could think of since the USB isolator resolves the issue. And if so, why is it doing that?

Perhaps it prevents the reset?

Good thought! I connected a 4.7 uF capacitor between the reset and 5V pins to prevent the serial monitor from initiating a reset and my sensor works perfectly.

Now the question is why the reset is messing with the sensor. Pressing the reset button doesn't have the same effect as the serial monitor.

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