EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Boxed MCU with RS-232 Port

Started by Rick C January 17, 2023
On Thursday, January 19, 2023 at 7:41:28 AM UTC-5, Don Y wrote:
> On 1/19/2023 3:29 AM, Theo wrote: > > I'm not really surprised, because the existence of a piece of hardware > > depends on a pre-existing market for that hardware. The market for > > RS232-to-X is well established, for various X. But RS232 to RS232 seems > > less likely, because it's not clear what people would use it for. > > > > The secondary question is, if a thing of the right shape exists, whether it > > can be reprogrammed. That is more common in an RS232-to-X product where > > some protocol conversion is involved, but often those are fixed-function > > chips (eg RS232 to USB). Even if it is reprogrammable, it may be > > 'unofficially', in which case you're maybe in a lifetime buy situation in > > case they change the MCU or something that would mean your reprogramming > > strategy no longer works. > > > > In the latter case I'd hunt around Alibaba looking for things of the right > > shape, but I think you'd first need to establish a use case that you can > > search for. Without that, it's just a 'box with MCU and two serial ports' > > and why would somebody want that? > > > > The alternative is to go for something highly overspecced that just happens > > to have two serial ports. A PC is an obvious one: > > https://www.alibaba.com/product-detail/Factory-Wholesale-Price-Dual-Band-Soft_1600482484162.html? > > > > or else there are dual RS232 to Modbus/RS485 converters: > > https://www.alibaba.com/product-detail/USR-N520-H7-Version-Dual-Port_60593907847.html > > and maybe you could reprogram those (it claims an ST Cortex M7). > > But it's pot luck whether the next batch will have a different CPU - the > > listing says they already revved it from a TI Cortex M4. > Two-port terminal server -- with a single PC to service as many as necessary. > No changes to the TS. If the TS is redesigned, the i/f (to the network) > will remain the same (excepting, possibly, configuration options if not > autobaud). SW resides in the PC -- and can snoop/log/replace/remote the > data if ever necessary without upgrading "firmware" in a device. Secure > comms to/from the PC so it's AS IF it was hidden in firmware. > > Costly, though. And, adds the need for a PC (which can likely be shared). > But, easy-peasy to implement!
If you add a PC, there's no need for the terminal server. There's also no need for about half the equipment in this system. But thanks for the thought.
> As you said, unless there is an existing market, who's going to bother > designing it?
There are many, many devices that you can program. They are just more complex than required. There are many, many devices that are MCUs with dual RS232 ports, just just don't come in boxes. It's silly to think there is *no* market for a controller with two serial ports, in an enclosure. We just haven't found the devices. Thanks for the suggestions. -- Rick C. ++- Get 1,000 miles of free Supercharging ++- Tesla referral code - https://ts.la/richard11209
On Thursday, January 19, 2023 at 5:29:44 AM UTC-5, Theo wrote:
> Paul Rubin <no.e...@nospam.invalid> wrote: > > Theo <theom...@chiark.greenend.org.uk> writes: > > > Another thought is to find a common 'gender changer' case, a plastic case > > > that would take a DB9 connector at each end, and drop in your own PCB. eg > > > > I think the hope is to not build hardware at all, including dropping > > boards into things, but instead to buy a complete and packaged box that > > you can plug cables into. I'm surprised that it seems this difficult. > > Maybe it is an opportunity. > I know, but I don't think there are better options. > > I'm not really surprised, because the existence of a piece of hardware > depends on a pre-existing market for that hardware. The market for > RS232-to-X is well established, for various X. But RS232 to RS232 seems > less likely, because it's not clear what people would use it for.
You aren't making sense. There are literally hundreds if not thousands of boxes with two serial ports. Some have only that. Others have extra ports. But none are programmable. There are lots of programmable controllers with dual serial ports, but not in an enclosure. Not sure what you are trying to say. But it's not important, because it's not an advancement toward a solution.
> The secondary question is, if a thing of the right shape exists, whether it > can be reprogrammed. That is more common in an RS232-to-X product where > some protocol conversion is involved, but often those are fixed-function > chips (eg RS232 to USB). Even if it is reprogrammable, it may be > 'unofficially', in which case you're maybe in a lifetime buy situation in > case they change the MCU or something that would mean your reprogramming > strategy no longer works. > > In the latter case I'd hunt around Alibaba looking for things of the right > shape, but I think you'd first need to establish a use case that you can > search for. Without that, it's just a 'box with MCU and two serial ports' > and why would somebody want that?
Alibaba is literally the last place I would by something like this, for all the obvious reasons, including the risk of never seeing the product or your money again.
> The alternative is to go for something highly overspecced that just happens > to have two serial ports. A PC is an obvious one: > https://www.alibaba.com/product-detail/Factory-Wholesale-Price-Dual-Band-Soft_1600482484162.html? > > or else there are dual RS232 to Modbus/RS485 converters: > https://www.alibaba.com/product-detail/USR-N520-H7-Version-Dual-Port_60593907847.html > and maybe you could reprogram those (it claims an ST Cortex M7). > But it's pot luck whether the next batch will have a different CPU - the > listing says they already revved it from a TI Cortex M4.
None of these devices are programmable and... they are from Alibaba. I'm trying to remember, who was Alibaba associated with? Oh yeah, forty thieves! -- Rick C. +++ Get 1,000 miles of free Supercharging +++ Tesla referral code - https://ts.la/richard11209
On Thursday, January 19, 2023 at 11:07:30 AM UTC-5, Grant Edwards wrote:
> On 2023-01-19, Theo <theom...@chiark.greenend.org.uk> wrote: > > > I'm not really surprised, because the existence of a piece of hardware > > depends on a pre-existing market for that hardware. The market for > > RS232-to-X is well established, for various X. But RS232 to RS232 seems > > less likely, because it's not clear what people would use it for. > The company I work for used to sell a small industrial "shoebox" PC > with 8 serial ports (232/422/485 software selectable) and a small > SSD. It had some slow Intel processor and ran Windows 7 or Linux. > > It never came close to breaking even, and was carried mainly as a > convenience for customers who purchased a particular large and > profitable software product (that used serial ports) and they didn't > want to configure their own machines. 15 years ago it made sense, but > these days, everybody runs the software product on a VM and uses > Ethernet->serial interfaces for the serial ports. > > The supplier stopped making the shoebox machines, and nobody had > bought any for a couple years -- so we never bothered to find a > replacement. > > We also used to sell a family of small boxes with ARM CPUs, a bunch of > serial ports, and an RTOS-based software development kit. The cost of > supporting the SDK was way too high to justify for the meager sales to > customers who wanted to write their own firmware, so the SDK was > discontinued. [The boxes themselves are still sold running propritary > firmware for varioius applications.]
Yeah, this is still far above what this project requires, an Arduino nano and some 100 lines of custom code. As soon as you say RTOS or any OS, it has become a NASA moon shot compared to what is required. That's what is surprising me. I would have expected something along the lines of a very low end PLC. But they just don't exist really. Even if your company could not make any money on them, there are companies that sell very large quantities of products I expect. Strange. -- Rick C. ---- Get 1,000 miles of free Supercharging ---- Tesla referral code - https://ts.la/richard11209
Rick C <gnuarm.deletethisbit@gmail.com> writes:
> When the glitch happens, no further data is sent to the recipient, > until the translator is reset. At this point, you have some idea in > your mind as to what has been designed, that seems to not match > reality.
I think I understand what has been designed. What I don't have is any solid idea of what is going wrong. I therefore can't infer that the mysterious problem won't also affect other hardware. If you're not worried about that, then fine. Your judgment is better than mine when it comes to stuff like that.
Rick C <gnuarm.deletethisbit@gmail.com> writes:
> There are many, many devices that are MCUs with dual RS232 ports, just > just don't come in boxes.
It's really weird that there are many catalogs and databases of small computer products for sale. Some of them are board level products and some are boxed products. But there seems to be no obvious way to select just the boxed products. Packaged small computers certainly exist. This one is overkill, but considerably less so than a full-blown Linux box. It just doesn't have RS232: https://www.seeedstudio.com/Wio-Terminal-p-4509.html Could something with a USB host port that you can plug an FTDI cable be ok? Lol, all this needs is DB9's: https://www.tindie.com/products/tindiescx/sc131-pocket-sized-z180-romwbw-cpm-computer-kit/ Actually it doesn't say whether the serial ports have RS232 voltages, so maybe not. Given the willingness to pay $100 per unit in 10+ quantity, maybe it is easiest to get something built out of existing boards and enclosures.
On 1/19/2023 9:07 AM, Grant Edwards wrote:
> It never came close to breaking even, and was carried mainly as a > convenience for customers who purchased a particular large and > profitable software product (that used serial ports) and they didn't > want to configure their own machines. 15 years ago it made sense, but > these days, everybody runs the software product on a VM and uses > Ethernet->serial interfaces for the serial ports.
Exactly. A PC is typically limited in terms of how many ports it can support -- regardless of the aggregate data rate. OTOH, you can open a socket per "virtual serial port" and handle scores of low data rate transactions in one appliance. And, your PC can be on the other side of the continent! [I like the single port terminal servers to talk with my legacy peripherals, here. Also has the advantage that *any* PC can connect to them instead of being hardwired to *a* machine with *a* serial port!] It's only a matter of time before we see everything with a network interface (wired *or* wireless). All these other efforts will just be seen as distractions -- effort wasted pursuing half-assed solutions.
On Thursday, January 19, 2023 at 3:42:53 PM UTC-5, Paul Rubin wrote:
> Rick C <gnuarm.del...@gmail.com> writes: > > There are many, many devices that are MCUs with dual RS232 ports, just > > just don't come in boxes. > It's really weird that there are many catalogs and databases of small > computer products for sale. Some of them are board level products and > some are boxed products. But there seems to be no obvious way to select > just the boxed products. > > Packaged small computers certainly exist. This one is overkill, but > considerably less so than a full-blown Linux box. It just doesn't have > RS232: > > https://www.seeedstudio.com/Wio-Terminal-p-4509.html > > Could something with a USB host port that you can plug an FTDI cable be > ok?
The "box" is a bit consumer oriented. This is going in a water treatment facility. The rest of the system is a plexiglass tank with running water and fish, a commercial PLC/EDAS unit and a many thousand dollar water sensor. This is why I would like to change the device from what is essentially a home made, 3D printed device. In this device is an Arduino nano, affixed to a purpose built, perfboard RS-232 converter. So a shiny plastic, LCD adorned case with no screwdowns, requiring USB dongles, is not what I'm looking for.
> Lol, all this needs is DB9's: > > https://www.tindie.com/products/tindiescx/sc131-pocket-sized-z180-romwbw-cpm-computer-kit/ > > Actually it doesn't say whether the serial ports have RS232 voltages, so > maybe not.
No, it says 5V. 2 x Serial ports, asynchronous, 5-volt, with software selectable baud rates.
> Given the willingness to pay $100 per unit in 10+ quantity, maybe it is > easiest to get something built out of existing boards and enclosures.
Maybe. Thanks for your comments. Interesting that you found these, which I couldn't do. -- Rick C. ---+ Get 1,000 miles of free Supercharging ---+ Tesla referral code - https://ts.la/richard11209
Rick C <gnuarm.deletethisbit@gmail.com> writes:
> In this device is an Arduino nano, affixed to a purpose built, > perfboard RS-232 converter.... So a shiny plastic, LCD adorned case > with no screwdowns, requiring USB dongles, is not what I'm looking > for.
Ah, I see. Hmm, home-made RS232 converter on perfboard, yeah, that sounds like trouble. Maybe use a full sized Arduino (Uno or Leonardo) and an RS232 shield? https://wiki.dfrobot.com/RS232_Shield just plugs into the headers on the bigger Arduino boards. I don't know whether you can stack two of them. If you used a dongle with a cable, that whole thing could go inside an enclosure with panel mounted connectors, assuming no serious size constraints on the box. Maybe you could recycle the enclosure from a thing like this, rather than 3d printing: https://www.cableleader.com/2-way-db9-manual-data-switch-ab-male.html
Il 17/01/2023 16:24, Rick C ha scritto:
> The unit only really needs one serial port, but it is more convenient to have two connectors, so I guess it needs to ports. One port will only receive and the other only transmit, no handshaking. > > The function is pretty simple. A sensor sends a line of about 50 chars, at 9,600 bps, once per second. This box counts 20 lines and adds a header. So nothing fancy is required of the MCU. There are parameters set when starting operation. > > The main thing I'm having trouble finding, is this needs to be in a box as a unit, not a board and a box to be assembled. Google hasn't been much help returning all sorts of things that aren't useful. > > Anyone know of such a box? The programming might be contracted out, if you are interested. There's a prototype using an Arduino nano, but some of them are flaky and it would not hurt to start over from scratch. >
I don't know if the following ideas were already suggested by others in this long thread. First idea is to make your own box. I know you asked for a ready-to-use box, but for low-medium quantities and for not extremely low-cost applications, IMHO making a custom box is not so difficult. There are many many plastic or metallic enclosures amopng you can choose. Pick one of your favorite MCU EVB with expansion connector (even an Arduino with two UARTs), and pick two UART/RS232 converters on PCB (such as [1]). Put them in the box. Of course you need to make some holes or apertures in the panels and assemble some cablings. The second idea is to use one off-the-shelf box with a host USB port (based on Linux, such as Raspberry, or a simple MCU with a host USB). Now you only need a two-ports USB hub and a couple of USB/RS232 converter. Of course this isn't a box, because the USB/RS232 converters are cables, but as usual you can put them in a custom box. [2] https://www.digikey.it/short/nqf0tc78
On Friday, January 20, 2023 at 2:54:21 AM UTC-5, pozz wrote:
> Il 17/01/2023 16:24, Rick C ha scritto: > > The unit only really needs one serial port, but it is more convenient to have two connectors, so I guess it needs to ports. One port will only receive and the other only transmit, no handshaking. > > > > The function is pretty simple. A sensor sends a line of about 50 chars, at 9,600 bps, once per second. This box counts 20 lines and adds a header. So nothing fancy is required of the MCU. There are parameters set when starting operation. > > > > The main thing I'm having trouble finding, is this needs to be in a box as a unit, not a board and a box to be assembled. Google hasn't been much help returning all sorts of things that aren't useful. > > > > Anyone know of such a box? The programming might be contracted out, if you are interested. There's a prototype using an Arduino nano, but some of them are flaky and it would not hurt to start over from scratch. > > > I don't know if the following ideas were already suggested by others in > this long thread. > > First idea is to make your own box. I know you asked for a ready-to-use > box, but for low-medium quantities and for not extremely low-cost > applications, IMHO making a custom box is not so difficult. There are > many many plastic or metallic enclosures amopng you can choose. > Pick one of your favorite MCU EVB with expansion connector (even an > Arduino with two UARTs), and pick two UART/RS232 converters on PCB (such > as [1]). Put them in the box. > Of course you need to make some holes or apertures in the panels and > assemble some cablings. > > The second idea is to use one off-the-shelf box with a host USB port > (based on Linux, such as Raspberry, or a simple MCU with a host USB). > Now you only need a two-ports USB hub and a couple of USB/RS232 > converter. Of course this isn't a box, because the USB/RS232 converters > are cables, but as usual you can put them in a custom box. > > > [2] https://www.digikey.it/short/nqf0tc78
Thanks for your suggestion. -- Rick C. --+- Get 1,000 miles of free Supercharging --+- Tesla referral code - https://ts.la/richard11209

The 2024 Embedded Online Conference