Connecting more than one serial Device with an Arduino

Hello, my name is Johannes and this is my first posting on this forum.

At the moment I' trying to connect a GPRS/GSM (Sim 800L) Module and a GPS-Module (NEO6MV2) with my Arduino UNO.

The Problem I'have is that both devices (GPS and GPRS/GSM Module) are communicating with the serial protocol (TX/RX) and the Arduino UNO only supports a single serial port which is furthermore already used for programming the Arduino with your Computer.

It would be usefull to keep the link to the computer working for Debugging the program code by using the Serial Monitor on a PC/Mac.

Is there any simple and practicable solution for my Problem? Do you have experiences in connecting more than one serial Device with the Arduino?

Using the Arduino Mega isn't an opportunity for my project because of its size. In a later step of the development I want to use a Arduino Micro.

Thank you for your help and please excuse my English! English istn't my first language :wink:

You can use software serial but despite it allowing multiple instances it can only receive on one instance at a time so might not suit your needs.
You can get SFF Mega2560

Why don't you use Arduino Leonardo or Arduino Micro both based on 32U4 microcontrollers and have an extra hardware serial port which can be accessed under class Serial1. The latter is very small as well.
That way you can still use Serial for your PC connection and Serial1 for the other system.

.... in fact I had the same issue when I needed a second serial port that supported port settings other than the standard SERIAL_8N1. Software serial libraries don't support anything else and even though I did try to modify software serial library to get for example 8E2, it didn't work properly. Hence an additional hardware serial port was the only option left.

Is there any simple and practicable solution for my Problem? Do you have experiences in connecting more than one serial Device with the Arduino?

More than one serial device can be connected to an arduino serial port. The devices should not tx at the same time or the data may be garbled.

More than one serial device can be connected to an arduino serial port. ..

Not sure if this is a wise thing to do. ITs not easy to ensure than two devices wont tx at the same time..

zoomkat:
More than one serial device can be connected to an arduino serial port. The devices should not tx at the same time or the data may be garbled.

I disagree, only one transmitter can be connected to the RX (pin0) at a time. The TX/RX pins of the serial port are driven HIGH and LOW. If you have two transmitter hooked to the RX pin and they are both driving their output they will fight eachother, the device with the stronger drive circuit will overload the weaker possibly damaging both.

Any any commands sent would be received by both, an be miss interpreted.

No a good Idea.

There will either have to be multiple serial ports, one for each device or the single serial port will have to be multiplexed with tri-state buffers.

Chuck.

I disagree, only one transmitter can be connected to the RX (pin0) at a time.

You probably weren't around for discussions like below.

http://forum.arduino.cc/index.php?topic=233906.msg1684842#msg1684842

zoomkat:
You probably weren't around for discussions like below.

Serial commands from computer through arduino to another device - #9 by zoomkat - Project Guidance - Arduino Forum

The diode trick is just an AND function with a poor O.C. drive.

I would never use it in a production system.

How do you identify which system is transmitting? You don't. You have to infer from context, make assumptions. (ass u me, a very bad idea IMHO);

Chuck.

Tx->-|
Tx->-+->-RX
TX->-|

I would never use it in a production system.

I couldn't agree more! Serial interface was never intended nor designed for one-to-many communication links anyway.

I couldn't agree more! Serial interface was never intended nor designed for one-to-many communication links anyway.

So you agree with the statement "I disagree, only one transmitter can be connected to the RX (pin0) at a time."? I was just correcting bad info somebody put out. Now it looks like spin control time. 8)

Zoomkat, Yes, sorry!

Watcher:
Zoomkat, Yes, sorry!

Don't let the facts cloud your beliefs! :wink: