Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Boxed MCU with RS-232 Port

270 views
Skip to first unread message

Rick C

unread,
Jan 17, 2023, 10:24:33 AM1/17/23
to
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.

--

Rick C.

- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209

Paul Rubin

unread,
Jan 17, 2023, 2:31:21 PM1/17/23
to
Rick C <gnuarm.del...@gmail.com> writes:
> 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.

There's about a gazillion industrial computers that do this, though they
are probably overkill and more expensive than one would prefer. This
one is on the front page of cnx-software right now:

https://www.cnx-software.com/2023/01/17/edatec-cm4-sensing-industrial-computer-offers-can-bus-rs485-and-rs232-interfaces/

Note that most of the boxed computers on that blog are quite powerful,
more than you need for this:

https://www.cnx-software.com/news/industrial

You could try a more general web search for "industrial embedded
computer" if that is the sort of thing you want. Do you need the box to
come from a real manufacturer with customer support? Is the idea to
deploy a moderate number of these, say dozens? A much larger number?
Or is it basically a one-off?

If characters are coming in at the full speed of the 9600 bps port, and
going out at the same speed, and more characters are going out than
coming in (because of the headers being added), how is this supposed to
work with no flow control?

Regarding the programming, if it is just as you describe, there is not
much to it, I would have thought.

If there is only one input port to this box, why use a box at all,
rather than have the sensor emit the header every 20 lines?

Rick C

unread,
Jan 17, 2023, 3:19:12 PM1/17/23
to
On Tuesday, January 17, 2023 at 3:31:21 PM UTC-4, Paul Rubin wrote:
> Rick C <gnuarm.del...@gmail.com> writes:
> > 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.
> There's about a gazillion industrial computers that do this, though they
> are probably overkill and more expensive than one would prefer. This
> one is on the front page of cnx-software right now:
>
> https://www.cnx-software.com/2023/01/17/edatec-cm4-sensing-industrial-computer-offers-can-bus-rs485-and-rs232-interfaces/
>
> Note that most of the boxed computers on that blog are quite powerful,
> more than you need for this:
>
> https://www.cnx-software.com/news/industrial

Yes, way overkill. I think I said the initial units use the Arduino nano. No OS required, and in fact is a liability.


> You could try a more general web search for "industrial embedded
> computer" if that is the sort of thing you want.

Yes, and I get the sort of things you link to above.


> Do you need the box to
> come from a real manufacturer with customer support? Is the idea to
> deploy a moderate number of these, say dozens? A much larger number?
> Or is it basically a one-off?

I think they have built a dozen now. They expect to build a few more before the modify the receiver of the data to handle this function. They are making this with an Arduino nano and a small custom board for the RS-232 converter, in a 3d printed box. All of that is fine I expect. But they are having this problem.

Here's what I would like to use.
https://www.brainboxes.com/product/usb-to-serial/usb/us-257
https://www.brainboxes.com/product/ethernet-to-serial/db9/es-257
Right size, right case. But they are not a computer as such, they're USB or Ethernet based serial port adapters. I've written to them to see if this unit can be programmed by the user.


> If characters are coming in at the full speed of the 9600 bps port, and
> going out at the same speed, and more characters are going out than
> coming in (because of the headers being added), how is this supposed to
> work with no flow control?

You mean, how would it work *with* flow control, right? The data is coming in, 9,600 bps, 50 chars per second. There is a ton of idle time to send the headers between the 50 char messages.


> Regarding the programming, if it is just as you describe, there is not
> much to it, I would have thought.

There's always more than meets the eye. I looked at the code and although it's Arduino code, it is enough like C that I can tell it's missing a few things. One is, the files I have are line delimited by the DOS convention, /r/n. The program counts lines by checking for /r, ignoring /n. I don't know if that would cause any problems, but if the /r is missed from data corruption, the character buffer would likely overflow, causing who knows what harm. The character count should be checked for bounds. I'm not even sure why the data is being buffered, it could be sent through one character at a time, simply monitoring for the end of line.


> If there is only one input port to this box, why use a box at all,
> rather than have the sensor emit the header every 20 lines?

We don't control the sensor. It used to send a periodic header. They changed to a new model or an upgrade, or something else which means the header is no longer sent.

If I wasn't up to my ears, I would take this on. But I am, so I can't. But that may change.

Thanks for your reply.

--

Rick C.

+ Get 1,000 miles of free Supercharging
+ Tesla referral code - https://ts.la/richard11209

Paul Rubin

unread,
Jan 17, 2023, 4:08:01 PM1/17/23
to
Rick C <gnuarm.del...@gmail.com> writes:
> Yes, way overkill. I think I said the initial units use the Arduino
> nano. No OS required, and in fact is a liability.

The OS won't hurt, but maybe it won't help much if the thing is this
simple. I can say I worked on a much fancier gadget like this using an
ARM Linux board (it intercepted and modified the data stream between a
POS terminal and a receipt printer, doing full duplex comms on both
sides while also getting data from the internet) and it worked fine
using the on-board 16550-style UARTs.

> They are making this with an Arduino nano and a small custom board for
> the RS-232 converter, in a 3d printed box. All of that is fine I
> expect. But they are having this problem.

Hmm, I wonder if it can be diagnosed, if they are ok keeping on using
the same hardware. Any idea what was going wrong? Flaky hardware?
Underpowered RS232 ports?
Those look nice. I will keep looking around / asking around.

> There is a ton of idle time to send the headers between the 50 char
> messages.

Ah right, I had missed or forgotten that there was just one message per
second. Yes, you are fine.

> There's always more than meets the eye. I looked at the code and
> although it's Arduino code, it is enough like C that I can tell it's
> missing a few things.

Arduino code is C++ with some special libraries and light preprocessing,
so it shouldn't be too big a deal to hack it.

> I don't know if that would cause any problems, but if the /r is missed
> from data corruption, the character buffer would likely overflow,
> causing who knows what harm....

Fair enough, yes, the program should check for various kinds of errors.

Is it disastrous if an error results in some kind of alert that
temporarily stops operation? The idea is to deploy something that
passes reasonable testing, possibly hit a few unexpected error
conditions during initial production, fix those, and hopefully be
reliable afterwards, but have it not be catastrophic if something goes
wrong after a long period.

What do you want to have happen in case of data corruption anyway? Do
the messages have checksums and should the pass-through box check them?

> I'm not even sure why the data is being buffered, it could be sent
> through one character at a time...

If this thing is susceptible to later feature creep, the buffering might
make things easier.

It seems to me that if you have another person involved with the
programming, that person should be close to the customer site in order
to diagnose issues that might come up with the installed systems. Or at
least, they should have real sensor hardware that they can test with.

> If I wasn't up to my ears, I would take this on. But I am, so I
> can't.

Understandable ;).

Rick C

unread,
Jan 17, 2023, 4:29:31 PM1/17/23
to
On Tuesday, January 17, 2023 at 5:08:01 PM UTC-4, Paul Rubin wrote:
> Rick C <gnuarm.del...@gmail.com> writes:
> > Yes, way overkill. I think I said the initial units use the Arduino
> > nano. No OS required, and in fact is a liability.
> The OS won't hurt, but maybe it won't help much if the thing is this
> simple. I can say I worked on a much fancier gadget like this using an
> ARM Linux board (it intercepted and modified the data stream between a
> POS terminal and a receipt printer, doing full duplex comms on both
> sides while also getting data from the internet) and it worked fine
> using the on-board 16550-style UARTs.
> > They are making this with an Arduino nano and a small custom board for
> > the RS-232 converter, in a 3d printed box. All of that is fine I
> > expect. But they are having this problem.
> Hmm, I wonder if it can be diagnosed, if they are ok keeping on using
> the same hardware. Any idea what was going wrong? Flaky hardware?
> Underpowered RS232 ports?

I don't know. The original guy who designed this is a bit busy. Because the problem is associated with some specific units, it's not terribly likely to be a coding issue. But who knows? Once the error is observed, a power cycle is required to fix it. It's not a one time glitch.


> > Here's what I would like to use.
> > https://www.brainboxes.com/product/usb-to-serial/usb/us-257
> Those look nice. I will keep looking around / asking around.
> > There is a ton of idle time to send the headers between the 50 char
> > messages.
> Ah right, I had missed or forgotten that there was just one message per
> second. Yes, you are fine.
> > There's always more than meets the eye. I looked at the code and
> > although it's Arduino code, it is enough like C that I can tell it's
> > missing a few things.
> Arduino code is C++ with some special libraries and light preprocessing,
> so it shouldn't be too big a deal to hack it.
> > I don't know if that would cause any problems, but if the /r is missed
> > from data corruption, the character buffer would likely overflow,
> > causing who knows what harm....
>
> Fair enough, yes, the program should check for various kinds of errors.
>
> Is it disastrous if an error results in some kind of alert that
> temporarily stops operation? The idea is to deploy something that
> passes reasonable testing, possibly hit a few unexpected error
> conditions during initial production, fix those, and hopefully be
> reliable afterwards, but have it not be catastrophic if something goes
> wrong after a long period.

This is actually a patch added when the sensor was changed to an updated model which no longer outputs the same format or the headers. It is likely to be dealt with by a change in the device that receives the reformatted data... at some point.


> What do you want to have happen in case of data corruption anyway? Do
> the messages have checksums and should the pass-through box check them?

I don't know. I think Checksums are overkill and just not appropriate. There's no one to add or check the checksums. I believe this is data that is simply being logged. The real problem is not the glitch, but that the failure remains until the translator is reset.


> > I'm not even sure why the data is being buffered, it could be sent
> > through one character at a time...
>
> If this thing is susceptible to later feature creep, the buffering might
> make things easier.

In talking to someone else, I remembered that the date and time formats are changed as well, so that's why the message is buffered.


> It seems to me that if you have another person involved with the
> programming, that person should be close to the customer site in order
> to diagnose issues that might come up with the installed systems. Or at
> least, they should have real sensor hardware that they can test with.

The problem follows certain units. I don't know how they did testing, but the units that work, work.


> > If I wasn't up to my ears, I would take this on. But I am, so I
> > can't.
> Understandable ;).

Anyone else have taller ears? lol

I'd be happy with a solid CPU in a good box. The current units are hand wired, so who knows how well they are made? This is the problem when one person designs something, then another person has to make it work. You never know where the bodies are buried.

Thanks for your insights.

--

Rick C.

-- Get 1,000 miles of free Supercharging
-- Tesla referral code - https://ts.la/richard11209

Paul Rubin

unread,
Jan 17, 2023, 5:04:44 PM1/17/23
to
Rick C <gnuarm.del...@gmail.com> writes:
> Once the error is observed, a power cycle is required to fix it. It's
> not a one time glitch.

Gack, yeah. I had been thinking, this isn't my area, but my
understanding is that the RS232 electrical spec requires voltages that
are somewhat above TTL logic levels, and that various crappy devices
skimp on these voltages and mostly work anyway. So that is a thing to
suspect if a home-brew RS232 device is acting flaky. It could be that
the device at the other end expects those voltages to be closer to the
real spec.

> This is actually a patch added when the sensor was changed to an
> updated model which no longer outputs the same format or the headers.

Can I ask about the device or computer that is receiving this data?
Does that have software of its own that can be modified? Adding a
hardware box just to deal with a software protocol change seems pretty
desperate.

> The real problem is not the glitch, but that the failure remains until
> the translator is reset.

How about including a WDT that resets the circuit? Is it possible to
tell if the CPU is even still running when the device locks up?

> I'd be happy with a solid CPU in a good box. The current units are
> hand wired, so who knows how well they are made?

As a test, you could put in a laptop with an FTDI cable and see if that
is able to keep the system happy. That's how we tested all our stuff
with the POS interception thing that I mentioned.

> This is the problem when one person designs something, then another
> person has to make it work. You never know where the bodies are
> buried.

Yes, that's why getting a remote contractor involved for something this
simple sounds like more trouble than it's worth. It's much more hassle
than if the person is already there in your shop and is familiar with
the product.

Rick C

unread,
Jan 17, 2023, 5:47:40 PM1/17/23
to
On Tuesday, January 17, 2023 at 6:04:44 PM UTC-4, Paul Rubin wrote:
> Rick C <gnuarm.del...@gmail.com> writes:
> > Once the error is observed, a power cycle is required to fix it. It's
> > not a one time glitch.
> Gack, yeah. I had been thinking, this isn't my area, but my
> understanding is that the RS232 electrical spec requires voltages that
> are somewhat above TTL logic levels, and that various crappy devices
> skimp on these voltages and mostly work anyway. So that is a thing to
> suspect if a home-brew RS232 device is acting flaky. It could be that
> the device at the other end expects those voltages to be closer to the
> real spec.

They used a MAX3232CPE which generates it's own voltages using switched capacitor voltage boost. I wanted to check the values of the caps. Seems the have different minimum values depending on the Vcc voltage. But they are not in the BoM. I'll ask about this. It could easily be the cause of the problem.


> > This is actually a patch added when the sensor was changed to an
> > updated model which no longer outputs the same format or the headers.
> Can I ask about the device or computer that is receiving this data?
> Does that have software of its own that can be modified? Adding a
> hardware box just to deal with a software protocol change seems pretty
> desperate.

"Desparate"? They just don't want to mess with the box that is receiving the data, not yet anyway. This was supposed to be an easy way to get it working with a minimum of fuss. It just didn't work out.


> > The real problem is not the glitch, but that the failure remains until
> > the translator is reset.
> How about including a WDT that resets the circuit? Is it possible to
> tell if the CPU is even still running when the device locks up?
> > I'd be happy with a solid CPU in a good box. The current units are
> > hand wired, so who knows how well they are made?
> As a test, you could put in a laptop with an FTDI cable and see if that
> is able to keep the system happy. That's how we tested all our stuff
> with the POS interception thing that I mentioned.

We have units that work. We have units that fail. I don't know what we would learn from using a laptop.


> > This is the problem when one person designs something, then another
> > person has to make it work. You never know where the bodies are
> > buried.
> Yes, that's why getting a remote contractor involved for something this
> simple sounds like more trouble than it's worth. It's much more hassle
> than if the person is already there in your shop and is familiar with
> the product.

If pigs had wings, they would fly. The only trouble is, they don't have wings.

--

Rick C.

-+ Get 1,000 miles of free Supercharging
-+ Tesla referral code - https://ts.la/richard11209

Paul Rubin

unread,
Jan 17, 2023, 6:32:51 PM1/17/23
to
Rick C <gnuarm.del...@gmail.com> writes:
> "Desparate"? They just don't want to mess with the box that is
> receiving the data, not yet anyway.

Well, desperate in the sense that modifying software is usually easier
than deploying and maintaining another physical computer, but I guess it
depends on how hard it is to mess with that box.

> We have units that work. We have units that fail. I don't know what
> we would learn from using a laptop.

If the laptop worked reliably it would show that the basic FTDI
interface was sufficient. It would also allow spotting issues with the
incoming data, etc.

Someone on irc suggested using thin clients from ebay:

https://www.ebay.com/itm/125720309804

They are cheap and plentiful, but maybe not the right look, as it were.

> If pigs had wings, they would fly. The only trouble is, they don't
> have wings.

I just worry that if this is all special purpose hardware at the
endpoints, making the gizmo work may involve checking levels with an
oscilloscope and stuff like that, rather than being a pure software
matter. The laptop could help test that theory.

Rick C

unread,
Jan 17, 2023, 6:45:03 PM1/17/23
to
On Tuesday, January 17, 2023 at 7:32:51 PM UTC-4, Paul Rubin wrote:
> Rick C <gnuarm.del...@gmail.com> writes:
> > "Desparate"? They just don't want to mess with the box that is
> > receiving the data, not yet anyway.
> Well, desperate in the sense that modifying software is usually easier
> than deploying and maintaining another physical computer, but I guess it
> depends on how hard it is to mess with that box.
> > We have units that work. We have units that fail. I don't know what
> > we would learn from using a laptop.
> If the laptop worked reliably it would show that the basic FTDI
> interface was sufficient. It would also allow spotting issues with the
> incoming data, etc.

??? You seem to be missing the fact that there are existing units that do the job without a problem. The problem is linked to specific units. There's nothing to learn from using a laptop. I believe they have used a PC running Putty to capture data on the serial ports.

You are looking where the light is better, in spite of the fact we know the problems not there.


> Someone on irc suggested using thin clients from ebay:
>
> https://www.ebay.com/itm/125720309804
>
> They are cheap and plentiful, but maybe not the right look, as it were.
> > If pigs had wings, they would fly. The only trouble is, they don't
> > have wings.
> I just worry that if this is all special purpose hardware at the
> endpoints, making the gizmo work may involve checking levels with an
> oscilloscope and stuff like that, rather than being a pure software
> matter. The laptop could help test that theory.

You mean a laptop with an oscilloscope dongle? A digital measurement of the RS232 signals by a PC is not of much use if you don't know where the thresholds are.

--

Rick C.

+- Get 1,000 miles of free Supercharging
+- Tesla referral code - https://ts.la/richard11209

Paul Rubin

unread,
Jan 17, 2023, 7:04:10 PM1/17/23
to
Rick C <gnuarm.del...@gmail.com> writes:
> There's nothing to learn from using a laptop. I believe they
> have used a PC running Putty to capture data on the serial ports.

Ok, same idea.

> You mean a laptop with an oscilloscope dongle?

I mean an scope with analog inputs to check voltages, timings, noise,
etc. You have boxes that work and boxes that mostly work. What makes
the boxes different from one another? It sounds like something
somewhere is marginal.

I hope this extreme an approach is not needed, but if custom hardware is
involved and you have the final responsibility of getting everything
working, you have to be ready for whatever it might take.

I remember on the POS project, we had some kind of multi-channel logic
analyzer for this purpose, though I don't remember using it. We also
had some hacked up serial cables that let us monitor the traffic between
two devices by tapping the TX and RX pins and bringing them out to a
third DB9 plug that we connected to another computer. Those cables were
very useful. I think I can figure out how they worked, but I've been
wanting to ask the guy who built them, just to be sure.

Rick C

unread,
Jan 17, 2023, 8:32:37 PM1/17/23
to
On Tuesday, January 17, 2023 at 8:04:10 PM UTC-4, Paul Rubin wrote:
> Rick C <gnuarm.del...@gmail.com> writes:
> > There's nothing to learn from using a laptop. I believe they
> > have used a PC running Putty to capture data on the serial ports.
> Ok, same idea.
> > You mean a laptop with an oscilloscope dongle?
> I mean an scope with analog inputs to check voltages, timings, noise,
> etc. You have boxes that work and boxes that mostly work. What makes
> the boxes different from one another? It sounds like something
> somewhere is marginal.

If you know anything about RS-232, you would know that it has margin on top of margin preventing marginal issues. The spec is that the voltages between +3V and -3V at the input of the receiver, while the driver is specified to drive at least ±5V. There's 2V margin. Then there's the fact that the actual threshold of the receiver is around 0.7V. I measured this once, but I don't recall the exact number, it might be more like 1.0V. The point is, there's another 2V margin.

I've asked for the values of the caps on the MAX3232 chip. If one of those is out of spec, it could impact the drive capability.

I don't have the units, so I can't put a scope on anything.


> I hope this extreme an approach is not needed, but if custom hardware is
> involved and you have the final responsibility of getting everything
> working, you have to be ready for whatever it might take.
>
> I remember on the POS project, we had some kind of multi-channel logic
> analyzer for this purpose, though I don't remember using it. We also
> had some hacked up serial cables that let us monitor the traffic between
> two devices by tapping the TX and RX pins and bringing them out to a
> third DB9 plug that we connected to another computer. Those cables were
> very useful. I think I can figure out how they worked, but I've been
> wanting to ask the guy who built them, just to be sure.

Not sure how a logic analyzer would help. That's for digital signals. You are talking about an analog issue.

I would like to find some hardware appropriate to the task. I can't even find an Arduino compatible board that has an RS-232 level shifter chip on the board. Everyone just copies the same design. I also can't find any lower end MCU in an enclosure with two serial ports. Everything I've found is a hulking x86 compatible gadget with all sorts of high end interfaces, and only one serial port if any. I guess that's why the guy made his own box. But there are tons of RS-232 interface boards to use with the Arduino. I guess the fact that they have the DB-9 connector is a problem.

--

Rick C.

++ Get 1,000 miles of free Supercharging
++ Tesla referral code - https://ts.la/richard11209

Paul Rubin

unread,
Jan 17, 2023, 11:02:22 PM1/17/23
to
Rick C <gnuarm.del...@gmail.com> writes:
> Not sure how a logic analyzer would help. That's for digital signals.
> You are talking about an analog issue.

The logic analyzer for the POS thing was probably for debugging timing
problems. I think it was able to timestamp more accurately than our
software hack could. You are right that it wouldn't handle analog
issues.

> Everything I've found is a hulking x86 compatible gadget with all
> sorts of high end interfaces, and only one serial port if any.

There's a number of ARM boards with RS232 but that's just x86 in
minuature, perhaps. Here is one with two RS232's, and again way more
other stuff than you want:

https://www.olimex.com/Products/ARM/NXP/LPC2378-STK/

Actually it looks like they have (had?) an AVR board with RS232 (single
port, meh). It is out of stock though, and (who knows) maybe
discontinued:

https://www.olimex.com/Products/AVR/Development/AVR-CAN/

Were you thinking of using a single port and splitting out the TX and RX
wires? That is a little bit too hacky imho.

The company is in Bulgaria but some of their stuff is stocked by
Digikey, so you could check there.

Also maybe this?

https://microcontrollershop.com/product_info.php?products_id=3517

Claims to have two uart ports and rs232 tranceiver chip, but uses
JST-like connectors rather than DB9. Same processor as the generic ARM
Bluepill though, and no extra ports other than USB.

Hmm, this one has two DB9's:

https://microcontrollershop.com/product_info.php?products_id=743

Anyway you can find other stuff there too.

> But there are tons of RS-232 interface boards to use with the Arduino.
> I guess the fact that they have the DB-9 connector is a problem.

I think stuff these days tends to use USB, which is its own can of
worms, but it is easy to get USB to serial converter cables.

There is this though, 1 port:

https://microcontrollershop.com/product_info.php?products_id=5579

Rick C

unread,
Jan 17, 2023, 11:24:15 PM1/17/23
to
I guess I'm getting tired. If I'm buying a board, one serial port is fine. UARTs are two separate devices, a transmitter and a receiver. They are not connected other than sharing the same bit rate and other format configuration, perhaps. The only reason for wanting two serial ports would be when buying a box level product, since external wiring is simpler with two cables, rather than a Y cable

ARM boards would be fine, but I'm not making a box, so I guess this will be someone else's problem.

I'm very surprised Digikey and Mouser don't carry a box device like this. They have lots of embedded computers, but they are like a PC in a small case. Some are like rPi's, with ARM processors, but still too messy dealing with a complex processor and an OS.

--

Rick C.

--- Get 1,000 miles of free Supercharging
--- Tesla referral code - https://ts.la/richard11209

Paul Rubin

unread,
Jan 17, 2023, 11:56:13 PM1/17/23
to
Rick C <gnuarm.del...@gmail.com> writes:
> I'm very surprised Digikey and Mouser don't carry a box device like
> this.

It is weird, there must be something like that, but product search
everywhere is terrible. I notice there is a new stackexchange for
hardware recommendations:

https://hardwarerecs.stackexchange.com/

It doesn't look that great, but who knows.

> Some are like rPi's, with ARM processors, but still too messy dealing
> with a complex processor and an OS.

If you can power it up and get a linux shell and run gcc, that is pretty
easy to deal with. You don't have to worry about the amount of software
underneath the shell prompt, you don't have to worry about UART device
registers since the OS handles that, etc. I do understand that it is
hardware overkill despite this.

Rick C

unread,
Jan 18, 2023, 1:30:29 AM1/18/23
to
On Wednesday, January 18, 2023 at 12:56:13 AM UTC-4, Paul Rubin wrote:
> Rick C <gnuarm.del...@gmail.com> writes:
> > I'm very surprised Digikey and Mouser don't carry a box device like
> > this.
> It is weird, there must be something like that, but product search
> everywhere is terrible. I notice there is a new stackexchange for
> hardware recommendations:
>
> https://hardwarerecs.stackexchange.com/

Ok, I've posted there. Thanks.


> It doesn't look that great, but who knows.
> > Some are like rPi's, with ARM processors, but still too messy dealing
> > with a complex processor and an OS.
> If you can power it up and get a linux shell and run gcc, that is pretty
> easy to deal with.

That's not really true. One way of making an MCU robust, is to reboot it periodically. If it can reboot in less than a second, it can do this job while invisibly rebooting. It takes significant time to reboot an rPi. There's ZERO reason to bother with more complex hardware that still doesn't have RS-232 I/Os or a case.


> You don't have to worry about the amount of software
> underneath the shell prompt, you don't have to worry about UART device
> registers since the OS handles that, etc. I do understand that it is
> hardware overkill despite this.

No, no reason to worry about any of that, because an OS is not going to be in the device.

--

Rick C.

--+ Get 1,000 miles of free Supercharging
--+ Tesla referral code - https://ts.la/richard11209

Paul Rubin

unread,
Jan 18, 2023, 3:37:13 AM1/18/23
to
Rick C <gnuarm.del...@gmail.com> writes:
> That's not really true. One way of making an MCU robust, is to reboot
> it periodically. If it can reboot in less than a second, it can do
> this job while invisibly rebooting. It takes significant time to
> reboot an rPi.

So have it auto-reboot at night. More seriously, the thing that fails
the most on Rpi-style boards is the SD card. If you have a board that
doesn't use an SD card, it can be pretty robust.

> No, no reason to worry about any of that, because an OS is not going
> to be in the device.

Of course the Arduino library is sort of an OS, if you use it.

I still worry a little about whatever is making your existing box fail.
If you can isolate it to those capacitors or whatever it was, that is
great. Otherwise maybe you have to be ready for the possibility of
installing a ready-made box with properly working RS232 ports and still
finding that it occasionally fails the same way.

Regarding the boxed microcomputer, someone on the Forth group might know
of a suitable product? It's the type of thing they might be using.

David Brown

unread,
Jan 18, 2023, 4:04:36 AM1/18/23
to
On 17/01/2023 21:19, Rick C wrote:

> There's always more than meets the eye. I looked at the code and
> although it's Arduino code, it is enough like C that I can tell it's
> missing a few things. One is, the files I have are line delimited by
> the DOS convention, /r/n. The program counts lines by checking for
> /r, ignoring /n. I don't know if that would cause any problems, but
> if the /r is missed from data corruption, the character buffer would
> likely overflow, causing who knows what harm. The character count
> should be checked for bounds. I'm not even sure why the data is
> being buffered, it could be sent through one character at a time,
> simply monitoring for the end of line.

You mean "\r" and "\n" here - programming is fussy about the details!

When counting line endings, I usually accept either character, and if
"\r" is received then a following "\n" is ignored (and vice versa - some
people get things wrong and send "\n\r").

The standard for DOS is "\r\n", the standard for *nix is "\n", and the
standard for old Macs is "\r". I would not be happy simply counting
"\r" characters unless I was sure the incoming data always used carriage
returns - if I were to pick just one character, it would be "\n". But
checking for either is best.

Data corruption is always something you have to consider. Sometimes you
can't do much about it, and will just pass on the mess - or skip it
until the data looks good again. But you at least want to make sure
there are no buffer overflows if a line ending is missed!

Andrew Smallshaw

unread,
Jan 18, 2023, 7:16:01 AM1/18/23
to
On 2023-01-17, Rick C <gnuarm.del...@gmail.com> wrote:
> On Tuesday, January 17, 2023 at 6:04:44 PM UTC-4, Paul Rubin wrote:
>> Gack, yeah. I had been thinking, this isn't my area, but my
>> understanding is that the RS232 electrical spec requires voltages that
>> are somewhat above TTL logic levels, and that various crappy devices
>> skimp on these voltages and mostly work anyway. So that is a thing to
>> suspect if a home-brew RS232 device is acting flaky. It could be that
>> the device at the other end expects those voltages to be closer to the
>> real spec.
>
> They used a MAX3232CPE which generates it's own voltages using
> switched capacitor voltage boost. I wanted to check the values of
> the caps. Seems the have different minimum values depending on
> the Vcc voltage. But they are not in the BoM. I'll ask about
> this. It could easily be the cause of the problem.

That was my first thought as well so I looked it up to double check.
The MAX3232CPE is 0.1uF across the board so far as I can see. You
do hit problems with MAX232's - the original needed 1uF caps but
the MAX232A and several alternate manufacturers specify 0.1uF as
a minimum. Problems can arise if a MAX232 is put in place of one
of the alternatives but with the 3232 I'd expect people to get it
right.

OTOH the 3232 is a 3.3V compatible part. One thing they all have
in common is the charge pumps are a bit weedy in terms of voltage,
aiming for +/-5.5V regardless of supply voltage. That's within
current specs but the RS232 minimum voltages have dropped over the
years, I suppose it's possible the port of the receiver is an
older design. In any case it doesn't leave particularly large
headroom for losses. Do you know if the protocol translator is on
a 3.3v or 5v supply? If the latter a MAX232A (note the A) is a
drop-in replacement with typical +/-10V drive. If 3.3V a booster
of some form will eliminate low voltage as an issue - in terms of
off the shelf hardware that would probably be a pair of RS232<>RS422
line extenders back to back.

--
Andrew Smallshaw
and...@sdf.org

Rick C

unread,
Jan 18, 2023, 7:43:22 AM1/18/23
to
On Wednesday, January 18, 2023 at 4:37:13 AM UTC-4, Paul Rubin wrote:
> Rick C <gnuarm.del...@gmail.com> writes:
> > That's not really true. One way of making an MCU robust, is to reboot
> > it periodically. If it can reboot in less than a second, it can do
> > this job while invisibly rebooting. It takes significant time to
> > reboot an rPi.
> So have it auto-reboot at night. More seriously, the thing that fails
> the most on Rpi-style boards is the SD card. If you have a board that
> doesn't use an SD card, it can be pretty robust.

So potentially lose an entire day of data? LOL


> > No, no reason to worry about any of that, because an OS is not going
> > to be in the device.
> Of course the Arduino library is sort of an OS, if you use it.

Now this is getting silly.


> I still worry a little about whatever is making your existing box fail.
> If you can isolate it to those capacitors or whatever it was, that is
> great. Otherwise maybe you have to be ready for the possibility of
> installing a ready-made box with properly working RS232 ports and still
> finding that it occasionally fails the same way.

Yes, and I would still need to worry about it being stepped on by a dinosaur.


> Regarding the boxed microcomputer, someone on the Forth group might know
> of a suitable product? It's the type of thing they might be using.

Maybe.

--

Rick C.

-+- Get 1,000 miles of free Supercharging
-+- Tesla referral code - https://ts.la/richard11209

Rick C

unread,
Jan 18, 2023, 7:55:44 AM1/18/23
to
On Wednesday, January 18, 2023 at 8:16:01 AM UTC-4, Andrew Smallshaw wrote:
> On 2023-01-17, Rick C <gnuarm.del...@gmail.com> wrote:
> > On Tuesday, January 17, 2023 at 6:04:44 PM UTC-4, Paul Rubin wrote:
> >> Gack, yeah. I had been thinking, this isn't my area, but my
> >> understanding is that the RS232 electrical spec requires voltages that
> >> are somewhat above TTL logic levels, and that various crappy devices
> >> skimp on these voltages and mostly work anyway. So that is a thing to
> >> suspect if a home-brew RS232 device is acting flaky. It could be that
> >> the device at the other end expects those voltages to be closer to the
> >> real spec.
> >
> > They used a MAX3232CPE which generates it's own voltages using
> > switched capacitor voltage boost. I wanted to check the values of
> > the caps. Seems the have different minimum values depending on
> > the Vcc voltage. But they are not in the BoM. I'll ask about
> > this. It could easily be the cause of the problem.
> That was my first thought as well so I looked it up to double check.
> The MAX3232CPE is 0.1uF across the board so far as I can see. You
> do hit problems with MAX232's - the original needed 1uF caps but
> the MAX232A and several alternate manufacturers specify 0.1uF as
> a minimum. Problems can arise if a MAX232 is put in place of one
> of the alternatives but with the 3232 I'd expect people to get it
> right.

The data sheet I saw has a table of minimum capacitance for three Vcc ranges, 3.3V, 5V and 3.3 to 5V approximately. Only 3.3V was 0.1 uF on all caps. The others were larger on at least one cap. Table 9-1 on page 12.


> OTOH the 3232 is a 3.3V compatible part. One thing they all have
> in common is the charge pumps are a bit weedy in terms of voltage,
> aiming for +/-5.5V regardless of supply voltage. That's within
> current specs but the RS232 minimum voltages have dropped over the
> years, I suppose it's possible the port of the receiver is an
> older design.

You mean the RS-232 (TIA/EIAI) specification has changed? I have not seen this.


> In any case it doesn't leave particularly large
> headroom for losses. Do you know if the protocol translator is on
> a 3.3v or 5v supply? If the latter a MAX232A (note the A) is a
> drop-in replacement with typical +/-10V drive. If 3.3V a booster
> of some form will eliminate low voltage as an issue - in terms of
> off the shelf hardware that would probably be a pair of RS232<>RS422
> line extenders back to back.

5V supply. I don't know why you are talking about the MAX232. I've said "MAX3232CPE" several times.

--

Rick C.

-++ Get 1,000 miles of free Supercharging
-++ Tesla referral code - https://ts.la/richard11209

Andrew Smallshaw

unread,
Jan 18, 2023, 8:22:20 AM1/18/23
to
On 2023-01-18, Rick C <gnuarm.del...@gmail.com> wrote:
>
> The data sheet I saw has a table of minimum capacitance for three
> Vcc ranges, 3.3V, 5V and 3.3 to 5V approximately. Only 3.3V was
> 0.1 uF on all caps. The others were larger on at least one cap.
> Table 9-1 on page 12. 1

I'm reading Maxim's datasheet, see
https://pdf1.alldatasheet.com/datasheet-pdf/view/73152/MAXIM/MAX3232CPE.html
If 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.

> You mean the RS-232 (TIA/EIAI) specification has changed? I have
> not seen this.

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.

> 5V supply. I don't know why you are talking about the MAX232.
> I've said "MAX3232CPE" several times.

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.

--
Andrew Smallshaw
and...@sdf.org

Andrew Smallshaw

unread,
Jan 18, 2023, 8:28:15 AM1/18/23
to
On 2023-01-18, Andrew Smallshaw <and...@sdf.org> wrote:
>
> 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.

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

--
Andrew Smallshaw
and...@sdf.org

Rick C

unread,
Jan 18, 2023, 9:20:35 AM1/18/23
to
On Wednesday, January 18, 2023 at 9:22:20 AM UTC-4, Andrew Smallshaw wrote:
> On 2023-01-18, Rick C <gnuarm.del...@gmail.com> wrote:
> >
> > The data sheet I saw has a table of minimum capacitance for three
> > Vcc ranges, 3.3V, 5V and 3.3 to 5V approximately. Only 3.3V was
> > 0.1 uF on all caps. The others were larger on at least one cap.
> > Table 9-1 on page 12. 1
>
> I'm reading Maxim's datasheet, see
> https://pdf1.alldatasheet.com/datasheet-pdf/view/73152/MAXIM/MAX3232CPE.html
> If 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.

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


> > You mean the RS-232 (TIA/EIAI) specification has changed? I have
> > not seen this.
> 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.

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.


> 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.
> > 5V supply. I don't know why you are talking about the MAX232.
> > I've said "MAX3232CPE" several times.
> 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.

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.

--

Rick C.

+-- Get 1,000 miles of free Supercharging
+-- Tesla referral code - https://ts.la/richard11209

Theo

unread,
Jan 18, 2023, 11:18:13 AM1/18/23
to
Rick C <gnuarm.del...@gmail.com> wrote:
> 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 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
https://uk.misumi-ec.com/vona2/detail/222301880534/#
- they have a DB9 to DB9 version:
https://uk.misumi-ec.com/pdf/vona/el/PVT1/PVT1_670909M_Datasheet_de_en_1.pdf
(this used to be a very common design but seems harder to find these days)

Theo

Paul Rubin

unread,
Jan 18, 2023, 5:10:18 PM1/18/23
to
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.

Paul Rubin

unread,
Jan 18, 2023, 5:19:16 PM1/18/23
to
Rick C <gnuarm.del...@gmail.com> writes:
>> More seriously, the thing that fails the most on Rpi-style boards is
>> the SD card.
> So potentially lose an entire day of data? LOL

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.

> Yes, and I would still need to worry about it being stepped on by a
> dinosaur.

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

Rick C

unread,
Jan 19, 2023, 2:15:37 AM1/19/23
to
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.

--

Rick C.

+-+ Get 1,000 miles of free Supercharging
+-+ Tesla referral code - https://ts.la/richard11209

Theo

unread,
Jan 19, 2023, 5:29:44 AM1/19/23
to
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:
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.

Theo

Don Y

unread,
Jan 19, 2023, 7:41:28 AM1/19/23
to
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!

As you said, unless there is an existing market, who's going to bother
designing it?

Grant Edwards

unread,
Jan 19, 2023, 11:07:30 AM1/19/23
to
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.]

Rick C

unread,
Jan 19, 2023, 1:00:04 PM1/19/23
to
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

Rick C

unread,
Jan 19, 2023, 1:06:48 PM1/19/23
to
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

Rick C

unread,
Jan 19, 2023, 1:14:01 PM1/19/23
to
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

Paul Rubin

unread,
Jan 19, 2023, 3:21:52 PM1/19/23
to
Rick C <gnuarm.del...@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.

Paul Rubin

unread,
Jan 19, 2023, 3:42:53 PM1/19/23
to
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?

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.

Don Y

unread,
Jan 19, 2023, 4:51:14 PM1/19/23
to
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.

Rick C

unread,
Jan 19, 2023, 5:10:54 PM1/19/23
to
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

Paul Rubin

unread,
Jan 19, 2023, 7:16:10 PM1/19/23
to
Rick C <gnuarm.del...@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

pozz

unread,
Jan 20, 2023, 2:54:21 AM1/20/23
to
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

Rick C

unread,
Jan 20, 2023, 4:03:52 AM1/20/23
to
Thanks for your suggestion.

--

Rick C.

--+- Get 1,000 miles of free Supercharging
--+- Tesla referral code - https://ts.la/richard11209

Theo

unread,
Jan 20, 2023, 8:03:30 AM1/20/23
to
Rick C <gnuarm.del...@gmail.com> wrote:
> 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.

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

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

Rick C

unread,
Jan 20, 2023, 9:28:07 AM1/20/23
to
I didn't say no "extra stuff". If it has other I/O, that's ok, just not excessive. A full blown PC has the problem that it is not easily rebooted, much larger than an MCU based device and sucks power. Here are some devices that would be perfectly suitable if they were programmable.

https://www.brainboxes.com/product/usb-to-serial/usb/us-257
https://www.brainboxes.com/product/ethernet-to-serial/db9/es-257


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

Yes, that's the problem.


> What is the use case for a programmable RS232-to-RS232 product?

Who cares? You seem just be interested in an argument. What's the use case for any programmable device? This application is a perfect example.


> If you can think of a use case, maybe you can find somebody who makes such a
> thing.

If it has serial ports and is programmable, it would not be sold for a specific use case. The industrial computers or PLC devices are not sold for a specific use case.


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

Perhaps you could explain what Modbus is and how it is related to this? Would such a converter be programmable?


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

Still hung up on "markets", eh?


> 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)?

Perhaps, but I haven't found one with any RS232, other than as attached modules and that always raises the price far too much. Even the PLC is too expensive, being some hundreds of dollars, rather than the lower end price I'm looking for.

Thanks for your comments.

--

Rick C.

--++ Get 1,000 miles of free Supercharging
--++ Tesla referral code - https://ts.la/richard11209

Herbert Kleebauer

unread,
Jan 20, 2023, 1:17:59 PM1/20/23
to
On 19.01.2023 19:06, Rick C wrote:


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

Seems you are 25 years to late. But this company is still selling
its device (with a Z180 processor). Seems this is what you are
asking for (but maybe without the price):

https://www.kksystems.com/programmable-protocol-converters/ppc-4-h2-c.html/
https://www.kksystems.com/datasheets/pdf_files/ppclft.pdf
https://www.kksystems.com/datasheets/pdf_files/ppcman.pdf



> Alibaba is literally the last place I would by something like
> this, for all the obvious reasons, including the risk of never
> Yseeing the product or your money again.

I bought many things from Aliexpress an nearly never had
any problems.

Rick C

unread,
Jan 20, 2023, 3:38:01 PM1/20/23
to
I'm pleased for you. People safely cross streets outside the crosswalk, yet people are killed doing that every day. Do you tell your kids it's a good thing to do?

--

Rick C.

-+-- Get 1,000 miles of free Supercharging
-+-- Tesla referral code - https://ts.la/richard11209

Dimiter_Popoff

unread,
Jan 20, 2023, 4:02:27 PM1/20/23
to
Buying a $10 or a $100 thing at aliexpress is not that similar
to getting killed, you know.
I have bought a lot of small stuff there and have not yet been killed.
Oh yes, and I do cross streets as I please and I am still alive, but
that's not a very similar matter, as explained above.

Rick C

unread,
Jan 20, 2023, 5:08:52 PM1/20/23
to
My experience with Alibaba is not the same as yours. With Ebay, I can dispute a sale and get a refund. Alibaba spent literally months demanding more and more things from me, many which made no sense because of the language barrier. In the end, they said I failed to prove the vendor was lying when he said he shipped the item listed. Photos were not good enough. They wanted a video for some reason. Alibaba simply does not support their customers, so I don't use them. Ebay is worth while, but some things sold are perpetually fake, or crap and you have to buy them to find out, then make the "return", which the vendor is required to pay for, so they often say keep it.

I even bought crap wire on Ebay from a vendor relatively local. The actual wire gauge was about three numbers below the claimed AWG. Bought 20 gauge and got 23 gauge. Bought 18 gauge and got 21 gauge, etc. I was getting the refund, so I thought I'd try seeing how far this went. 16 gauge was actually 19 gauge and 12 gauge, was actually 15 gauge. The vendor could not say they didn't know, the wire insulation has *their* name on it! So it's a custom marked product. How could they not know they are selling mislabeled wire?

Yeah, they all sell crap. I just find it possible to get a refund from Ebay. Alibaba, not so much.

--

Rick C.

-+-+ Get 1,000 miles of free Supercharging
-+-+ Tesla referral code - https://ts.la/richard11209

Dimiter_Popoff

unread,
Jan 20, 2023, 6:38:37 PM1/20/23
to
I am not sure I'd bother to open a $10 dispute on aliexpress, I'd
expect your outcome plus wasted time. I can't remember buying anything
which costs > $100. They try to keep their reputation (aliexpress,
not alibaba) as they make their money on huge sale quantities
of small value all over the planet.
Recently I bought a nice keyboard at something like $40+,
can't believe I got something *that* good at this price (way
better than the Cherry-G84-s I have been using for decades now).
On alibaba the risks are way higher I guess, depends on luck.
My sister buys stuff from someone in Pakistan she found over alibaba
and she is happy (many years now). No surprise your experience has
been different.
I would not consider buying chips on either alibaba or aliexpress
of course. I bought some fast HV diodes on ebay twice and what
I got was not just OK but unobtainable otherwise....
Go figure, life is colourful and full of risks of various
probabilities and stakes.

anti...@math.uni.wroc.pl

unread,
Jan 20, 2023, 8:58:49 PM1/20/23
to
IIUC Alibaba is intended for larger transactions and has different
rules than Aliexpress. I did only small or very small transactions.
For me problem with Ebay was that with cheap shipping things would
not arrive and there were no way to dispute this. I can understand
this, without tracking there is no way to know who was to blame:
seller, mail or fraudolent customer. Tracked shipping was
significantly more expensive than goods that I wanted to buy.
OTOH things with cheap/free shipping ordered on Aliexpress were
arriving fine. So my conclusion was that Ebay sellers were at
fault and I stopped buying on Ebay.

There was period when also some shipments from Aliexpress vanished,
but AFAICS Aliexpress got this under control: they have reasonably
cheap tracked shipping and it seem that on all shipments they track
if package leaves China. That probably removes all incentives
for sellers to fail sending things.

Most Aliexpress seller have resonably high volumes. They sell
what customers want to buy. It can not be completely non functional,
there are not enough fools to support this. The problem is
that most customers are unable or unwillig to fully examine
what they bought. So you get rechargable batteries with
completely bogus stated capacity or USB chargers with inflated
charging current. I bought a lot of things on Aliexpress
but I am trying to keep realistic expectations. I bought
few USB chargers knowing that stated current (2.1 A) is
much bigger than real one (0.85 A), but they were good enough
for my purpose. I bought resistors and small power transistors.
My reasoning was that making something that looks like resistor
or transistor in small/medium volume is probably more expensive
than real resistor/transistor in high volume. And hopefully
there are not enough fools to fund high volume manufacturing
of fake transistors. Well, I got resistors and resonably
performing transistors. I can not say if there are some hidden
troubles but to the moment I am satisfied with what I bought.
In the past I bought few STM chips from Chinese sellers.
AFAIK those chips were widely used in China, the unit price was
much lower than unit price from western distributors, but
significantly higher that supposed volume price. So it
looked resonable that Chinese seller could sell them at lower
margin and still make a profit. And up to now I had no
problem with those chips.

OTOH if there is advanced/rare western part it would be strange
if Chinese seller had some magic cheap source of the part, so
I am very suspicious of such offers. Power mosfets were
borderline case. Around 2019 I bought packs of 10 from several
sellers. Essentially all were out of specs (too large Rds_on). If
there were moderate discrepancy I made comments stating real paramenter,
in few cases of really large discrepancy I requested partial
refund (and got it possibly after a dispute). To say the truth,
refunds that I got were probably not worth my time, I did this
mostly from feeling of moral duty, to make sure sellers know
that there is problem and to discourage them from selling such
bad parts.

When buying on Aliexpress it is useful to read buyers comments.
Especially Russians tend to measure/test bought parts, so you
can have resonable idea what you are buying.

BTW: classic Arduino boards are supposed to have Atmega 328P.
I have heard that recently a lot of boards instead had Chinese
chip. IIUC such boards also appeared in western distribution
channels, so it is possible that some Arduino boards that you
use is equpped with Chinese chip. On paper Chinese chip should
be better than Atmega 328P, but it has incompatiblities. For
simple use in Arduino it may be compatible enough, but in case
of troubles difference between chips is one of possible reasons.

--
Waldek Hebisch

Rick C

unread,
Jan 20, 2023, 9:44:39 PM1/20/23
to
I've had exactly that problem. The only issue is that the vendor will ask you to wait another week or two, and repeat that process until the 60 day window has closed. So I say, no, I want a refund. Even if they don't cooperate, Ebay has always provided a refund. This has happened maybe four or five times. Once, the ordered item really did arrive.

> I can understand
> this, without tracking there is no way to know who was to blame:
> seller, mail or fraudolent customer. Tracked shipping was
> significantly more expensive than goods that I wanted to buy.
> OTOH things with cheap/free shipping ordered on Aliexpress were
> arriving fine. So my conclusion was that Ebay sellers were at
> fault and I stopped buying on Ebay.

The shipping on Ebay has improved. Very few of the vendors now use untracked shipping. But even if the tracking says it was delivered, you can still get a refund for an undelivered item. The shipping company does not always deliver to the right home or mailbox. Sometimes people give it to you, other times they don't. In any event, again, I've never been turned down for a refund by Ebay if I do everything right that I'm supposed to do, which is mostly, report it within 60 days of ordering.

Once a Japanese company shipped an item wrong. I don't recall the detail, but they wanted me to pay the return shipping which was not cheap. I dug my heals in and eventually lost. Don't recall the reason why. They stopped receiving my emails, or any other communications. So I opened another account, ordered the deluxe version of the same thing, shipped to another address. I made a claim with the credit card and got the refund. Then I sold this one to pay for the loss on the other one. Maybe that was dishonest, but I feel I was cheated on the first order, so justified.

I also ordered a Hantek attached oscilloscope, the low end model, to evaluate before buying a higher end model. I couldn't even get the software to load. No support to speak of, so I put in for a return. For whatever readson, the tracking was mucked and said it was never delivered. So I got the refund without an argument. Hantek is real crap goods, btw.


> There was period when also some shipments from Aliexpress vanished,
> but AFAICS Aliexpress got this under control: they have reasonably
> cheap tracked shipping and it seem that on all shipments they track
> if package leaves China. That probably removes all incentives
> for sellers to fail sending things.

No, they send something, just not anything of value. Aliexpress can't seem to understand the ICs which don't work, are counterfeit and you don't have to test every one on the reel to know they are all crap. The real issue was the language barrier. They don't speak English, rather use automated translators in both directions, so don't understand half of what you are saying. They also don't understand what an IC is and think counterfeit is only for handbags.


> Most Aliexpress seller have resonably high volumes. They sell
> what customers want to buy. It can not be completely non functional,
> there are not enough fools to support this.

LOL! If they buy counterfeit ICs at $0.05 each, they don't need to sell many at $5.00 to make profit.


> The problem is
> that most customers are unable or unwillig to fully examine
> what they bought. So you get rechargable batteries with
> completely bogus stated capacity or USB chargers with inflated
> charging current. I bought a lot of things on Aliexpress
> but I am trying to keep realistic expectations. I bought
> few USB chargers knowing that stated current (2.1 A) is
> much bigger than real one (0.85 A), but they were good enough
> for my purpose. I bought resistors and small power transistors.
> My reasoning was that making something that looks like resistor
> or transistor in small/medium volume is probably more expensive
> than real resistor/transistor in high volume. And hopefully
> there are not enough fools to fund high volume manufacturing
> of fake transistors.

I don't think you understand. There are any number of things that look like the thing they are selling you, which will pass a visual inspection if you close one eye and have no idea what you are looking for. But they are fake. Even a $0.10 transistor has a lot of markup if they only pay $0.001 each for a reject. It might work well enough to light the LED on a transistor tester.


> Well, I got resistors and resonably
> performing transistors. I can not say if there are some hidden
> troubles but to the moment I am satisfied with what I bought.

Sure, if you only need crap components, then you are good to go!


> In the past I bought few STM chips from Chinese sellers.
> AFAIK those chips were widely used in China, the unit price was
> much lower than unit price from western distributors, but
> significantly higher that supposed volume price. So it
> looked resonable that Chinese seller could sell them at lower
> margin and still make a profit. And up to now I had no
> problem with those chips.
>
> OTOH if there is advanced/rare western part it would be strange
> if Chinese seller had some magic cheap source of the part, so
> I am very suspicious of such offers. Power mosfets were
> borderline case. Around 2019 I bought packs of 10 from several
> sellers. Essentially all were out of specs (too large Rds_on). If
> there were moderate discrepancy I made comments stating real paramenter,
> in few cases of really large discrepancy I requested partial
> refund (and got it possibly after a dispute). To say the truth,
> refunds that I got were probably not worth my time, I did this
> mostly from feeling of moral duty, to make sure sellers know
> that there is problem and to discourage them from selling such
> bad parts.
>
> When buying on Aliexpress it is useful to read buyers comments.
> Especially Russians tend to measure/test bought parts, so you
> can have resonable idea what you are buying.

I've never found any selling sites with good reviews. Many are made up from whole cloth. I recall when Ebay had some sort of rating system in both directions. There were vendors who would set up buyer accounts and buy things at a penny. Good reviews in both directions and credibility would increase. Eventually Ebay put an end to it, partly by all but eliminating reviews of buyers. Now, I find very few sellers with fewer than thousands of ratings. If they have few ratings, or are below 99% positive, I avoid them if I have choice. One thing I've learned is to completely avoid flash drives on any of these sites. 90% of the time, they will fail a good memory test. Seems they use a flash drive 8 or 16 times smaller and flip the bits on the size reporting. They can sell a bunch of these before they are booted off the service.


> BTW: classic Arduino boards are supposed to have Atmega 328P.
> I have heard that recently a lot of boards instead had Chinese
> chip. IIUC such boards also appeared in western distribution
> channels, so it is possible that some Arduino boards that you
> use is equpped with Chinese chip. On paper Chinese chip should
> be better than Atmega 328P, but it has incompatiblities. For
> simple use in Arduino it may be compatible enough, but in case
> of troubles difference between chips is one of possible reasons.

I don't have details, but I'm pretty sure they are using an actual Arduino nano from the original Arduino vendor. You'd think they are buying from mainstream vendors, no fakes.

--

Rick C.

-++- Get 1,000 miles of free Supercharging
-++- Tesla referral code - https://ts.la/richard11209

Paul Rubin

unread,
Jan 20, 2023, 10:14:21 PM1/20/23
to
Theo <theom...@chiark.greenend.org.uk> writes:
> 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.

The search is not for an RS232-to-RS232 product per se, but for a small
computer with two RS232 ports. In the Z80 era, those used to be
plentiful. Of course they were considered full fledged personal
computers, in large expensive boxes, given the technology of time.

The lament is that there doesn't seem to be anything like that being
made today with modern technology. Just a small box with a programmable
microprocessor inside, and two RS232 ports. All the available products
add a massive amount of additional complexity. It does seem like an
opportunity.

Imagining making something like that for myself makes me feel dismayed.
Besides the MCU board and enclosure, you also need a bunch of mounting
screws, standoffs, connectors, an enclosure made of sheet metal, tools
to drill holes for the standoffs and make D-shaped cutouts for the DB9
connectors, burn-in testing for everything, yada yada yada. All that
stuff would have to be ordered from someplace, maybe multiple places.

Whenever I try to make anything physical, I invariably discover partway
through that I need some 10 cent part that I didn't think of earlier, so
I have to order that and wait N days for its arrival, then repeat this
process several times. This is why custom made anything costs so much.
It's not like programming where if I need some chunk of software, I can
download it and have it a minute later.

It doesn't seem like THAT outlandish a wish to hope that box described
instead exists as an off the shelf product from somewhere. It is weird
that it is so hard to find.

Don Y

unread,
Jan 20, 2023, 10:41:13 PM1/20/23
to
On 1/20/2023 8:14 PM, Paul Rubin wrote:
> Theo <theom...@chiark.greenend.org.uk> writes:
>> 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.
>
> The search is not for an RS232-to-RS232 product per se, but for a small
> computer with two RS232 ports. In the Z80 era, those used to be
> plentiful. Of course they were considered full fledged personal
> computers, in large expensive boxes, given the technology of time.

A `7180 with some level-shifters would be a 3-chip solution "from the past".
But, you'd "program" it as a PROM, not some ASL.

> The lament is that there doesn't seem to be anything like that being
> made today with modern technology. Just a small box with a programmable
> microprocessor inside, and two RS232 ports. All the available products
> add a massive amount of additional complexity. It does seem like an
> opportunity.
>
> Imagining making something like that for myself makes me feel dismayed.
> Besides the MCU board and enclosure, you also need a bunch of mounting
> screws, standoffs, connectors, an enclosure made of sheet metal, tools
> to drill holes for the standoffs and make D-shaped cutouts for the DB9
> connectors, burn-in testing for everything, yada yada yada. All that
> stuff would have to be ordered from someplace, maybe multiple places.

More importantly, you'd have to CONSTRAIN yourself to ONLY putting
those two serial ports in the design. (Hmmm, should they support
modem control signals? hardware handshaking? flow control? what
if I want to connect it to something -- in the FUTURE -- that has one
of those needs, beyond Rd/Td?)

Should it be programmable as a masked part? Or, some sort of interpreted
language? What range of bit rates should it support? 134.5? 115.2K?

I mean, if you're going to all the trouble to design/build something,
wouldn't you want to make it as "universal" as possible? I.e., like
a VENDOR supplying a product to the largest possible market for a given
price point?

> Whenever I try to make anything physical, I invariably discover partway
> through that I need some 10 cent part that I didn't think of earlier, so
> I have to order that and wait N days for its arrival, then repeat this
> process several times. This is why custom made anything costs so much.

No, folks who make custom devices for a living already have those
items on hand. They likely use a particular set of components,
hardware, enclosures, etc. Because they don't want to have to
incur *extra* costs just to put it in a ROUND box (instead of square).

> It's not like programming where if I need some chunk of software, I can
> download it and have it a minute later.
>
> It doesn't seem like THAT outlandish a wish to hope that box described
> instead exists as an off the shelf product from somewhere. It is weird
> that it is so hard to find.

Why do you consider it weird? What use do folks have of EIA232 devices,
nowadays? Are they even commonplace on PCs? Or, have they gone the way
of the floppy disk, parallel port, PCMCIA slots, ISA bus, etc.? How
much longer before optical discs will be obsolete (instead of just
obsolescent)?

Other than the "fallback interface" on my UPSs (in case the ethernet
i/f is not functioning), I can't think of a use that merits my having a
"serial cable" on hand. (I think I have an old ICE that used a serial
port) Even my older printers only use SHORT parallel cables to connect
to 1/2/3-port print servers (do I have ANY parallel ports anymore?)!

[The Market weeds out items that it doesn't consider to be of practical use]

ISTM that the entry-level product would be something with an ethernet
(or BT) port and ____________. Like a 1/2/3/etc. port terminal server
to bridge that obsolescent technology (EIA232) to more modern comms.
"You mean you have to connect that device directly to the machine
that USES it???"

What can you do with JUST a pair of serial ports? (because of the
requirement for it to be "in a box" and, thus, a *complete* product,
with just those I/Os). And, if the number of use cases is small,
you're likely going to pay a lot for that "special" ability.

The last commercial product I designed with serial ports was almost
35 years ago. And, it's goal was to *monitor* serial data streams
and provide remote notification and access to those ports (internal,
chip-level 212A modem) when certain strings were detected.

Nowadays, EVERYTHING has a network port and secure comms.

Theo

unread,
Jan 21, 2023, 5:53:37 AM1/21/23
to
Paul Rubin <no.e...@nospam.invalid> wrote:
> Theo <theom...@chiark.greenend.org.uk> writes:
> > 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.
>
> The search is not for an RS232-to-RS232 product per se, but for a small
> computer with two RS232 ports. In the Z80 era, those used to be
> plentiful. Of course they were considered full fledged personal
> computers, in large expensive boxes, given the technology of time.
>
> The lament is that there doesn't seem to be anything like that being
> made today with modern technology. Just a small box with a programmable
> microprocessor inside, and two RS232 ports. All the available products
> add a massive amount of additional complexity. It does seem like an
> opportunity.

A 'small computer' these days is a PC or a Raspberry Pi. Something smaller
than that isn't a 'computer', it's an 'embedded microcontroller' - and those
are usually expressly designed not to be programmable. Which means we're
left with repurposing something else where they happened to leave a JTAG/etc
port exposed.

A PC or Pi would be the wrong tool for the job IMO - one day you're going to
turn the power on and find the storage is corrupted or failed and it won't
boot.

The suggestion of a PLC is a good one - that is a use case for a
microcontroller-level programmable device, if you can put up with the size.
The cheap Chinese PLCs might do the job (but Rick has vetoed that route).

> Imagining making something like that for myself makes me feel dismayed.
> Besides the MCU board and enclosure, you also need a bunch of mounting
> screws, standoffs, connectors, an enclosure made of sheet metal, tools
> to drill holes for the standoffs and make D-shaped cutouts for the DB9
> connectors, burn-in testing for everything, yada yada yada. All that
> stuff would have to be ordered from someplace, maybe multiple places.

I agree, it's a PITA. Particularly if your organisation is not set up for
hardware manufacturing: if you need 100 units of the thing you aren't just
going to solder them up and screw them together yourself, but contracting
that volume out is annoying.

Personally I would design for the enclosure. With the right enclosure, like
the one I linked to, it would be PCB assembly - which you could more easily
contract out - followed by clipping the enclosure around it. There would be
no need for standoffs, screws, drilling, anything. But still clipping 100
enclosures over boards and packaging them up might not be something your org
is set up to handle - eg if you're a strictly office setup and not designed
for packaging and shipping.

> It doesn't seem like THAT outlandish a wish to hope that box described
> instead exists as an off the shelf product from somewhere. It is weird
> that it is so hard to find.

I think it's just that RS232 (at least in the DB9 form, UARTs are still
everywhere) is increasingly legacy these days, so it's getting harder to
find DB9s on things that aren't intended to convert away from RS232. The
SCADA field is the only one I can think where microcontroller RS232 might
still be popular.

Theo

Don Y

unread,
Jan 21, 2023, 7:05:55 AM1/21/23
to
On 1/20/2023 8:41 PM, Don Y wrote:
> ISTM that the entry-level product would be something with an ethernet
> (or BT) port and ____________.  Like a 1/2/3/etc. port terminal server
> to bridge that obsolescent technology (EIA232) to more modern comms.
> "You mean you have to connect that device directly to the machine
> that USES it???"

I've one of these in my toy chest:

<https://www.zdnet.com/article/shrunken-linux-enter-the-cerfcube/>

Of course, $400 and 20 years ago is likely a non-starter!

(and, as one of the six faces is explicitly omitted, I wonder if
it qualifies as "boxed"?)

anti...@math.uni.wroc.pl

unread,
Jan 21, 2023, 3:02:34 PM1/21/23
to
Rick C <gnuarm.del...@gmail.com> wrote:
> On Friday, January 20, 2023 at 8:58:49 PM UTC-5, anti...@math.uni.wroc.pl wrote:
> > Rick C <gnuarm.del...@gmail.com> wrote:
> > > On Friday, January 20, 2023 at 4:02:27 PM UTC-5, Dimiter wrote:
> > > > On 1/20/2023 22:37, Rick C wrote:
> > > > > On Friday, January 20, 2023 at 1:17:59 PM UTC-5, Herbert Kleebauer wrote:
> > > > >> On 19.01.2023 19:06, Rick C wrote:
<snip>
> > > My experience with Alibaba is not the same as yours. With Ebay, I can dispute a sale and get a refund. Alibaba spent literally months demanding more and more things from me, many which made no sense because of the language barrier. In the end, they said I failed to prove the vendor was lying when he said he shipped the item listed. Photos were not good enough. They wanted a video for some reason. Alibaba simply does not support their customers, so I don't use them. Ebay is worth while, but some things sold are perpetually fake, or crap and you have to buy them to find out, then make the "return", which the vendor is required to pay for, so they often say keep it.
> > >
> > > I even bought crap wire on Ebay from a vendor relatively local. The actual wire gauge was about three numbers below the claimed AWG. Bought 20 gauge and got 23 gauge. Bought 18 gauge and got 21 gauge, etc. I was getting the refund, so I thought I'd try seeing how far this went. 16 gauge was actually 19 gauge and 12 gauge, was actually 15 gauge. The vendor could not say they didn't know, the wire insulation has *their* name on it! So it's a custom marked product. How could they not know they are selling mislabeled wire?
> > >
> > > Yeah, they all sell crap. I just find it possible to get a refund from Ebay. Alibaba, not so much.
> > >
> > IIUC Alibaba is intended for larger transactions and has different
<snip>
> No, they send something, just not anything of value. Aliexpress can't seem to understand the ICs which don't work, are counterfeit and you don't have to test every one on the reel to know they are all crap. The real issue was the language barrier. They don't speak English, rather use automated translators in both directions, so don't understand half of what you are saying. They also don't understand what an IC is and think counterfeit is only for handbags.

My impression was that verndors understood resonably well what I
wrote and answered sensibly. The things were probably too small to
really involve a person from Aliexpress, communication from
Aliexpress looked like canned text. So really no big problem with
Engish, but potentially could be different if matters got more
complicated (more value at stake and vendor contradicting my claims).

BTW: Aliexpress want very much to translate offers into my native
Polish. Compared to English text that they have translations into
Polish are really funny/misleading.

> > Most Aliexpress seller have resonably high volumes. They sell
> > what customers want to buy. It can not be completely non functional,
> > there are not enough fools to support this.
>
> LOL! If they buy counterfeit ICs at $0.05 each, they don't need to sell many at $5.00 to make profit.

In general, probably 1 in 100 customers makes comments dealing with
actual performance of given product. So after 100 sales, if thing is
non-functional you can expect bad opinion and after that more folks
looking at what they get and cascade of more bad opinions. Actually
if thing is completely non-functional I would expect complaints
much earlier. So maybe bad guy can collect few hundreds or maybe
some thousends dollars. If one could do such thing without a cost,
then surely, there would be a lot of folks doing this. But there
is probably some cost setting Aliexpress seller account and if
enetrprise is pure fraud, then Aliexpress is likely to take some
action (say via court or police).

My impression is that complete, pure fraud is not big problem.
Rather, problematic are goods that appear to work but are substandard
or have hidden defects.

> > The problem is
> > that most customers are unable or unwillig to fully examine
> > what they bought. So you get rechargable batteries with
> > completely bogus stated capacity or USB chargers with inflated
> > charging current. I bought a lot of things on Aliexpress
> > but I am trying to keep realistic expectations. I bought
> > few USB chargers knowing that stated current (2.1 A) is
> > much bigger than real one (0.85 A), but they were good enough
> > for my purpose. I bought resistors and small power transistors.
> > My reasoning was that making something that looks like resistor
> > or transistor in small/medium volume is probably more expensive
> > than real resistor/transistor in high volume. And hopefully
> > there are not enough fools to fund high volume manufacturing
> > of fake transistors.
>
> I don't think you understand. There are any number of things that look like the thing they are selling you, which will pass a visual inspection if you close one eye and have no idea what you are looking for. But they are fake. Even a $0.10 transistor has a lot of markup if they only pay $0.001 each for a reject. It might work well enough to light the LED on a transistor tester.

I was writing about basic transitors like 2N3904, BC237 and similar.
AFAICS $0.10 for such transistor is well above market price. Few
years ago 2N3904 from big American distributor was $0.0234 per piece when
you wanted 500. About 10 years ago reputable local distributor had
basic types for equivelent of $0.015 per piece in quantities of 100.
And BF493 was half of that. This distributor had a warehouse and
same day (if order was early enough in the day) or next day shipping.

Chinese seller had batches of 100, with prices of order $1 per batch,
that is $0.01 per transitor. I was a bit curious so I looked at
availability numbers. Apparently he started from 10000 and counter
went relatively fast down. And then restarted from 10000. So
he was selling milions of transitors (10000 times 100 is milion).
I also looked at Farnell. For similar type they had something like
35000 and counters were slowly changing. So Chinese guy had _much_
larger volume than Farnell and almost surely much lower operating cost.

At prices between $0.10 and $0.20 per piece I got few TO-220
powers MOSFETS. They were out of specs and probably rejects:
both Rds_on and junction capacitance was larger than it should
be, so this was not smaller MOSFET relabeled as bigger one.
I consider them good enough for undemanding uses in experimental
circuits. Certainly I would not allow them to get anywhere
near production (too much risk that they would end up in
critical circuits).

> > Well, I got resistors and resonably
> > performing transistors. I can not say if there are some hidden
> > troubles but to the moment I am satisfied with what I bought.
>
> Sure, if you only need crap components, then you are good to go!

If I had extreme requirements, then I would not use 2N3904 or
BC237. But they are good enough for most uses.

> > In the past I bought few STM chips from Chinese sellers.
> > AFAIK those chips were widely used in China, the unit price was
> > much lower than unit price from western distributors, but
> > significantly higher that supposed volume price. So it
> > looked resonable that Chinese seller could sell them at lower
> > margin and still make a profit. And up to now I had no
> > problem with those chips.
> >
> > OTOH if there is advanced/rare western part it would be strange
> > if Chinese seller had some magic cheap source of the part, so
> > I am very suspicious of such offers. Power mosfets were
> > borderline case. Around 2019 I bought packs of 10 from several
> > sellers. Essentially all were out of specs (too large Rds_on). If
> > there were moderate discrepancy I made comments stating real paramenter,
> > in few cases of really large discrepancy I requested partial
> > refund (and got it possibly after a dispute). To say the truth,
> > refunds that I got were probably not worth my time, I did this
> > mostly from feeling of moral duty, to make sure sellers know
> > that there is problem and to discourage them from selling such
> > bad parts.
> >
> > When buying on Aliexpress it is useful to read buyers comments.
> > Especially Russians tend to measure/test bought parts, so you
> > can have resonable idea what you are buying.
>
> I've never found any selling sites with good reviews. Many are made up from whole cloth. I recall when Ebay had some sort of rating system in both directions. There were vendors who would set up buyer accounts and buy things at a penny. Good reviews in both directions and credibility would increase.

There may be something like that at Aliexpress. But I meant actual
text of comments. It would take some effort to make up text that
is belivable and it is not clear what seller would gain. Aliexpress
allow you to view opinions corresponding to given rating, so you
can look up why people give bad rating (while good ratings frequently
came with no text, bad ones usually give some justification).

> Eventually Ebay put an end to it, partly by all but eliminating reviews of buyers. Now, I find very few sellers with fewer than thousands of ratings. If they have few ratings, or are below 99% positive, I avoid them if I have choice. One thing I've learned is to completely avoid flash drives on any of these sites. 90% of the time, they will fail a good memory test. Seems they use a flash drive 8 or 16 times smaller and flip the bits on the size reporting. They can sell a bunch of these before they are booted off the service.

I never looked at flash drives online. I bought SD cards and at some
time there was flood of fake cards that reported much higher capacity
than they had. But then came programs that tested real capacity
and it seems that problem essentialy vanished. At least for
moderate capacities.

--
Waldek Hebisch

Rick C

unread,
Jan 22, 2023, 8:12:06 PM1/22/23
to
On Saturday, January 21, 2023 at 3:02:34 PM UTC-5, anti...@math.uni.wroc.pl wrote:
> Rick C <gnuarm.del...@gmail.com> wrote:
> > On Friday, January 20, 2023 at 8:58:49 PM UTC-5, anti...@math.uni.wroc.pl wrote:
> > > Rick C <gnuarm.del...@gmail.com> wrote:
> > > > On Friday, January 20, 2023 at 4:02:27 PM UTC-5, Dimiter wrote:
> > > > > On 1/20/2023 22:37, Rick C wrote:
> > > > > > On Friday, January 20, 2023 at 1:17:59 PM UTC-5, Herbert Kleebauer wrote:
> > > > > >> On 19.01.2023 19:06, Rick C wrote:
> <snip>
> > > > My experience with Alibaba is not the same as yours. With Ebay, I can dispute a sale and get a refund. Alibaba spent literally months demanding more and more things from me, many which made no sense because of the language barrier. In the end, they said I failed to prove the vendor was lying when he said he shipped the item listed. Photos were not good enough. They wanted a video for some reason. Alibaba simply does not support their customers, so I don't use them. Ebay is worth while, but some things sold are perpetually fake, or crap and you have to buy them to find out, then make the "return", which the vendor is required to pay for, so they often say keep it.
> > > >
> > > > I even bought crap wire on Ebay from a vendor relatively local. The actual wire gauge was about three numbers below the claimed AWG. Bought 20 gauge and got 23 gauge. Bought 18 gauge and got 21 gauge, etc. I was getting the refund, so I thought I'd try seeing how far this went. 16 gauge was actually 19 gauge and 12 gauge, was actually 15 gauge. The vendor could not say they didn't know, the wire insulation has *their* name on it! So it's a custom marked product. How could they not know they are selling mislabeled wire?
> > > >
> > > > Yeah, they all sell crap. I just find it possible to get a refund from Ebay. Alibaba, not so much.
> > > >
> > > IIUC Alibaba is intended for larger transactions and has different
> <snip>
> > No, they send something, just not anything of value. Aliexpress can't seem to understand the ICs which don't work, are counterfeit and you don't have to test every one on the reel to know they are all crap. The real issue was the language barrier. They don't speak English, rather use automated translators in both directions, so don't understand half of what you are saying. They also don't understand what an IC is and think counterfeit is only for handbags.
> My impression was that verndors understood resonably well what I
> wrote and answered sensibly.

I didn't say anything about the vendors not understanding. I'm talking about the dispute process. It is very heavily weighted in favor of the seller and on top of that, they have no language barrier. I had to read their Chinese, which they suddenly started using for the dispute and Alibaba use the translator to communicate with me. Much of the problem I had, was because they were asking me for very silly things, some of which was a language issue, no doubt, but also the fact that they are set up for selling funny clocks, t-shirts and handbags, not technically oriented items.


> The things were probably too small to
> really involve a person from Aliexpress, communication from
> Aliexpress looked like canned text. So really no big problem with
> Engish, but potentially could be different if matters got more
> complicated (more value at stake and vendor contradicting my claims).
>
> BTW: Aliexpress want very much to translate offers into my native
> Polish. Compared to English text that they have translations into
> Polish are really funny/misleading.

Oh, yes! The want very much to do what it takes the close the deal, they just don't care if you get ripped off.


> > > Most Aliexpress seller have resonably high volumes. They sell
> > > what customers want to buy. It can not be completely non functional,
> > > there are not enough fools to support this.
> >
> > LOL! If they buy counterfeit ICs at $0.05 each, they don't need to sell many at $5.00 to make profit.
> In general, probably 1 in 100 customers makes comments dealing with
> actual performance of given product. So after 100 sales, if thing is
> non-functional you can expect bad opinion and after that more folks
> looking at what they get and cascade of more bad opinions.

Alibaba doesn't work that way.


> Actually
> if thing is completely non-functional I would expect complaints
> much earlier. So maybe bad guy can collect few hundreds or maybe
> some thousends dollars. If one could do such thing without a cost,
> then surely, there would be a lot of folks doing this. But there
> is probably some cost setting Aliexpress seller account and if
> enetrprise is pure fraud, then Aliexpress is likely to take some
> action (say via court or police).

Alibaba has virtually no effective rating system. What is there, is easily scammed by generating fake reviews and starting over with a new company name when you get bad reviews. Like Ebay in the early days. Ebay took the matter seriously, and stopping the vendors from being able to blacklist customers because the blue the whistle. I remember sellers threatening me to give good, or no reviews.


> My impression is that complete, pure fraud is not big problem.
> Rather, problematic are goods that appear to work but are substandard
> or have hidden defects.

Your impression is very wrong. "Hidden defects" such as being totally counterfeit, meaning likely some reject part in the same package, that's not even the same part number.


> > > The problem is
> > > that most customers are unable or unwillig to fully examine
> > > what they bought. So you get rechargable batteries with
> > > completely bogus stated capacity or USB chargers with inflated
> > > charging current. I bought a lot of things on Aliexpress
> > > but I am trying to keep realistic expectations. I bought
> > > few USB chargers knowing that stated current (2.1 A) is
> > > much bigger than real one (0.85 A), but they were good enough
> > > for my purpose. I bought resistors and small power transistors.
> > > My reasoning was that making something that looks like resistor
> > > or transistor in small/medium volume is probably more expensive
> > > than real resistor/transistor in high volume. And hopefully
> > > there are not enough fools to fund high volume manufacturing
> > > of fake transistors.
> >
> > I don't think you understand. There are any number of things that look like the thing they are selling you, which will pass a visual inspection if you close one eye and have no idea what you are looking for. But they are fake. Even a $0.10 transistor has a lot of markup if they only pay $0.001 each for a reject. It might work well enough to light the LED on a transistor tester.
> I was writing about basic transitors like 2N3904, BC237 and similar.
> AFAICS $0.10 for such transistor is well above market price.

Dear god! It was just a number to illustrate the idea. Pick you own numbers.


> Few
> years ago 2N3904 from big American distributor was $0.0234 per piece when
> you wanted 500. About 10 years ago reputable local distributor had
> basic types for equivelent of $0.015 per piece in quantities of 100.
> And BF493 was half of that. This distributor had a warehouse and
> same day (if order was early enough in the day) or next day shipping.
>
> Chinese seller had batches of 100, with prices of order $1 per batch,
> that is $0.01 per transitor. I was a bit curious so I looked at
> availability numbers. Apparently he started from 10000 and counter
> went relatively fast down. And then restarted from 10000. So
> he was selling milions of transitors (10000 times 100 is milion).
> I also looked at Farnell. For similar type they had something like
> 35000 and counters were slowly changing. So Chinese guy had _much_
> larger volume than Farnell and almost surely much lower operating cost.
>
> At prices between $0.10 and $0.20 per piece I got few TO-220
> powers MOSFETS. They were out of specs and probably rejects:
> both Rds_on and junction capacitance was larger than it should
> be, so this was not smaller MOSFET relabeled as bigger one.
> I consider them good enough for undemanding uses in experimental
> circuits. Certainly I would not allow them to get anywhere
> near production (too much risk that they would end up in
> critical circuits).

Ok, buy your transistors at Alibaba. Just don't buy anything that requires some real money.


> > > Well, I got resistors and resonably
> > > performing transistors. I can not say if there are some hidden
> > > troubles but to the moment I am satisfied with what I bought.
> >
> > Sure, if you only need crap components, then you are good to go!
> If I had extreme requirements, then I would not use 2N3904 or
> BC237. But they are good enough for most uses.

Ok, so you actually want 2Nxxxx and don't care what you really get. Fine.
LOL!!! No, that's the point. It so EASY to come up with fake reviews. Just lift reviews from some other vendor. Copy-paste. That's the easy part. The hard part is setting up the new account after your old one has been ratted out. So 10 minutes, rather than just 5 minutes.


> Aliexpress
> allow you to view opinions corresponding to given rating, so you
> can look up why people give bad rating (while good ratings frequently
> came with no text, bad ones usually give some justification).

Not talking about Aliexpress. Talking about Alibaba. Aliexpress is not much different. They just work with smaller numbers.

I think the last time I used Aliexpress, I ordered two of the same FPGA boards, one with a display and one without. They shipped one FPGA board and one display. The vendor would not acknowledge my messages. Aliexpress did nothing. I had to dispute it on the credit card.


> > Eventually Ebay put an end to it, partly by all but eliminating reviews of buyers. Now, I find very few sellers with fewer than thousands of ratings. If they have few ratings, or are below 99% positive, I avoid them if I have choice. One thing I've learned is to completely avoid flash drives on any of these sites. 90% of the time, they will fail a good memory test. Seems they use a flash drive 8 or 16 times smaller and flip the bits on the size reporting. They can sell a bunch of these before they are booted off the service.
> I never looked at flash drives online. I bought SD cards and at some
> time there was flood of fake cards that reported much higher capacity
> than they had. But then came programs that tested real capacity
> and it seems that problem essentialy vanished. At least for
> moderate capacities.

Again, not my experience. The vendors got smart and provided their own images of passing the test. I was asked to show a VIDEO of the unit being tested and failing. The test takes some 12 hours or more to run!!! I had to dispute that one on the credit card. I stopped ordering flash on the Internet. I was in Microcenter today, so I picked up another 256 MB flash for $20. It's store brand, so probably not great, but it's actually the right size (minus formatting, etc).

--

Rick C.

-+++ Get 1,000 miles of free Supercharging
-+++ Tesla referral code - https://ts.la/richard11209

Rick C

unread,
Feb 3, 2023, 12:22:55 PM2/3/23
to
Crap! I posted about this in several forums and got nibbles from a few, including here. I stopped replying because the waters got more murky rather than more clear. So I wanted to wait until I had something more accurate to provide people. I am planning to reply to you too Paul Rubin. I just have some of my own stuff to deal with first.

Meanwhile, someone sent a reply by a means I don't recall. He specifically mentioned that he had designed a product in a similar enclosure to what I want. I think he even mentioned it being IP67. But durned if I can find it. EEVBLOG has the worst messaging facility. You get to see the messages coming to you, but not the messages you send. So no conversational context!

If this jogs anyone's memory, please contact me again.

--

Rick C.

+--- Get 1,000 miles of free Supercharging
+--- Tesla referral code - https://ts.la/richard11209

Rick C

unread,
Feb 3, 2023, 1:04:18 PM2/3/23
to
On Friday, February 3, 2023 at 12:22:55 PM UTC-5, Rick C wrote:
> Crap! I posted about this in several forums and got nibbles from a few, including here. I stopped replying because the waters got more murky rather than more clear. So I wanted to wait until I had something more accurate to provide people. I am planning to reply to you too Paul Rubin. I just have some of my own stuff to deal with first.
>
> Meanwhile, someone sent a reply by a means I don't recall. He specifically mentioned that he had designed a product in a similar enclosure to what I want. I think he even mentioned it being IP67. But durned if I can find it. EEVBLOG has the worst messaging facility. You get to see the messages coming to you, but not the messages you send. So no conversational context!
>
> If this jogs anyone's memory, please contact me again.

Nevermind. I found the email. I will be meeting with my brother this weekend to figure out how to proceed. Thanks for your interest.

--

Rick C.

+--+ Get 1,000 miles of free Supercharging
+--+ Tesla referral code - https://ts.la/richard11209

Rick C

unread,
Mar 22, 2023, 3:18:18 PM3/22/23
to
On Tuesday, January 17, 2023 at 11:24:33 AM UTC-4, Rick C wrote:
> 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 was skimming the web for this again and I think I found something from Aaeon. Not sure why I didn't find this before. Maybe I did, but at that time was really looking for something with a simple CPU, rather than something to run a full OS. Beggars and choosers...

https://eshop.aaeon.com/ultra-slim-box-pc-boxer-6405.html

This one is $366, which is more than I'd like, but beggars... It is cheaper than the tailored unit a guy is working on for us. A sample unit doesn't work right and debugging across an ocean is not working very well. I could have this up and running in a day or something, as long as it comes with Linux installed.

They have a cheaper unit with a single serial port, $287.

https://eshop.aaeon.com/rockchip-android-system-boxer-rk88.html

Not sure if there is any real risk to sharing the serial port between the two devices. I know there's no handshaking. In fact, the Arduino shares a single serial port.

The only real problem is communications. Aaeon only has a couple each. So far, they have not responded to my requests for delivery on 20 units.

BTW, to those who contacted me about this and haven't heard back after the initial exchange, I'm sorry. I got busy with my own work and lost track of the emails. Of those who did reply, only one had a design in a box, ready for software. But that is not yet working.

--

Rick C.

+-+- Get 1,000 miles of free Supercharging
+-+- Tesla referral code - https://ts.la/richard11209

Paul Rubin

unread,
Mar 22, 2023, 11:35:18 PM3/22/23
to
Rick C <gnuarm.del...@gmail.com> writes:
> BTW, to those who contacted me about this and haven't heard back after
> the initial exchange, I'm sorry. I got busy with my own work and lost
> track of the emails. Of those who did reply, only one had a design in
> a box, ready for software. But that is not yet working.

You still want someone to do this custom? What is your budget and how
many units do you want? Did you ever find out more about the
requirements? I know a good who is good at this stuff. You are
probably looking at $1000 or more of NRE, but spread across a few dozen
units it might not be too bad, as the hardware itself should be quite cheap.

Rick C

unread,
Mar 23, 2023, 2:26:40 AM3/23/23
to
If you are talking about someone to build a board, no thanks. That is what I meant to say in the post, but I guess I glossed over that. I found a platform that is affordable, even if it is way overkill. A custom board design is not needed. Heck, a custom board design was never needed, except that RS-232 voltage levels are needed at the serial port I/Os. Otherwise, an Arduino of some variation, would be ideal.

I will just write the software myself with the $300 platform I guess. Being a PC type platform, running an OS, updating the software is just a matter of copying a file from an SD card or a USB memory stick. It could even be hooked up through the Ethernet port, although I'm not so familiar with that these days.

Years ago, I had a couple of desktop PCs running Win2k and from the info I found on the website World of Windows Networking, was able to connect them so the disk drives were available on either machine. I tried to do the same think a couple of years ago and it was much, much harder. Microsoft has made networking much more complex now.

I did manage to find my way through management speak and arrive at a very simple set of requirements. In fact, the problem with the guy we currently have working on the effort, is he added requirements of his own, that mess up the operation we intended. We might still use his solution, if he can get it to work for us. But he's in the UK and this is mucking up the debugging.

This device goes between a sensor, and an EDAS, which is just an industrial computer acting as an intermediary, collecting other data and sending it all on to other receivers of the data. A product update in the sensor (third party product) changed the data format. Before this new sensor was used, the translator was not needed. The translator makes the new sensor output compliant with the old sensor format which is expected downstream.

Serial formats are 9600, 8, N, 1. The input data is 1 line per second, output as soon as converted. A header is appended after each 20th input line. At these data rates, there will be no handshaking and no chance of any collisions.

New data format on incoming message example:
# 032023 174930 23.024 6.79 17.37 12.44
Terminated with /r/n

Old data format on output message example:
01/30/23 19:15:28 21.788 6.23 17.41 12.66
Terminated by /r/n

The modifications in the data are removing the "# " at the beginning and inserting '\' and ':' into the date and time fields.

Every 20 lines a header should be inserted and sent to the output. If something corrupts the line count, it's not a problem.

===========================================
Date Time Temp SpCond pH ODO
m/d/y hh:mm:ss C mS/cm mg/L
-------------------------------------------
*** 1-LOG last sample 2-LOG ON/OFF, 3-Clean optics ***

Anything received that isn't in the input format specified above, should be sent on to the output. No other data should be sent to the output, such as boot messages. The only error checking should be that the line does not overflow the internal translator buffers. A watchdog timer could be used to reset the unit, if the software is lost in the weeds. The goal here is not for any data error checking, or other optimizations. If the old sensor produced any crap data, it didn't muck up the works before, and it shouldn't be a problem now, so just send it on.

I don't know for certain that the input data format is always the same length, so this should not be assumed. I would say an 80 character max length is a safe assumption. The /r/n should be the line delimiter. If garbage is received on the input before a message, it will prevent detection of the start of the message, which is fine. As soon as the next /r/n is received, it will be back in alignment. That's all that matters.

If I had more free time, I would have this done by now. lol

--

Rick C.

+-++ Get 1,000 miles of free Supercharging
+-++ Tesla referral code - https://ts.la/richard11209

Rick C

unread,
Mar 23, 2023, 2:28:03 AM3/23/23
to
The number of units required is initially 20, and probably another 20 in a few months. After that, not sure.

--

Rick C.

++-- Get 1,000 miles of free Supercharging
++-- Tesla referral code - https://ts.la/richard11209

Theo

unread,
Mar 23, 2023, 6:06:46 AM3/23/23
to
Rick C <gnuarm.del...@gmail.com> wrote:
> The number of units required is initially 20, and probably another 20 in a
> few months. After that, not sure.

We've been here before, but there are many many 'mini PCs' (often Celeron or
similar low power CPU) coming out of China that have multiple RS232 ports.
There doesn't seem to be much special about this one.

If such a 'mini PC' is within your spec (you were talking about
microcontrollers originally), it's just a case of finding a distributor who
meets your requirements. Easiest is to just go on Aliexpress [1] and buy
them, but if that's not your thing then I'm sure there is a US/wherever
importer.

If you're going to need many years worth of supply that's a bit trickier,
since they tend to update the product lines every time Intel releases a new
chip.

Theo

[1] https://www.aliexpress.com/w/wholesale-mini-pc-rs232.html

Paul Rubin

unread,
Mar 23, 2023, 11:54:54 AM3/23/23
to
Rick C <gnuarm.del...@gmail.com> writes:
> If you are talking about someone to build a board, no thanks.

No, building a board would be crazy unless you're making 1000s of them.
Pick an Arduino or similar board with RS232 support, pick some enclosure
out of a catalog, put the stuff together, get the code running on the
board and test everything, etc. Then send the assembled unit to the
actual deployment site for in situ testing before making more units.

There is always some stuff going wrong or consuming time in any process
like that. Thus there will be some NRE.

Paul Rubin

unread,
Mar 23, 2023, 12:00:35 PM3/23/23
to
Rick C <gnuarm.del...@gmail.com> writes:
> The number of units required is initially 20, and probably another 20
> in a few months. After that, not sure.

You are really willing to spend $300 per box in that quantity? So $6000
or $12000 depending? This sounds very doable.

Where is the deployment site geographically?

Rick C

unread,
Mar 24, 2023, 3:59:10 AM3/24/23
to
On Thursday, March 23, 2023 at 6:06:46 AM UTC-4, Theo wrote:
> Rick C <gnuarm.del...@gmail.com> wrote:
> > The number of units required is initially 20, and probably another 20 in a
> > few months. After that, not sure.
> We've been here before, but there are many many 'mini PCs' (often Celeron or
> similar low power CPU) coming out of China that have multiple RS232 ports.
> There doesn't seem to be much special about this one.

Yes, but initially I was looking for something more like an Arduino in a box. That never materialized. The solution we are looking at now, is a custom design someone did for another project, that suits our needs, but since the production quantities are low, the unit price is a bit steep, even if manageable.


> If such a 'mini PC' is within your spec (you were talking about
> microcontrollers originally), it's just a case of finding a distributor who
> meets your requirements. Easiest is to just go on Aliexpress [1] and buy
> them, but if that's not your thing then I'm sure there is a US/wherever
> importer.

LOL! Aliexpress is literally the last place I would go for commercial gear.


> If you're going to need many years worth of supply that's a bit trickier,
> since they tend to update the product lines every time Intel releases a new
> chip.
>
> Theo
>
> [1] https://www.aliexpress.com/w/wholesale-mini-pc-rs232.html

Useless, since you may not be able to buy the same unit even six months from now.

But thanks for the suggestion. I'm presently talking to Aaeon who has some affordable units.

--

Rick C.

++-+ Get 1,000 miles of free Supercharging
++-+ Tesla referral code - https://ts.la/richard11209

Rick C

unread,
Mar 24, 2023, 4:02:47 AM3/24/23
to
On Thursday, March 23, 2023 at 11:54:54 AM UTC-4, Paul Rubin wrote:
> Rick C <gnuarm.del...@gmail.com> writes:
> > If you are talking about someone to build a board, no thanks.
> No, building a board would be crazy unless you're making 1000s of them.
> Pick an Arduino or similar board with RS232 support,

That's one of the problems. Boards like Arduinos do not have RS-232 support. They have serial ports, but that's what was tried initially, with a home brew RS-232 level shifter added on a perf board. Don't know why, but half of them tend to hang, even if after days. Not acceptable.


> pick some enclosure
> out of a catalog, put the stuff together, get the code running on the
> board and test everything, etc. Then send the assembled unit to the
> actual deployment site for in situ testing before making more units.

Sounds great. Do you have a proposal?


> There is always some stuff going wrong or consuming time in any process
> like that. Thus there will be some NRE.

Yeah, I'll just do the software myself. The cost difference between the Arduino and a minature PC is so small, it's more than made up in the savings of not having to do any of the stuff you mentioned other than write software.

--

Rick C.

+++- Get 1,000 miles of free Supercharging
+++- Tesla referral code - https://ts.la/richard11209

Rick C

unread,
Mar 24, 2023, 4:03:32 AM3/24/23
to
Multiple. Some are in the DC area.

--

Rick C.

++++ Get 1,000 miles of free Supercharging
++++ Tesla referral code - https://ts.la/richard11209

Paul Rubin

unread,
Mar 24, 2023, 4:43:52 AM3/24/23
to
Rick C <gnuarm.del...@gmail.com> writes:
> That's one of the problems. Boards like Arduinos do not have RS-232
> support.

I thought I had located one and posted a link here. I'll look again.

> Sounds great. Do you have a proposal?

I'm open to this but I'm probably not the best person for it, since I'm
mostly a software guy. Do you have a timeframe? I can also check with
other people I know who might be interested, and will refer them to you
by email if they are.

Hans-Bernhard Bröker

unread,
Mar 24, 2023, 7:45:03 AM3/24/23
to
Am 24.03.2023 um 09:02 schrieb Rick C:
> On Thursday, March 23, 2023 at 11:54:54 AM UTC-4, Paul Rubin wrote:
>> Rick C <gnuarm.del...@gmail.com> writes:
>>> If you are talking about someone to build a board, no thanks.
>> No, building a board would be crazy unless you're making 1000s of them.
>> Pick an Arduino or similar board with RS232 support,
>
> That's one of the problems. Boards like Arduinos do not have RS-232 support. They have serial ports, but that's what was tried initially, with a home brew RS-232 level shifter added on a perf board.

Color me puzzled. Why on earth would anyone home-brew an RS232 level
shifter, particularly for a project that could clearly afford using
ready-made ICs like MAX232 instead?

Theo

unread,
Mar 24, 2023, 10:20:37 AM3/24/23
to
The problem is that commercial microcontroller boards like Arduinos tend to
have TTL level serial ports (or USB ones). If you want a box holding one of
those with some RS232 ports, you need to make a PCB with a MAX232 and a DB9,
and an enclosure to match. Rick was trying to find a box with all that
already done for him and drew a blank.

It's not the design that's the problem, it's the manufacturing.

Although for quantity 20 at these kind of price points, I might be tempted
to build something using dev boards, eg:
https://www.dfrobot.com/product-1030.html
and maybe a bit of 3D printing for an enclosure. For two of those boards
you might need to hand-patch one to use different pins, but it's not hard
and could be done.

If the customer is willing to pay $300 a unit it might be worth Rick's (or
somebody else's) time to do it. I'll be happy to take that contract, email
address works :-)

Theo

Rick C

unread,
Mar 24, 2023, 11:03:47 AM3/24/23
to
That's what they used. I simply meant it was not a commercial product on a PCB. Half the units have some problem.

Did you think I meant they designed their own level shifter chip?

--

Rick C.

----- Get 1,000 miles of free Supercharging
----- Tesla referral code - https://ts.la/richard11209

Rick C

unread,
Mar 24, 2023, 11:08:58 AM3/24/23
to
This device is exactly what makes this difficult. Which pin on the DB9 is the data output?


> If the customer is willing to pay $300 a unit it might be worth Rick's (or
> somebody else's) time to do it. I'll be happy to take that contract, email
> address works :-)

You will need to post an email address. GG doesn't provide the email. Just HBBr...@t-online.de

--

Rick C.

----+ Get 1,000 miles of free Supercharging
----+ Tesla referral code - https://ts.la/richard11209

Herbert Kleebauer

unread,
Mar 24, 2023, 12:17:17 PM3/24/23
to
On 22.03.2023 20:18, Rick C wrote:

> I was skimming the web for this again and I think I found something from Aaeon. Not sure why I didn't find this before. Maybe I did, but at that time was really looking for something with a simple CPU, rather than something to run a full OS. Beggars and choosers...
>
> https://eshop.aaeon.com/ultra-slim-box-pc-boxer-6405.html
>
> This one is $366, which is more than I'd like, but beggars... It is cheaper than the tailored unit a guy is working on for us. A sample unit doesn't work right and debugging across an ocean is not working very well. I could have this up and running in a day or something, as long as it comes
with Linux installed.


A lot of power consumption for such a task! An Atmel board
would only consume about 0.4 W, for example something like
that:

https://www.ledato.de/product_info.php?products_id=33
https://www.ledato.de/product_info.php?products_id=35

The price is crazy, but there should be similar
devices for only 1/5 of this price.


Theo

unread,
Mar 24, 2023, 12:23:58 PM3/24/23
to
Rick C <gnuarm.del...@gmail.com> wrote:
> On Friday, March 24, 2023 at 10:20:37 AM UTC-4, Theo wrote:
>
> This device is exactly what makes this difficult. Which pin on the DB9 is the data output?

TXD (output of MAX2323ESE) is pin 2, RXD (input of MAX2323ESE) is pin 3.

ie would connect to a PC via a straight-through cable, not a null modem.

> > If the customer is willing to pay $300 a unit it might be worth Rick's (or
> > somebody else's) time to do it. I'll be happy to take that contract, email
> > address works :-)
>
> You will need to post an email address. GG doesn't provide the email. Just HBBr...@t-online.de

My email is on the bottom of http://www.markettos.org.uk/

(I am in the UK, if that makes a difference)

Theo

Herbert Kleebauer

unread,
Mar 24, 2023, 1:54:42 PM3/24/23
to
The same company (ledato.de, taskit.de) has also an ARM
board with Ubuntu and 2 (or 3) RS232 ports which is cheaper:

https://www.taskit.de/produkte/flex-iot/
https://youtu.be/Fsr8F6B7j0s

Hans-Bernhard Bröker

unread,
Mar 24, 2023, 2:11:01 PM3/24/23
to
Am 24.03.2023 um 16:03 schrieb Rick C:
> On Friday, March 24, 2023 at 7:45:03 AM UTC-4, Hans-Bernhard Bröker
> wrote:
>> Am 24.03.2023 um 09:02 schrieb Rick C:

>>> That's one of the problems. Boards like Arduinos do not have
>>> RS-232 support. They have serial ports, but that's what was tried
>>> initially, with a home brew RS-232 level shifter added on a perf
>>> board.

>> Color me puzzled. Why on earth would anyone home-brew an RS232
>> level shifter, particularly for a project that could clearly afford
>> using ready-made ICs like MAX232 instead?
>
> That's what they used. I simply meant it was not a commercial
> product on a PCB. Half the units have some problem.
>
> Did you think I meant they designed their own level shifter chip?

You said you home-brewed the level shifter. How else was anybody to
interpret that?

Hans-Bernhard Bröker

unread,
Mar 24, 2023, 2:26:46 PM3/24/23
to
Am 24.03.2023 um 15:20 schrieb Theo:

> The problem is that commercial microcontroller boards like Arduinos tend to
> have TTL level serial ports (or USB ones). If you want a box holding one of
> those with some RS232 ports, you need to make a PCB with a MAX232 and a DB9,
> and an enclosure to match. Rick was trying to find a box with all that
> already done for him and drew a blank.

Of course he did. Finding that kind of box off-the-shelf was a very
long shot, IMHO.

Industrialized versions of the Raspberry Pi might have come close, but
they're more likely to offer RS485 or 422, insead of 232.

Rick C

unread,
Mar 24, 2023, 2:34:41 PM3/24/23
to
There should be many things in this world.

Paul Rubin

unread,
Mar 24, 2023, 4:42:55 PM3/24/23
to
Rick C <gnuarm.del...@gmail.com> writes:
> This device is exactly what makes this difficult. Which pin on the
> DB9 is the data output?

The pinout is given here: https://wiki.dfrobot.com/RS232_Shield

How do you feel about using that board, with an Arduino? Digikey stocks
it, if that helps:

https://www.digikey.com/en/products/detail/dfrobot/DFR0258/6588574

How do you feel about recycling the enclosure from one of those port
selector switches discussed a while back?

Here is a Lilygo board which has an ESP32-C3 MCU and RS232 among
other things, for $17.98: https://www.lilygo.cc/products/t-rsc3

It is shipped from China so maybe doesn't fulfill requirements because
of that, but it at least shows that such a product exists.

Article about it with an Aliexpress redirect link (it is also sold
through there):

https://www.cnx-software.com/2023/01/20/lilygo-t-rsc3-esp32-c3-board-features-isolated-rs232-rs485-interfaces-5-to-24v-dc-input/

Direct Aliexpress

https://www.aliexpress.com/item/1005005136988162.html

Here is an Olimex MSP430 board with RS232 for around $32:

https://www.olimex.com/Products/MSP430/Starter/MSP430-5438-STK/

It is available at Mouser, though they only have 9 in stock right now:

https://www.mouser.com/ProductDetail/Olimex-Ltd/MSP430-5438STK?qs=BoUPAr39LHyy3j%2FN0eUzfQ%3D%3D

It is also on Digikey's site, but out of stock there.

There are more Olimex boards with RS232 that I didn't look up.

You mentioned that you didn't want to use an external FTDI cable on a
USB port. What about having an FTDI dongle inside the box, installed so
that its DB9 connector is panel mounted?

https://ftdichip.com/products/usb-com232-plus1/
https://ftdichip.com/products/db9-usb-f/

TTL to RS232 (?): https://www.sparkfun.com/products/449
Similar: https://www.waveshare.com/wiki/RS232_Board

Regarding the locations: are any in the western US?

Rick C

unread,
Mar 24, 2023, 5:31:26 PM3/24/23
to
On Friday, March 24, 2023 at 4:42:55 PM UTC-4, Paul Rubin wrote:
> Rick C <gnuarm.del...@gmail.com> writes:
> > This device is exactly what makes this difficult. Which pin on the
> > DB9 is the data output?
> The pinout is given here: https://wiki.dfrobot.com/RS232_Shield

You didn't answer the question. Which pin is the data output and which is the data input?


> How do you feel about using that board, with an Arduino? Digikey stocks
> it, if that helps:
>
> https://www.digikey.com/en/products/detail/dfrobot/DFR0258/6588574

Are you going to make the cable required?


> How do you feel about recycling the enclosure from one of those port
> selector switches discussed a while back?

Recycling is not a problem, as long as there is no branding on the box.


> Here is a Lilygo board which has an ESP32-C3 MCU and RS232 among
> other things, for $17.98: https://www.lilygo.cc/products/t-rsc3
>
> It is shipped from China so maybe doesn't fulfill requirements because
> of that, but it at least shows that such a product exists.
>
> Article about it with an Aliexpress redirect link (it is also sold
> through there):
>
> https://www.cnx-software.com/2023/01/20/lilygo-t-rsc3-esp32-c3-board-features-isolated-rs232-rs485-interfaces-5-to-24v-dc-input/
>
> Direct Aliexpress
>
> https://www.aliexpress.com/item/1005005136988162.html
>
> Here is an Olimex MSP430 board with RS232 for around $32:
>
> https://www.olimex.com/Products/MSP430/Starter/MSP430-5438-STK/
>
> It is available at Mouser, though they only have 9 in stock right now:
>
> https://www.mouser.com/ProductDetail/Olimex-Ltd/MSP430-5438STK?qs=BoUPAr39LHyy3j%2FN0eUzfQ%3D%3D
>
> It is also on Digikey's site, but out of stock there.
>
> There are more Olimex boards with RS232 that I didn't look up.
>
> You mentioned that you didn't want to use an external FTDI cable on a
> USB port. What about having an FTDI dongle inside the box, installed so
> that its DB9 connector is panel mounted?
>
> https://ftdichip.com/products/usb-com232-plus1/
> https://ftdichip.com/products/db9-usb-f/

Are you going to write the USB stack to run on the simple CPUs you have linked to?
I don't know why you are showing all these devices.

> Regarding the locations: are any in the western US?

I don't know. Why does this matter? You won't be visiting the customer's site.

You seem to be thrashing around in looking at every little board that might or might not do the job, rather than finding one that will. The single port boards you've identified have the DB9 connector, but you don't indicate how you will split this into the two connectors required for the job.

Do you understand the requirements?

--

Rick C.

---+- Get 1,000 miles of free Supercharging
---+- Tesla referral code - https://ts.la/richard11209

Don Y

unread,
Mar 24, 2023, 6:35:39 PM3/24/23
to
On 3/24/2023 8:08 AM, Rick C wrote:

>> Although for quantity 20 at these kind of price points, I might be tempted
>> to build something using dev boards, eg:
>> https://www.dfrobot.com/product-1030.html
>> and maybe a bit of 3D printing for an enclosure. For two of those boards
>> you might need to hand-patch one to use different pins, but it's not hard
>> and could be done.
>
> This device is exactly what makes this difficult. Which pin on the DB9 is the data output?

"Nominal" signal directions are specified from the standpoint of the *DTE*.
Remember that one rule and everything else falls into place. I.e., a DCE
*receives* data on the "Transmit Data" pin and transmits on the "Receive
Data" pin.

[Null Modem cables came into being because DTEs wanted to talk to DTEs.
So, *both* want to transmit on the TxD signal -- and thus need a pin
swap in the cable to connect out-to-in and in-to-out... even though
both are TxD]

DTE, by convention, use *male* connectors. That's the second thing to
remember.

Identify pin #1. Count sideways to the next pin; that will be RxD -- the
INPUT for the DTE device. The next pin will be TxD -- the OUTPUT for the
DTE device. (This for a DB9; using a DB25 changes this relative order).

It's not that hard (though folks tend to confuse themselves by getting
the frame of reference wrong -- esp when looking at UART chipsets
that want to label their pins TxD and RxD -- even if they are wired to
RxD and TxD, respectively, on the DB9, as is the case when implementing
a DCE).

Folks have historically bastardized all of these conventions -- for
"good reasons" (or, so they thought). But, a device (module) designed
for general use IN THE 21st CENTURY should have been designed with some
adherence to convention (i.e., male connector for DTE, female for DCE;
DTE transmits on TxD, DCE transmits on RxD). It's highly unlikely
that you're going to find a device that handshakes using SRTS or RLSD!

The roles of the control signals can quickly become confused as older
kit uses them in the original *interlocked* fashion of RS232C while
newer interpretations of the standard(s) have altered that behavior
(because most devices aren't as pathetically slow as 103 modems!)

[But, I think TWX, TELEX, et al. are long dead and gone]

Paul Rubin

unread,
Mar 24, 2023, 9:19:59 PM3/24/23
to
Rick C <gnuarm.del...@gmail.com> writes:
> You didn't answer the question. Which pin is the data output and
> which is the data input?

The transmit pin (TXD, pin 2 in that table) is the output and the
receive pin (RXD, pin 3) is the input. Since it is a female connector,
by the standard, the box is considered data communications equipment
(DCE), rather than data terminal equipment (DTR). If it was DTR, the
two pins would be switched around. Is that what you are asking? In any
case, one always has to test to be sure.

>> https://www.digikey.com/en/products/detail/dfrobot/DFR0258/6588574
> Are you going to make the cable required?

A splitter cable? I thought I posted a url to order those from.

> Recycling is not a problem, as long as there is no branding on the box.

There could be a label with your own branding, strategically placed to
cover up any existing branding, if that works for you.

> Are you going to write the USB stack to run on the simple CPUs you
> have linked to?

It exists already on some of them. I wouldn't write a new one.

>> TTL to RS232 (?): https://www.sparkfun.com/products/449
>> Similar: https://www.waveshare.com/wiki/RS232_Board
> I don't know why you are showing all these devices.

There are tons of cpus with built in UARTs

> I don't know. Why does this matter? You won't be visiting the
> customer's site.

Somebody at some point might have to do that. I hope not, but the
saying is, hope for the best and plan for the worst.

Frankly the first thing I would try is taking one of your homebrew boxes
that is known to be failing, swapping out the homemade level shifter PCB
with one of the ones linked above, and seeing if that works. Or at
least, use a scope to check the voltages coming out of the homemade PCB.

> You seem to be thrashing around in looking at every little board that
> might or might not do the job, rather than finding one that will.

It is a two step process: 1) identify possible candidates; 2) pick one.

Posting links to those boards is in part a demonstration that such
boards exist.

> The single port boards you've identified have the DB9 connector, but
> you don't indicate how you will split this into the two connectors
> required for the job. Do you understand the requirements?

I believe so. There are premade splitter cables that separate pins 2
and 3 from a DB9 into two more DB9's, or such a thing can be made, or
(preferable) one can use a CPU with two serial ports (or USB split into
two ports). The splitter cable can be inside the box since IIRC you
don't want it flopping around on the outside. Then the two DB9's would
be on the rear panel.

Rick C

unread,
Mar 24, 2023, 9:21:24 PM3/24/23
to
Excellent Don. Now, please tell me which unit is the DCE and which is the DTE? Or better yet, just answer the question asked, on this device, which pin on the DB9 connector is the data output and which is the data input?

--

Rick C.

---++ Get 1,000 miles of free Supercharging
---++ Tesla referral code - https://ts.la/richard11209

Paul Rubin

unread,
Mar 24, 2023, 9:22:43 PM3/24/23
to
Paul Rubin <no.e...@nospam.invalid> writes:
> (DCE), rather than data terminal equipment (DTR). If it was DTR, the
> two pins would be switched around.

Sorry I meant DTE, not DTR. DTR is one of the signal pins. I believe I
got the assignments right for DCE but maybe not. Anyway there are only
two possibilities, and it's very easy to get stuff switched around
someplace, so one always has to check.

Rick C

unread,
Mar 24, 2023, 9:34:12 PM3/24/23
to
On Friday, March 24, 2023 at 9:19:59 PM UTC-4, Paul Rubin wrote:
> Rick C <gnuarm.del...@gmail.com> writes:
> > You didn't answer the question. Which pin is the data output and
> > which is the data input?
> The transmit pin (TXD, pin 2 in that table) is the output and the
> receive pin (RXD, pin 3) is the input. Since it is a female connector,
> by the standard, the box is considered data communications equipment
> (DCE), rather than data terminal equipment (DTR). If it was DTR, the
> two pins would be switched around. Is that what you are asking? In any
> case, one always has to test to be sure.

You are providing links to hardware. I'm asking you which pin is data out and which pin is data in? This is a very simple question, no?


> >> https://www.digikey.com/en/products/detail/dfrobot/DFR0258/6588574
> > Are you going to make the cable required?
> A splitter cable? I thought I posted a url to order those from.

Do you know if that splitter will work for this application? I don't see the link. How many messages back, or how many days/weeks ago was that? You posted a lot of links in the message I replied to.


> > Recycling is not a problem, as long as there is no branding on the box.
> There could be a label with your own branding, strategically placed to
> cover up any existing branding, if that works for you.
> > Are you going to write the USB stack to run on the simple CPUs you
> > have linked to?
> It exists already on some of them. I wouldn't write a new one.

Can't use a USB dongle if there's no USB software.


> >> TTL to RS232 (?): https://www.sparkfun.com/products/449
> >> Similar: https://www.waveshare.com/wiki/RS232_Board
> > I don't know why you are showing all these devices.
> There are tons of cpus with built in UARTs

Having a UART is not sufficient. The interface needs to be a DB9 male, RS-232 voltage levels. One connector for the input data, and one connector for the output data.


> > I don't know. Why does this matter? You won't be visiting the
> > customer's site.
> Somebody at some point might have to do that. I hope not, but the
> saying is, hope for the best and plan for the worst.

That is far outside your concern.


> Frankly the first thing I would try is taking one of your homebrew boxes
> that is known to be failing, swapping out the homemade level shifter PCB
> with one of the ones linked above, and seeing if that works. Or at
> least, use a scope to check the voltages coming out of the homemade PCB.
> > You seem to be thrashing around in looking at every little board that
> > might or might not do the job, rather than finding one that will.
> It is a two step process: 1) identify possible candidates; 2) pick one.

Have you picked one yet?


> Posting links to those boards is in part a demonstration that such
> boards exist.

I've never needed convincing that these boards exist.


> > The single port boards you've identified have the DB9 connector, but
> > you don't indicate how you will split this into the two connectors
> > required for the job. Do you understand the requirements?
> I believe so. There are premade splitter cables that separate pins 2
> and 3 from a DB9 into two more DB9's, or such a thing can be made, or
> (preferable) one can use a CPU with two serial ports (or USB split into
> two ports). The splitter cable can be inside the box since IIRC you
> don't want it flopping around on the outside. Then the two DB9's would
> be on the rear panel.

Does the splitter cable run a signal to pins 2 and 3 on both cables? I've yet to find one that connects to pin 2 on one connector and pin 3 on the other connector, leaving the other pins 2 and 3 unconnected.

I think you will find the splitter cable will need to be a custom design. It's probably easier to just use a CPU without a DB9 and build a cable to run from the header to the two DB9s on the box. But then you will need a CPU card with RS232 level shifters.

This is why I don't want to do the design. It's messy and far too much work for something so simple.

--

Rick C.

--+-- Get 1,000 miles of free Supercharging
--+-- Tesla referral code - https://ts.la/richard11209

Don Y

unread,
Mar 24, 2023, 10:21:33 PM3/24/23
to

Paul Rubin

unread,
Mar 24, 2023, 10:44:06 PM3/24/23
to
Rick C <gnuarm.del...@gmail.com> writes:
> You are providing links to hardware. I'm asking you which pin is data
> out and which pin is data in? This is a very simple question, no?

Didn't I answer? I wrote:

>> The transmit pin (TXD, pin 2 in that table) is the output and the
>> receive pin (RXD, pin 3) is the input.

Pin 2 = data out, pin 3 = data in. Is something missing from that
answer? There is a possibility that it is wrong and that the two are
switched, but that would show up immediately during testing.

>> A splitter cable? I thought I posted a url to order those from.
> Do you know if that splitter will work for this application?

It sounded to me like it should, but part of the task is to put the
stuff together and test it. Anyway I think it is better to use a board
with two uarts. I checked, and the Arduino Leonardo has two, so it
sounds like that is a suitable board if you want to use the Arduino
approach.

> Can't use a USB dongle if there's no USB software.
The USB software is present in the boards that have USB host ports.

>> >> TTL to RS232 (?): https://www.sparkfun.com/products/449
>> >> Similar: https://www.waveshare.com/wiki/RS232_Board
>> > I don't know why you are showing all these devices.
>> There are tons of cpus with built in UARTs
>
> Having a UART is not sufficient. The interface needs to be a DB9
> male, RS-232 voltage levels. One connector for the input data, and
> one connector for the output data.

Right, that is the purpose of those boards that I linked. To convert
TTL levels to RS232 levels. You connect the UART to the level converter
board. That is pretty much the same thing that you already did with the
homemade MAX232(?) PCB, thus the idea of swapping in this other board
and seeing if it works where your existing one doesn't.

> That is far outside your concern.

I am glad to hear this. So what happens if I ship you boxes that I've
tested on my bench and that supply the right voltages as shown on a
scope, but only half of them work at the customer site, like with your
boards? Who is responsible?

> Have you picked one yet?

The Leonardo looks good to me but obviously I would want to test an
evaluation unit before settling on it.

> Does the splitter cable run a signal to pins 2 and 3 on both cables?
> I've yet to find one that connects to pin 2 on one connector and pin 3
> on the other connector, leaving the other pins 2 and 3 unconnected.

I would have to check that. However, disconnecting pin 2 or 3 can in a
cable like that can be done with a wire cutter.

> I think you will find the splitter cable will need to be a custom
> design. It's probably easier to just use a CPU without a DB9 and
> build a cable to run from the header to the two DB9s on the box. But
> then you will need a CPU card with RS232 level shifters.

The suggestion further up is to use that level shifter card.

> This is why I don't want to do the design. It's messy and far too
> much work for something so simple.

Yes, that's why nobody else wanted to do it either until you mentioned a
figure of $300 per box. That is enough to cover the necessary amount of
derping around that always afflicts a project like this. You've done a
lot more hardware stuff than I have, so I shouldn't be the one who has
to explain that.

Rick C

unread,
Mar 24, 2023, 11:01:09 PM3/24/23
to
On Friday, March 24, 2023 at 10:44:06 PM UTC-4, Paul Rubin wrote:
> Rick C <gnuarm.del...@gmail.com> writes:
> > You are providing links to hardware. I'm asking you which pin is data
> > out and which pin is data in? This is a very simple question, no?
> Didn't I answer? I wrote:
>
> >> The transmit pin (TXD, pin 2 in that table) is the output and the
> >> receive pin (RXD, pin 3) is the input.
> Pin 2 = data out, pin 3 = data in. Is something missing from that
> answer? There is a possibility that it is wrong and that the two are
> switched, but that would show up immediately during testing.
> >> A splitter cable? I thought I posted a url to order those from.
> > Do you know if that splitter will work for this application?
> It sounded to me like it should, but part of the task is to put the
> stuff together and test it.

Yeah, that's just what engineers do. They throw some stuff together and test it, over and over, rather than actually understanding the requirements.

I'm trying to get you to understand the issues, but you just aren't getting it. I don't know how a cable I have no info on is wired. But if pin 3 on the CPU connector goes to pin 2 on both of the cable connectors, then it's not likely to work properly is it? Two drivers on the same pin sound like a bad idea to me.


> Anyway I think it is better to use a board
> with two uarts. I checked, and the Arduino Leonardo has two, so it
> sounds like that is a suitable board if you want to use the Arduino
> approach.

Does it have RS-232 driver chips?


> > Can't use a USB dongle if there's no USB software.
> The USB software is present in the boards that have USB host ports.

I would hope so. Do any of the boards you are talking about have USB host ports? Typically the small CPU boards use a USB to serial port chip to support bootloading, with no drivers on the CPU to host USB.


> >> >> TTL to RS232 (?): https://www.sparkfun.com/products/449
> >> >> Similar: https://www.waveshare.com/wiki/RS232_Board
> >> > I don't know why you are showing all these devices.
> >> There are tons of cpus with built in UARTs
> >
> > Having a UART is not sufficient. The interface needs to be a DB9
> > male, RS-232 voltage levels. One connector for the input data, and
> > one connector for the output data.
> Right, that is the purpose of those boards that I linked. To convert
> TTL levels to RS232 levels. You connect the UART to the level converter
> board. That is pretty much the same thing that you already did with the
> homemade MAX232(?) PCB, thus the idea of swapping in this other board
> and seeing if it works where your existing one doesn't.
> > That is far outside your concern.
> I am glad to hear this. So what happens if I ship you boxes that I've
> tested on my bench and that supply the right voltages as shown on a
> scope, but only half of them work at the customer site, like with your
> boards? Who is responsible?

I think that is something we can worry about later. So far, I'm not sure you can produce any boxes.


> > Have you picked one yet?
> The Leonardo looks good to me but obviously I would want to test an
> evaluation unit before settling on it.
> > Does the splitter cable run a signal to pins 2 and 3 on both cables?
> > I've yet to find one that connects to pin 2 on one connector and pin 3
> > on the other connector, leaving the other pins 2 and 3 unconnected.
> I would have to check that. However, disconnecting pin 2 or 3 can in a
> cable like that can be done with a wire cutter.
> > I think you will find the splitter cable will need to be a custom
> > design. It's probably easier to just use a CPU without a DB9 and
> > build a cable to run from the header to the two DB9s on the box. But
> > then you will need a CPU card with RS232 level shifters.
> The suggestion further up is to use that level shifter card.
> > This is why I don't want to do the design. It's messy and far too
> > much work for something so simple.
> Yes, that's why nobody else wanted to do it either until you mentioned a
> figure of $300 per box. That is enough to cover the necessary amount of
> derping around that always afflicts a project like this. You've done a
> lot more hardware stuff than I have, so I shouldn't be the one who has
> to explain that.

When you get the details worked out, and wish to discuss a price, let me know through email.

Thanks

--

Rick C.

--+-+ Get 1,000 miles of free Supercharging
--+-+ Tesla referral code - https://ts.la/richard11209

Paul Rubin

unread,
Mar 25, 2023, 12:18:44 AM3/25/23
to
Rick C <gnuarm.del...@gmail.com> writes:
> I'm trying to get you to understand the issues, but you just aren't
> getting it. I don't know how a cable I have no info on is wired. But
> if pin 3 on the CPU connector goes to pin 2 on both of the cable
> connectors, then it's not likely to work properly is it? Two drivers
> on the same pin sound like a bad idea to me.

Again there is a 3 step process going on: 1) note that a product of this
sort exists, without remembering too much detail about it. 2) find the
product description page again, and this time study it carefully
including the pin diagrams, to develop a theory of whether it does the
right thing and which pins to connect or disconnect. 3) actually buy
the cable and test the theory.

Right now we are at step 1. I think it is best to avoid the whole thing
though. The approach of splitting the pins out from a single port is
too kludgy, if it is at all practical to use two ports.

> [Arduino Leonardo] Does it have RS-232 driver chips?

No it does not. That is why I linked those level shifter cards.

> I would hope so. Do any of the boards you are talking about have USB
> host ports?

The ESP32-S2 has it. Here are the API docs:

https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/peripherals/usb_host.html

The CDC (communication device class) software is here:

https://github.com/espressif/esp-idf/tree/master/examples/peripherals/usb/host/cdc/cdc_acm_vcp

It looks like a potential pain in the neck to use. I currently have an
Adafruit Feather board with that chip so maybe I will try it.

The chip also supports wifi and bluetooth, fwiw. The software stacks
for both of those are way more complicated than USB.

> When you get the details worked out, and wish to discuss a price, let
> me know through email.

OK.

George Neuner

unread,
Mar 25, 2023, 9:42:21 PM3/25/23
to
On Fri, 24 Mar 2023 18:21:21 -0700 (PDT), Rick C
<gnuarm.del...@gmail.com> wrote:

>Excellent Don. Now, please tell me which unit is the DCE and which is
>the DTE? Or better yet, just answer the question asked, on this
>device, which pin on the DB9 connector is the data output and which
>is the data input?

"Terminal Equipment" (TE) vs "Communications Equipment" (CE).

DTE is the computer (terminal), DCE is the modem. To adhere to the
RS-232 conventions, your external device has to be "communications
equipment".

Don explained the cables and how the signaling works. DTE transmits on
TxD, and receives on RxD. DCE does the reverse. Which physical pins
these are on depends on the form factor: DB9 or DB25.

RS-232 pinout diagrams are very easy to find. Try Google.

Rick C

unread,
Mar 25, 2023, 10:26:03 PM3/25/23
to
You are confused. I don't need any information about RS-232. Everything you are talking about is irrelevant. Virtually NO ONE uses RS-232 to connect DCE to DTE. They simply are tying together two devices that wish to use asynch serial at RS-232 voltage levels.

But neither you nor Don seem to understand that. I was trying to lead Don to this conclusion by asking pointed questions, but that failed. You, however, seem to have the same problem Don does.

I often have this problem with people who don't actually understand how RS-232 is used. There are people who view the world through data sheets and specification standards. Then there's the real world, where you have to toss out some of that, and ask questions like, "Which pin is output and which pin is input?" If the person you are talking to gives you anything other than a pin number, you are talking to the wrong person.

Engineers design stuff. Technicians figure out how to make it work.

--

Rick C.

--++- Get 1,000 miles of free Supercharging
--++- Tesla referral code - https://ts.la/richard11209

Jim Jackson

unread,
Mar 26, 2023, 2:27:14 PM3/26/23
to
On 2023-03-26, Rick C <gnuarm.del...@gmail.com> wrote:
>
> I often have this problem with people who don't actually understand
> how RS-232 is used. There are people who view the world through data
> sheets and specification standards. Then there's the real world,
> where you have to toss out some of that, and ask questions like,
> "Which pin is output and which pin is input?" If the person you are
> talking to gives you anything other than a pin number, you are talking
> to the wrong person.

Many years ago I often had to connect up gear with RS232 interfaces, and
it was a pain, as there was often no manual for the gear or the manual
was badly written and the author used the RS232 "standard" terms in a
cavalier way.

So I used an RS232 breakout box to try and identify RXD and TXD, and
what the various pins did, and what had to be strapped to what to get
either end to speak! Oh happy days - NOT!

Good luck with the project.


Dimiter_Popoff

unread,
Mar 26, 2023, 3:24:56 PM3/26/23
to
Hard to believe the long fossilized RS-232 horse can get all that
beating again...
Next thing let's beat the baud rate detection? :D

Don Y

unread,
Mar 26, 2023, 4:25:49 PM3/26/23
to
On 3/26/2023 11:27 AM, Jim Jackson wrote:
> Many years ago I often had to connect up gear with RS232 interfaces, and
> it was a pain, as there was often no manual for the gear or the manual
> was badly written and the author used the RS232 "standard" terms in a
> cavalier way.

Folks who haven't designed communications equipment where RS232 (in its
various bastardized forms) don't understand that commenting on a product
chosen (seemingly) at random from a producer of unknown character is
pure folly. Simply because the folks who design said pieces of
kit are operating often in ignorance -- trying to make a device that
mates with X instead of a device that conforms to a standard.

This is a common problem when folks try to "bottom feed".

> So I used an RS232 breakout box to try and identify RXD and TXD, and
> what the various pins did, and what had to be strapped to what to get
> either end to speak! Oh happy days - NOT!

There were "magic (active) cables" produced years ago that would,
automatically, adapt to common pinout incompatibilities. But, "common"
is the operative word, here. And, if you were in a market where
*many* of the pins on a DB25 were active, they were just toy solutions.

Just getting the pinout to *appear* correct is only part of the story.
You also need to know how they have implemented the signaling protocol
and the timing thereof (see my reply to George, upthread)

I have encountered devices made by "established companies" that use
all sorts of different signaling schemes as well as pinouts. As
I mentioned in an earlier post, seeing SRTS used for flow control, or
RLSD, etc. I'm sure there's a reason they made these bastardizations
but, regardless, I had to live with it as the vendor isn't going to
"fix" his implementation just to satisfy my beliefs.

As I have had to design many such devices, over the years, to interact
with many *other* devices (they having undisclosed design goals), I
quickly learned to accumulate a set of "widgets" that would allow me
to quickly make common signal swaps. Then, once each end of the link
looked like a DCE or DTE, a straight-through cable solved the ELECTRICAL
problem.

[E.g., I can understand APC's bastardization, below. Almost. Yet,
feel they could have implemented the feature set in a more compatible
way...]

I build these into connector shells that are designed to support a
pair of back-to-back connectors (DB9 or 25) and then affix a label
telling me the device that it is intended to normalize (e.g., I have
one at my feet that "fixes" APC's UPS serial port) *or* the function
it is intended to perform (gender change, NULL modem, NULL 'terminal'!,
etc.)

An early employer (specializing in comms kit!) had a huge box
full of assorted (and undocumented) cables. One of the first
chores on any project was finding a suitable cable to mate
to the device in question. This involved untangling dozens of
cords and *trying* each, in turn, until some signs of life
appeared. Then, refining the selection.

I pitched the idea of the small (2"x2") widgets paired with
a straight-through cable. Discard the box of random wire
and keep a shoebox full of the little widgets -- and ONLY
straight through, M-F cables. Sometimes I have to stack
a few "widgets" to get the requisite signal pairing.
But, then know how to make a new widget that is tailored
to THIS device (and labeled as such)

Don Y

unread,
Mar 26, 2023, 4:25:49 PM3/26/23
to
Rick doesn't understand how the Standard is interpreted solely as
"guidance", in the real world. The idea that someone ELSE could
examine *his* choice of device from *his* chosen vendor and
comment, in any meaningful way, suggests a naivite that's
beyond laughable.

APC uses a DB9 that *seems* to implement RS232. Yet, if you
wire it to a nominal mate, you'll find the UPS will shutdown.
Because THEY have repurposed one of the modem control signals
as a "shutdown" signal. Ooops!

Is APC (Schneider Electric) a dubious little garage shop
selling products that likely have limited lifetimes? I.e.,
you want to talk to an APC UPS, you learn how APC expects
the port to be wired and used. If this is unacceptable
to you, you find another UPS vendor and hope for something
better.

Having a pinout tells you very little more than which
signals you can "safely" connect together; it tells you
nothing about the function of the signal, the protocol or
content. E.g., using RLSD as a pacing signal (WTF??)
The choice of UART gives a *hint* as to how responsive the
software (firmware, drivers, HAL, etc.) will be to signalling
conventions and message latency.

If I twiddle a "handshaking" (misnomer) signal, how quickly
will the other party stop transmitting? How many *more*
characters must I be prepared to receive as it's output
buffer, holding register and ISR empties and it reacts to
my notification? What's the worst-case latency on the ISR
being handled IN THAT BOX? How slow have *I* been to
recognize that I'm backlogged? Am I (ISR) reacting to a
character received many character-times earlier?

If I send an in-band signal to convey the same information,
how long before that reaches the wire? And, propagates
up the receiving stack to a point where the other device
can recognize my "signal"? Then, all of the above questions
repeat, again.

Will in-band signals be accepted if the link relies on hardware
handshaking (pacing) signals? Will they be elided if encountered
in messages EVEN WHEN NOT CONFIGURED AS SIGNALS? Which in-band
characters will be used (^S and ^Q may be the most common but they
are not immutable choices)? Will ANY received character (IXANY)
suffice to signal resumption of transmission is allowed?

What if a device misses a flow control signal? How can I
*reliably* restart it (given that I may not know what it's doing)
without contaminating the data stream?

Are they pacing signals or handshaking signals (most folks
have never had to deal with the original Standard's
implementation!)?

Does the device send two stop bits but only check for one?
Is parity generated? Is received parity *checked* (or just
an extra bit-time in the character frame)? Does the device
send/acknowledge long BREAKs? Does it use /n, /r, either,
or both as a line delimiter? Is the line buffered before
delivery to the application layer?

Does it expect additional delay at \r? \n? \t? \b? \f? \v?
Does it reliably support every data rate advertised? Who
chose the cable -- and how? What is the impact on the device's
overall functionality of increasing data rates? Of mismatched
rates?

Repeat all of this from the vantage point of the other device;
how will *it* expect ME to behave? And, how will it react if
I MISbehave? (will an input buffer overrun because it was naively
sized for fixed-length messages?) How will *I* react if *it* misbehaves?

PCs are ubiquitous. Yet, have you ever seen any of these issues
quantified and published in a form that you could rely on in a
design? If I use one of the modem control signals to turn around
a bidirectional transceiver, how do I know that the last character
has *cleared* it AT THE TIME THE SIGNAL ASSERTS? How do I guarantee
that the code runs on some other PC, equivalently??

If you are coding on bare metal, you can answer these questions from
YOUR end of the wire. If you are relying on a COTS device with
"drivers" in place, then good luck finding the information (unless
you can examine the schematics and source code and reverse engineer
the limits of their implementation -- or, replace it entirely).

People expecting to have an answer to these questions before
*touching* a COTS product are woefully naive. People expecting
others to do their work FOR them are just opportunistic cads.
(Or, profoundly incompetent)


Don Y

unread,
Mar 26, 2023, 4:32:48 PM3/26/23
to
On 3/26/2023 1:23 PM, Don Y wrote:
> I build these into connector shells that are designed to support a
> pair of back-to-back connectors (DB9 or 25) and then affix a label
> telling me the device that it is intended to normalize (e.g., I have
> one at my feet that "fixes" APC's UPS serial port) *or* the function
> it is intended to perform (gender change, NULL modem, NULL 'terminal'!,
> etc.)

This is the APC widget mentioned:
<https://mega.nz/file/J35SBBob#FtQznCDovhBZHJdA5OspHdMo6_DiDMjQwtCqnh3Oa54>

By (my) convention, the named device ("UPS") is located at the
connector from which the label can be read (i.e., the connector
to the right).

The jack screws -- in the context of that device -- act as a further
hint.

If I want to know what's inside, I have to look up the schematic
for the widget -- unless the function is obvious (e.g., gender
change).


Don Y

unread,
Mar 26, 2023, 4:37:45 PM3/26/23
to
On 3/25/2023 7:26 PM, Rick C wrote:
> Engineers design stuff. Technicians figure out how to make it work.

And you apparently do neither. <frown>


Don Y

unread,
Mar 26, 2023, 4:52:48 PM3/26/23
to
On 3/26/2023 1:32 PM, Don Y wrote:
> On 3/26/2023 1:23 PM, Don Y wrote:
>> I build these into connector shells that are designed to support a
>> pair of back-to-back connectors (DB9 or 25) and then affix a label
>> telling me the device that it is intended to normalize (e.g., I have
>> one at my feet that "fixes" APC's UPS serial port) *or* the function
>> it is intended to perform (gender change, NULL modem, NULL 'terminal'!,
>> etc.)
>
> This is the APC widget mentioned:
> <https://mega.nz/file/J35SBBob#FtQznCDovhBZHJdA5OspHdMo6_DiDMjQwtCqnh3Oa54>

And this is the COTS *PC* that I use as a name server:
<https://mega.nz/file/Fi4hEACJ#YgVZ5tdZBjTcwW76gXC2vdgv5M6u4lTpUDAwu53Z9n8>

Note the *two* serial ports (DTE as the standard dictates), 100BaseT
network connection (it's just a name server, it doesn't need to
have high throughput), PS/2 keyboard and VGA (cuz it's a PC!),
wifi and USB. The four mounting holes visible are the VESA standard
(I have these mounted between my monitor and support arm)

As an ISA PC, it will run damn near any OS intended for such
a platform (I run NetBSD on this box). So, all of the PC hosted
AND TARGETED tools are available (I have a LFC monitor wired to
one of the serial ports to discipline my time service as that
was easier/cheaper to implement than any other solution!).

Rick C

unread,
Mar 26, 2023, 10:11:33 PM3/26/23
to
Fortunately, this effort only uses TX and GND on one port and RX and GND on the other port. I don't care what the TX and RX pins are called, one is input, the other output and we just need to connect the input to the device that is sending the data and connect the output to the device that is receiving data. All this has already been worked out and a prototype was built. Unfortunately there is some problem that results in a hung unit from time to time. That developer doesn't have the time to mess with it, so we are looking elsewhere. But the pin assignments are not a problem, just people's perspective on the issue.

--

Rick C.

--+++ Get 1,000 miles of free Supercharging
--+++ Tesla referral code - https://ts.la/richard11209

Rick C

unread,
Mar 26, 2023, 10:22:28 PM3/26/23
to
On Sunday, March 26, 2023 at 4:25:49 PM UTC-4, Don Y wrote:
> On 3/26/2023 11:27 AM, Jim Jackson wrote:
> > Many years ago I often had to connect up gear with RS232 interfaces, and
> > it was a pain, as there was often no manual for the gear or the manual
> > was badly written and the author used the RS232 "standard" terms in a
> > cavalier way.
> Folks who haven't designed communications equipment where RS232 (in its
> various bastardized forms) don't understand that commenting on a product
> chosen (seemingly) at random from a producer of unknown character is
> pure folly. Simply because the folks who design said pieces of
> kit are operating often in ignorance -- trying to make a device that
> mates with X instead of a device that conforms to a standard.

And there is the problem. The RS-232 standard defines the interface between data terminal equipment and data communication equipment, at the data communication equipment interface. It says nothing about anything else. However, people use these voltages and so these level shifting devices, often along with the same type of connectors for many *other* applications. At that point, the RS-232 standard does not apply in a consistent way. So people are free to pick and choose the parts they want, and the parts they don't want.

The RS-232 moniker is often used, when even the voltage levels are not the same. At that point, there is nothing RS-232 about it. People are just using the term as a synonym for an async serial port.

--

Rick C.

-+--- Get 1,000 miles of free Supercharging
-+--- Tesla referral code - https://ts.la/richard11209
It is loading more messages.
0 new messages