🞴 Engineering Index About Search

An Electrical Discharge Machining Power Supply Design


DIY EDM post #1. Other EDM posts

Note: I plan on adding more pictures and figures to this post once I get around to making them.

Anatomy of an EDM Arc Pulse

Each arc used in the EDM process is created by a carefully controlled high power signal applied across the spark gap between the electrode and the workpiece. Just before the arc forms, a high voltage has to be applied quickly across the spark gap until an arc actually forms. How long it takes between applying the high voltage and an arc forming. Then, over a very short time interval, the spark gap resistance and voltage drop, while the current rises. The arc is kept alive for a specific amount of time, depending on the application; during that time, the voltage and current across the arc should be carefully controlled to get a consisted cutting action. Finally, the arc is turned off, and the process is repeated. Depending on the application and electrode and workpiece materials, positive, negative, or alternating polarity are used to get the best cut quality.

A graph of the voltage across the spark gap plotted against time for 2 EDM pulses.

This figure shows two consecutive arc pulses. Time periods A and C are the regions during which high voltage is applied to the spark gap, but before a breakdown occurs and the arc forms. Note that this time might vary based on many unpredictable factors. Time periods B and D represent the constant current phase once the arc has been created. Note that the voltage may differ even when the arc current is the same. The arc voltage is generally proportional to the distance between the electrode and the workpiece, which is a parameter that should be monitored and controlled.

Design Requirements for an EDM Pulse Power Supply

EDM machines, in the simplest electrical terms, repeatedly cause a spark gap (made of the electrode and workpiece) to arc in a controlled manner. The degree of control over the arc affects the quality of the machined surface, and in particular the uniformity of arc power and energy is important. Thus, we want to have pretty good control of the arc current and voltage. Current can be controlled electronically, but the voltage across the arc is mostly dependent on the gap distance between the electrode and workpiece, and has to be regulated mechanically (this coupling of the electronic and mechanical control is called the EDM servo system). The electrical properties of the spark gap also mean that the current

Another important design requirement is that the power supply can create very many, very short duration arcs. Typical general-use EDM processes use arcs that last between 1 and 250 microseconds, with modern machines being on the very low end of that (e.g. 5 microseconds). Faster pulses still are required for micro-EDM processes. The faster these pulses can be produced, the better, since EDM is already an incredibly slow process. Ideally, the frequency of arcs should be in the tens of kHz in order to get practical machining speeds.

Additionally, the power supply voltage needs to operate at a high enough voltage to start the spark. For general-use EDM, anything above 100V is sufficient, which is high voltage (enough to be dangerous), but not too extreme. On the low end, the same precautions for dealing with mains voltage should be appropriate, but I'm not an expert on HV, so don't rely only on my judgement for your safety.

Finally, this is not a strict requirement for EDM machines, but I want to be able to switch the polarity off the workpiece and electrode electronically rather than manually switching the wiring somehow, which would make the power supply more flexible.

General Design

I decided early on that I was going to use power FETs to regulate the current and to connect the spark gap, and that I would just use rectified and filtered AC mains to power the device (since high voltage, high power DC power supplies are expensive). The trickiest part of the design then is simultaneously keeping a constant current and creating quick pulses. In order to have sufficiently quick rise and fall times for the current across the spark gap, the inductance in series with the spark gap must be low. However, this means that regulating the current by switching would require the FETs to switch many times over the 5 microsecond pulse, which is not feasible with most FETs. A more elegant solution is to have a current through a large inductance, making it easier to control, and divert it through the spark gap when a pulse is desired. I implemented this idea using 5 power N-channel MOSFETs and two diodes in an admittedly unusual topology.

A screenshot of the schematic of the switching components for the main power stage of the arc generator. In addition to the switching components and spark gap used to regulate current, there is an inductor that slows the rate at which the current changes and a current sensor inline with it.

I roughly visualize the topology as a nested H-bridge controlling a current across the inductor. One half bridge has a MOSFET on the high side, but only the body diode where the low side MOSFET would be. The other halfbridge has a diode on the high side (again acting as the high side mosfet diode), while the low side is another H-bridge (this time a standard one with all positions having MOSFETs).

During normal operation, there will be a close-to-constant current flowing though the central inductor, and it always . Adjusting the current and sending arc pulses to the electrode and workpiece involve switching between a specific set of current paths, each of which passes through the inductor. The current paths either increase or coast the current, either pass the current through the spark gap or not, and, if the current passes through the spark gap, which polarity is used. It is possible to oppose the current, but that would increase the bus voltage and has the possibility of damaging other electronics.

First there are three possible current paths that will not cause an arc: one that increases the current, and two that coast.

This current path applies the full bus voltage across just the inductor in the same direction as the current. In practice, only one of the two parallel current paths in the inner H-bridge should be used, but they are equivalent from a schematic perspective.

The first of the coasting current paths, using the upper current loop through the top bypass diode.

The second of the coasting current paths, using the lower current loop through the bottom bypass diode.

To increase the current while creating and arc, there is a current path for each of arc polarity.

Increasing the current during an arc with one polarity. In this case the current will flow from the workpiece to the electrode.

Increasing the current during an arc with the other polarity. In this case the current will flow from the electrode to the workpiece.

To coast the inductor while creating and arc, resulting in a slow decrease in the current, there is also a current path for each of arc polarity.

Coasting the inductor current during an arc with one polarity. In this case the current will flow from the workpiece to the electrode.

Coasting the inductor current during an arc with the other polarity. In this case the current will flow from the electrode to the workpiece.

The controller for the pulse generator takes three inputs: the set point for the current, the arc polarity, and whether the arc should be on or not. Then, on each clock edge, a finite state machine decides which switches should be on or off and what the next state should be based on those inputs. Ideally, the state machine would try to switch the gates as little as possible to decrease switching losses, and the

The arrangement of MOSFETs makes the switching pattern a bit awkward, but it satisfies the design requirements. In addition, there are some nice features, such as the ability to choose the polarity on a pulse-by-pulse basis. EDM machines can cause electrolysis, and alternating the polarity could prevent the electrolysis causing the workpiece to oxidize over time. I'm not well versed enough with the EDM process to know if it will actually be useful or not, though.

Design Details

Now that I have a design for the power stage, we need to design the various power supplies, control electronics and peripherals. These include the high (and low) voltage supply, power MOSFET gate drivers, arc voltage and inductor current sensing, and digital control circuitry.

MOSFET Gate Drivers

Switching N-channel MOSFETs on and off is roughly equivalent to charging and discharging a capacitor across the gate and source pins. That capacitance is referenced to ground for low-side MOSFETs, which makes it relatively easy to control, but high-side MOSFETs are referenced to a varying voltage which makes it difficult to properly charge and discharge that capacitance. I decided to use dedicated half-bridge gate drivers to control pairs of MOSFETs, which handle the switching process correctly. Those gate drivers use a 12VDC power supply and have a digital input for each of the high- and low-side MOSFETs.

Current and Voltage Sensing

Since a consistent arc is important, we need to be able to monitor and regulated the arc current and voltage. The voltage sensing needs to be fairly quick, since it is used to detect when an arc has started, which will occur on a microsecond timescale. I put a voltage divider between either side of the spark gap and ground, and a differential ADC measures the voltage difference between the two dividers. The arc voltage can then be calculated from the voltage measured between the two dividers. The voltage dividers are referenced to ground to avoid a high common-mode voltage, which might destroy the ADC or add additional noise. In order to prevent the potentially large currents from influencing the measurement, a separate pair of sensing wires are connected near the spark gap and run alongside the power wires. Ideally, no current should pass through these wires, so there shouldn't be any voltage drop proportional to the current.

For the current sensing, I decided to use a closed-loop hall effect current transducer, which produces a small proportional current output that is galvanically isolated from the measurement target. I measure the current that is passing through the large inductor, whose terminals could be on either end of a wide voltage range depending on the switching state. Using an isolated transducer eliminates the potential for common mode noise and should make current regulation more reliable. I decided to use the same ADC for both just to reduce the number of unique parts, but the current sensing doesn't need to be very fast, since using a large inductor means the current won't change too fast.

Digital Control Circuitry

For digital control of the power system, I decided to put it on a separate board. I might want to integrate the EDM control logic with other parts of the control, so it would make sense to have that control be external. Thus, I added a connector with a bunch of pins to break out all of the digital signals. Since the pulse power supply manages high voltages, I decided to use optoisolators on each of the digital signals as well, so none of the potentially expensive digital controllers get exploded.

HV and LV Power Supplies

Several different voltage rails are needed. First, we need a high voltage (roughly 150VDC or higher) power rail that will power the actual arcs. I decided that the simplest way to do this was to just use rectified and filtered mains AC. In the US, the 120V RMS mains AC has 150V peaks, so it should become 150VDC when it is rectified and filtered. In theory, if more power is needed, you could also rectify the 240V 3-phase AC, but I probably won't need that much power.

Next, a 12VDC rail is needed to power the gate drivers, so it may need to supply a fair bit of current, depending on the switching frequency. One option would be to build a 150VDC to 12VDC converter, but this would likely start to strain the amount of available board space. Instead, I decided to punt on the 12VDC supply and just added a connector for an external power supply.

Finally, a 3.3VDC rail is needed for the digital circuitry. Small converter modules already exist that can take the 12VDC I will already have and regulate it to 3.3VDC. I found one that has a simple 3 pin interface, which is good for 500mA and just needs a couple decoupling capacitors. That should be plenty to drive the minimal amount of digital circuitry on the board.

PCB Layout

Here is the layout I eventually developed, although it is probably not very easy to interpret. The bottom half is the switching stage along with gate drivers, the top left is the high voltage input and filtering, and the top right is the low voltage digital control and isolation circuitry.

Here is the final layout I devised, which I think ended up pretty compact in terms of the power stage with short high-current loops, and I managed to fit it on a 2-layer PCB. The only compromise I had to make was to include a busbar to make routing space for a gate driver.

I didn't do anything particularly special in terms of layout. I decided to use a 2 layer PCB since there weren't any parts with particularly strict layout requirements (I did end up having to use a single jumper cable). The most important part of the layout is ensuring that the parasitic inductance is minimized in the flyback diode path; because we are switching large inductive loads with high currents, if the parasitic inductance is too high in the flyback diode path, the current won't be able to divert to it before the FETs are exploded. The parasitic inductance issue must also be addressed with the correct placement of decoupling capacitors. In this case, I used low-impedance film capacitors near the high side of the switching bridge.

Also, since the power MOSFETS are likely to generate a lot of heat with fast switching and high currents, I arranged them so that they could be clamped together onto a heatsink or water block. Note that the casing pads of the MOSFETs need to be electrically isolated from the heatsink because they are not grounded.

Another important consideration is the layout of the gate drivers, which ideally need to be positioned relatively close to the gates so that the gate-source loop is relatively small. This is not the most important consideration, but it becomes more and more important the faster you want to switch, for example if you want to do micro-EDM with extremely short pulses.

A more miscellaneous layout detail a second ground plane for the non-power circuitry, since the high currents and high frequency switching on the power circuitry can generate a lot of noice. The ground plane for the ADCs and other digital and analog circuitry is only connected at one point to limit the influence of any noise on the power ground plane.