Introduction: DB9 Serial Break Out Cable.

Back in the old days of eight bit computers such as the Commodore 64, Apple, TRS-80, and the Atari among others, the only way to transfer data between computers was either a modem or a much coveted rs232 interface. There was no ethernet, usb, or wifi. Today things have changed a lot but you still need to know about the rs232. Typical situation. You need to flash a router with the latest firmware as it does not support the good old web upload.
i.e. :  http://romain.novalan.fr/wiki/Flash_Fonera_2100_with_OpenWrt_by_console_port_and_redboot

We have already done parallel breakout cables. (https://www.instructables.com/id/No-solder-parallel-port-break-out/) and I have eluded to a joystick port break out cable. Now I would like to do a serial port cable. Why? I have been finding more and more aricles about interfacing to the serial port. Everything from temperature sensors, radio transmitters,  and even used just for power. You could also use with with the appropriate electronic parts to be a jtag cable.

Notice: Try this at your own risk. I will not be responsible for any issues. If you are unsure, get a professional to help.

Note: bc547=nte123ap bc557=nte159

Step 1: All Serial Voltages Are Not the Same.

There are 3 basic voltages for serial that are used. They are 12,5, and 3.4 They could be even some other voltage. You have to check the documentation of the devices you are using to be sure. Maxim and other companies make integrated chips to make the interfacing easier. You can also make you own circuits from discrete parts. There are a ton of schematics on the internet to choose from. If you are unsure get a professional to help.

With all kinds of usb interfaces about, it seems like there is a usb for everything. With the increase in the need to attach to micro-controllers routers and other flashable hardware, it does not hurt to get to know the rs323 port.  Pinout's are usually documented. You have to be careful though, because you have to know what voltage you are working with. 12, 5, and or 3.3. Maxim and other companies make special chips to make this easier. Epanorama.net has some good information also.

Step 2: What's Needed:

Parts.
1 - 10 position double screw down bar.
1 - DB9 female ended serial cable with all 9 Lines connected. (Some may have a tenth wire for the shield.)

Tools:
Continuity tester: (i.e https://www.instructables.com/id/Yet-another-continuity-tester/)
or Ohmmeter
Wire cutters strippers.
Paper clip
Screw driver.

Step 3: Pairing the Cable.

The first thing you want to do is to remove the cover from the db9 female end and make sure all the lines are connected. if not you may be wasting a good cable. This cable is ok.
put the cover back on the cable end.
Measure out about a foot for longer if you if need it.
Cut the cable in half at that point. (the other end can go into the future use pile or box)
Remove about six inches of the outer cover being careful not to damage any of the wires.
Strip the ends of the individual wires about a half an inch.

Step 4: Connecting the Wires.

It is even more important to connect the wires correctly with the serial port. You have much higher values voltage and current to deal with. I usually number my bar from 1 to 10 going from the left.  Use the continuity tester or the ohm meter to see which wire connects to which pinhole. a paper clip can be inserted in the hole to be tested to make things easier. Once you have determined it's number, screw it down on the bar.

Step 5: Finished Product.

Well are the lines are connected and here we attach the cable to an old motherboard for robotics use. Parallel port breakout cable also attached. You have to be real careful with the wires as they break easily.

Step 6: Serial Port Mods.

From two of the more popular sites: (note: 25 pin connectors will use different connections.)

http://hacknmod.com/tag/serial-port/

http://hackaday.com/tag/serial-port/

http://martybugs.net/electronics/tempsensor/

Temperature sensing with linux:  http://pihost.us/~stacato/digitemp/

You should be able to install digitemp from the repo without have to download the software and manually installing it.

Debian based:
$ sudo apt-get install digitemp

Fedora based:
$ sudo yum install digitemp


-------------------------------------------------------

$ sudo apt-get digitemp

Once inststalled You can use

$ sudo digitemp_DS9097u -s /dev/ttyUSB0 -w

"

Now, to read the temperatures. You'll want the digitemp package, which is pre-packaged in Debian and probably most other Linux distributions. Once it's installed, you'll need to know what program to use. Several are available for different DS masters, but in the LinkUSBi's case, you'll want digitemp_DS9097U. To begin, verify the bus is working correctly by walking it:

# digitemp_DS9097U -w -s /dev/ttyUSB0
DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane
GNU Public License v2.0 - http://www.digitemp.com
Turning off all DS2409 Couplers
...
Devices on the Main LAN
28D1483C0200002F : DS18B20 Temperature Sensor
28E9393C020000C3 : DS18B20 Temperature Sensor
010EBED512000046 : DS2401/DS1990A Serial Number iButton

This shows the two DS18B20 temperature sensors (T-Sense probes), as well as the DS2401 embedded in my LinkUSBi. (The DS2401 literally does nothing but return a serial number. Still, as mentioned before it's useful to have to verify the bus is working correctly even if no other devices are plugged into it.)

Next you'll want to create a config file. I chose to store it in /etc/digitemp.conf.

# digitemp_DS9097U -i -c /etc/digitemp.conf -s /dev/ttyUSB0
DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane
GNU Public License v2.0 - http://www.digitemp.com
Turning off all DS2409 Couplers
...
Searching the 1-Wire LAN
28D1483C0200002F : DS18B20 Temperature Sensor
28E9393C020000C3 : DS18B20 Temperature Sensor
ROM #0 : 28D1483C0200002F
ROM #1 : 28E9393C020000C3
Wrote /etc/digitemp.conf

You will be left with a file called /etc/digitemp.conf that looks something like this:

TTY /dev/ttyUSB0
READ_TIME 1000
LOG_TYPE 1
LOG_FORMAT "%b %d %H:%M:%S Sensor %s C: %.2C F: %.2F"
CNT_FORMAT "%b %d %H:%M:%S Sensor %s #%n %C"
HUM_FORMAT "%b %d %H:%M:%S Sensor %s C: %.2C F: %.2F H: %h%%"
SENSORS 2
ROM 0 0x28 0xD1 0x48 0x3C 0x02 0x00 0x00 0x2F 
ROM 1 0x28 0xE9 0x39 0x3C 0x02 0x00 0x00 0xC3 

You can rearrange the ROM mappings as you'd like. 1-Wire refers to devices by their 64-bit IDs; the numeric mappings are for digitemp's benefit. In my case, 28D1483C0200002F is the probe I'd like to use, so #0 is fine.

Now, let's see what's being returned:

# digitemp_DS9097U -q -c /etc/digitemp.conf -a
Mar 04 22:22:43 Sensor 0 C: 25.38 F: 77.67
Mar 04 22:22:44 Sensor 1 C: 27.56 F: 81.61

Great, works fine. We'll soon need the data in a machine-readable format, so here's how to do that:

# digitemp_DS9097U -q -c /etc/digitemp.conf -o 3 -a
0	77.79	81.50
"

Step 7: Infrared Reciever.

Research the lirc project for software on linux.

Step 8: PDA Connect.

For more information see: http://www.instructables.com/id/Cheap-lcd-screen-for-the-Arduino/

You could probably use an old laptop like a pda also.

Step 9: Experimental Adapters.

PS/2 to Serial Mouse
From HwB

This adapter will enable you to use a mouse with a 6 pin Mini-DIN (PS/2) connector to a computer with a 9 pin D-SUB (Serial) connector.

This requires that the mouse handles both protocols. A mouse like this is sometimes referred to as a combo-mouse.

Pinout

6 PIN MINI-DIN FEMALE to the mouse.

9 PIN D-SUB FEMALE to the computer.

Mini-DIN Dir D-Sub

GND 3 5 GND

RxD 2 2 RxD

TxD 6 3 TxD

+5V 4 7 RTS

-------------------------

Mini-DIN to DIN Keyboard

This adapter will enable you to use a keyboard with a 6 pin Mini-DIN connector to a computer with a 5 pin DIN connector.

Pinout

6 PIN MINI-DIN FEMALE (PS/2 STYLE) to the keyboard.

5 PIN DIN 180° (DIN41524) MALE to the computer.

Mini-DIN DIN

Shield Shield Shield

Data 1 2

Ground 3 4

+5 VDC 4 5

Clock 5 1

------------------------

Comments

About This Instructable

6,109views

12favorites

License:

Bio: computoman.blogspot.com Bytesize articles instead of a trilogy in one post.
More by Computothought:Coffeepot mealsEasy sun hatEasy cakes and pies.
Add instructable to: