I have designed this little board which will monitor a 7 conductor cable during a specific stage of production. During this stage, the cable (between 3,000ft & 40,000ft) is having heavy duty steel armor wires wrapped around the outside of it and there is a potential for one or more of these steel armor wires (if the tension is not set properly) to cut into the cables, resulting either in a direct short from conductor to armor wire, a high resistance short from conductor to armor wire (think armor wire compressed almost all the way through conductor insulation) or an open caused by armor wire severing one or more of the conductors. The purpose of this board is to detect any of the above scenarios and shut down the machine so that a repair can be made before it's too late, or so the cable can be scrapped before all the supplies are used up. The armor wire contacts the machine, which is bolted to the ground, so armor wire = chasis ground = earth ground. It is controlled by an arduino microcontroller and has 2 relay outputs; one for the 120V machine run signal, and one for a 120V red/green stack light.
The board is already made and I have tested it on a few diffferent conductors, and it performs perfectly. What I am seeking from the members here is a little proofreading of my circuit & the ideas behind it. I am a novice at best and there's a good chance that I designed this thing insufficiently in one or more areas. As you read, if what I say is incorrect ot my circuit is incorrect, please tell me. On monday I will be demonstrating the operation of the device to the thermoplastics engineers who design the cables that we make to get their blessing to install it; so if you have something to say, please speak now. Thanks
The basic theory of operation is that 1,000v from the DC/DC converter will be sent out on the center conductor, weave back and forth through the rest of the conductors, and return on 2 conductors. the DC/DC converter can only supply 1.5mA, so it should be able to push all 1000V across 666KΩ; any lower resistance and voltage starts to drop off. In the circuit, I have 10MΩ of resistance, (plus 500Ω-5KΩ for the conductor), so that means that theoretically I should be able to start to detect a DC/DC voltage output drop (leakage from conductor to armor wire) around 715KΩ. The voltage recieved back on the 2 conductors is conveyed to the microcontroller via a darlington optocoupler. I am aware that the output of the opto is not linear, but at the specific current resultant of the 20MΩ resistors, it seems to be the "butter zone" and testing has shown that I get a useable analog output from it - doesn't need to be exact. The μcontroller recieves the 2 analog signals (inverted signals) from the opto and compares them to a value from a potentiometer; this value would be the user-set tripwire - if the value of either opto channel is > than the pot value, there is a problem: either there is a short to ground or an open.
Ok, first a couple of pics:
I know it's not pretty, but it's functional, and I'm likely the only one who will ever see it from the back side.
Now the drawing:
And finally, the code:
If you are still reading, thank you very much for your time and Ilook forward to reading your comments.
The board is already made and I have tested it on a few diffferent conductors, and it performs perfectly. What I am seeking from the members here is a little proofreading of my circuit & the ideas behind it. I am a novice at best and there's a good chance that I designed this thing insufficiently in one or more areas. As you read, if what I say is incorrect ot my circuit is incorrect, please tell me. On monday I will be demonstrating the operation of the device to the thermoplastics engineers who design the cables that we make to get their blessing to install it; so if you have something to say, please speak now. Thanks
The basic theory of operation is that 1,000v from the DC/DC converter will be sent out on the center conductor, weave back and forth through the rest of the conductors, and return on 2 conductors. the DC/DC converter can only supply 1.5mA, so it should be able to push all 1000V across 666KΩ; any lower resistance and voltage starts to drop off. In the circuit, I have 10MΩ of resistance, (plus 500Ω-5KΩ for the conductor), so that means that theoretically I should be able to start to detect a DC/DC voltage output drop (leakage from conductor to armor wire) around 715KΩ. The voltage recieved back on the 2 conductors is conveyed to the microcontroller via a darlington optocoupler. I am aware that the output of the opto is not linear, but at the specific current resultant of the 20MΩ resistors, it seems to be the "butter zone" and testing has shown that I get a useable analog output from it - doesn't need to be exact. The μcontroller recieves the 2 analog signals (inverted signals) from the opto and compares them to a value from a potentiometer; this value would be the user-set tripwire - if the value of either opto channel is > than the pot value, there is a problem: either there is a short to ground or an open.
Ok, first a couple of pics:
I know it's not pretty, but it's functional, and I'm likely the only one who will ever see it from the back side.
Now the drawing:
And finally, the code:
Rich (BB code):
/*
Armor Machine Fault Tester
Reads an 3 analog in puts: 2 optocoupler channels, isolating from 0-1000V, and 1 potentiometer.
Also prints the results to the serial monitor.
The circuit:
see drawing
created 11 jan. 2011
by Charles Staton
*/
const int optoCH1InPin = A2; // Analog input pin that ch1 of the optocoupler is attached to
const int optoCH2InPin = A1; // Analog input pin that ch2 of the optocoupler is attached to
const int thresholdpotInPin = A0; // Analog input pin that the potentiometer is attached to
const int allgood = 3; //output that will trigger relay for lightstack green light & relay for machine estop contact closure
const int turn1KVon = 2; // output to relay that will turn on the 1KV DC/DC converte
const int resetbutton = 4; // reset button, will turn the unit on initially & reset after a fault is detected.
int opto1Value = 0; // value read from the optocoupler CH1
int opto2Value = 0; // value read from the optocoupler CH2
int thresholdValue = 0; // value read from the threshold pot
int leakagedetected = 0; // Value to store if optocoupler in is higher or lower than threshold value
int readytogo = 0;
int reset = 1; // value to store state of reset button (normally closed button)
int startupsequence = 0;
void setup() {
pinMode(allgood, OUTPUT);
pinMode(resetbutton, INPUT);
pinMode(turn1KVon, OUTPUT);
// initialize serial communications at 9600 bps:
Serial.begin(9600);
}
void loop() {
// read the analog in value:
opto1Value = analogRead(optoCH1InPin);
opto2Value = analogRead(optoCH2InPin);
thresholdValue = analogRead(thresholdpotInPin);
reset = digitalRead(resetbutton);
if (reset == 0) {
startupsequence = 1;
}
else {
startupsequence = 0;
}
if (startupsequence == 1) {
digitalWrite(turn1KVon, HIGH); //turn on the HV and..
delay(500); //wait half a second for it to charge up
startupsequence = 0;
readytogo = 1;
}
if (readytogo == 1) {
//detect leakage. If the voltage on both opto channels are higher than
//the user-set threshold voltage then no leakage tripwire exists. The
//principle is that if an indirect short allows enough current to pass,
//the voltage output of the dc/dc converter will drop.
if (opto1Value > thresholdValue || opto2Value > thresholdValue ) {
leakagedetected = 1;
}
else {
leakagedetected = 0;
}
if (leakagedetected == 1){
digitalWrite(allgood, LOW);
readytogo = 0;
}
else{
digitalWrite(allgood, HIGH);
}
}
else{
digitalWrite(turn1KVon, LOW);
digitalWrite(allgood, LOW);
}