Giving Arduino a second UART over I2C by stacking another Arduino on top

Now that I have the Cellular modem working with the PC over serial I am trying to get the same thing implemented on an Arduino. Since the modem uses the serial interface I will not be able to use that to debug my program via a serial terminal running on my PC.

I tried using the SoftSerial (or the NewSoftSerial) library but ran into data corruptions even at the low speeds, so I decided to look for other ways to get another hardware UART on the Arduino. For a while I was contemplating getting a Mega Pro from Sparkfun but its price was a turnoff. In the end I realized that I could just stack another Arduino on my Diavolino (both interfaced to each other over I2C as master slave) and after trimming the UART rx/tx shield pins be able to separate out the two UARTs.

The other issue is that the UART pins of the Cellular modem are not 5V tolerant. This had not affected me till now since I was using the Adafruit FTDI friend at 3.3V logic levels when connecting to the PC serial port. So I could not get another 5V Diavolino. In the end I decied to get a 3.3V Arduino Pro and stack that on top of my 5V Diavolino.

Overall the connections will look something like the following diagram:

arduino extra serial port plan

Note that when I drew this I was planning on using another Diavolino at 3.3V but decided against it since it seemed like more work because I would need to get the 3.3V regulator on my own and also somehow get an 8MHz AVR chip for it. In hind sight this may not have been a good idea since the Arduino Pro seems to be connecting both the Vcc pins in the header to 3.3V. The Diavolino instead has them separated which seems more sensible to me.

Another thing I forgot to show in the diagram above are the pull up registers for the I2C lines (SDA & SCL) between the two Arduino boards. I am hoping that connecting those to 3.3v would work for the 5v arduino, but I am not sure.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s