Page 1 of 1

ASCII in to ASCII out converter

Posted: Wed Jun 07, 2017 10:13 am
by Engineer3104
Hi folks,
I'm in need of a protocol converter to work between two pieces of equipment in an upcoming home automation project.
I need a device with two RS232 serial ports. I need to be able to receive a 10 to 12 byte ASCII string on one port and send a different ASCII string response out the other port. It will be necessary to be able to receive up to 100 different strings, with 100 different responses.
I can build a circuit using a PIC processor to do the job, with a huge number of IF / THEN statements, but I think it would start to bog down with too many strings. Also, modifying the individual lines of code, recompiling, and downloading each time a change is made would be tedious.
Not sure if a Raspberry Pi or Arduino type of solution would be any easier.
Does anyone know of a prebuilt "black box" that does such a thing. I would be real happy if it had some sort of interface to it that simply required entering the ASCII strings into a table.
Any suggestions would be appreciated.
Thanks

Re: ASCII in to ASCII out converter

Posted: Wed Jun 07, 2017 12:42 pm
by dyarker
Is a PC one end of this serial link? Instead adding a box in the middle; make the string translation programmatically in a program.

Re: ASCII in to ASCII out converter

Posted: Thu Jun 08, 2017 6:47 am
by Engineer3104
Unfortunately, the home owner has not decided on how he wants to control things. The receiving end will most likely be a Hunter Douglas hub controlling about 25 sets of blinds. For now, he's looking at using UPB transmitters to control them, as well as about 120 lights in the house. I have access to the ASCII protocols used by both of these networks, but would sure like an off-the-shelf box to do the conversion. Thinking about it, having a box that could generate multiple ASCII strings, based on one input trigger would allow me to create scenes with multiple blinds in multiple areas.
This project is still several months away, and will probably change many times.
Cheers.

Re: ASCII in to ASCII out converter

Posted: Thu Jun 08, 2017 11:26 am
by haklesup
Any uController that can be configured with 2 serial ports and has enough memory to hold a lookup table of the ascii control codes will work and is probably the best way to go due to flexibility and upgradability. Just about any solution starts here and adds features.

Raspberry Pi and other IOT controllers with Bluetooth, WiFi or Ethernet can simplify that interface if you are going to need it. If they want to create a web interface page for example R-Pi seems like a good choice. Since it has camera interface and accepts USB cameras, it is also a good choice to tie into security. I think you can update it wirelessly too making the upgrades easier.

I hope you charge some decent NRE for your programming, its worth $5k to engineer such a solution, perhaps more. Go to a design firm and you'll probably be numbed by a $12k or higher figure.

Re: ASCII in to ASCII out converter

Posted: Wed Jul 26, 2017 8:14 am
by Ronaldlees
haklesup wrote:Any uController that can be configured with 2 serial ports and has enough memory to hold a lookup table of the ascii control codes will work and is probably the best way to go due to flexibility and upgradability. Just about any solution starts here and adds features.

Raspberry Pi and other IOT controllers with Bluetooth, WiFi or Ethernet can simplify that interface if you are going to need it. If they want to create a web interface page for example R-Pi seems like a good choice. Since it has camera interface and accepts USB cameras, it is also a good choice to tie into security. I think you can update it wirelessly too making the upgrades easier.

I hope you charge some decent NRE for your programming, its worth $5k to engineer such a solution, perhaps more. Go to a design firm and you'll probably be numbed by a $12k or higher figure.
I like the photon for those kinds of tasks. It uses the STM32 ARM Cortex M3 microcontroller and a Wi-Fi chip, which (as you've pointed out) j- could simplify any interface arrangement. That particular uController has the horsepower to run a web server fairly well (for an interface) - and do the serial data conversions as well. It hits a sweet spot between low-end iOT and the Pi.