Page 1 of 2

Serial communication hardware

Posted: Tue Oct 11, 2022 8:01 pm
by konczakp
Hello, I need some help finding the right hardware which I could use with Arduino IDE. I need a board with as much as possible UART (don't want any software serial etc) There is STM32 BlackPill with up to 3 UART connectors but is there any other hardware with more UARTs? Or maybe there is some kind of extender for UART. My main goal is talk to 8 devices via UART and every each can talk separately so if any extender then it has to be buffered. Thanks

Re: Serial communication hardware

Posted: Tue Oct 11, 2022 9:59 pm
by dannyf
I think you will find it much more helpful to you if you lay out the problem you are trying to solve, rather than implemention for a particular solution you have in mind.

With that said, try st's website or distributors with parametric search.

Out of my memory, the TI chips have an insane amount of peripherals.

And they have a flavor of Arduino environment

Re: Serial communication hardware

Posted: Wed Oct 12, 2022 7:15 am
by konczakp
You are right, my bad. The problem is that I have to communicate with 12 other microprocessors (Arduino and STM) over UTP/FTP cable. Longest distance is about 15 meters. Network is in a star topology so I was thinking of using RS485 for communication for such a distance. So I need 12 UARTs and the best solution for that would be to use single board or two boards with I2C or SPI for that. Maybe there is another way to accomplish this but I couldn't find it.

Re: Serial communication hardware

Posted: Wed Oct 12, 2022 7:37 am
by ag123
if you don't need concurrent connnections, i think uarts can be multiplexed
e.g. using 74hc4052
https://e2e.ti.com/support/switches-mul ... -4-sensors

or i'd think they can be wired in bus 'spi like'
https://electronics.stackexchange.com/q ... exing-uart
https://www.maximintegrated.com/en/desi ... 5/588.html
https://en.wikipedia.org/wiki/RS-485
https://www.maximintegrated.com/en/desi ... 5/588.html

and it seemed max3485
https://www.maximintegrated.com/en/prod ... X3485.html
has /RE and DE enable signals, so i'd guess you could practically multiplex them using the DE lines to control the outputs.

Re: Serial communication hardware

Posted: Wed Oct 12, 2022 7:56 am
by konczakp
ag123 thanks for all solutions but all of them requires master - slave topology in which I have to select on which channel I'm going to write to. In my situation I need let's say full-duplex communication on each channel to be able to write from slave to master and from master to slave independently on each UART.

About max3485 - at the beginning I was thinking of max488 which is full-duplex but also works in master-slave topology because it is not releasing the bus so it is impossible to use it as I would like to.

Re: Serial communication hardware

Posted: Wed Oct 12, 2022 8:01 am
by ag123
check the larger chips like the RE, VE, ZG series, those probably has lots of uarts and i'd think you could buy boards for them.
e.g. the stm32f407ve series or 405rg series

ST itself has a Nucleo F401RE board
https://www.st.com/en/evaluation-tools/ ... 401re.html
https://www.st.com/en/microcontrollers- ... 401re.html
but it seemed based on the specs it has 3 uarts only

i stumbled into some funky app notes in google searches e.g.
Using the SPI as an Extra UART Transmitter - Texas Instruments
https://www.ti.com/lit/pdf/spna234
Using the ST626X SPI as a UART - STMicroelectronics
https://www.st.com/resource/en/applicat ... ronics.pdf

this seemed rather interesting and that maybe you could use them if after all the spi ports don't overlap uart ports
another way though could be to use multiple 'black pill' boards designed as a 'network switch'.
a key in such a design is there probably need to be a fast 'high speed bus' (e.g. spi) that connects several of them together.
so that each board 'routes' packets to different interfaces probably by address etc. quite a bit of software work, but i'd guess it is doable.

Re: Serial communication hardware

Posted: Wed Oct 12, 2022 8:31 pm
by ozcar
CAN bus comes to mind. But that might be way off, as it is something I have never used.

Re: Serial communication hardware

Posted: Thu Oct 13, 2022 2:14 am
by GonzoG
I think that ehternet might be best solution here if you don't need central hub to control all traffic.
You just connect all devices that need to communicate to network switch.

Re: Serial communication hardware

Posted: Thu Oct 13, 2022 10:21 am
by shinji
Long time ago I experimented with TI Arm Cortex-M4F based microcontrollers (https://www.ti.com/tool/EK-TM4C123GXL). This one supports 8 UARTs, is 5 V safe and can be programmed in an Arduino-like environment (http://www.energia.nu/).

Re: Serial communication hardware

Posted: Thu Oct 13, 2022 11:31 am
by dannyf
I would use one uart and design a protocol to communicate . For example a transmission can be done in frames. A frame would start with an identifier, a body and an end. You will need to resolve conflict.

Another way is to have a signal line to notify the receiver.

Endless possibilities.