Author Topic: Need eight RS-232 serial ports, cheap, using a Teensy 4.1?  (Read 2064 times)

0 Members and 1 Guest are viewing this topic.

Offline cdevTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Need eight RS-232 serial ports, cheap, using a Teensy 4.1?
« on: April 08, 2022, 01:14:34 pm »
This project looked useful for those of us who have lots of old test equipment lying around, that they want to automate stuff with. I could certainly use this box which is reminiscent of the old serial port servers popular in the old BBS days

https://hackaday.io/project/184402-8-port-rs232-to-ethernet-server

This also looks easy and flexible and easy to embed in stuff.. Like my Feeltech signal generator. Could the ESP replace the Teensy to make this serial port box wireless? Probably.
.
https://hackaday.com/2015/09/18/transparent-esp8266-wifi-to-serial-bridge/
« Last Edit: April 08, 2022, 04:23:19 pm by cdev »
"What the large print giveth, the small print taketh away."
 

Offline nvmR

  • Regular Contributor
  • *
  • Posts: 74
  • Country: il
Re: Need eight RS-32 serial ports, cheap, using a Teensy 4.1?
« Reply #1 on: April 08, 2022, 02:12:59 pm »
Similar to this one:
https://freetserv.github.io/
 

Online ksjh

  • Contributor
  • Posts: 18
  • Country: de
Re: Need eight RS-32 serial ports, cheap, using a Teensy 4.1?
« Reply #2 on: April 08, 2022, 02:38:33 pm »
This looks certainly interesting.

When we needed lots of RS-232 ports in our networking lab at our university, I simply used a Delock 61860 USB 2.0 to 8 x serial adapter, one Raspberry Pi and ser2net.

https://www.delock.de/produkt/61860/merkmale.html?setLanguage=en
https://sourceforge.net/projects/ser2net/
 
The following users thanked this post: cdev

Online ksjh

  • Contributor
  • Posts: 18
  • Country: de
Re: Need eight RS-32 serial ports, cheap, using a Teensy 4.1?
« Reply #3 on: April 08, 2022, 03:04:20 pm »
This also looks easy and flexible and easy to embed in stuff.. Like my Feeltech signal generator. Could the ESP replace the Teensy to make this serial port box wireless? Probably.
.
https://hackaday.com/2015/09/18/transparent-esp8266-wifi-to-serial-bridge/

I also tried the esp-link software some years ago. I even made a small PCB with an ESP-12F, a level converter and a linear regulator to power it from 5V USB. For one TTL serial port, it worked quite well.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Need eight RS-232 serial ports, cheap, using a Teensy 4.1?
« Reply #4 on: April 13, 2022, 02:22:53 am »
Quote
Could the ESP replace the Teensy to make this serial port box wireless?
ESP doesn't have 8 UARTs...
I'm working on a gadget to get 3 or 4 Serial ports out of a QTPy or Xiao (via USB.)It's sorta looking like USB performance is going to be a problem :-(
 

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 3894
  • Country: gb
Re: Need eight RS-32 serial ports, cheap, using a Teensy 4.1?
« Reply #5 on: April 13, 2022, 10:55:06 am »
Delock 61860 USB 2.0 to 8 x serial adapter, one Raspberry Pi and ser2net.

I used the 61860 too, also two miniPCIe quad-serial modules on a router board that has two miniPCIe 1x lanes.
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 3894
  • Country: gb
Re: Need eight RS-232 serial ports, cheap, using a Teensy 4.1?
« Reply #6 on: April 13, 2022, 10:59:32 am »
The 61860 is currently listed for 110 euro(1). Not bad.
My solution is more expensive: 120 euro per each miniPCI-quad serial module -> 8 lines means two modules, thus 240 euro.

I was lucky and I found two modules as second hand for 50 euro each, but hey? here you need to actively look on Amazon (second hand deals) and eBay.

edit:
(1) including postage
« Last Edit: April 13, 2022, 01:25:41 pm by DiTBho »
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 
The following users thanked this post: ksjh

Online ksjh

  • Contributor
  • Posts: 18
  • Country: de
Re: Need eight RS-232 serial ports, cheap, using a Teensy 4.1?
« Reply #7 on: April 13, 2022, 01:10:08 pm »
The 61860 is currently listed for 110 euro. Not bad.

You can find it even cheaper in Germany, currently for just over 72 EUR with free shipping inside Germany.
https://www.berrybase.de/en/computer/cable-adapter/serial/usb-8x-rs232-konverter
Shipping to other EU countries is also not that expensive, but unfortunately, UK is not mentioned on their page.
 
The following users thanked this post: DiTBho

Offline cgroen

  • Supporter
  • ****
  • Posts: 631
  • Country: dk
    • Carstens personal web
Re: Need eight RS-32 serial ports, cheap, using a Teensy 4.1?
« Reply #8 on: April 13, 2022, 01:46:41 pm »
This looks certainly interesting.

When we needed lots of RS-232 ports in our networking lab at our university, I simply used a Delock 61860 USB 2.0 to 8 x serial adapter, one Raspberry Pi and ser2net.

https://www.delock.de/produkt/61860/merkmale.html?setLanguage=en
https://sourceforge.net/projects/ser2net/

The delock device is nice! Do any of you guys know of a similar device that has TTL levels instead of "true" RS232 ?
I often need at lot of serial ports for field testing (for debug data from target systems)
 


Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6227
  • Country: fi
    • My home page and email address
Re: Need eight RS-232 serial ports, cheap, using a Teensy 4.1?
« Reply #10 on: April 13, 2022, 05:36:08 pm »
This is unlikely to help here, but since the TTL or voltage level issue came up...

I have a variety of SBCs and routers that have serial consoles on UART ports with specific voltage levels: 1.8V, 3.3V, and 5V.  They often have no protection, so overvoltage can do irreparable damage (essentially require replacing the SoC to get the serial port functionality back, since it is often implemented directly on the SoC).

All my devices have both Vcc and GND pins in addition to the data pins (RX, TX; some, but not all, have hardware handshaking, i.e. CTS and RTS), so I do not actually need to know the voltage used on the UART pins; I just want the voltage levels to match that Vcc pin.

I have used SN74LVC1T45 dual supply bus transceivers (-DVBR, 6-pin SOT-23 footprint, single-bit), as they support any voltage between 1.65V and 5.5V on either side, with switching time less than 20ns, and were easily available.  (In fact, LCSC still has lots of them available, as of this writing, for USD $0.541 each in lots of ten.  They also have the same chip in smaller footprints and other manufacturers, but me bumblefuck need the largest footprint for easier soldering.)

Yet, I've often discovered that if I were to use digital isolators (2/2, for TxD and RTS, and RxD and CTS), I could solve both voltage level and ground loop issues at once.  Say, ISO6742 (Texas Instruments), Si8642 (Skyworks Solutions), MAX14932 (Maxim Integrated), and so on.  (I personally do not need the additional RS-232 signals, and often could actually do with just 1/1 for TxD and RxD only.)  Of these, ISO6472 can work with 1.8V, or 2.25 to 5.5V; Si8642 with 2.5V to 5.5V; and MAX14932 from 1.71V to 5.5V.  There are other ones too, obviously; these are just the ones I've looked at.

Right now, digital isolator chips seem to be very hard to find.  TME does have some ADuM chips, so if I was really in need, I'd use one with isolated DC-DC converter (so that the isolator worked at 5V or 3.3V on both sides), and SN74LVC1T45 or similar dual supply bus transceivers on the downstream end (for proper voltage level shifting); possibly with a optionally selectable linear regulator footprint, so that one could select the final downstream voltage between a supply pin, and the linear regulator.  Choose a regulator footprint with 1.8V and 3.3V regulators, and you can use the same board for isolated UART connections at a selectable voltage level.

Currently, I actually use an USB isolator (cheap ADuM3160 12Mbit/s isolators off eBay; they're straight from the datasheet, just check the DC-DC converter used, and even the $10 ones are quite okay to use for this in my experience) between the microcontroller or USB-to-UART converter, so I get the isolation I want anyway, and the SN74LVC1T45 level shifters give me the level shifting capability.

I do have a Teensy 4.1, so I guess I could create a carrier board exposing all the UART RX and TX pins with a suitable SN74LVC1T45 each, in EasyEda.  Teensy 4.0 exposes five UARTs on 0.1" pitch, though, so I'd actually recommend using 4.0s instead of 4.1s (because 4.0 is still available from PJRC.com for $20 each).  There are additional two on the pads beneath, for a total of 7 RX/TX pairs, but they're much more trickier to solder to than the standard 0.1" pitch through holes on the perimeter.  While not all of the UARTs have FIFOs, it is fast enough with LOTS of RAM so it should not be a problem at all.  (My real world tests using Teensy 4.0 indicates it can trivially sustain 200 Mbit/s in one direction using USB Serial, so USB bandwidth and Teensy speed is definitely not an issue.)
The only questions are, really, how should the four pins – Vcc, RX, TX, GND – per UART be exposed: 0.1" through-holes/pins?  Some kind of connector? And should it be a carrier board (sitting beneath the Teensy board), or a separate board you connect with wires?
 
The following users thanked this post: cgroen

Offline cgroen

  • Supporter
  • ****
  • Posts: 631
  • Country: dk
    • Carstens personal web
Re: Need eight RS-232 serial ports, cheap, using a Teensy 4.1?
« Reply #11 on: April 13, 2022, 05:56:55 pm »
Thanks for the hints!
What I'm looking for is a "finished" solution (I look at it as a "hammer", just a tool ;) )
I could easily do with just the RxD (and GND) for 8 channels, and would also not need isolation (devices are battery supplied)
I'll keep looking :)
 

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 3894
  • Country: gb
Re: Need eight RS-232 serial ports, cheap, using a Teensy 4.1?
« Reply #12 on: April 13, 2022, 06:45:57 pm »
@Nominal Animal

Eh, today I bought qty = 4 radio modules made by AUREL. The idea is to create radio-RS232 modules, half-duplex, with a carrier frequency of ~ 400Mhz, and capable of transmitting and receiving signals up to 38Kbps.

There are 8 channels, the idea is to add four dispswitches so each module can select its ID. All the 8 channels will be mixed on the same antenna on the bridge-side.

The problem is how to balance the package, but once you have found a good workaround, you can embed an MPU inside the radio and you are ready to use it up to 8 devices serially and wireless.

Will it work? Who knows :D
« Last Edit: April 13, 2022, 07:01:33 pm by DiTBho »
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6337
  • Country: ca
  • Non-expert
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf