3
\$\begingroup\$

I've run into an unusual problem. I'll start off by describing my goal: I'm designing a circuit that can test for short circuits and open circuits in a wiring harness. The wiring harness does not have a CAN bus or anything complicated like that - just simple wires.

Here's how it works

I have two CPLDs, one as a designated driving end (all pins are output) and another as an receiving end (all pins are input). The driving end CPLD is programmed to be a Serial In Parallel Out shift register and the receiving end is a Parallel In Serial Out shift register.

Let's assume all the wires in the harness are one-to-one i.e. no junctions. Let's also assume that there are only 8 wires. So, to test the first wire in the harness, the driving end register is loaded with 10000000. The receiving end also sees this and it all ends well. The driving end is then clocked and it reads 01000000. If the receiver also reads this, then that wire is OK.

But suppose there is a short circuit between wire 2 and 3. If that's the case, then the receiving end will read 01100000. This, too, is OK as we have detected the short and can take action.

But what happens at the driving end? The CPLD's pin 3 will be forcing 0V and pin 2 will be forcing 3.3V. The short circuit between pin 2 and 3 will result in two output pins connected together. I'm assume that a significant current will flow from pin 2 to pin 3 and damage could result.

Note that the shift registers/CPLDs are being driven by a microcontroller. Also note that the harness is usually quite large, around 200-300 wires. Some of which are one-to-many connections. This is why a CPLD was an attractive option as it allows me to program a large shift register and allows testing of a large harness with a relatively small circuit.

How can I handle such a problem?

\$\endgroup\$

3 Answers 3

6
\$\begingroup\$

I would personally use tri-state outputs in this situation.

Instead of driving a 0 or a 1, you could have pull-down (or pull up depending on your preference) resistors on the outputs, and drive the pin you're interested in high or low - the opposite of your chosen pull-up/-down resistor. The other outputs should be set to high impedance so they don't interfere with the expected results.

The pull-up/-down resistors would probably be best situated at the receiving end of the wiring harness so that it 'defaults' the inputs to a known state and stops them floating, rather than defaulting the signal through the harness.

Makes it a little more complex than a simple shift register...

Also, maybe Open Collector (or Open Drain for you CMOS junkies) would do the trick in a similar way...

\$\endgroup\$
7
  • \$\begingroup\$ I quite like this - if only because the CPLDs I'm using have a programmable pull up resistor. Do you think that 5k would be good enough? This is the min. value specified in the Max V Handbook. \$\endgroup\$
    – Saad
    Commented Oct 26, 2011 at 10:11
  • 1
    \$\begingroup\$ I usually use 10K for pull-up personally, but 5K should be OK. \$\endgroup\$
    – Majenko
    Commented Oct 26, 2011 at 10:15
  • \$\begingroup\$ @Saad - Unless you have extremely fast signals or extremely long wires, higher is better because you'll reduce your power dissipation. \$\endgroup\$ Commented Oct 26, 2011 at 11:43
  • \$\begingroup\$ @KevinVermeer Thanks. I can also increase the resistance of the pull up if I choose to drive the IO pins at 1.8V. The resistance is then at least 80k. But that would mean changing my uC as its min. voltage is 2.7V. I think going with external resistors seems like a good option. But suppose I go with pull down, is 10K sufficient? Is there any disadvantage of pull down resistors that I'm unaware of as pull up seems to be more common. \$\endgroup\$
    – Saad
    Commented Oct 26, 2011 at 11:56
  • \$\begingroup\$ I should add, the wires can be upto 1.5m long. \$\endgroup\$
    – Saad
    Commented Oct 26, 2011 at 13:30
3
\$\begingroup\$

Some ideas:

  • If it's for a short-term prototype, don't worry too much. Damage of that sort takes quite a long time to kick in! Likely a '0' will "win" over a '1', so you may find you get no '1's at all if there's a short.
  • Add series resistors to the drive pins to limit the current to a safe value.
  • Put high-value pull-downs resistors on all the lines and only drive a single line at a time. Tristate the other lines in the PLD.
  • Put a pull-up resistor on each line and use the open-drain output mode on the PLD pins.

You need to do some calculations on how high the resistance of short-circuit you want to detect is - as this gets higher, your current limit/pull resistors also need to increase so they don't "outweigh" the fault.

\$\endgroup\$
0
\$\begingroup\$

Suitable series resistors will prevent damage.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.