blog

Multiple UART With Raspberry Pi

The super easy and very popular mini computer Raspberry is the first choice of developer for developing super amazing projects. Raspberry Pi gives number of GPIOs for easy interfacing of various modules. Raspberry Pi has SPI, I2C and UART broken out over the I/O port. Since it has only one UART port so only one device can be connected to it, which is very problomatic to many developers.So, what if you need the RasPi to access another? There are number of steps and procedures to access 2nd UART on the Raspberry Pi.

1) I2C to UART converter : There number of ICs in the market launched by renowned companies which are I2C to UART converters. You can access the UART port via I2C protocol. Some ICs are: https://www.sparkfun.com/products/retired/9981 , NXP SC16IS750.

2) SPI to UART Converter : MAX3110E SPI to UART is one of the IC which can be used to have number of UART using SPI interface. Raspberry Pi has two SPI buses to connect more than one slave.

3) Use another microcontroller with Pi: There number of AVR, pic etc, microcontrollers which have more than one UART, it is actually fairly straightforward to access a 2nd UART on the Raspberry Pi. Like on Arduino we can use Software Serial to which we can connect number of UART devices. In this procedure Arduino(Second controller) just simply send the data collected from various UARTs connected to it to Raspberry Pi via any available protocol (UART,SPI or I2C).

4) Software Serial in Raspberry Pi: If you don’t want any extra hardware, than this method is right for you. Simply plug in the 2nd UART device into 2 GPIO pins (one TX on RX) rather than using a HW UART.

Leave a Reply

Your email address will not be published. Required fields are marked *