view history edit print login register

DisablingAutoResetOnSerialConnection

So you have found need for disabling the auto reset? So that the arduino does not reset when establishing a connection. Here are some solutions.

The simple way that doesn't require any permanent modifying of your hardware or software configuration changes:

Stick a 120 ohm resistor in the headers between 5v and reset (you can find these on the isp connector too). 120 is hard to find so just combine resistors. Don't go below 110 ohms or above 124 ohms, and don't do this with an isp programmer attached. You can just pull out the resistor when you want auto-reset back.

More options

The ATmega168 is reset by pulsing its reset pin to GND. The Arduino IDE itself cannot create such pulses, but by setting the DTR line to LOW and adding a capacitor (R3 on the pcb, marked red), the reset pin gets sucked to LOW until the capacitor is charged through the internal pull up resistor and R1 - which resets the chip. This works in the same spirit as adding "auto reset" to a chip for proper startup after connecting power.

Unfortunately this reset usually also happens if you initiate any other serial connection (routed through usb) to the device, even if not desired. Imagine your device is finished, the code has converged to a "bug-free" (tm) state and you just want your doodad to run and collect data, survive reboots of the host pc/mac ... (needs external power of course).


Permanently disabling the auto reset on Arduino Diecimila boards:

How to remove R3 without damaging the PCB:

As you can see in the picture, there are several vias and 2 unused spots with solder pretty close to R3. Best not to disturb sleeping dogs!

Just in case someone wants to try, there's just no sensible way of mechanically removing the smd capacitor (cutting it in half, grinding it away, scratching at it with an exacto knife...) in finite time without getting mad - been there, done that.

There's two working methods of removing smd capacitors/resistors that I personally tested. Some esoteric ones (not bad mind you) can be found on youtube.

Method A is nicely described on the SPARKFUN page with lots of pictures. The basic idea is to put a rather BIG blob of solder on the smd part, touching and heating up both ends. If properly heated, the smd part can simply be pushed away with the solder iron's tip. This should not take too long, as the pcb will get pretty hot and might start to disintegrate (stink). Some discoloration is to be expected. There's also special solder out there with a melting point of about 180�C, which makes it especially easy to remove parts without overheating, but it's not exactly cheap (google: LOWMELT/CHIPQUICK).

I did not use the big-blob-of-solder-method as I expected to touch any of the vias near by.

Method B is what I used on my Arduino PCB. I just grabbed an old pair of metal tweezers with flat and rather thick tips (about the same width as the smd capacitor) and heated it up with a small gas torch until it glowed in dark orange. The tips must be massive enough to store some of the heat till you get to the PCB. How much heat is required can and should be tested before with some piece of solder. It should melt easily when touched by the tweezers, but the right temperature ought to be approached from below its melting point ( not the tweezers' :-) ). Then basically grab the capacitor on both ends, making good contact with the tinned parts without touching the PCB, and just lift it. DONE.

This is how it should look like if all goes well:

How to upload code without auto reset:

Even without the auto reset feature it's still quite easy to get code uploaded.

  1. press and hold the reset button
  2. fix your eyes on the RX/TX leds on the PCB
  3. press the upload button in the IDE
  4. as soon as the RX led flashed once, quickly release the reset button

After that, the normal upload procedure should start with the RX/TX leds flashing madly. In case the IDE (or avrdude) throws an error, just work on your timing a bit. I'm doing this on a regular basis and it works well with the current bootloader.


Software settings to disable the DTR pin on the host:

This section is meant to be helpful for development of code talking to the Arduino board. As far as I understand, it cannot provide a system-wide setting to disable DTR on the host. If some rogue application decides to enable DTR of its own accord, this cannot be helped.

There's a thread on this in the arduino forum.


  • Using PERL (linux/win32) - provided by akak1656

    #!/usr/bin/perl

    use strict;
    use Device::SerialPort;

    my $port = Device::SerialPort->new("/dev/ttyUSB0");
    $port->databits(8);
    $port->baudrate(9600); # <-- match to arduino settings
    $port->parity("none");
    $port->stopbits(1);
    $port->dtr_active(0);

  • Using c++ (linux/win32)

...