Need to connect real DB-9 Serial Port to Arduino NANO board.

Hello,

Before i buy Arduino Nano V3.0 board, i need to know how i can connect a real DB-9 plug for RS-232 Input/Output. Of course I will mount level translator TTL-RS232 (MAX3232 or other) and make all support circuits for it.

But, discovering the schematics i saw that USB chip is connected to ATMega328 with 2 resistors (B,C from resistor pack). How can I use this board in two modes : 1-with USB port for program loading. and 2-with RS-232 chip and DB-9 connector for application needs (communication with other RS-232 devices).

Thank you in advance, Radislav Yanai.

Short answer is that if you want the Nano to output serial you can, but you can't upload sketches at the same time.

You may be better off using a Pro mini and a USB to serial converter.

You can upload sketches via the RS232/TTL level adapter (vs USB), but will need to press reset as part of the upload process when the IDE shows "compiled xxx of 32xxx bytes". Don't try and send to the card via USB while sending to the card with RS232, they will corrupt each other. Both can receive from the Nano at the same time.

The 1K resistor provides a little bit of separation - when USB is not active, it outputs a high level so it acts like a 1K pullup resistor on the line. If you connect the RS232 output with 1K also, when it is not active it will look like a 1K pullup to the USB. 5V with 1K pullup means the whatever is driving the line needs to sink 5mA to pull the line line, and the next to nothing to bring the line high. The 16U2 can sink 5mA no problem. The RS232 driver then needs to sink 5mA also. Check the datasheet for the part you want to use. A lowcost MAX232 such as this one http://www.ti.com/lit/ds/symlink/max232.pdf see page 5, 7.7 VOL, will pull the line to 0.4V with 3.2mA. Other devices will have different characteristics - mostly worse from what I can find!

At 5mA, the 0.4V may creep up some - as long as it stays under 0.3 x Vcc, 1.5V, it will be seen as a valid low.

Thank you very much for answer's. I will try to connect on ATMega pins with MAX3232 chip and to use the communication when USB is not operational for Rx. Best regards, Radislav Yanai

ChilliTronix:
Short answer is that if you want the Nano to output serial you can, but you can’t upload sketches at the same time.

You may be better off using a Pro mini and a USB to serial converter.

I checked the Pro Mini board - it is better for my usage.
Thank you ChilliTronix !
But, Where I can find schematics with AtMega328 chip, not with AtMega168 ?
Best regards,
Radislav Yanai

ATmega328 and ATmega168 have the same packages, 328 has double of memory but schematics should be the same for both. See the datasheet (is common for both) to confirm.