Why We Need to Change COM Port in Arduino
Change in Arduino COM port is required because some users need a specific port for Arduino, requiring them to change the default set COM port by PC for Arduino. PCs configure multiple serial ports according to connected devices, so to connect Arduino to a specific port we need to change it first.
Another reason why we need to update COM port selection is sometimes Arduino changes its COM ports automatically or after every reconnection COM port gets updated, so we select a permanent and stable COM port for Arduino board. Follow below-mentioned steps to update Arduino COM port selection:
How to Change Com Port Arduino
COM port is a necessary tool for serial communication between devices and there are tons of devices including Arduino which supports COM port serial data transfer. Here are a few steps to change the COM port for the Arduino board.
Connect Arduino Board with PC
First connect Arduino board so PC can configure default COM port for Arduino later we will change it to a new COM port.
Step 1: Open Arduino IDE. It can be opened using the IDE shortcut icon or by typing Arduino IDE in the window search box.
Step 2: Once the Arduino IDE is open a new window with the IDE interface will open here, we can write any sketch we want. Currently the Arduino board is disconnected so no COM port is showing.
Step 3: Connect Arduino board to any PC hardware serial port using USB B cable.
Step 4: After the Arduino board is connected, the Arduino IDE will configure the COM port for the Arduino board. Some older versions of IDE might not do this on their own, so to select the COM port manually; go to: Tools>Port>Serial ports>COM6.
Open Device Manager and Update Arduino COM Port Drivers
To change the COM port for the Arduino board first we must update drivers for ports and to do this we need to open the device manager. Follow steps below to complete driver updates.
Step 1: Arduino Uno is connected at COM port 6 now to change COM port first we need to open device manager. Type Device Manager in Windows search box like shown in image below:
Step 2: Device manager will open a new window where we can check our Arduino board connected port in the “COM & LPT’’ section. As Arduino IDE shows us COM6 port for Arduino board, the exact same port will also be mentioned here in device manager.
Step 3: Before we can select a new COM port for Arduino board it is recommended to update the COM port drivers for Arduino. Select Arduino COM port and right click over it a drop-down menu will open click Update driver.
Step 4: Now a new window will open where it shows two options for driver updates: either we can update drivers using local files or select automatically drivers update option. We will go with an automatic search for a driver option.
PC will search for updated COM port drivers if already installed it will show a message like shown in image below:
Select a New COM Port for Arduino Board
As drivers have successfully updated now, we will move forward to selecting a new COM port for the Arduino board.
Step 1: Right click over Arduino COM port and select Properties.
Step 2: New window will open now select Port Settings option.
Step 3: Now click Advanced.
Step 4: Now a new section will popup. Here in the advanced setting for COM ports we got an option “COM Port Number”. Select COM port number and a complete list of all the ports available will appear. Normally in Windows up to 256 COM ports are available. All the COM ports which are under use will show (in use) messages.
Here we can select any COM port for Arduino which is not in use on any other device. Currently the Arduino board is connected at COM port 6 we will select a new port for Arduino. Select COM10 or any other port and click OK.
Step 5: To confirm whether the COM port is updated or not, open Arduino IDE and look for the Arduino COM port. You will see that the Arduino board has updated its COM port to number 10.
We have successfully changed the Arduino COM port. Remember once a new COM port is selected reconnect Arduino board with PC before uploading a new sketch otherwise successful uploading of sketch is not possible.
Conclusion
COM port is necessary for all serial devices, it allows easy and fast communication among devices. Here we discussed if Arduino is not working properly for a particular COM port how we can update or change it to a new one to ensure Arduino stable functionality.