RS232 serial communication... where to start

I have a system that uses RS232 serial communication that I’ve run off a RaspberryPi for years using Mono (.NET) framework. It works well, but I would really like to simplify the setup considerably although I have never done any type of RS232 work in the Particle / Arduino environment, so I’d like to know where to start.

The system sends 50 bytes of data every second. Currently I store all of the data on the Pi and then once every 15 mins I average out the data and push it to a web service. This keeps the web communications less chatty.

Here is some technical info:
My serial output requires that the DTR (pin 4) be driven high (set) and that RTS (pin 7) be driven low (cleared), in order to power the port. The hardware transmits data on the RX (pin 2) line, and listens for commands on the TX (pin 3) line. GND (pin 5) is ground. No other pins are used.

The output is just ASCII data. Nothing special, but it does change on the second quite often. Having each second of data is important.

Has anyone done this and what is the best way to get started? I’ve coded for years, but I am still green on hardware so any good reads or hardware starts would be awesome. Let me know if you need more info.

Thanks!

I’ve been doing this for a while now. I have some industrial equipment that logs data to a printer over RS-232. With each carriage return, the photon pushes the ASCII text to a web server using a particle webhook. On the hardware side, this is a great place to get started.

RS-232 to TTL breakout

Eventually I had custom photon shields fabricated with the necessary MAX3232 chip and capacitors and a DB9 connector.

2 Likes

Be sure to use only 3.3V for supply and logic levels. The Mesh device GPIOs are NOT 5V tolerant.

1 Like

Thank you both for the information!

Do you have any more information and/or a link to the project?

1 Like

@smn8600 also chiming in, are you willing to share the custom Photon shield you created (or can I buy some off of you)?