Connect with us

Mux/Dmux

Discussion in 'General Electronics Discussion' started by Glenn31, Dec 16, 2013.

Scroll to continue with content
  1. Glenn31

    Glenn31

    5
    0
    Dec 16, 2013
    Hello, need a little advice for a beginner.

    I am wanting to create a test for a 6 core cable. The basic test is to apply 5 volts to each core then check if each core has voltage on and not shorted then output to the PLC saying ok.

    My idea is to use a 3 input mux chip (inputs from the PLC) to apply the output voltage onto each core in turn. (i believe this is simple enough to do) but then..

    Is there a way i can have a 6 input chip, depending which input is on will give me a 3 bit binary output i could put into the PLC?

    Any help is much appreciated, cheers
     
  2. Glenn31

    Glenn31

    5
    0
    Dec 16, 2013
    can you get an encoder which detects if 2 or more inputs are on at the same time?
     
  3. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    Do you have a PLC? Can it do the automatic testing?

    Will your test jig have connectors for both ends of the cable? Or do you need one jig at one end, and a separate jig at the other end?

    If it's possible, your simplest test setup would be to have six PLC outputs driving the six cables at one end, and six PLC inputs responding to the six cables at the other end. You write some code in the PLC to assert one output at a time, and check that the corresponding input goes active and no other inputs do.

    If that's not workable, you'll need to describe your project in more detail.
     
  4. Glenn31

    Glenn31

    5
    0
    Dec 16, 2013
    Yeah I could just do it with the PLC and that would be the most simple way but I don't want to use that much I/O and also just for my own benefit want to do it with chips, I really want to use a decoder and encoder but just don't know how I would detect a short on the encoder Input.
     
  5. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    Well, you could save a lot of outputs if you used a CD4017 (see http://media.digikey.com/pdf/Data Sheets/Fairchild PDFs/CD4017BC, CD4022BC.pdf) to drive one end of the cable. It has up to ten outputs, but can be configured to use any number of them, with one output active at a time. It moves to the next output in response to a clock pulse. I would set it to drive seven outputs, with the first output unconnected.

    Your PLC code wouldn't need to be able to force the CD4017 to a particular output; it could just figure out which output was active, then advance through all of the outputs using a single clock signal. One digital output required. If there is a break in the cable, the receiving end would detect "no wires active" when the CD4017 is not at output 0. This would require some special handling, and it might be simpler to just add a second output driving the CD4017's RESET input, to force it to a known count.

    At the other end, I can think of MANY alternatives, but I don't know of any IC that will do what you want. Here is one suggestion. You want to detect (a) which single wire is activated, (b) whether more than one wire is activated, and (c) when no wires are activated.

    I suggest using an array of diodes to encode the six wires into a three-bit binary representation of the wire number, from 1 to 6. This would be done by connecting diodes with their anodes to the incoming cable signals, and their cathodes to a three-bit binary number bus, consisting of three wires, "b0", "b1" and "b2", which would be read through three digital inputs on the PLC. The diodes would be connected like this:

    Wire 1: diode to "b0"
    Wire 2: diode to "b1"
    Wire 3: diode to "b0" and another diode to "b1"
    Wire 4: diode to "b2"
    Wire 5: diode to "b2" and another diode to "b0"
    Wire 6: diode to "b2" and another diode to "b1".

    Nine diodes. This gives you a three-bit binary value from 1 to 6 if a single wire is active, and 0 if no wires are active. You would use a pull-down resistor on each of b0~b2 so each one defaults to the OFF state.

    That would allow you to detect any fault on the cable, but if two wires are shorted together, you would not necessarily be able to determine which wires they were. This is inevitable if you have only three inputs to the PLC. It can only tell you eight different possibilities.

    One other thing. If two (or more) wires are shorted in the cable, and the cable is driven directly from the CD4017's outputs, the outputs that are shorted together will "fight with" each other, and their voltages will be poorly defined. This problem can be avoided using diodes between the CD4017's outputs and the cables, with their anodes to the CD4017 and cathodes to the cable socket. If wires 2 and 3 are shorted, for example, and the CD4017 is driving output 2, the voltage coming back on wire 3 is isolated from output 3 of the CD4017 by the diode and there is no conflict.

    There are lots of other possibilities but I think this may be the one that gives you the lowest I/O count - one or two outputs, and three inputs on the PLC. It also gives you a pretty thorough test - it will detect and identify any broken wire(s), and detect (but not identify) any short.

    The CD4017 operates from a supply voltage from 3V to 15V. I would use 12V.
     
    Last edited: Dec 17, 2013
  6. Glenn31

    Glenn31

    5
    0
    Dec 16, 2013
    Could you explaine what I would be doing with the pull down resistor a bit more clear? And how would it detect a short? Much appreciated thank you
     
  7. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    The nine diodes make a crude encoder. If one of the six inputs is active (positive voltage), the circuit generates a three-bit binary number that corresponds to the number of the input that's active. If no inputs are active, the resulting binary number is 0.

    This arrangement, where the three binary outputs can be driven by several diodes, is called a "diode OR gate". Actually, there are three diode OR gates, one for each bit of the binary number. The diode OR gate requires a pulldown resistor on the output, so that when none of the diodes is feeding a positive voltage onto the output, the output assumes a low state. Your PLC inputs probably already provide this function, because they will require a certain minimum current before they will be regarded as ON. The PLC inputs must be connected so they activate when positive voltage is present from the cathodes of the diodes in the diode OR gates.

    Say there's a short between wire 1 and wire 4. When the 4017 asserts output 1, voltage will appear at the diode logic on inputs 1 and 4. The voltage on input 1 will cause binary output b0 to go active, which is correct, and the voltage on input 4 will cause binary output b2 to go active, which is wrong. The binary number that the PLC will read is not the 1 that it is expecting; it is 5. As long as you test each wire independently, any short between wires will cause one or more binary values to be wrong. The specifics depend on which wire numbers are shorted together, but any short will cause at least one mismatch.
     
  8. Glenn31

    Glenn31

    5
    0
    Dec 16, 2013
    thank you very much for your help, i understand now, i will try it on simulation software
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
Loading...
Electronics Point Logo
Continue to site
Quote of the day

-