Monday, February 27, 2006

Just one more major revision to the Table 310.16 Calculator

I removed the option choices and went with a conservative selection. If the terminal temperature is less than the insulation temperature then the overcurrent protective device (more than likely a circuit breaker) is selected based on the terminal temperature. The next higher or equal standard size device per Section 240.4(D) is selected unless the circuit supplies multiple receptacles. In this case the next lower or equal device is selected based on the terminal ampacity. The terminal ampacity is determined by the size of the conductor and the terminal temperature rating. This is now in the program. The NEC does not address this method explicitly but it is implied in several examples in the NEC handbook. Basically it says if the terminal temperature is lower than the insulation temperature treat the conductor as if it has the lower temperature rating, but derating can still be done with the ampacity at the higher conductor temperature as long as the conductor is not used at a greater (derated) ampacity than the terminal ampacity. That is what the calculator program is supposed to do, if it all works right. Every problem I have done with the program so far does this correctly.

On a lighter side, I just returned from taking the dog for a walk when not less than 300 feet from the house we jumped two moose. It has snowed about six inches in the last two days. The 800 foot driveway is now too deep for the car so we fired up the four wheel drive truck and made us a road. I haven’t had the drive way plowed all winter and I think I will keep on going this way. All the people that visit us have four wheel drive so that should not be a problem, but the fuel truck may have one. We are down to 8 inches of fuel in the tank. I went online and found a fuel tank calculator for free. You just enter the size of your tank and the inches of fuel and it gives you the gallons. We have about 44 gallons that should last another week before we call for fuel. I am going to put a wood stove in here next summer and maybe just forget about oil.

Saturday, February 25, 2006

Table 310.16 Wire Size, OCPD, and voltage drop Calculator is now online

At last the calculator is online at http://www.electrician.com and http://www.electrician2.com. It is only 35k in length and the source code is organized and maintainable (the online version has been thoroughly obfuscated.) The Excel Table 310.16 program was a maze that I couldn't decipher myself. Also it would not do aluminum and had a few bugs where it oversized the wire. I think this new JavaScript online program is a dandy, but we shall see. If any of you find bugs please let me know.

I have begun flow charting the program for a continuing education course and preparing a few NEC change proposals related to some discoveries. You are suppose to flow chart first, but I always do it backwards. How do you know what the program is supposed to do unless you write it? I tried four different programs before I found the correct solution. The first one was a monster and went to 2000 lines before I decided to scrap it entirely, but not after spending a week trying to get the bugs out. Of course I am not a professional programmer or I would probably be better at this. If programming is like everything else it takes five years to reach journeyman level. I only have about two years worth, I suppose. Anyway, it has been fun, and of course I owe the people that buy my continuing education courses gratitude, or else I would be out on some job probably living in a camp working 7-10's and only eating, sleeping, and doing electrical construction work. That is about all you do when on one of those remote camp jobs like I have worked so many times.

Thursday, February 23, 2006

Latest on the Wire Size, OCPD, and Voltage Drop Calculator

The program is humming. It is like a high speed race car. The code that was about 150k in length is now about 35k and the program is doing what it is supposed to do and it does it well. I just keep doing problem after problem trying to get it to fail. It does copper and aluminum, ambient and fill derating, Table 210.24, Section 240.4(D), 60, 75, and 90 degrees C insulations and terminal temperatures, nipples, receptacle circuits, continuous and non continuous loads, and it gives you the minimum and maximum over current protection and wire size. The output is transferred to a voltage drop calculator that requires the voltage and phase and one way circuit length to calculate the voltage drop. You can also upsize the wire size by clicking a button to decrease the voltage drop or click another button to go back to the original size.

I bought an obfuscating program to reduce the size of the JavaScript program even further and to make the program almost undecodeable. I also built in the copyright information so if it is removed the program will not run. I have had too much of my code stolen!

Work on the Wire Size and Voltage Drop Calculator

Work is just about complete. I a wrote three unsuccessful programs before I finally decided that I should go back and look at the Excel Spreadsheet algorithm that I wrote 10 years ago this fall. Fortunately after an intensive six weeks of writing the Excel program I wrote down how the program worked. It is an interesting algorithm that actually solves a very complex problem of linear programming. For those of you that did not have the good fortune of studying mathematics for 8 years and living in the poor house like I did, linear programming in this case is the solution to many greater than, less than, and/or equal to lines on graphs. In the case of using the NEC Tables and rules these lines are not continuous and have many breaking points for exceptions. It is truly an interesting problem that requires a very complicated analysis. I now have over four weeks time in writing this program using JavaScript and six weeks creating the Excel spreadsheet in 1996.

Monday, February 20, 2006

Work continues on the Table 310.16 and voltage drop calculator

I have been working about 14 hours a day debugging and testing this program. The special limitations required by the 15, 20 and 30 ampere circuits are taking much time.
I plan to develop my next course following completion of this program. I want to develop a computer applications course for electricians.

Thursday, February 16, 2006

Wire Size, OCPD, and Voltage Drop Calculator

The program is complete. The final dress and check out is in process. It is a difficult task to test all combinations that a large program does. This program is now 87K or about 2,000 lines of code and does 10,080 combinations of problems. So how does one check out all combinations? That is why software publishers issue beta versions in an attempt to get users to find any bugs. Also, I am looking into scrambling the JavaScript source code to keep other software publishers from stealing it. I have invested a total of about 10 weeks in writing this program since it is a derivative of the Excel program written in the late 1990's. As I search the web for various electrical calculators I keep finding my JavaScript code at many other sites, along with inaccurate applications of other programs. I am convinced that many of these people have no idea of what these programs are supposed to do.

Monday, February 13, 2006

More on the wire size and ocpd protection computer program

The program is about 2/3 complete. The marvel of writing a computer program is that it requires that you break down your decision making process into discrete steps. Have you ever asked some one how they come up with that answer, only to receive a reply that they don't know how they figured it out, but they just did it? A computer program requires that you analyze the process of decision making to its most fundamental operations and that you write code that mimics this process so the computer can repeat what you have done. This is not always an easy process and becomes more and more entangled until the program itself operates without you knowing how it does it, but somehow it comes up with the right answers. It is an amazing feat.

Saturday, February 11, 2006

Work continues on Wire size and OCPD Calculator

First a comment about the weather. Today it is thawing at about 45 degrees F. All winter we have had only 8 inches of snow. We have been able to drive the car down our 800 foot road all winter without having to plow. Other than the cold snap during the last week of January when it went to -51F this winter has been very mild indeed. Today, I read that the east coast is bracing for 12 inches of snow. Alaska has a reputation as being a cold and difficult place to live. That is not entirely true, but many Alaskans like to make it that way to keep the population down. We only have 600,000 people or about one square mile per person. The months of April, May, June, and July are absolutely beautiful and for the most part Alaska is undeveloped with thousands of acres of wilderness with no fences.
Now about the computer program. It is coming along, a struggle but coming along. As I said before in 1999 I spent six hard weeks writing an Excel Spreadsheet to perform this function. Believe me when I say that a computer program that selects the wire size and OCPD based on the continuous and non continuous loads, 6 tables and numerous other variables is one very complex program. I read somewhere that it is a simple five step process. That is not exactly correct.

Thursday, February 09, 2006

Work beginning on Wire size and OCPD Calculator

I have begun the JavaScript version of an improved wire size calculator. I wrote the original one in excel in 1999 in about six weeks time. It is at the electrician.com site under calculators. But I have noticed that this older Excel Version does not always open in IE for some reason.
There are numerous variables required for selecting the correct size conductor and OCPD using a computer program. As usual, 98 percent of the time the process is a very simple technique of using Table 310.16. But the other 2 per cent is very complex requiring the logical connection of continuous load, noncontinuous load, number of conductors in a cable or raceway, ambient temperature, conductor insulation temperature, the type of circuit, the length of raceway or bundled conductors, the termination temperature, the type of cable if used, the standard sizes of overcurrent protective devices, the ampacity tables, and of course whether the conductor is aluminum or copper. These requirements are located throughout the NEC making this an arduous task to do without a computer program. It is with awe and wonder that a computer program can do this process because in some instances the calculations have to be checked against themselves to determine if an additional calculation shall be performed.
It utterly amazes me that the people that write the NEC expect anyone to get all this right. Perhaps that is why there is so much redundancy and overkill in the NEC - so when errors are made, and they must be made often, buildings will not burn down from overheated conductors.