You can save your company time and money with easy-to-use online tools like engineering calculators.

The interactivity of today's graphical Web browsers offers serious advantages to the engineer or electrician in the field. For example, you might find a form-based online calculator that gives you a recommended wire size if you know the load size and length of a wire run. In fact, you can automate nearly all engineering calculations as well as their reference tables. What used to require page flipping now only requires you to enter data and click on the answer button.


Imagine how this can speed up estimation, field-generated change orders (Photo above), upsells, custom fabrication, and other functions that rely on quick and accurate engineering calculations. This same tool allows you to perform custom calculations flawlessly. Suppose ABC Co. wants no more than a 2% voltage drop on any circuit. You could set up a modified form on your Web site just for them. You can even print the results for documentation and future reference.

Labor-intensive calculations like those for sizing fuses, breakers, wiring, transformers, and motors are prime candidates for online automation. Other possibilities include calculations for lighting, short-circuit analysis, English-metric conversions, raceway fill, box fill, drill bit size, hole size per bolt size, tap size per hole size, hole saw size per conduit size, and just about any other calculation needed to do the job right.

How do you put dynamic engineering content on the Web? You can generate Web pages one of two ways: dynamically or statically. A dynamically generated Web page results from a database query on a server. You can see this kind of page when you visit www.amazon.com and search for a book. Static Web pages, on the other hand, are programmed and saved as a file. That file can exist on your local hard drive, an intranet, or the Web. Pages that end in the “htm” or “html” extension are examples of static pages. No matter how you generate the page, the content can be dynamic. In other words, it can change depending on viewer interaction.

One tool Web programmers use to provide dynamic content is the script. A script is fairly simple programming code the browser can interpret to generate functions like engineering calculations.

The sample calculations in this article use JavaScript as the basis for performing calculation routines. Some recent additions to manufacturers' Web sites include Macromedia Flash routines to provide engineering calculations.

Why scripts? Of the many programs available for performing engineering calculations, few are as flexible and economical as scripts written for the Web. Let's look at several compelling reasons for using script language in engineering calculations.

Cross-platform operability. HTML and scripts can run on any machine or operating system that has a Java-enabled browser. If you can view most pages on the Internet, you can use script-based engineering applications.

Compact size. The circuit design application referenced in this article is about 12 kilobytes. The same application written for Microsoft Excel is about 25 kilobytes and requires you to have a current version of Excel prior to use.

Portability. You can save and access the application on a local hard drive, an internal network, or on the Internet. You can use the application in the field on a handheld computing device or a Java-enabled wireless Internet device.

Easy customization. Since HTML pages and scripts are in plain text, you can easily edit them for an application and keep them up to date with current codes and practices. For example, a client required conduit fill to be at a maximum of 30% rather than the 40% generally required by Code. This prompted the addition of the “% Fill” box on the input form (Figure, right). The addition required about three lines of code and 15 min of work.

Put these benefits together, and you've got a competitive edge. Using Web-based engineering routines can extend the capabilities of your staff by eliminating dependence on bulky reference materials, expensive programs, and specialized calculators. If they're already using Handspring or Palm devices anyway, you're giving them the functionality of several discrete tools in one they already have.

Practical example. Let's review an example to demonstrate simple HTML page's coding. In basic circuit design, we convert a load to amps, calculate circuit breaker and wire size, and calculate raceway fill. You could look up each of these items in the NEC, but why not let the script do the looking for you? Here's how the script element works:

When you load the page, you see an input form (see Figure above). After you enter the required information, the script looks up the type of load and performs the basic conversion to amps. This script uses factors f1, f2, and f3 to calculate full load amps (fla), wire size amps (wsa), and maximum circuit breaker sizes (mcb) for various types of loads. The portion of the calculation that converts the entered load to amps looks like the coding in the Sidebar, on page 44.

Once the script converts the load to amps, it extracts all other information from simple tables taken directly from the current edition of the NEC. The whole process takes only a few seconds. You can update the functionality to reflect NEC changes by modifying a relatively simple text file. In addition, the conductor and conduit selection tables (not shown in the programming code above) provide a template for additional pages like conduit fill.

It pays off. You can use the programming methods that power the Internet to power many of the tasks you must tackle in electrical design and construction. Web pages can be simple or complex, depending on the task requirements and the skill level of the persons responsible for creating the application. By using online forms instead of calculators, you reduce repetition and increase accuracy. By using online forms instead of spreadsheets, you eliminate platform dependency and empower people in the field to easily do tedious calculations with inexpensive devices.

Graper is a principal electrical engineer with Systems West Engineers, Inc., Eugene, Ore.



Sidebar: Code for Converting Load to Amps

function amps(form)

{

if (form.type.value==“amps” ║

form.type.value==“hp” ║

form.type.value==“kva” ║

form.type.value==“feeder”)

{znone=“1”}

else {window.alert (“Type must be hp, kva, amps, or feeder”)}

if (form.phase.value ==“3”) {ph = 1.732}

else {ph = 1}

if (form.type.value == “hp”) {f2 = 2}

else {f2 = 1.25}

if (form.type.value == “feeder”) {f3=1.25}

else {f3=1}

form.fla.value = form.load.value*f1;

form.wsa.value = form.fla.value*1.25/f3;

form.mcb.value = form.fla.value*f2/f3;

form.kw.value = form.fla.value*form.volts.value*ph/1000;



Sidebar: Internet References

Java Resources: www.jars.com

HTML Programming: www.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.html

Examples used in this article: www.systemswestengineers.com/engdesk.htm