Switching between Multiple RX/TX

Hi everyone,

So soon I intend to undertake a "stand alone" Arduino project (http://arduino.cc/en/Main/Standalone) which seems all well and fine. The only problem is that using the USB serial breakout board uses the RX and TX pins on the Atmega328, and I need them for a Bluetooth module in my project. I know that I can just swap the wires around as needed (change back to Bluetooth after I'm done uploading to the Atmega) but it seems a little inconvenient if I end up re-uploading a lot, then using the Bluetooth module. So my question is, is there any sort of switches I can use where I can connect two separate sets of RX/TX wires and switch between them? It would be perfect to just have a switch to switch between Bluetooth RX/TX and USB serial breakoutboard RX/TX.

Thanks! :slight_smile:

Sure, a simple DPDT switch will do.
Middle common pin will connect to the 328, outer pin will connect to one or the other source.
Double pole means 2 set of signals being switched at the same time.

http://www.digikey.com/product-detail/en/200UDP1T1A1M2RE/EG4911-ND/2498446

Can also do it electronically:

http://www.digikey.com/product-detail/en/DG408DJZ/DG408DJZ-ND/821394

CrossRoads:
Sure, a simple DPDT switch will do.
Middle common pin will connect to the 328, outer pin will connect to one or the other source.
Double pole means 2 set of signals being switched at the same time.

200UDP1T1A1M2RE E-Switch | Switches | DigiKey

Can also do it electronically:

DG408DJZ Renesas Electronics Corporation | Integrated Circuits (ICs) | DigiKey

Thanks! Very helpful.

Edit: Actually, could I just double check what you mean with the wiring to the DPDT Switch? Adding on to this little simple little picture I drew would help, thanks!

An even better solution is to use SoftwareSerial (look in the playground) to give you a second serial port. Use this for the bluetooth.

Mark

holmes4:
An even better solution is to use SoftwareSerial (look in the playground) to give you a second serial port. Use this for the bluetooth.

Mark

This looks really helpful too! Thanks Mark!

Hardware switch

CrossRoads:
Hardware switch

Ahh, I understand now!

Exactly what I need! :slight_smile: Thanks very much