Saturday, August 17, 2019

Preventing Arduino from auto-reset when COM port opens\closes

by / Wednesday, 08 December 2010 / Published in Arduino

As you may have noticed, each time you open or close COM port, your Arduino board resets. This may be good for development, but when you put something into production or just create an application that keeps the port open only while transmitting data, it's very disturbing.

There are two ways to prevent this from happening.

anti reset capacitor


The first, physical way, requires installing a small (10 uF) capacitor between reset and ground pin. It will "eat" the reset pulse, so your board will not reboot.

However, this works only after your board was started successfully. If you connect the capacitor before you plug Arduino to USB, it will not start. As well, you will not be able to upload any sketch without removing the capacitor. So, this is not the best way and should be used only when your program on a computer cannot be modified.

The second, software way, works much better. You should set Data Terminal Ready (DTR) parameter for port to false\disabled. Without that signal, Arduino will not reset each time the port is opened or closed.

An example in C# how to do this:

SerialPort p = new SerialPort(args[1], 9600);
p.DtrEnable = false;

With the second way, you'll still be able to upload any sketch - if necessary.

Read 9178 times Last modified on Thursday, 02 April 2015 10:23

Do you like this? Please share!

Simon Tushev

Simon is IT professional with interests in web design, electronics, photography and astronomy. He writes about PHP, Yii, Joomla!, Arduino and several other topics.


Here I publish articles related to my areas of interest, my brief notes that may save some time to others, as well as some of my works.

This site is a work in progress. I will add more sections in the future, such as

  • More photos to photogallery
  • More Joomla!-related articles
  • ...



New Posts

Spam/Forgery Notice

If you've received a spam email from, please know that this emails are...

07-03-2019 in Blog


Using dynamic GeoIP module with nginx (CentOS)

nginx introduced dynamic module support in v. 1.9.11. This brief article provides step-by-step procedure...

13-04-2016 in Linux, BSD, Unix


Visual difference between pseudo and true random data

This is is "random" image generated using PHP rand() function: And this is an image...

20-11-2015 in Blog

Scroll to top

We use cookies, just to track visits to our website, we store no personal details Privacy policy