Electrical

Last Updated: 12 March 2009

Disclaimer:
Electricity is inherently dangerous.  It will kill you and burn down your house and everything you own if you fail to pay it the proper respect.  If you don't feel competent to work with it, don't.  Call an electrical engineer, electrician, or the goober down the street who knows what he's doing.  Stop.  Take a step back.  Think.  And if you're using electrical tape you're already doing it wrong.

I can't emphasize this enough - 120v will wake you up; 240v will kill you twice before you hit the ground!  If you're not at least a little bit afraid of electricity, you're doomed.

This page does not provide every last detail, and assumes a basic familiarity with household wiring.  If you lack this basic familiarity STOP and call an engineer (or electrician).


There are two options for powering this lathe (or any 3-phase motor) on my single-phase 220v shop electrical system:

1. Swap the motor for a single phase version.  This would require an increase in power rating, since single phase motors are less efficient (produce less torque given an input power).

2. Convert my single-phase power to 3-phase.

It turns out that modern Variable Frequency Drives (VFD) are so cheap as to make options 1 and 2 effectively the same cost.  The choice, therefore, is clear - a VFD should be used to convert my 1-phase power to 3-phase.  VFDs offer a great many practical advantages over a single-phase motor, chief among these being:

A. Infinitely variable speed with near-constant torque.
B. The ability to tailor acceleration and deceleration curves
C. Provisions for emergency stop
D. Automatic reversing

After much consideration, I decided to use a Hitachi X200 VFD rated at 2 hp.  The 2 hp rating is required because the output current limit on a 1 hp X200 is 4 amp, but the motor specifications indicate a peak current draw of 4.6 amp.  The 2 hp unit limits at 7.1 amp.


Some Commentary on Choosing a Variable Frequency Drive
I'll take a moment to comment on my choice of VFD.  As near as I can tell, the VFD works by converting the input power to DC, then high-speed-switching the DC to 3-phase AC.  The DC bus in the Hitachi X200 operates between 350 and 700 volts.

There are two types of modern VFD control systems: sensorless vector and V/f.  Both offer the same motor-tuning options (acceleration/deceleration curves, frequency tuning, emergency stop, infinite variable speed, etc).

Many people will tell you that the only appropriate control for a machine tool is sensorless vector.  They claim that sensorless vector is a "constant torque" drive, which means maximum motor torque can be achieved all the way down to near-zero RPM.  Sensorless vector drives (an example would be the Hitachi SJ200) are significantly more expensive than their V/f counterparts.

I would tend to disagree with most people, after a careful review of the SJ200 and X200 manuals.  The X200, which uses V/f control, provides full torque to the motor down to roughly 6 Hz running frequency.  Why would anyone ever need to go below 6 Hz at peak torque?  The motor on this lathe doesn't even begin rotating until around 5 Hz.  At 6-Hz the rotational speed of the motor is probably around 3 or 4 RPM - why would anyone need such a low speed?

The X200 has 3 modes that are user-selectable: variable torque, reduced torque, and constant torque.  By default, the unit is set to constant torque.

I believe, therefore, that the important difference between sensorless vector and V/f drives is the minimum rotational frequency at which maximum motor torque can be achieved.  Here's what Hitachi has to say about it:

V/f control:
In the past, AC variable speed drives used an open loop (scalar) technique to control speed.  The constant-volts-per-hertz (V/f) operation maintains a constant ratio between the applied voltage and the applied frequency.  With these conditions, AC induction motors inherently delivered constant torque across the operating speed range.
Sensorless Vector:
Today, with the advent of sophisticated microprocessors and digital signal processors (DSPs), it is possible to control the speed and torque of AC induction motors with unprecedented accuracy...The technique is referred to as intelligent sensorless vector control (iSLV).  It allows the drive to continuously monitor its output voltage and current, and their relationship to each other.  From this it mathematically calculates two vector currents.  One vector is related to motor flux current, and the other to motor torque current.  The ability to separate control these two vectors is what allows the [iSLV drive] to deliver extraordinary low-speed performance and speed control accuracy.

So it seems to me that sensorless vector control only makes sense if you want to run your motor at very low speeds.  In general, that's not a very good idea for a squirrel cage motor, whose cooling capacity is a function of RPM but whose thermal condition is a function of current draw.  The X200 will maintain full motor torque down to 6 Hz.  The SJ200 will maintain full motor torque down to 0.5 Hz, which is quite remarkable, but irrelevant to lathe (and mill?) applications.

Optional reading:
Check out this nice little presentation Fluke put together on VFDs sending voltage spikes out.  Interesting reading, although irrelevant if your VFD-to-motor wires are less than about 15 ft long.

Executive Summary
Let's examine what I'm trying to do here from a "top-level" perspective.  The first cartoon here shows what was present on the lathe when I bought it, and is typical of any industrial machine operating on 3-phase house power with momentary pushbutton switches for control.  3-phase house power enters the safety switch on the lower left, where it's routed to the motor starter.  The control panel on the right is also wired to the motor starter, and provides the signals that tell the motor starter which direction to rotate the motor.  The motor is wired to the output terminals on the motor starter.  In this particular lathe, everything was operating at 208 VAC 3-phase except for the control panel, which operated at 110v single-phase.

The second photo here is where I'm going with the wiring.  I have replaced the motor starter with a VFD and the house power is now single phase.  Input power is two hot wires (240v across) and one ground wire (the bright green one).  The control panel is intact, but is now communicating the desired actions to the VFD.



Overview of VFD Wiring Options
I will now attempt to describe in detail the new wiring scheme by building up gradually in three steps.

There are at least a million different ways of wiring a VFD, and everyone has their own method that makes logical sense to them.  Given the frequency of VFD and general "how do I wire this" questions I see in various machine tool forums, I will take some time here to explain (as best I can) my personal opinions on wiring a VFD.  I am not an electrical engineer, and my methods would probably make an electrical engineer choke, but they have served me quite well.

I will present the following in three sections, arranged in order of increasing complexity:
1. The most basic VFD wiring scheme (which should NEVER be used).
2. A VFD with a safety switch and fused input power (minimum required configuration for safe operation).
3. A VFD with safety switch, fused input power, and external controls (the most sophisticated arrangement).


1. The Most Basic VFD Wiring Scheme (never do this)
I'm presenting this wiring scheme merely to show the most simplistic use of a VFD.  This method alone should never be used for a serviceable machine!  It is presented here only to lead the reader through the process of wiring a VFD beginning from the most basic to the more complex.  At the very least, a VFD must be wired with a safety switch (see the next section).

At it's most basic level, a VFD is really just a black box that transforms single-phase house power into 3-phase motor power.  In that sense, only 6 wires are absolutely required:
VFD Input VFD Output
Wire 1 - hot house power
Wire 2 - hot house power
Wire 3 - house ground
Wire 4 - 3-phase leg 1
Wire 5 - 3-phase leg 2
Wire 6 - 3-phase leg 3

With this configuration, plugging in the VFD to house power will start it working instantly, and will allow the full function of the VFD in operating your motor.  As far as wiring goes, that's all you need.  Please remember, however, that your VFD will almost certainly require some programming for the characteristics of your motor.  That programming is addressed in the VFD user manual, and for this reason I recommend anyone who hasn't ever used a VFD choose one with a good user manual as top priority.  I've found the Hitachi manuals are extremely well written and clear.

2. A VFD With Safety Switch (minimum safe system)
From the previous section add one layer of sophistication: a fused safety switch.  Don't make this more complicated than it is - I'm simply talking about putting a switch and a fuse (or circuit breaker) between your house power and your VFD.  There are a number of good things about this:

1. NEC (National Electrical Code) requires all motors to have a manual power disconnect.
2. You'll be able to have the machine plugged in, but off.  In other words, the machine won't be "live" just because it's plugged in.

Now don't get hung up on the safety switch idea - we're just talking about a simple switch, as shown in the first photo here.  This particular one came with the lathe, and you can see there's a terminal for each of the 3 phases.  Although this was meant to be connected to 3-phase power (hence the 3 terminals), you can connect it to any power source!  In my case, since I'm wiring in single-phase house power, I simply used one of the terminals for the hot line, one for the neutral, and the last for the other hot line.  It makes no difference what order these wires go.  I chose to place the neutral in the middle because it "made sense".  this makes a positive disconnect of each individual line (which actually exceeds the requirements in the NEC, I think).

The first photo here shows the inside of the safety switch during assembly.  It's missing the fuses I installed, and a few other parts, but it shows the wiring nicely.  The output terminals at the bottom aren't visible here, but the house power input is visible.  You want to wire the house power to the terminals shown because they are live when the machine is plugged in, and you want to minimize the danger of electrocuting yourself if you open up the box while live.  (The other terminals are connected to the knives, which would be very easy to touch and die).

The second photo shows the switch completely assembled and wired.  In many respects, this switch (which is typical of industrial safety switches) is no different than the big knife switches from the original Frankenstein movie (also Young Frankenstein), the main difference being that the knives are enclosed and a mechanism for activating them is included.  (Notice this is at least 10 million times safer than what Dr. Frankenstein was using).

The third photo here is a schematic version of the second photo.  Yellow wires are headed for the VFD.  Red and white wires are house input.  The green wire is ground.

Notice I added two fuses - one for each hot line.  I didn't bother with one for the neutral.  I did this only because the VFD I bought specified 20A fuses on the input line, and the circuit I'm using at the house is 30A.

Also note the neutral line isn't required if you only need 240v power!  I included it because it was convenient to do so, and it will offer a simple way to get 120v power if I ever need it.  Never use the 120v power you get between any hot line and the ground!  Never!  That's a great way to kill yourself (or others) and burn your house down!  So if you think you'll need 120v power on the tool some day, go ahead and provide yourself a neutral line.

Pretty much all industrial safety switches since the dawn of time have looked like this one (on the 8th day, God created electricity and the safety switch).  But there are other ways of accomplishing the same thing.  For example, some machines may have a simple two-button switch that looks very much like an ordinary machine tool switch.  They all serve the same purpose - a means to disconnect the machine from house power even while it's still plugged in.

There is another way of doing this.  It turns out the NEC allows a circuit breaker to be used as the disconnect for a motor.  So if you really wanted to, you could use the circuit breaker in whatever load panel you've tapped for your 240v (or 120v) power as your motor disconnect.  In fact, that's what I did on the bandsaw project, because I didn't see the need for a machine-mounted disconnect in that particular application.  Having a safety switch, however, is generally preferred.

To get power to the safety switch, you want to use a quality service cord if you're going to put a plug on it.  (If you're wiring directly into house power without a plug, then you could use something else such as individual wires in electrical conduit).  Whatever you do, use at least the minimum gauge for the current you're handling!  Even better, use the next larger gauge.  Here's a page that discusses wire ampacity.

I'm a bit of a stickler when it comes to wiring terminals, so I'm using a 46-amp rated Amphenol MIL-SPEC circular connector to connect house power.  That's why in the second photo here you don't see any wires going into the box from house power - I didn't have the cable connected when I took the photo.










3. VFD with Fused Safety Switch and External Controls (maximum complexity)
Here's where things get a little tricky, and particularly hard to explain.  Most (all?) VFDs have a front control panel, whereby every function of the VFD - including complete motor control (on/off/stop/speed/etc) - is available.  You can use these controls to operate your machine, and don't even bother reading this section if you want.  But there are a couple disadvantages to this:

1. It requires the VFD to be mounted close, so you can access the controls.  This reduces your flexibility in choosing where to mount it.
2. There's a bit of a safety concern here, since the buttons are typically pretty small on a VFD and if you need to STOP in an emergency it might be difficult to nail the button on the first try.
3. Most VFD control panel buttons are very light duty, and not really meant for regular use, especially with grimy hands.

To overcome these issues, most (all?) VFDs have an option for external control.  This allows you to wire your own switches (of pretty much any type) into the VFD to control it.  Every VFD is different with respect to the way this is done, and the VFD user manual is the only way to get the instructions specific to your VFD.  But they're all going to be pretty similar to what I'm about to describe.

Before we dive into the VFD itself, we need to address something that can be intimidating - the motor starter.  If your machine has a "drum" switch or other push-and-stay-engaged or toggle-type switch, you probably don't have a motor starter.  A motor starter allows the use of momentary pushbutton switches to control the motor.  There are some very good reasons for this arrangement, which I'll get into momentarily.

The first photo here is of the motor starter that was on my lathe.  This looks complex and intimidating, but it's actually not too bad, once you understand the logic.  This is really just 2 relays (one for motor forward, one for motor reverse) and a couple big terminal blocks to hold all the wiring.  This allows momentary pushbuttons to start and stop the motor.

See, the "problem" with a momentary pushbutton is it's, well, momentary.  It's only making a connection as long as you have the button pressed.  Since it's impractical to operate a piece of equipment while holding your finger on a button, you have to have some way of "latching" the motor on with just a momentary connection.  That's what this type of motor starter does - it "latches" the motor in the "on" state until you press the STOP button on your operator control panel.

So how do we make a latching relay?  The second photo here is a schematic of a simple latching relay of my own design.  The trick is to wire the positive power input line in a "feedback" loop through the relay terminals, so that once the power is engaged - even for a split second - the relay will engage and remain so.  I will now attempt to explain this in detail, referring to the letter-labeled wires in the diagram.  To do this, you need your "Run" switch(es) to be momentary normally-open type and your "Stop" switch to be momentary normally-closed type.  In the diagram, SPST means "Single Pole, Single Throw" and DPST means "Double Pole, Single Throw".    Notice I'm only using the normally-open pole on the DPST run switch.  You could achieve the identical circuit using a SPST run switch, as long as it's normally open, which would look identical to the pictured STOP switch except that the switch terminals would be in the open-circuit state at normal rest.  So why did I use a DPST switch instead of SPST?  Because that's what came on the machine, and there's no reason to go buy new switches if I don't have to.

In the off state, which is shown in the diagram, relay input power is traveling into the STOP switch via wire "A".  It moves through the STOP switch itself, into the normally-open side of the RUN switch via wire "F".  Power is also routed to one of the switched terminals in the relay via wire "B".

When the RUN button is pressed, power travels through "A", "B", and "F" as before, but now it also travels through the RUN switch via "C", which is wired to both sides of the relay - both the electromagnet terminal and the switched terminals.  The negative wire (green) is completing the circuit for the electromagnet, so it turns on (connects) the switched terminals in the relay.  This effectively connects input power, "A", to the output power, "D", as well as to the switched terminals!  

Now, when the user releases the RUN button, power is traveling through the stop switch via "A", to the switched-side of the relay via "B".  From there, it travels to the electromagnet side of the relay and to the device you want to recieve power via "D".   In effect, the relay is now "stuck" (latched) in the ON position.  The electromagnet inside the relay which activates the switched terminals is being supplied with power right through the stop switch.

Finally, when the user presses the STOP switch, power to the relay is cut off, since the input power only has access to the relay via wire "A" and "B".  This cuts power to wire "D", and turns off your switched circuit.

This is exactly what the motor starter in the first photo is doing!  It's a little bit more complex because in reality we have 2 relays - one that is wired to spin the motor forward, and one that is wired to spin the motor in reverse.

Why do it this way?  Well, the main motivation is safety.

1. If the power goes out while the motor is running, the system will not restart when power is restored, which makes the whole thing quite fail-safe.
2. Only a very tiny current is traveling through the control switch.  This minimizes the chances that an operator can be electrocuted, and allows small-gauge wires and light-duty switches to be used if desired.

So how does this relate back to the VFD?  Well, the external control bus on most (all?) VFDs is a low-voltage DC signal that is meant to be wired in such a way as to send signals to various terminals on the VFD that tell it what to do.  The third diagram here shows the full schematic of the motor starter that I built to operate the VFD using the original pushbutton controls that came with my lathe.  Remember, if you've got a drum switch or toggle switches you don't need this relay setup, since your switch is "latching" all by itself!

The Hitachi 24VDC controller bus has a number of terminals, but the most important are:

P24 - this is +24VDC constant
L - this is -24VDC constant
1 - a +24v signal at this terminal tells the VFD to engage the motor on forward rotation
2 - a +24v signal at this terminal tells the VFD to engage the motor on reverse rotation

No signal on either 1 or 2 tells the VFD to stop the motor.  A +24v signal to BOTH 1 and 2 will stop the motor (a failsafe in case the operator presses forward and reverse at the same time).

Other VFDs will vary in their terminal labels, and even their bus voltage, but they're all going to work the same basic way.  All of this is explained, of course, in the VFD instruction manual in greater detail, but they generally don't show you how to wire your relays as I have here.

Given the terminals I described, you can imagine how this would work with toggle switches or a drum switch - you merely route the P24 signal though your switch and back to terminal 1 or 2 (whichever is appropriate) - no need to use the ground signal at "L".

The last photo here shows the actual implementation of the relay system (motor starter) as I designed it.  Those are two 24VDC relays I picked up at the local electronic surplus shop (very cheap).  One for forward, one for reverse.  They're so small they fit inside the little junction box that came on my lathe.  I no longer have any need for the huge motor starter shown in the first photo here, because I've exactly reproduced it's functionality.

(You might ask, why is there Velcro on the back of those relays?  Originally I was going to Velcro the relays into the junction box.)





And that's it!  Simple, right?  Don't get caught up making this more complex than it is.  All we're doing here is switching power around to make things do what we want.  Spend some time with the schematics I've shown and convince yourself how they work.  Once it "clicks" in your mind you'll realize it's really very simple.  The bottom of this page provides a complete wiring diagram.

How to buy a relay
The topic "how to buy a relay" could concievably consume quite a few words.  Anyone who takes a few minutes to look for relays quickly discovers there are at least a million different relays.  To help you narrow down the choices, let's look briefly at the criteria necessary for a relay specification.  These are, in order of importance:

1. Coil voltage.  The relay coil voltage rating must equal your control signal voltage.  In my case, the X200 external control bus is 24VDC, so I need a 24VDC coil.  When dealing with automobiles you'd need a relay with a 12VDC coil.

2. Contact rating.  This is the current rating of the relay contacts.  Be sure to get one that can handle the current you're going to be switching.  In the case of the X200 external control bus, the current is very low (<<1 amp DC), which almost any relay can handle.  But the current of the load you're trying to switch also sizes the relay.  Since I only need to switch a few milliamps, I certainly don't need a giant relay capable of handling 200 amp.

3. Terminal type or contact form.  There are quite a few options in terminals.  The most common are PCB (Printed Circuit Board) mount and quick connect.  PCB mounts are small pins and are meant to be soldered directly to a circuit board.  Quick connect terminals are often called "spade" terminals, and are the most convenient in most cases.

An example of a general purpose relay that would work with the X200 may be found here.  Notice the coil voltage is 24VDC, contact rating is 20A, and contact form is "type 1A" (quick connect).

Obviously if you look at the photo of the relays I used they don't look anything like the link above.  Remember, there are millions of different relays out there that will work with each application.  I bought what the surplus shop had in stock the day I was there based on the size and the ratings.

A note about wire sizes
In any wiring job it's always necessary to consult a good wire ampacity chart, like this one.  If you search on "wire ampacity" you'll find many examples.  Your wiring should be large enough to handle at least as much current as the fuse or circuit breaker that is protecting the circuit it's in.

The main power input to the lathe uses 10ga. wire rated to 30 amp, which is the same rating as the circuit breaker protecting the load center where I plug it in.  That doesn't mean the wire will burn up at 30 amp, it only means the wire is certified to carry 30 amp continuous in open air.

The wiring within the safety switch is 10 ga. solid copper house wire that I had laying around, good to 30 amp.

The wires between the safety switch and the VFD are 10 ga. stranded copper machine tool wire, with insulation designed to be resistant to grease, oil, solvents, and most acids.

The control panel wires are 18 ga. automotive type wires with SXL cross-linked polyethylene insuation resistant to oil, grease, fuel, solvents, and most acids.  These wires can be small gauge since the control signals are very small current.


Now, on to a few more details specific to my lathe...
Here's what the VFD looks like straight out of the package.  Pretty simple, really.  I went with Hitachi for a couple reasons, principle among them the excellent quality of the instruction manual.  It's written in pretty clear English, which is much better than what you get with certain other brands, such as Teco, whose manuals are written in "pigeon" English, at best.  This is my first VFD setup, so I wanted something with good instructions.

Hitachi is Japanese made, so I'm confident it's top-quality electronics.  The range of features and fine tuning available with this is nothing short of remarkable.  Most of the setttings were not required for this simple lathe.

Shown here is the safety switch as I got it on my lathe.  The two yellow wires were running to a 208/460 volt 3-phase transformer mounted atop the switch box to provide 110v single-phase power to the motor starter.  The relays on the motor starter are 110v, hence the need for 110v single-phase power.

I've also provided a picture of the notice posted inside the switch cover.  Square D has been around a long time, and their stuff seems generally well-made.  This switch is certainly much better built than the General Switch Co. safety switch that came on the band saw.






Here's a shot of the safety switch cleaned up and reassembled.  Notice the new Amphenol 97-3102A-22-22p circular connector that will receive power from a service cord (the same service cord I use for the band saw) down in the lower right corner of the box.  The connector is rated to 46 amp.  I ran both hot wires and the neutral (pole ground) even though I only need the 2 hot wires.  The neutral will provide a convenient source of 120v power if I ever need it in the future.

Notice I've added two fuses to the box, thereby making the "non-fusable" switch fusable.  I didn't plan on doing this, but the variable frequency drive specifies 20 amp protection and the main breaker at the load center for the shop is 30 amp.  Better safe than sorry, I guess.

I stripped all the paint from the switch and even cleaned up the Square D label attached to the front of the door.

I'm using 10 ga. solid copper wire for the main input power, with 10 ga. stranded machine tool wire for all the output lines except ground, which uses 14 ga. machine tool wire.  All screw terminals use tinned copper ring connectors, which are crimped and soldered in place.  As far as I'm concerned, the only "correct" way to make an electrical connection is with solder.





Anyway, the hardest part about using the X200 was figuring out how and where to mount it.  The housing is very "porous" for heat rejection, and has a huge aluminum heat sink attached to the back.  Any enclosure has to be large enough to provide adequate heat transfer away from the box.

After much consideration, I decided to mount the X200 to the gear train cover on the left end of the lathe, as pictured here.  I am not enclosing it.  When not in use, I have a small nylon cover that Cindy made for me that keeps welding/grinding debris out of the holes.

The lower photo shows the power wiring for the VFD.  Since it's not in an enclosure, I've guaranteed maximum cooling effectiveness.  Note the X200 has a small fan that draws air through the heat sink as a function of internal temperature.

Initially, I had planned to simply control the lathe directly from the X200 front control panel.  After doing so for the programming and setup, it became clear the front panel buttons are not ideal for regular use controlling a lathe.  They're very small membrane switches that are likely to wear out from grimy fingers pushing them all the time.

So I decided instead to re-install the lathe's original Westinghouse forward/reverse/stop switch.  The X200 (and most VFDs) comes with all the provisions necessary for external control.  With external controls, I will only need the front panel of the X200 to change speed (if necessary) and check status.  (The X200 can display some interesting statistics including frequency, motor current draw, and operating hours).

Here's the complete wiring diagram for the lathe as I've designed it.