5 Replies Latest reply on Aug 19, 2019 8:17 PM by shabaz

    Single Board Computer and RS232


      I am working on a project where I need to receive data from a device using RS232. Right now I am using a Raspberry Pi and an FTDI RS232 to USB cable.




      I would like to find a cheaper alternative and ideally supports RS232 natively. I would like to eliminate the need for the USB adapter. Are there any single board computers with pins that can handle RS232?

        • Re: Single Board Computer and RS232

          I don't know of any SBCs that directly support RS232 signal levels however there are many small inexpensive RS232 level conversion boards

          that use a single chip to convert the serial I/O from the SBC pins to and from RS232 signals on a DB9 connector. They usually require a +3.3V supply

          from the SBC. I have bought several of these boards on Ebay and have used them on Raspberry Pis, Odroid1 and 2, and BeagleBoard Black SBCs

          with no problems. Use a RS232 to TTL search on Ebay to find them and make sure that they support 3.3V I/O levels (most of them do).

          1 of 1 people found this helpful
          • Re: Single Board Computer and RS232

            If the raspberry pi works, why not use the GPIO pins? RS-232 Connections That WORK! - Connecting Devices or Converters - B&B Electronics explains the details how the interface works. But you can use the UART on Pi looking at https://www.raspberrypi.org/documentation/configuration/uart.md . But beware of the conditions at the bottom. If you want a more turn key answer take a look at https://www.sparkfun.com/tutorials/215 . Amazon has this forhttps://www.amazon.com/RS232-converter-board-Female-3-3V/dp/B005D5T292 for example. May save a few dollars, but is it worth the troubles? thecaptain0220 only you can decide for yourself.



            1 of 1 people found this helpful
            • Re: Single Board Computer and RS232

              HI Kirk,


              thecaptain0220  wrote:


              Right now I am using a Raspberry Pi and an FTDI RS232 to USB cable.



              The FTDI item you've linked to does not provide RS232, it provides 3.3V or 5V-compilant levels (sometimes known as a USB-UART adaptor).


              Is that what you're looking for? A single board computer with the signals provided as with the FTDI device you mention? If so, that's a very different requirement than a single board computer with RS232.

              Which of the two are you looking for?

              3 of 3 people found this helpful
                • Re: Single Board Computer and RS232

                  I have done some research, but I will admit that I am not an expert on the subject.  I am using the cable in the link to receive serial data from the device. I connect the RX, TX, and Ground. The cable doesn't work out of the box however, I have to use the FTDI programming tool and set it to invert the RX and TX signal. Looking at the spec for RS232 it seems like it can go all the way down to 3 volts. Its it possible that its RS232, just lower voltage and the FTDI chip can handle it?


                  My first attempt at it I used an Arduino Uno. I used an RS232 to TTL converter to connect it. I used SoftwareSerial and a couple of GPIO pins to read the data. It worked pretty well, but I kept ending up with garbage data showing up intermittently . I could never get it to work 100% so I moved to the Raspberry Pi and the USB adapter.




                  2 of 2 people found this helpful
                    • Re: Single Board Computer and RS232

                      Hi Kirk,


                      The FTDI device on its own won't do RS232, the levels are different, and they are inverted. The end of the FTDI cable outputs UART, which signals up and down similar to RS232, but different levels and unverted.


                      Despite the configuration utility mentioning RS232, it's misleading, because it is expecting the FTDI chip to be added to a 'RS232 driver/receiver chip. Only then will you get RS232. The UART alone (i.e. the FTDI device) won't get you that.


                      If you're having to invert in the utility, it sounds like you really do need RS232 functionality, but this is a guess. If the guess is wrong and RS232 levels are applied, it will damage the equipment.


                      Incidentally what is the specific equipment you're connecting to (part or model name), and is there any way to confirm (e.g. user manual) that indicates if RS232 is needed or (say) TTL levels are needed? Usually (not always) RS232 levels are needed if the connector is a DB9 or DB25. If the connector is something else, it is unclear, until there is further information.


                      From everything you've mentioned, it does sound like the equipment needs RS232 levels, since the Arduino worked to a degree with a RS232 converter.


                      If you want an easier method to get RS232, there are USB to RS232 interfaces available, to save having to do the intermediate step of using the FTDI device (internally they will contain that).


                      FInally, with the Pi, if you choose that route, then there is a UART interface on the 40-way connector, so no FTDI cable is needed, just a UART to RS232 board. The same applies to the Arduino, it's on-board interface is a UART, not RS232, and requires the RS232 driver/receiver board/chip (which is what you tried, as I understand).


                      To summarize, there are lots of options, but not knowing why there was garbage information with the Arduino and RS232 interface, it is hard to say what will be a good path. In general there will be lots of information to use RS232 with Arduino or Pi, because RS232 is/was so popular, but it's maybe getting less popular, so an adapter device may cost $15 or so (this is a guess), although ebay could be cheaper.

                      2 of 2 people found this helpful