Succes! the first workpiece has been machined!
Month: July 2017
I’ve added a feature to trace the controller process variables, like gap voltage, feed rate, error etc. This is a very powerfull debugging feature that will ease tuning the control loop greatly. I also installed Matlab on the NUC PC for direct data processing of the measurement results. Here is an example of the Vgap voltage, measured during cutting with an uncontrolled constant feedrate.
The histogram of the Vgap nicely shows two averages. One for no arc wire voltage and one for when actual current is flowing through the arc. The results clearly show that closed loop control is required to improve the results, since the two averages are too close to each other. The no arc voltage is 17V, since I was running at 170V DC with a 10% duty cycle. The goal is also to reduce the standard deviation in the Vgap when the arc is on.
When running longer times during testing, I ran into an issue where the wire would snag on itself, blocking wire transport. It turned out to be a nasty issue that requires quite some changes in the wire rollers and overall mechanism. What I failed to see when designing is that if you run a wire over a wheel and loop it around several times, the wire will always run off the wheel if the wheel turns in one direction continuously. This is because if you loop it around several times, the wire is at an angle, which causes a “thread pitch”. While turning, the wires will move axially at a rate of the thread pitch * rpm.
In order to prevent the wire from running off the wheel I thought some flanges would do the trick. That seemed to work initially, but what eventually happens is that the wire still wants to run off the wheel and forces itself against the flange and eventually over itself, forcing a snag.
I came up with a solution that I’m now implementing. It requires additional rollers and parallel groves in the rollers. Here’s a before picture and and a picture of the mechanism under construction.
In order to control the gap width, you need to measure the gap width. This cannot be done directly, however an indirect measurement is possible.
The voltage across the arc is independent of the duty cycle of the EDM process and is strongly correlated to the gap width. So this voltage can be used to control the gap width.
What I have seen in DIY machines so far is that the averaged voltage across the gap is measured and used to control the gap width. This is very different since this depends on the duty cycle and is therefore not a good representation of the actual arc voltage. So if you measure the voltage across the gap, you need to correct for the duty cycle in order to get a good estimate of the arc voltage.
My initial idea for this correction was to measure the gap voltage with a high bandwidth and then sample and average the gap voltage only during the on period of the discharge cycle (I planned to do this inside the generator control cabinet). That sampled average is then independent of the set process duty cycle. That voltage is then communicated over an optic fiber to the motion control platform, which uses that voltage to control the stepper motor speed and indirectly the gap width.
Yesterday I noticed however for the first time that the bandwidth of the LEM voltage transducer is much lower than the bandwidth of the current transducer that I am already using for my generator. I did not expect this and assumed that the voltage transducers had a similar bandwidth. So now my idea of measuring the gap voltage with a high bandwidth and then sampling to get the arc voltage independent of the duty cycle won’t work. I want to keep using the LEM, since galvanic isolation is a must. I also looked at some other solutions but did not find any that without a lot of design effort could measure with a high bandwidth. So I rethought my strategy and came up with the following:
I perform a low bandwidth measurement on the gap voltage, with the LEM voltage transducer. This gap voltage measurement then needs to be corrected for the duty cycle, however my motion control platform does not know what the duty cycle is. So I change the optical fiber interface such that it does not communicate the arc voltage (my initial idea), but instead it communicates the actual duty cycle of the process. I then hook up the LEM output to my motion control cabinet instead of my generator control cabinet. The dynomotion motion control card then receives two analog voltages (after signal conditioning) one that represents the duty cycle of the process and one the represents the averaged gap voltage.
The correction on the averaged gap voltage to obtain an arc voltage estimate is then made by some additional software processing (the dynomotion card allows you to add your own C-code). The arc voltage estimate is then used to control the stepper feed rate.
This new approach requires some changes which I will be working on the coming days.
There is one other parameter that affects the measured voltage, this is the ignition delay. The ignition delay should be relatively constant if the gap width is constant so it might work well without compensating for this parameter, since the loop gain will be tuned manually, which can compensate for the ignition delay. So I’ll try first without compensating for the ignition delay. Later on, if required, I can add compensation for the ignition delay as well.
Last night I implemented the feedrate overwrite via the fiber optic interface. I need this to close the control loop for the gap voltage. The duty cycle of the light signal now directly sets the feedrate continuously from -100% (reverse) to 100%.
For control, the setpoint for the gap voltage and control gain/transfer function will be added to the Dynomotion SW, not via the UI of the arc controller.
Next task is to add electronics to the arc controller that will measure the arc voltage independently from the set duty cycle and convert the analog measurement to a duty cycle modulated fiber optic signal. That is the final piece of the puzzle to really start EDM-ming with my machine!
When running longer periods, the motion control cabinet got quite hot inside. It figures, the stepper motor power supplies, NUC PC and linear 5V 3A supply all combined in a cabinet the size of two shoeboxes without ventilation is asking for problems.
I changed the cabinet so it now includes forced air cooling. The air inlet and outlet are shielded by EMC grids.
Yesterday I finished the fiber optic interface for the Dynomotion motion controller. This interface will be used to communicate the V-gap value to the motion controller so that the motion controller can calculate the required feedrates for the stepper motors.
This interface consists of a fiber optic reciever and some electronics to change the signal from a duty cycle modulated signal into an analog signal with a range of -10v…+10V. This is the input range of the ADC of the motion contol card. By doing so, the signal uses the full range of the ADC, getting the highest resolution.
- 5V DC
- Optic fiber with 100KHz duty cycle modulated signal
- Analog signal, -10V…+10V range
I’ve started the work on realising the electronics that measure the gap voltage and communicate it to the motion control platform over an optic fiber. The first thing I want to do is to change the UI panel of the arc control unit so that it also displays the gap voltage. This will help in tuning the control loop.
I considered using an analog panel meter at first to display the gap voltage. However an analog meter is quite slow and does not show the dynamic stogastic behavior of the gap voltage. A normal digital display with numbers will also not work since the signal fluctuates to fast and if you LPF the signal, you get a distorted view of what is actually going on. Then I came up with this solution (found a LED matrix in a scrapped parts bin).
The movie shows how the display graphs a slow analog sinus signal. Only 1 led is on at a time. columns represent the major 20V increment tick marks on a scale while rows represent the minor tick marks (so first column middle indicates the analog voltage is 10V +/- 20V/14).
A noisy signal will show as multiple leds that are lit (while actually only 1 led is on at a time, the eye is not fast enough) with one led that is the brightest if the noise is normally distributed. The number of leds that are lit indicates the width of the normal distribution (you can’t do that with an analog panel meter), and the position in the matrix of the group of lit leds indicates the average/offset.
This video shows the response to a noise signal of which I manually vary the offset and noise amplitude:
I’ve made some changes to the cabling and the keyboard and mouse now continue to work when the arc is arcing. This is tested with low-medium power levels, since I do not have a V-gap control loop in place (yet) which prevents me to test at higher power levels.
The actions taken where:
- Connected the input of the USB isolator to ground, so that mouse and keyboard are not floating (had forgotten this, it improved the EMC problem, but did not resolve it completely)
- Added clamshell ferrite beads to all begins and ends of all USB cables
- Shielded the USB hub with copper tape and soldered the tape to the cage of the USB connectors.
For EMC testing I needed to start cutting. However, I have not yet implemented the V-gap closed loop control part of the system. So in order to make a test cut for EMC testing, I just set the feedrate to ultra slow. This was sufficient for testing.
The closed loop control of the gap voltage will increase the performance enormously, so I’m eager to get started on that! But first I need to fix the EMC issues of my keyboard and mouse.
I have resolved the EMC issue with the motion controller!
To fix the EMC issue with the motion controller I first exchanged the cables to the stepper motors with fully shielded cables and then retested several times. The issue persisted.
Then I decided to make quite a big change to the motion control setup. I have moved the NUC PC into the motion control cabinet (the NUC used to be on the back of the monitor). That change took a full day. The cabinet is quite small and most components had to be relocated in order to fit the NUC as well.
I also had to hack an additional power switch to the NUC so that I can turn it on without opening the cabinet. I directly soldered an USB cable to the Dynomotion controller to make sure I have the shortest possible USB cable length, which is now 10 cm.
For some unknown reason the 48V supply for the steppers died upon testing. I suspect its a quality issue of the ultra cheap ebay supply. I swapped it out by two 24V 150W supplies I found in my own stockpile of junk.
With those changes in place I retested again and the motion controller is now EMC bug free. Now however, my keyboard and mouse stop working when the arc is on. This should be easier to fix and is the next task.
During testing I found a new EMC issue. This time its the motion controller. When increasing the arc power, the dynomotion card suddenly becomes unreachable and the CAM software chrashes. I was afraid this would happen, since I’ve seen it in other CNC milling machines that use the Dynomotion card, so I took many precautions. However, the issue still popped up. My card is mounted in a shielded enclosure and has galvanic isolation on all used interfaces (including the USB interface). Even now the issue still persists. This is a mayor problem now which will consume quite some debugging time.
I know its EMC since the card works perfectly when the arc is turned off. The current counter measures are:
- 4 stage common mode filter on mains power
- Shielded enclosure
- USB optical isolator
- Interfaces to stepper drivers are all optically isolated
- USB ferrite bead located next to the controller
- Low noise linear power supply
Suggestions anyone for additional measures?……..
The picture below shows the current state of the motion control cabinet (click the image for large picture).
The wire motor controller initially did not work well when the arc was initiated due to EMC issues. The display would show random characters and the force control jittered a lot. I’ve implemented quite some EMC counter measures and it now seems to work fine at low power levels. I’ve not been able to test up to full power yet, since I need closed loop gap voltage control for that, which is not yet finished. However, considering the number of counter measures taken, I’m confident that the controller will continue to operate correctly for high power levels as well. Here’s a list of counter measures:
- Changed the single stage common mode mains filter to a dual stage filter with higher attenuation
- Added a common mode filter in the enclose on the analog force feedback signal
- Added a ferrite bead around the data lines of the display
- Changed all cables to fully shielded cables from end to end
- Separated the PWM motor power wires into a separate shielded cable
- Used copper tape to shield all “naked” wires that run from the motor and sensor into the shielded cable
- Hooked up the motor mounting frame to earth
- Made sure all earth connections to the different frame parts of the enclose have a low impedance by sanding all connection points (to remove aluminum oxide and paint)