Hello,
I have the following scenario:
-
Breadboard Arduino (http://www.oomlout.co.uk/breadboard-arduino-compatible-kit-bbac-p-211.html?zenid=46ca0ec794512cd3711f19488fa153f2). Built exactly as described, except using a 5V external power source (switch-mode, suitably decoupled, etc) -- instead of the provided linear regulator.
-
I have an Arduino Serial USB Light Adapter connected (http://arduino.cc/en/Main/USBSerial). The VCC pin is not connected, since I'm powering the board externally. Ground is connected/shared.
-
I have a simple sketch that, in loop(), just prints data to Serial, blinks an LED (pin 9) then delays for a 200ms.
Everything works perfectly. The serial data can be received when the USB cable is connected, the LED blinks. All is well.
... until I disconnect the USB cable from the Serial USB adapter. Once the external power source is turned on, the sketch runs for a few seconds (I can tell from the blinking LED on pin 9), then resets (LED momentarily stops blinking, LED on pin 13 flickers). Then runs for a few seconds more, then resets -- over and over again (~5 seconds between resets, possibly dependent on the length of serial data I transmit). If I remove the 'auto-reset' capacitor from the board -- this reset does not happen. If I remove the USB serial adapter entirely -- this reset does not happen.
This means I cannot use the USB/Serial adapter permanently in a project, whilst still leaving auto-upload enabled. Doing so would mean that every time the USB cable is disconnected, the Arduino will reset every ~5 seconds.
I would like the USB/Serial adapter to just discard any data when the cable is not connected. I had understood the reset pin on the adapter would be used purely during initial USB connection (and for upload) -- these resets I can live with. I just cannot live with the frequent every-5-seconds reset caused when the USB cable is not connected.
Perhaps I'm misunderstanding how this is supposed to work? All help appreciated.
Thanks.