Extend ESP32 UART interfaces, Is it possible?
Extend ESP32 UART interfaces, Is it possible?
I'm looking to have a 5 serial connections with ESP32 and preferably with hardware UART connections, But we can use only 2 out of total 3 UART peripherals because one is already using for serial flash. So i'm wondering if there is a way to extend UART interfaces or should i go with Software UART interfaces? If so how? Please advice.
Re: Extend ESP32 UART interfaces, Is it possible?
You have 3 on the chip that you can use on almost any of the pads available through the driver provided with esp-idf!
And 2 more you can get with external IC like NXP SC16IC7x2 which is Dual UART with I²C-bus/SPI interface
And 2 more you can get with external IC like NXP SC16IC7x2 which is Dual UART with I²C-bus/SPI interface
-
- Posts: 9708
- Joined: Thu Nov 26, 2015 4:08 am
Re: Extend ESP32 UART interfaces, Is it possible?
Also, if your connections are half-duplex with the ESP32 sending commands and the peripherals just replying, you may get away using only one UART channel and using the GPIO matrix to multiplex it to different pins. Does have the disadvantage that you cannot receive data on a channel that is not currently muxed to RX, hence the restriction of half-duplex with the ESP32 sending commands.
Re: Extend ESP32 UART interfaces, Is it possible?
Actually i need full duplex function for my application so i thought to use SC16IS762IBS from NXP as @samsam mentioned. Any better modules provide dual UART before i order this?
https://www.digikey.com/product-detail/ ... -ND/946249
https://www.digikey.com/product-detail/ ... -ND/946249
Re: Extend ESP32 UART interfaces, Is it possible?
I'm usualy using Atmel ATXMega microcontrollers for situations like this. For example, with ATXMEGA32 you can get 4 UARTS and I2C interface to ESP32, and you can program it to work in a way you want it. You can also use it as port expander, spi expander, etc.
Re: Extend ESP32 UART interfaces, Is it possible?
So is ATXMEGA32 capable of handling simultaneous 4 UART channels. Actually i'm trying to communicate with 5 SIM900 modules simultaneously with ESP32 and i'm running FreeRTOS. Any suitable recommendations for that purpose? I'm also worried that i have to program the Atmel chip to achieve above purpose?
Re: Extend ESP32 UART interfaces, Is it possible?
You can't use flow control and timeshare the uarts?
Re: Extend ESP32 UART interfaces, Is it possible?
I'm not sure what you are referring here. Can you explain little bit more how to achieve this with freeRTOS?
Re: Extend ESP32 UART interfaces, Is it possible?
ATXMEGA is perfectly capable to handle simultaneous 4 UART channels (interrupt based, and xmega works at 32MHz), of course, you have to program it to achieve this (or any) functionality.Prasad wrote:So is ATXMEGA32 capable of handling simultaneous 4 UART channels. Actually i'm trying to communicate with 5 SIM900 modules simultaneously with ESP32 and i'm running FreeRTOS. Any suitable recommendations for that purpose? I'm also worried that i have to program the Atmel chip to achieve above purpose?
If I may ask, for what purpose do you need 5 SIM900 modules? I'm working with SIM800 module attached to ESP32 using PPPoS, so it is possible to use all network functions the same way they are used with WiFi. It works perfectly for couple of months now. ESP32 is comunicating with couple of servers using ftp, sftp, mqtt, ...
You can look at my basic example and example with cURL .
Another approach could be to simply multiplex Tx&Rx pins with external multiplexer (for example 74HC4052D). I've used this configuration in some other projects and it works well. It is the most simple & cheapest approach.
Re: Extend ESP32 UART interfaces, Is it possible?
Thanks @loboris for the valuable explanation. Now i'm interested in multiplex Tx&Rx solution as you mentioned and it seems to be the simplest approach. Before that i was considering(Well, couldn't try that yet) switch a single UART connection between 5 SIM900 modules to perform actions, Then it will not be simultaneous of course.
I'm using 5 SIM900 modules to build online top up mechanism for selected telco carriers in here. So it requires 5 telco carriers to be standby to perform topup requests coming through MQTT connection. Any thoughts/corrections/suggestions about my design architecture would be greatly appreciated
I'm using 5 SIM900 modules to build online top up mechanism for selected telco carriers in here. So it requires 5 telco carriers to be standby to perform topup requests coming through MQTT connection. Any thoughts/corrections/suggestions about my design architecture would be greatly appreciated
Who is online
Users browsing this forum: Baidu [Spider] and 112 guests