LowPowerLab Forum

Hardware support => Projects => Topic started by: ColinR on February 13, 2015, 03:12:17 AM

Title: Virtual Serial Port
Post by: ColinR on February 13, 2015, 03:12:17 AM
Hello all,

Spending some time noodling around what are common interface issues for things like industrial and laboratory sensor integration, one of the common pain points is retrofitting existing equipment. Most offer some sort of serial interface, most commonly RS232. The problem is that to integrate these sort of devices, typically you need someone like ourselves to come in and program a micro to talk to it properly. Often they require some command to elicit data, and then some formatting on the backend to do something useful with it.

I can't help but think that having a way to configure serial communications outside of a microcontroller would be quite useful. For example, if from a browser connected to a gateway you could send commands to a serial port on a moteino and read the response, broken up in 61-character messages, of course. You'd need a cheap-o logic-level converter for most devices, but aside from that it seems as simple as some modular code and software serial. You could then configure a standard command sequence and code to format the response. For example, if your device wants to see 'R<cr>' before it sends data, you could configure the remote moteino to send that command and send the response back.

Just an idea.
Title: Re: Virtual Serial Port
Post by: Felix on February 13, 2015, 08:33:04 AM
I designed a little add-on board with a RS232-to-TTL translator chip (no buffering) for a small project, but never mass produced it. That could be used with the MoteinoMEGA second serial port, or with any software serial port. Software serial is enough for up to 115200 in most of the cases that i've seen with a dedicated MCU that sits and listens all the time to incoming data.
I was thinking maybe make a shield for the mega or something like that, but the physical format is the troubling part - should it just have pins, or put a DB9 on there? The DB9 will be like a behemoth compared to the little board and make it a much larger PCB.
Title: Re: Virtual Serial Port
Post by: ColinR on February 13, 2015, 08:46:49 PM
Yeah, I'm thinking that a MEGA would be good, if for no other reason than the extra program space that I'd need, on top of the existing UniMote code I have in there.

I'd go with pins, and then the user could switch TX/RX if necessary, and the user could use whatever connector they want, e.g. a panel mount DB9, or maybe wiring a cable directly through a cord grip. That's what I would do for this guy: http://www.cupidcontrols.com/2014/12/push-button-rf-data-transmitter/

Run a cable out the back and directly to the scale, or whatever.