Hello Guest it is April 27, 2024, 01:56:41 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - krypton

Pages: « 1 2
11
General Mach Discussion / Re: PWM Spindle Control using Mach3 - How I did it
« on: September 09, 2014, 05:18:52 AM »
We bought a Chinese NC milling machine that was supplied with NCstudio software and driver board.  Being familiar with Mach3, we decided to convert.  With a non-isolated breakout board and a 5V external supply, it was easy to connect up the X, Y, and Z stepping motors (there is isolation in their driver units).

The spindle motor is driven by a Fuling V/F inverter model DZB312B001.5L2DK.  An internet search located a manual for the DZB200 / DZB300 series inverters, showing that there are some differences between the DZB300 and DZB312 models, like a panel mounted speed pot on the latter.

The manual shows about 200 commands, so it is a complex machine.  We set the command so that it could be controlled by the keypad.

We found that the speed was controlled by NCstudio from three digital inputs in eight levels, so we were at least able to run the mill by connecting the appropriate wires together

Trial and error located the command that allowed the speed to be controlled by the panel mounted pot or by an external pot.  (Command F0.03 set to 1 or 2.)  There is a 10 V supply with an analogue ground for the external pot.

The breakout board supplies a 5 V signal driven by the PWM output of Mach3.  This would not directly drive the external pot input - it seemed to upset certain timers in the inverter.  The filtering command F2.13 designed to smooth out interference did not seem to work.

The PWM signal was opto-isolated (to keep the analogue ground separate from the digital ground), amplified to 10 V and filtered.  The command F2.11 to set the upper voltage limit to 5 V did not seem to work, (although it worked on the panel pot okay), so the amplification to 10 V was necessary. 

The PWM signal from Mach3 has a minimum space pulse width, so as the frequency is increased the filtered voltage range is reduced, down to 50% at over 4 kHz.  A compromise was reached by setting the frequency to 100 Hz, and the RC filter time constant to 100 ms.  Because the inverter input has an input resistance of 20 kohms, the R value has to be low.  A sufficient value was 470 ohm, losing 2.5% of the signal.  To not lose any more voltage the filter input was driven hard, by using a CD4069 hex inverter with all six inverters in parallel, losing only 20 mV.

So the circuit was:  an opto-isolator driven such that its output transistor was off when not driven from a computer, so that the speed is zero when first powered on.  That transistor drives the CD4069 parallel inputs with a pull-up resistor.  The chip and resistor are powered by the inverter's +10V.  Then an RC filter into the external pot input.  If a non-isolated input is satisfactory the opto-isolator is replaced by an npn transistor and two resistors.

(So it is a lot like Chris Humphris' one except with no LED, no power supply capacitor, no pot, using an optoisolator on the input, and using a different logic chip.  With his, I would recommend a resistor between the transistor base and earth so the spindle motor does not turn on ever if the input is unplugged - base leakage current.)

As it turns out the full range of the frequency to get 24,000 rpm was available and Mach3 successfully handled the spindle motor.

Then a digital input to the inverter was used to set the motor in run mode from Mach3.  This was derived from the PWM spindle drive with a filter, to put the inverter in Run Forward mode whenever the pulses were there, and Stop mode when they were absent.

The emergency stop button was wired to the computer to action a Mach3 emergency stop when required.

And using an inverter relay output (command F2.21) to be active only when the spindle motor was turning to drive a solid state relay to turn on the spindle motor water cooling, vacuum dust extractor, mister and cooling fans, so that it is quiet unless the mill is actually cutting material.

It is intended to get the mill to produce a printed circuit to replace the non-photogenic prototype board – then we can produce the photos for all to see.

Krypton

12
General Mach Discussion / Re: PWM Spindle Control using Mach3 - How I did it
« on: September 01, 2014, 04:09:56 AM »
I noticed that you have earthed all unused 4011 pins.  You must not do this.  Only earth (or connect to +12V) unused inputs. 

The logic gate inverts.  So if you earth both inputs the output goes high - the top output transistor turns on.  If you earth the output the only limit to the current drawn is the on-resistance of the top transistor.  This will heat the package, as you have three of the gates with outputs shorted.  The currents and power may exceed the maximum specified, and the chip life will be reduced.

So leave all outputs open-circuited.

And check that the chip is specified to handle 12V - some have a maximum of 7V, designed to operate on 5V supplies.

Pages: « 1 2