Bringing It Forward
Bringing It Forward:
So how does one move a plug from the back of the computer, put it on the front and still have a working serial port at the end of the day? The front end is easy; buy some male 9-pin D-SUB connectors, (panel mount with solder cups is probably best, more on that later) cut the appropriate sized holes in the front of your case and secure them with hex bolts. The plastic front panel of most computer cases can be detached and worked on a safe distance away from the computer itself. I strongly recommend you do not attack while the frontage still attached to the rest of the PC.
Making the new ports work is a little more involved. There is a few different methods of obtaining the signals for the front-panel connectors:
The first option is for the brave and experienced only, and probably not the best idea for anybody. There's only a small amount of solder used on the D-SUB connectors on mainboards and they're usually close together. Also, heating your mainboard isn't very smart either.... The components are very small and easily overheated.
The second option is the easiest and should work for most people. I used some ribbon cable and crimping D-SUB's to collect the signals from the on-board serial ports and ran the cables under the mainboard (there's always a good 5mm or more space underneath) and up to the front of the case.
Multi I/O cards usually have 10-pin IDC headers for serial ports which can be connected to the front of the case instead of the usual I/O expansion slot cover. Old multi I/O cards can be found on Trade Me for under NZ$10. If you use a multi I/O card, you may wish to disable the original serial ports in the BIOS.
The method which best suits will vary from PC to PC. You may even find something completely different works best for you. Onwards....
If you use your serial ports as an interface for prototype projects, an activity indicator can be extremely useful. The only piece of standard test equipment capable of indicating activity on a high-speed serial line is an oscilloscope, which the average hobbyist cannot afford.
Installing an LED indicator which lights up briefly every time the data line(s) make a negative going transition immediately tells you if data is moving or not. This could be a simple as an LED connected between the data line(s) and ground. (A large resistor would be needed, over 1KΩ) The LED could be made to light whenever the data line in a certain state.
Unfortunately, the bit period (the time the that data line rests in either state to represent a single bit) is usually far to short to register as more than a dim flicker. At 9600 baud the bit period is ~100µs. An external modem operating at 56Kbps would require a bit period shorter than 20µs.
The solution is a simple monostable 555 circuit which lights an LED for ~10ms every time it detects a negative going transition. This adds a further advantage by working on the transition rather than the actual voltage; the LED cannot lock on when the serial line decides to idle low. (as is the case with some UARTs)
These parts are for the front-panel ports only:
These parts are for the activity indicator circuit:
Most of the parts in the timer circuit don't need to be exact. Changes in the value of the 10KΩ resistor and/or 1µF capacitor will effect the length of the LED flash. The 0.01µF cap must be of this value and type and the 47µF decoupling capacitor shouldn't be any smaller than stated. (it can be larger, but don't over do it)
The circuit itself is very simple; just a standard monostable 555 configuration with a specialised trigger circuit. I will not go into depth on the workings of the 555 in this explanation.
Most serial ports have their data lines (Tx and Rx) idle at +10V or more. This voltage is completely blocked by the diodes on the inputs and the trigger (pin 2) is held high by the 470KΩ resistor. When a transmission is initiated in either direction at least one of the data lines will change to -10V or less and the trigger input will be pulled below ground. (The 100KΩ pull-down is stronger than the 470KΩ pull-up. Read a bit on voltage dividers if the trigger circuit doesn't make sense to you.)
When the circuit is triggered the 1µF capacitor will begin to charge. (before the 555 is triggered pin 7 is connected to ground, preventing the capacitor from charging) As soon as the 555 is triggered pin 3 goes high and lights the LED through the 150Ω current limiting resistor. After a short period, somewhere along the lines of a few tens of milliseconds, the voltage across the 1µF capacitor will rise about two thirds or Vcc and the circuit will reset. Thus every negative going transition on either data line will result in a short (but significantly longer than the bit period) flash from the LED.
This circuit can be powered by anything from 4.5V to 15V, but Vcc must not be any higher than the positive level expected on the serial data lines. If Vcc is too large, the diodes in the trigger circuit will become forward biased, (anode more than ~0.6V higher than cathode) and current will flow through the trigger circuit onto the serial line. If this current is large enough the circuit will be triggered, this being what happens when the data line goes negative. 5V is ideal and readily available inside a computer.
The circuit can be adapted to handle more ports by simply adding more diodes in the same fashion as the two shown. Two of these circuits, (or a single circuit using a 556) could be used to provide indicators of Tx and Rx separately. Feel free to change this circuit to suit your needs.
The back of the case where the original serial ports are piggybacked. The ribbon cables enter the case directly below the plugs shown and run under the mainboard to the front.
The front of the case with the new serial ports and activity indicator LED. The orange LED indicates serial port activity, the red is the HDD light and the blue is just the power LED. The two bolt heads directly below the orange LED are the PCB mounts for the 555 circuit.
The LED indicator circuit.
If you have any comments or questions please don't hesitate to contact me.
|Return To Top||Last Updated: 12/02/2007||Home Page|