9
\$\begingroup\$

I'm making my own board and using an ATmega 328 with the Arduino bootloader. I have a DIP switch to select either an FTDI chip (for programming) to be connected to the ATMega's Rx and Tx, or a GPS that outputs serial to be connected. I was looking at this schematic for reference: http://arduino.cc/en/uploads/Main/ArduinoNano30Schematic.pdf

Why are there 2 resistors on Rx and Tx coming from the ATMega? Do I need those just for the connection to the FTDI chip, or do they need to be there for the GPS too?

\$\endgroup\$
  • \$\begingroup\$ I would say they were intended to be termination resistors, but if you have 1K impedance on a PCB trace you have larger problems. \$\endgroup\$ – drxzcl Jun 19 '11 at 18:32
  • 1
    \$\begingroup\$ Why not ask the people who designed it? \$\endgroup\$ – endolith Jun 19 '11 at 20:41
9
\$\begingroup\$

One of them is there to prevent damage that could occur if the AVR has RxD programmed as an output, pins on both devices could be damaged if that happened as AVR pins can source and sink quite a lot of current. I don't think that the other resistor is necessary.

\$\endgroup\$
  • \$\begingroup\$ If you're going to add hardware to compensate for possible firmware bugs, then the list never ends. I don't know much about AVRs, but most microcontrollers wake up with pins in high impedance state for exactly this reason. General pins don't become outputs until the firmware explicitly makes them so. Sometimes extra hardware to deal with likely bugs makes sense in prototypes, but for high volume products with tested firmware this is just a waste. Most digital outputs will survive fine when jammed together, although I wouldn't do this on purpose. \$\endgroup\$ – Olin Lathrop Jun 19 '11 at 21:04
  • 7
    \$\begingroup\$ The Arduino is generally used by people like art and design students, hence the need for safeguards like that. The OP shouldn't need resistors there. \$\endgroup\$ – Leon Heller Jun 19 '11 at 21:17
  • 1
    \$\begingroup\$ I think it may be possible to set the Rx on the FT232 as an output, in bit-bang mode. \$\endgroup\$ – Connor Wolf Jun 20 '11 at 5:36
  • 2
    \$\begingroup\$ @Olin Repurposing the pin as an output pin is quite common, being able to use it for both programming and general IO is a feature. PORTD is the only full 8 bit port you have on the arduino to play with so reusing the tx/rx lines is standard fare if you do not need to speak serial during normal operation. \$\endgroup\$ – John Meacham Jul 18 '14 at 10:04
5
\$\begingroup\$

It doesn't look like there is any good reason for those resistors. Both parts on that schematic appear to run on 5V with a common ground. There should be no need for resistors in the lines between the two chips.

If the lines were going off board, then there might be some point to putting resistors in series to protect the on-board parts, but that doesn't seem to be what's happening in that schematic.

Keep in mind this is a Arduino schematic. That means there is a good chance whoever designed it doesn't do this professionally. There are a lot of superstitions out there. Just because something is on the net doesn't mean it's done right.

\$\endgroup\$
  • 6
    \$\begingroup\$ Arduino is specifically intended for people who are new to this. Therefore, designing the hardware to be tolerant software errors which could cause bus conflicts is common sense. I can see a very good reason for the resistors - People might accidentally set the TX/RX lines to outputs when they shouldn't be. \$\endgroup\$ – Connor Wolf Jun 20 '11 at 5:35
  • \$\begingroup\$ There are good reasons for the resistors to be there, please the check the other answers. \$\endgroup\$ – Marcelo Jan 24 '16 at 14:27
3
\$\begingroup\$

It could be done to prevent the other off board device is powering the Atmel when it is powered off. Due to current that runs via the internal clamp diodes of the Atmel...

\$\endgroup\$
  • \$\begingroup\$ Welcome to EE.SE! Generally we advice users to refrain from answering old questions unless the question is credible and doesn't have an answer. With that said, this specific question is over three years old and has an accepted answer. In the future please try to refrain from answering older questions since it brings the question to the top of the question feed on the front page and gives a messy look to EE.SE. Thanks! \$\endgroup\$ – Funkyguy Nov 3 '14 at 0:56
  • 2
    \$\begingroup\$ @Funkyguy the accepted answer is, while not an untrue observation, probably not the true reason. \$\endgroup\$ – Chris Stratton Nov 3 '14 at 5:12
3
\$\begingroup\$

This is an old and already answered question, but I didn't find in any of the answers one of the good and possibly one of the most important reasons for the resistors to be there.

Although most people use the RX/TX only to connect the Arduino to their PCs for programming the chip and/or perform serial debugging, others use the Arduino's RX/TX pins to communicate it with other serial devices. In this case, the FTDI chip and this other device would conflict and it is very likely that will damage both due to short circuiting. These resistors "separate" the FTDI from the other device when there is one connected to the AVR RX/TX pins, protecting both and allowing them to be wired and connected simultaneously.

One thing to remember is that, once another serial device is connected to the RX/TX pins of Arduino, the resistors will mask the logical levels from the FTDI in a similar way that happens with pullup/pulldown resistors, so, the external device will have "preference" over the FTDI communication.

\$\endgroup\$
2
\$\begingroup\$

Adding a small-value (100 ohms or so) series resistor on a signal which is going off-board can reduce RF emissions. The resistors on the illustrated schematic don't seem well-placed for that, though. Another use for resistors is as a really cheap mux. If the FTDI chip tries to drive the Arduino's RX pin and nothing on the header tries to, the FTDI chip will "win", but if something on the header tries to drive that pin without a series resistor, the device on the header will "win". That might explain some usefulness for the resistor on the Arduino's RX pin. Not sure what purpose the one on TX, serves, though, unless there's another external connection for the "TX" wire that's wired to the FTDI's RX pin and I'm just not seeing it (if there was such an external connection, it would be possible for the external device to inject data to be sent via the FTDI).

\$\endgroup\$
2
\$\begingroup\$

I have seen 100 ohm resistors on I2C and UART buses before, they are often for ESD protection. They work in conjunction with the built in clamp diodes in the MCU.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.