EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Boxed MCU with RS-232 Port

Started by Rick C January 17, 2023
On Thursday, March 23, 2023 at 2:26:40 AM UTC-4, Rick C wrote:
> On Wednesday, March 22, 2023 at 11:35:18&#8239;PM UTC-4, Paul Rubin wrote: > > 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. > 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
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
Rick C <gnuarm.deletethisbit@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
Rick C <gnuarm.deletethisbit@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.
Rick C <gnuarm.deletethisbit@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?
On Thursday, March 23, 2023 at 6:06:46&#8239;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
On Thursday, March 23, 2023 at 11:54:54&#8239;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
On Thursday, March 23, 2023 at 12:00:35&#8239;PM UTC-4, Paul Rubin wrote:
> 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?
Multiple. Some are in the DC area. -- Rick C. ++++ Get 1,000 miles of free Supercharging ++++ Tesla referral code - https://ts.la/richard11209
Rick C <gnuarm.deletethisbit@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.
Am 24.03.2023 um 09:02 schrieb Rick C:
> On Thursday, March 23, 2023 at 11:54:54&#8239;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?
Hans-Bernhard Br&ouml;ker <HBBroeker@t-online.de> wrote:
> Am 24.03.2023 um 09:02 schrieb Rick C: > > On Thursday, March 23, 2023 at 11:54:54&#8239;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?
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

The 2024 Embedded Online Conference