Also called 'How the mother of all mess-ups (lets not curse now) can mess up your entire morning.'...
This is my first blog on this board, so be gentle. Also as you might observe, I have a rather self-deprecating sense of humor. I hope you enjoy it.
As true electronics enthousiasts, most of you will be aware of audio jack-plugs. There are various shapes and sizes, with 2 connections, three and sometimes four. (Never seen one with 5, and 1 connection is usually called a banana-plug. Often used in conjunction with power-supplies.)
Typically, these things are used in audio-equipment, for connecting audio inputs and outputs, such as microphones, lines and speakers. But lets face it: pretty much anything that needs a power, ground and one or two data-lines (I/O) could connect over these connectors.
At my work, we use these connectors to connect sensors to a main controller board. Quite frankly, I can't go into much detail (especially since this is an R&D project) but sufficing to say, we're doing pretty much what I descibed above: Tip is Vcc, ring is data I/O (bi-directional) and sleeve is ground.
At one point in time, I was building the firmware to process these connections and something odd struck me: To simulate an input, I had a switch wired up to signal and ground and to pull the data line low, I'd simply flick the switch. But the weirdest thing: The moment I did that, the controller would glitch out and reboot, and keep glitching until I put the switch back. Now, I'd like to point out that I'm not the one that actually designed the circuit board, but the guy that did is pretty good at it. (given the decennia of experience he has..) On my request, he looks over my shoulder as I demo the behaviour, we study the schematic, rule out shorts in some pull-up resistors and are left scratching our heads.
Designer: "Well... if I didn't know any better, we're browning out the LDO (voltage regulator). But between the couple dozen mA's for the controller, the mA's for some leds and the current through this pull-up resistor, it really shouldn't..."
Me: "Well, we ruled out any possible short outs or wrong specced resistors. There's one FET that might have caused a short to ground, but it would cause the short even without the switch.."
Designer: "There's the second LDO we could switch on for high power mode. That will give more power. See if that solves the brown-out."
Me: "Gimme a sec.... "
Fiddles with the test-code. Compiles and writes the code to target.
Me: "Ok, switching."
Throws switch, debugger characteristically glitches over the brown-out reboot of the controller.
Me: "Nope, same effect, controller still glitches on sw-OH-CARPONACRACKER!"
Through reaction speeds honed throughout the years as an embedded developer, I kill the power at the PSU and hope I didn't break anything expensive. The mainboard survived, but upon inspection with a magnifying glass, one of the fets powering the pull-up circuit gave the ghost blue-smoke. At this point, me and colleague are stumped. He suddenly frowns and says:
"Gimme the board. I'll replace the FET and want to check on something."
He replaces the board and does some beep-testing with a breakout plug he has for this port. It doesn't take him 2 minutes...
Designer: "So, did you figure it out yourself yet? Or want me to tell you?"
Me: "Is it my fault? "
Designer (grins) "Nope. Ok, Observe the Jack-plug female: It has 3 connection pins, a tip, ring and sleeve, right? So when you see these three pins (shows a connector unsoldered) you'd think that the pin at the end is the tip, the next one is the ring, and the closest one to the opening is the sleeve. The good news is, we were right about the sleeve. However.. (Shows with multimeter beep) The signal and tip have switched positions."
I frown and study the connector.
Me: "Sooo... switching on the switch, I pulled Vcc, over the FET, straight to ground. The low-power LDO browned out before the FET could seriously harm itself, but the larger LDO supplied enough current before It browned out to fry the FET.
Somebody actually went through the trouble of casting a connector chassis with a conduction pattern to physically switch the two pins? Why even..?"
In our defense: The datasheets for these things was either wrong, or it was the wrong datasheet. I can't imagine it's a production error (I wanted to pull the connector apart to see what it looked like inside, but that would have been destructive and designer needed it still) and why do it this complex? That part we haven't figured out yet, but I'm glad that this was still a prototype board. So since we already had an ample supply of connectors, we simply changed the board for now and went with that. (I assume we'll keep an eye on the possibility that the next batch of connectors might magically be 'the right way around' again, but that's not (yet) my problem..)