Hello Guest it is July 20, 2019, 04:55:26 PM

Author Topic: PWM Spindle Control using Mach3 - How I did it  (Read 65734 times)

0 Members and 1 Guest are viewing this topic.

Re: PWM Spindle Control using Mach3 - How I did it
« Reply #20 on: March 22, 2015, 05:38:12 AM »
Hi to all,

First of all I am a novice, so please pardon me if I ask the wrong question at wrong place. This thread is very well written and is very useful to people like me who are trying to build a cnc lathe with threading option and thanks to Chris for sharing this useful info.

The main thing I want to ask the expert persons is that my PWM signal is not isolated, hence i may end up frying everything, can any one please post a diagram of a circuit on how to isolate the pwm signal from parallel port before passing it to the PWM-to-analog converter, without disturbing its frequencies or voltages.

Errors happen with me all the time so i just want to be safe. What I understand from my knowledge is that a device like opto-coupler (to be used for pwm signal isolation) should be very fast because PWM signals are high in frequencies?

Also if I use I regular Solid State Relay which has a switching time of 10 milliseconds, to isolate the signal, will it work?

Thanks to all in advance and sorry again for stupid mistakes.

Re: PWM Spindle Control using Mach3 - How I did it
« Reply #21 on: March 22, 2015, 07:48:00 AM »
Practically any opto-isolator will do, as the PWM pulses are not fast.  I used a HCPL-0501 because I had it in stock.  I drove the opto-isolator internal LED direct from the break-out board through a 470 ohm resistor (into pin 3).  The output transistor (pin 6) has a 22K load to +10V, into the hex inverter inputs.  Pin 8 to +10V, pin 2 breakout board earth, pin 5 the motor controller earth  See my last posting - Sep 9, 2014.

You cannot use a solid state relay because they are a latch, and normally are only used for switching AC - they depend on current reversal to turn off.

Krypton
Re: PWM Spindle Control using Mach3 - How I did it
« Reply #22 on: March 22, 2015, 02:09:49 PM »
Thanks for pointing me in the right direction but as I said that I'm just a person with less electronic skills and I said wasn't able to understand your post  ???

I have EL817 and 4N35 opto couplers in stock, if you can draw and show a circuit on how to hook either one of these to the Chris's described schematics, I would be really thankful to you guys

Cheers
GAURAV
Re: PWM Spindle Control using Mach3 - How I did it
« Reply #23 on: March 22, 2015, 08:03:03 PM »
Sorry, one picture is worth a thousand words.
Krypton

Re: PWM Spindle Control using Mach3 - How I did it
« Reply #24 on: March 23, 2015, 02:09:01 AM »
Wow  ;D that was super. Very helpful, heartiest thanks to the experts here. Will complete the trials and let you know what's up.
Re: PWM Spindle Control using Mach3 - How I did it
« Reply #25 on: March 23, 2015, 09:24:47 AM »
I could use some help please in hooking up my Spindle motor to my breakout board.
This is ongoing from my conversion of my TCL160 which has a Mitsubishi FR-Z024 0.37k fitted.

The original Documentation from the TCL160 shows these connections were used.

STF (Fwd) to pin 5 on my new board
STR (Rev) to pin 7 on  my new board
5
2
P24 (Looks like pin SD which is common) Output shutoff, how is this handle by Mach3
MRS/RT This is marked as 'Boost' on the original TCL Manual (What is the purpose of the Boost)

I have included some diagrams and would appreciate help on the correct hookup.
« Last Edit: March 23, 2015, 09:42:56 AM by Len-Tikular »
Re: PWM Spindle Control using Mach3 - How I did it
« Reply #26 on: March 24, 2015, 03:53:33 AM »
Hi Krypton,
just a small thing about the optocoupler, in the diagram you have shown pin2 of EL817 is connected to 0 volt, there is no 0volt DC in my circuit or power supply, so can you suggest where and how to connect the pin 2 of the optocoupler?
Many thanks
Gaurav
Re: PWM Spindle Control using Mach3 - How I did it
« Reply #27 on: March 24, 2015, 05:22:48 AM »
To the common ground of the breakout board - the computer ground.  Because there are two grounds that are not connected, they have to have different names.

Krypton
Re: PWM Spindle Control using Mach3 - How I did it
« Reply #28 on: March 24, 2015, 07:48:23 AM »
Len-Tikular wrote:
I could use some help please in hooking up my Spindle motor to my breakout board.
This is ongoing from my conversion of my TCL160 which has a Mitsubishi FR-Z024 0.37k fitted.

The original Documentation from the TCL160 shows these connections were used.

STF (Fwd) to pin 5 on my new board
STR (Rev) to pin 7 on  my new board
5
2
P24 (Looks like pin SD which is common) Output shutoff, how is this handle by Mach3
MRS/RT This is marked as 'Boost' on the original TCL Manual (What is the purpose of the Boost)

============
I am doing some guessing here.  

I have not learned how to control the forward from Mach3, because it would require a motor on/off inserted in the right places in the G-code.  I am sure it is possible.  That is why I added the extra circuit, filtering the PWM signal, so it is in forward mode only when the PWM pulses are present.

The FRZ-024 manual shows that there are two ways to control the speed.  One is with three wires (RL, RM, RH), providing slow, medium and high speed.  The other is a potentiometer (pins 10, 2, 5) that gives a speed proportional to the voltage on the slider.  This would be best, so I suggest my Krypton circuit as above (reply 23) to give both speed and forward signals.  There is an internal +5V supply (pin 10) to power the filter circuit, and the same constraints are needed - a low value filter resistor to provide the full range from the internal +5V with the filter driven hard from a low resistance driver chip.  Use pin 5 as the common ground for this circuit, not the digital ground P24.  See Appendix B in the manual.

I cannot envisage a need for reverse motor direction, so you will not require that input at all.

I think that the second acceleration/deceleration (MRS) would be for emergency stop conditions, a safe fast stop, not a dead stop, which may put more stress on the motor than is justified or safe.  Remember that these controllers are not only used for NC milling, etc. (I worked on locomotives, and if they are stopped too quickly they can derail, or put flats on the wheels - there is an optimum deceleration.)

Krypton
Re: PWM Spindle Control using Mach3 - How I did it
« Reply #29 on: March 24, 2015, 09:34:30 AM »
Thanks for your reply Krypton.

On this Lathe (TCL150) the way the tool turret and tools are designed the Surfacing tools come into contact with the workpiece from above. This is where the reverse rotation of the spindle motor is needed.

I assume also that accurate control of the spindle speed is required where 'Threading operations' are carried out ?

George
« Last Edit: March 24, 2015, 09:36:02 AM by Len-Tikular »