Serial Port Not Found when using multiple sensors

I’m using an Arduino Uno and trying to configure three MG-811 sensors to work together.

When I have one or two of the sensors plugged in to the board (pins A1 and A2), the code uploads just fine and works as desired. As soon as I add power to the third sensor, the already-uploaded code stops running and I get the following error when I try to re-upload:

Arduino: 1.8.9 (Windows 10), Board: "Arduino/Genuino Uno"

Sketch uses 5760 bytes (17%) of program storage space. Maximum is 32256 bytes.
Global variables use 286 bytes (13%) of dynamic memory, leaving 1762 bytes for local variables. Maximum is 2048 bytes.
avrdude: ser_open(): can't open device "\\.\COM4": The system cannot find the file specified.

Problem uploading to board.  See for suggestions. Error opening serial port 'COM4'.
Caused by: jssc.SerialPortException: Port name - COM4; Method name - openPort(); Exception type - Port not found.
	at jssc.SerialPort.openPort(
	... 8 more
Error opening serial port 'COM4'.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I’ve tried using external power sources, different analog pins, a different Arduino, and an entirely different set of sensors. It doesn’t seem to matter where the power is drawn from, which sensors I use, or which pin(s) I’m using. I can even have all three sensors grounded and connected to analog ports, but as soon as I add power to the third sensor it stops running the program and recognizing the serial port.

My best guess is that it has something to do with each sensor attempting to draw 5V; is there a limit regarding voltage and analog inputs? Any suggestions on how to avoid this error?

What CURRENT does each sensor require ?

Doubt it is an actual VOLTAGE issue.

Schematic would be useful too.

Maybe worth reading this before adding any more information.


I've attached a schematic of one of the configurations I've tried, just to give a general idea. I've also tried using separate power sources for each sensor with a common ground, and a few other brief ideas. Sorry for any confusion; I'm used to working with software, not hardware, so this is fairly new to me... in all my searches over the past weeks, I haven't even thought to check current as opposed to voltage.

If I'm reading the datasheet for the MG-811 correctly, each sensor draws 200mA. I'm using an external power source, so I should have enough current supplied for all three. I've seen that Arduino has a limit on the sum of the currents for all of the input and output pins; would using transistors alleviate the problem?


200mA is more than the Arduino can handle.
SO your PSU should be at least 600mA just for the sensors alone.

Also don't forget these types of sensor mostly have an initial burn in period and warm up period . (24/48 hrs)

I presume you did the burn in's already ?
Once you have completed the burn in then you can calibrate them (not always needed but recommended).

The warm up period can often draw more than the run current.
Your present pic is likely to either stop the Arduino from working or even damage it beyond repair.