Boxed MCU with RS-232 Port

I'm reading Maxim's datasheet, see

formatting link
you're looking at a sheet from another manufacturer that may change, leading to the same kind of incompatibility as seen with the MAX232 variants.

Not recently but over time, yes. From memory the initial spec was

+/-12V. I think it was RS232C that lowered it to +/-9V but don't hold me to that. It was either RS232E or F that lowered it again to +/-5V. Even the 'F' revision is fairly old now, but 'C' got so deeply ingrained it's not unusual to see references to RS232C even today. All specify inputs must tolerate up to +/-25V so there is cross-compatibility in terms of avoiding damage at least, but RS232 is one of those standards that often doesn't get implemented rigidly, e.g. power thieves, discrete implementations that are not strictly compliant, and so on.

Acknowledged. MAX232 is the classic part for this application and where I suspect most people will have gained their initial experience. It's the one that has the most issue with the cap sizing. It's also a 5V only part. The MAX2323 is a 3.3V/5V part, at 5V it's interchangable with the MAX232 but the latter has higher output levels. If thresholds are the marginal factor here that's why I suggest it as a possible experiment.

Reply to
Andrew Smallshaw
Loading thread data ...

Sorry, to emphasise again, a MAX232_A_ can be substituted. A genuine Maxim MAX232 needs larger caps.

Reply to
Andrew Smallshaw

Did you look at the data sheet you linked to? What are the minimum capacitor recommendations for the MAX3232?

I think your memory is faulty. It has always been a minimum of ±5V at the driver output as long as I can recall. RS232C is from 1969. More recent changes were made to make the standard interworkable with ITU-T/CCITT V.24.

The receiver voltage requirement of ±3V allows for variation in the actual threshold of the receiver. The spec has also always allowed up to ±25V at the driver, unloaded, and an output resistance of 3 to 7 kohms. The difference between the output and input voltage ranges allows for at least 2V of noise on the line.

If the voltage levels are marginal, that would best be discovered by using an oscilloscope to measure them as well as the rise/fall times and the pulse timings.

Reply to
Rick C

I was wondering about boxes that do MIDI, eg MIDI to USB conversion. MIDI is just serial with a strange (31K) baud rate, and those boxes often have multiple MIDI ports (although not as many UARTs as ports). The downside is that MIDI is a current loop so the electrical signalling is wrong.

Also wondered if there are RS232-to-X boxes (eg USB) where the main chip is an MCU that can be reprogrammed. But if you want two ports that's harder.

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

formatting link
they have a DB9 to DB9 version:
formatting link
used to be a very common design but seems harder to find these days)

Theo

Reply to
Theo

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.

Reply to
Paul Rubin

Does that refer to the SD card failing? I didn't realize you were envisioning saving any data on the Pi. If you were using a RPi type of board presumably you'd upload incoming data (maybe over a network) as it arrived. But that is far away from the Arduino approach.

Ok, so it sounds like you are confident that something is really wrong with the Arduino boxes that are failing. Seems reasonable.

Reply to
Paul Rubin

I don't think we are communicating at all. 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. Sorry if I've misled you.

Reply to
Rick C

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.

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:

formatting link
or else there are dual RS232 to Modbus/RS485 converters:
formatting link
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.

Theo

Reply to
Theo

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.]

Reply to
Grant Edwards

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.

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.

Reply to
Rick C

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.

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.

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!

Reply to
Rick C

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.

Reply to
Rick C

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.

Reply to
Paul Rubin

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:

formatting link
Could something with a USB host port that you can plug an FTDI cable be ok?

Lol, all this needs is DB9's:

formatting link
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.

Reply to
Paul Rubin

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.

No, it says 5V.

2 x Serial ports, asynchronous, 5-volt, with software selectable baud rates.

Maybe. Thanks for your comments. Interesting that you found these, which I couldn't do.

Reply to
Rick C

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?

formatting link
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:

formatting link

Reply to
Paul Rubin

Il 17/01/2023 16:24, Rick C ha scritto:

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]
formatting link
Reply to
pozz

Thanks for your suggestion.

Reply to
Rick C

You indicated you wanted RS232-to-RS232, with no extra stuff. Not hardwired, not a PC, not a pile of dongles plugged into another thing. Show me the boxes that do that.

You can of course find boxes that happen to have two serial ports as well as (lots of) other stuff. But they're designed to do some other 'X' (eg Modbus), and aren't (officially) reprogrammable.

What is the use case for a programmable RS232-to-RS232 product? If you can think of a use case, maybe you can find somebody who makes such a thing.

Alibaba is a good place to answer the question 'if you can think of it, does it exist?'. I would not buy them from there. But, for example, it turned up the dual RS232 to Modbus converters. Once knowing that as a possible market I might then go and see if there was a sensible supplier of that.

Searching Alibaba did not come up with examples of boxes doing RS232 to RS232, which suggests that specifically is a market that doesn't really exist.

A PLC is one starting point - maybe there's a dual RS232 PLC out there. Alibaba shows various RS232 PLCs - maybe something like that would suffice (from a local supplier)?

Theo

Reply to
Theo

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.