Reading data from DE-9 serial port

Hello all,

I have a project that requires me to read data from a DE-9 pin serial connector. The port is mounted on a handheld air quality monitor that spits out data every 6 seconds.

How can I wire my Arduino Duemilanove to read data from this com port? Can I wire the pins on the com port directly to the digital input pins on the Arduino, or do I need electronics like resistors to divide the voltage? Which pins do I need from the com port? I know that pin 5 is the reference ground, and pins 2 and 3 are the received and transmitted data pins respectively. To me, it sounds like I'll only need pins 5 and 3, but maybe you guys have more information.

If anyone has worked on a similar project your help would be greatly appreciated.

Thanks, -tgarg

You cannot wire from a DB-9 serial connector directly to an Arduino (this is assuming the DB-9 connector carries "standard" RS232 signals which vary from +10V to -10V). You need a level translator circuit such as the MAX232.

You can also buy an "RS232 shield" that simplifies this for you. Here's the first link that comes up in Google for this:

-- The Ruggeduino: compatible with Arduino UNO, 24V operation, all I/O's fused and protected

Thanks for your prompt response.

One thing that I didn’t mention is that we need the arduino to function as a datalogger, and we have purchased a data logging shield to help us do this.

If we use the RS232 shield, can we use the datalogger shield as well? Would it be better to use the RS232 shield and find an alternative solution for the datalogging?

Any information would be appreciated.


as long as pin assignments aren't common between them (and they shouldn't be..I don't think), you can stack the shields together.

Thanks magnethead.

How would I find out if the pin assignments are common or not? I want to make sure that this solution would work before ordering the part.


It is unlikely that they would use the same pins because an RS232 shield will only be interested in the serial RX and TX lines. Where as a data logger would be concerned with the SPI lines (pins 10, 11, 12 & 13).