1
\$\begingroup\$

I have been playing with an idea of having multiple Arduino (e.g. ATmega328) with different purposes running on a circuit.

The intention would be to enable the FTDI programmer such as the FT232RL or FT231X chip to communicate to a specific circuit by switching these digital pins to one Arduino at a time to accomplish this programming.

The FT232RL or FT231X chip would be routed to a USB host whilst the programming pins would only be enabled on the selected Arduino.

My initial design idea was AND gates before I truly understood that Arduino Programming is a bi-directional communication process -- this would never work.

My next logical step is working with relays, this seems overkill for what I am attempting to accomplish considering cost and space on a board alone.

My specific implementation of this doesn't require any special considerations such as signal noise or loss. The Arduinos could be assumed to be on the same PCB operating over traces.

Does anyone have any other component suggestions that could accomplish this direct bidirectional connection whilst being switched on and off using a 5 V pin?

Velvet
4,9085 gold badges18 silver badges32 bronze badges
asked May 13, 2023 at 4:26
\$\endgroup\$
2
  • \$\begingroup\$ Excuse me, but isnt't this an XY problem? If you for example put a single 500 MHz 32-bit ARM that has a built in USB bootloader, in place of multiple 8-bit 16 MHz AVRs, you don't need to have the FTDI or multiplex it in any way. Why would you put multiple 8-bit AVR MCUs on same board? But of course, you can, and multiplex a programmer with some mux or buffer ICs, but it will be more expensive and harder to make than single fast MCU. \$\endgroup\$ Commented May 13, 2023 at 8:30
  • 2
    \$\begingroup\$ My initial design idea was AND gates before I truly understood that Arduino Programming is a bi-directional communication process -- this would never work. ... why would it not work? ... the transmit and receive lines are separate \$\endgroup\$ Commented May 14, 2023 at 2:23

1 Answer 1

2
\$\begingroup\$

Sounds like you need a tri-state buffer for each of the lines between the Arduino and the FTDI FT232RL or FT231X, such as the 74LS244 Octal Tri-state Buffer

74LS244 Octal Tri-state Buffer

You would have one of these for each Arduino, and connect the relevant IO pins to each of the buffers in the appropriate direction:

  • Arduino outputs to the An inputs of the buffer
  • Arduino inputs to the Qn outputs of the buffer
  • The same would apply to the IO pins of the FTDI IC

Assuming that there are a maximum of four lines in each direction between the Arduino and the FTDI IC (which I believe to be the case), then only one buffer IC would be needed per Arduino.

The fact that the buffer is tri-state means that you can isolate the Arduinos that are not needing to communicate with the FTDI IC, by disabling their buffers via the CA and CB inputs. Then enable the CA and CB inputs only on the buffer(s) connected to the Arduino that needs to communicate with the FTDI IC.

Clearly, only one set of buffers should be enabled at any one time.

You would also need to consider to enable and disable the buffers. That is to say, consider how these CA and CB pins, for each buffer, are managed. You could either manually control each one with a switch or, automatically, with an additional μController, with the appropriate glue logic. You could also have each Arduino manage their own buffers, but that would require some negotiation between the Arduinos to ensure that no conflict occurs - however, this seems to be adding unnecessary complexity.


Note that, if you have any bi-directional lines (although the FTDI ICs don't have any of those), then a bus transceiver, such as the TTL 74LS245, should be used.


Note that the term Arduino usually refers to the Arduino boards (such as the Uno, Nano, etc.). These boards already have a FTDI IC on them, so this would complicate matters.

However, if by Arduino, you actually mean an actual ATmega328P μController IC, then this method, as described above, should work.


Useful References

answered May 13, 2023 at 6:41
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.