<$BlogRSDUrl$>

October 19, 2004

Serial Hell 

When doing a job like assembling a system from loose parts, it is important to have a clear scheme or drawing, understand it clearly and frequently check if what you are doing corresponds to what needs to be done, if the system you are putting together looks like it is supposed to be. Don't do that, and probably you will spend hours working, only to realize (late in the evening, when you're tired and edgy) that what you assembled is useless.

Case in point: my last afternoon's ordeal with a RS-232 lead - two leads, actually.
I need that thing to connect my pressure indicator (that, in turn, amplifies and processes the electric signal from a pressure transducer connected to my experimental apparatus) to a computer, in order to record pressure variations - the purpose of all this is to study the behaviour of supercritical carbon dioxide.

RS-232 is probably the most widely used interface for serial communications between computers and a variety of devices and instruments, in domestic, commercial and industrial applications (and military hardware too). If you look at the back of a computer, you'll probably notice one or two ports, with nine connectors in a D-shaped assembly (there are other ports of similar shape but with different functions), called generally COM1 and COM2: those are serial ports, RS-232 compliant.

Of course this instrument has a non-standard interface, a 15-pin D-connector instead of the usual DB9 or DB25 connectors. The pressure indicator's manufacturer can supply the proper lead, but I think that £70 are a bit too much for a 2 m long cable with connectors at each end. So I downloaded their Serial Communications manual, and set to assemble my own lead. I had a well equipped elecetronics workshop at my disposal, so it did not take long to assemble the first lead.

For the second lead, I wanted to use a shielded cable to keep off electromagnetic interferences. That was quite a bitch of its own, because thin stranded conductors are difficult to solder on the cramped pins of a DB9 connector... but one third trough the work I realized something horrific: I read the connections scheme in the wrong way, so my first lead was useless. "Well, let's make this second one straight, and then fix the first", I though (with some cussing in between).

I tried, but just I could not manage to solder the thin cores, and the shield, to a connector not made for a shielded cable. When finally I succeeded to solder one, the other detached. After a too long time, I almost threw the whole damn thing across the room... but then tried another type of cable.

Who never did this kind of work cannot really grasp all of the problems one must go through to get things done. Cables have the peculiar property of slipping out of place just when you move the solderer's tip close. Four arms would be just enough to keep the connector and the cable in place, and hold the solderer at the same time. But I only had two arms, and a useful clamp, at least. If you detach a conductor from a connector's pin, that cup will be full of solder, and attaching another conductor will be more difficult, and irritating.
And conductors' insulation will burn if you overheat them, and, and... a lot of tiny things taken singularly, but together they can drive someone nuts.

The new cable was even worse: those bigger cores were too big to fit in a pin's cup. It was something like 18:30, getting dark, with me sweating and cursing alone in the workshop. My hands were trembling with fatigue and impatience, and that does not help for precision work. I was about to throw the whole damn thing across the room.

"Fuck the shielded cable" I said, now weary, and using the ol' good 3-cores standard cable, by 19:30 I had my second lead ready, and I fixed the first one. At least I thought so.
I went back to my lab, connected one end of the lead to my instrument, and I tried to connect the other to the computer... but it would not fit. Bloody hell! On a closer inspection, I realized that the lead's connector must be a female DB9, while I installed a male one. Talking about having a clear idea of what needs to be done...

Then I let the matter drop for the moment, and headed to the students' union bar to drown the damned story in a pint of lager, and took the bus home.

This morning, I was back in the workshop at 9:30 to finally fix the lead. 4 hours spent yesterday, and one-and-something this morning, to assemble one goddamned cable that actually required no more than 2 hours. Shit. But at least now it's OK.

Comments:

Post a Comment

This page is powered by Blogger. Isn't yours?