Thursday, March 12, 2009

Making a Null Modem : Loop-back type



Before doing serial port programming, we need to build a null modem. A null modem is a cable with two rs-232 connectors. Usually we use female connector. This connector is known as DB-9 female connector. The Layout of a DB-9 connector, if we see it from THE SOLDERING SIDE, is shown below :

1 2 3 4 5
6 7 8 9

For our first project we are going to build a loopback type null-modem. You will need two DB-9 CONNECTORS, 1 meter long UTP cables, and a set of soldering equipment. You will have to solder cables at the soldering site if DB-9 CONNECTORS. To make things simple, I named one connector as CONNECTOR-1 and the other as CONNECTOR-2. Now these are the soldering work of our null-modem :
  • for BOTH CONNECTORS you have to SHORT-CIRCUIT pin 1, 4, and 6.
  • for BOTH CONNECTORS you have to SHORT-CIRCUIT pin 7 and 8.
  • connect pin 2 of CONNECTOR-1 with pin 3 of CONNECTOR-2 (I use BROWN cable).
  • connect pin 3 of CONNECTOR-1 with pin 2 of CONNECTOR-2 (I use GREEN cable).
  • connect pin 5 of CONNECTOR-1 with pin 5 of CONNECTOR-2 (I use BLUE cable).