Propeller Cable Tester
Sariel
Posts: 182
Alright guys. I have this project most of the way done, I just hit a roadblock today, and I am having a problem seeing the other side. I have a prop-based programmable cable tester that will not correctly detect a shorted wire. I have a 74HC595 and a 74HC165 on each end of a wire, and by passing serial data to the 595, and reading the data that is on the 165, then comparing it to a static Binary value, I can Detect opens all day long. When miswires (appearing as opens and shorts) or just shorts are present in the cable, I am finding that the amount of voltage output by the 595 is not quite enough to drive 2 pins high at the 165. The way it is wired is so that the 595 is directly connected to the cable under test and is driven by the 3.3 volts for the prop. Each input of the 165 is driven low by a resistor. I originally started with a 10K, then tried a 100k, then all the way up to 10 Meg ohm, but I am still getting 0.65 volts (approx) instead of the 3.3 volts I see normally. I also tried without a pull-down resistor, but not even that would drive the pins high enough to signal the miswire.
Am I doomed to adding a transistor, or maybe even a buffer IC in between the Cable under test and the 74HC165? Maybe even bump the 74HC595 up to the 5 Volt rail? I guess I am not even sure if that will fry my Prop by too much voltage returned back from the 165. What is going to happen when I have a cable that I want to have jumpers installed into so more than one line is going to be active by design. I can see the tester having a serious problem with that. I am afraid that it is going to be a show stopper unless I find something very simple and inexpensive to fix this project.
Am I doomed to adding a transistor, or maybe even a buffer IC in between the Cable under test and the 74HC165? Maybe even bump the 74HC595 up to the 5 Volt rail? I guess I am not even sure if that will fry my Prop by too much voltage returned back from the 165. What is going to happen when I have a cable that I want to have jumpers installed into so more than one line is going to be active by design. I can see the tester having a serious problem with that. I am afraid that it is going to be a show stopper unless I find something very simple and inexpensive to fix this project.
Comments
Please post a schematic?
What conditions are you trying to design for?
Ok... Here is my full source. I included all of the object files that I use as well. The 74HC595 and the 74HC165 object files are lightly modified versions of ones I found in forums or the obex. TV and TV_Text are unmodified. The source is very heavily commented, with the schematics inside.
It is just a simple continuity tester, looking for opens and shorts. It crudely will show you a mis-wire by displaying an "Open and Short" failure to the same pins. Pretty self-evident when you analyze the failure data. Maybe in the future I would like to incorporate resistance, Kelvin testing, maybe add a high voltage supply and a big ole gang of relays for HiPot testing, but boy is that waaaaaay down the road.
Thank you for taking a peek for me. Like I said tho, it is not really a firmware problem so much as it is my data lines do not have enough juice to drive the 165 when there is a jumper or a short in the assembly. I am leaning towards bumping the 595 voltage up to 5 instead of running 3.3... but I am afraid to put too much juice to a prop IO pin and fry the thing.
Oh.. I wanted to add that this version does not know the difference between an open or short, but it can find them if I get past this error.
I use 5 volt 74HC595 frequently with the Prop. As long as you have 3k resistors in series with the receiving Prop pin, you should be okay.
I usually use 10k resistors with 5V data. I'm not sure if the added resistance of your cable will cause trouble. I'd be inclined to think it would work.
Duane
I tried it out on a small sample circuit so I did not fry anything on my gang of breadboards, and voltages look promising so far. I added a 2K7 to SerOut from the 165 after bumping all of the shift in/out registers up to 5 volts. Now, on to adjusting the full proto. I am thinking I am going to have to do a study on cable length and Resistance to find out if there is going to be a length limitation for larger assemblies. Future re-designs will employ an optocoupler, or maybe buffers. I just don't want to make too many adjustments to the hardware (or the price) at this stage until I get a better idea on performance and stability after it has been used for a while.
Thanks for the idea.
Your 'cable testing' circuit is about the pinnacle of a basic circuit. Resistors in parallel. Which means you should do some EE work and calculate all of the currents and voltage drops and whatnot. Then once you know what everything will look like you can then pick your chips and your supporting infrastructure.
It sounds to me like you have an idea and then you're just throwing chips at the problem. Do some pencil and paper work before you start your design (even though you've already failed a few times). Then report back with all of your calculations and full design specifications. Then do the circuit design. Circuit design is not supposed to be step 1!
Yeah after the fact I was thinking about something like that, that's why I tried bumping thee resistance up to 100k. My algebra skills are not super-spectacular, but you would think that 100k resistors would have a good trickle so the pin stays low, and when you toggle a maximum of 8 pins high at the same time and effectively making 8 100k resistors in parallel. (1/Rt) = (1/R1) + (1/R2) + ... my total is just a hair over 12 k, and should not be sinking all of my current away from the 165 causing the problem I am seeing. Just in case there was something in the IC I was not expecting, I changed the value to 10 meg after that, then tested the pin with a logic probe to see that the Register side of the resistor was in fact still pulling the pin low, and it did not work.
I am sure during the course of a design, something came up that you did not foresee, and you had to make changes to your original penned idea. This is one of those circumstances. I thank you for your input, but certainly I don't need a Holier-Than-Thou attitude.
Kwinn -
My schematics are in the top level file of the .zip I included in my 2nd post. It is overly commented mostly because this is my first major propeller project, and I want to easily be able to see what is going on. I happen to have a couple 597's sitting around here, and I am trying to get the file in the obex to do my bidding with a sample circuit. Do you have a snippet of code around for driving those chips that I can take a peek at? I plan on pretty much the same thing you made, only 2x as big, and a few other bells and whistles.
Schematics.txt
Cleared the '595 and '597s
Shifted a 1 into the first position of the '595 and then shifted in 16 bits from the '597 and compared the data to the first entry in a table
Toggled the '595 clock to shift the 1 to the next position, shifted 16 bits in from the '597, compared data to second entry in table
Repeated previous line until the 1 bit had shifted through all 16 bits of the two '595's and compared to all 16 table entries
It was a very simple go/no go tester.
You use 10K (or have you gone to 100K?) pull down resistors which would draw 0.5mA each at +5V. Since the '595 can output 35 mA per pin and you have no resistors on the outputs a single output pin should have no problem pulling all 32 of the '165 input pins high.
Are your chips in sockets or are they soldered in place?
The whole beast is breadboarded at this stage, simply because I wanted a quick and easy way to test out the failure detection by moving jumper wires. I have been drawing up a surface mount board that I plan on using as the final assembly, but that stalled out when this issue reared it's ugly head. I see your thoughts are the same as mine tho. There is no reason why this should not work. You thinking that something went wrong with my shift registers? I have a tube in my cabinet of each, so if I find some time today, I'll change them out to see what happens.
I also did a couple checks to see what my voltage and current draw is with the brand new IC's and I am getting 4.9 volts, 0.6 mA with no jumper. With 2 points jumpered, I get 1.3Volts, 63.3 mA. Any Idea what would cause those readings?
Just tried toggling the 165 pins manually with a probe from the 5 volt line while the tester was running, and it detected a short! I am starting to think that rules out the source code and the 165 circuit.... maybe something is going all wonky with the 595? could it have something to do with the lack of resistor on the parallel side of it?
He has 470 ohm series resisters on the outputs of the shift registers which limit the current.
See #11.
Duane
This way you know the last chip you added is the most likely cause of any problem you have.
That is exactly what it is supposed to be doing. I added that in shortly after seeing the issue, and starting up this thread. I will attach an updated version of the source.
I kinda noticed that... this beast is a lot faster than I would have expected it to be.
Yup. That's how I built this thing up. Take a peek at the rev history, and it should reflect that.
Yeah I tried that, but still no joy. Was not sure how limiting my current even more would help, but it was worth a shot.
Autotester v1.201 - Archive [Date 2011.03.28 Time 07.21].zip
A short in the cable has the effect of shorting the outputs of the shift register.
You said in #13 that the voltage on the shift registers dropped to 1.3 volts.
This would not happen with the series resisters in place.
Duane
(edit) working on a spreadsheet to see if I can find any correlation in the data... will be back later with findings.
For the 595 I am using a slightly modified version of the one found n the Obex, "jm_595_ez_demo.zip", and for the 165 I used one that I found digging in the forums called HC165try.spin, found here:
[HTML]
http://forums.parallax.com/showthread.php?91963-74HC165-Spin-Test-code-need-some-help
[/HTML]
I think I have an answer to my own question. I filled out the Spreadsheet of random pass/fail conditions, and I started seeing a trend in the XOR translations. Correct me if I am wrong, but wouldn't returning all 0's indicate a passing check, if expected condition is equal to the XOR'd data, that would be a short. if an open condition is found, XOR'd data would be greater than expected data in the L[x] variable. I could then rely on the step number to tell me what pin on the 595 connector side would be faulty, like I am already doing, and use that as error reporting to the end user.
Any time.
Wanted to say thanks again to kwinn for guiding me through the serious questions I had. If you ever find yourself in Cheeseville, I owe ya a beer or five.
I have that short bug fixed now, where it is detecting all shorts, not just ones that are shorting to a pin higher in the pin number being tested. XOR did the trick, after I had to visualize on paper what the heck the real data would be. For simplicity, I left the open detection alone since there was nothing wrong with that. Snippets I changed were:
(rinse and repeat for all 4 pattern sets)
and added in the method:
Now, it is time to add in operator requests that are not system vital like short conditions displaying pin from and to data... just stuff to make thier life easier.. maybe some time in the future I will add wire color mapping so they can go right to the failure and fix it without even having to look at a print. Starting to get excited about this again. :nerd:
*edit*
It has something to do with output current. I re-wrote a bit of the program to toggle all 4 jumpers high at once, and it was enough to get the intended results. I really don't want to write programs this specific for each cable, so I am in search for something on the output side that brings more than 25 mA to the table, or an input chip that is a bit more sensitive.
If you want a bit more specific info I will need an accurate schematic of a few bits of the output and input circuitry. PM me with your email address and we can echange info directly.
Hrm... that guy looks like it will possibly do the trick. Just now trying to figure out if there will be enough voltage to toggle the ULN's after it has travelled down the length of the assembly. Wouldn't it be better to just have one set on the output side?
XOR again? awesome. I'll be an expert in that trick very soon. I have learned so much in this project that is going to carry over to some of the other ideas floating around in my head.