What would happen if the new Arduino Duemilanove were connected to both USB and External power supply? I looked at the schematic, and it appears that the USB power is set as the power supply when a 3V power supply is detected (from the FTDI UART).
So I'm wondering what would happen if both the USB and external power supply were plugged in at the same time. Would anything get damaged?
No damage will result. Both power sources may exist at the same time. If there is no external power present then the P channel FET transistor allows the USB power to supply the current for the board, otherwise board power is supplied by external power, even if USB power is present.
This power source decision strategy makes sense except where if the external power source is a battery, where one would rather the board be powered from the USB, if avalible, rather then drain the battery. It does looks like if the external battey source voltage was kept between 6.7vdc (min needed before voltage regulator drop off) and 7.3vdc then the USB power, if avalible, would become the lead power source. That doesn't seem to work out to any even number of battery cells without adding some additional external diode drops.
So just to be more clear, it should also be okay to transition from one source to the other while the Arduino is running?
Scenario: Program it and start it on USB, plug in a battery, unplug the USB, run for a day, come back to the USB to open a port and get some debug data, and nobody gets burnt?
No electrical problems from automatic power switching from external to USB, however as long as external power is present I belive it is used even if USB gets plugged in. So automatic power switching only jhappens when running on USB power and then external power is provided, but not in the opposite order.
However not sure that you may not experiance a board reset, causing your program to restart, when unplugging and plugging the USB. This is an artifact of the USB DTR signal being capacitor coupled to the Arduino reset pin, allowing the Arduino IDE to download a sketch without one having to press the reset button. You should test for this first before higher level testing of more complex programs. The auto reset feature can be defeated by removing the cap or possibly USB driver changes. Other may have better explainations of this possiblity.