0
\$\begingroup\$

Let me begin by stating that I don't have much experience in hardware-related projects.

I need to obtain info from a machine that outputs its data from an RS232 cable. http://i.imgur.com/fkqnf.png

Back panel diagram

My goal is to then take this data and send it to a server. I thereby plan on using an Arduino Uno Board, attached with the Arduino Ethernet board, and write a looping program that will send the data every few seconds.

What device should I use to collect the information from the machine? Can I simply use an RS232 to USB converter and plug it directly on the UNO board, or are there RS232 boards for this?

And finally, are there better alternatives to my current problem?

I'll gladly clarify anything that is not clear enough, thanks.

\$\endgroup\$
  • 1
    \$\begingroup\$ I don't really know if this is what you're looking for, but if your arduino has RX/TX pins for RS232 communication, you probably only have to convert the -12V/+12V voltage to TTL level. This can be done using the MAX232 device. \$\endgroup\$ – Keelan Jan 6 '13 at 18:41
  • \$\begingroup\$ I recommend reading this tutorial first: arduino.cc/en/Tutorial/ArduinoSoftwareRS232 \$\endgroup\$ – user32682 Nov 13 '13 at 21:03
3
\$\begingroup\$

A ready-made RS232 shield for the UNO such as the one I linked would be the quickest way to get going collecting data (it was the first search hit; I have no experience with the particular product or vendor.)

If learning and doing are more important, you could make up some RS232 <-> 5v logic level-shifters and write or find a software UART to read the bit-stream.

\$\endgroup\$
  • \$\begingroup\$ Thanks, I had found this shield but isn't this the wrong entry? Or can I just use a female-female RS232 plug and should be able to get something working from there? \$\endgroup\$ – juliensaad Jan 6 '13 at 18:54
  • 1
    \$\begingroup\$ RS232 "standard" is so slippery that you can always find gender-benders (M-M, F-F), wired with- or without Xmit/Recv crossover (there's a handful of 'em in my parts box for just this reason!). I can't tell the gender of the port in your equipment diagram, but if it and the shield are the same, you'll probably need a gender-bender with crossover. The manuals should tell you whether each part is a DTE (terminal-like) or DCE (computer- or other communication devce-like). If they are the same, you'll need crossover; if they differ, you won't. \$\endgroup\$ – JRobert Jan 6 '13 at 19:02
  • \$\begingroup\$ Thank you very much, I will look into this! Sorry I can't vote up -.- \$\endgroup\$ – juliensaad Jan 6 '13 at 19:05
  • \$\begingroup\$ Another useful part is an RS232 breakout board - you can wire up any kind of an interconnect until you understand what's going on. Kind of a last ditch measure but it has saved my butt on more than one occasion! \$\endgroup\$ – JRobert Jan 6 '13 at 19:09
  • \$\begingroup\$ Would this be the kind of part that could work? ebay.ca/itm/… \$\endgroup\$ – juliensaad Jan 6 '13 at 19:30
1
\$\begingroup\$

Having been trained as an industrial electronics technician, specializing in computer systems of the mid 80's (I have personally upgraded over 200 IBM PC to IBM XT with 20 MB (yes, that's Mega-Bytes)) and have worked with serial port modems (200 baud and up!). I suggest an old laptop running windows and Hyperterminal software. I'd try a straight thru cable and a breakout box with leds. The leds on the terminal unit will blink as it tramsmits. Once you select the serial port com number and applicable baud rate, start/stop and data bits ( 9600,n,8,1 for example). You can then "read" the output data and save to a data file.

\$\endgroup\$
  • \$\begingroup\$ Been there, done that too, Ricky. Your answer doesn't address how to get it to the server. Improve your answer! He may also have power / space constraints. \$\endgroup\$ – Transistor Jan 29 '16 at 19:50
1
\$\begingroup\$

This is quite straight forward. I have done this when I had to receive uart data from 8051 to TI LM3S3748. However for this TTL levels was sufficient. Between, I know I am bit late to answer this question, however, taught I'd add a little more details to it.

Now coming to your question:

1st - Since Tx Machine is giving data output in RS232 format, you will need a Rs232 converter at your Arduino end to receive this data successfully. We need this RS232 converter at the receiver (Arduino) end, so that it can convert the RS232 levels to TTL levels, that can be interpreted by the microcontrollers. The hardware connections for this is simple:

|Machine| Tx pin----(Data-Rs232)--->Rx pin |MAX232/RS232 Board| Tx pin----(Data-TTL)---> UART Rx pin |Arduino|

The above shows the connection sequence. While receiving the data from MAX232, make sure that the ground of the Arduino and MAX232 is common reference at the receiving end.

2nd - For the above set, another important thing to keep in mind is the baud rate. Make sure that your receiving device i.e. Arduino's baud rate matches with that of the transmitting machine. For e.g. If the baud rate of your Tx machine is 9600 bps, then your Arduino should be programmed to receive the data with a baud rate of 9600 bps.

3rd - For you question about, If you can connect directly to your Arduino USB, yes you can, provided you have and on board USB chip such as a FTDI.

Hope this helps.Good Day!

~VD

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.