Hello Guest it is October 16, 2021, 06:31:31 PM

Author Topic: PWM spindle - Circuit advice  (Read 23851 times)

0 Members and 1 Guest are viewing this topic.

Offline Sweep

  •  150 150
    • View Profile
    • pollz.co.uk
PWM spindle - Circuit advice
« on: June 02, 2012, 12:16:18 PM »
I have built a circuit board to change the PWM output from Mach3 into a 0-10v signal required by my DC motor controller. The board is based on a couple of designs that are readily available on the internet and the DC controller is a Control Techniques Lynx 08 that was fitted to my machine in its original condition. The Lynx is around 20 years old but works fine.
The Lynx has its own on-board 10V supply that is used for external speed control via a potentiometer. See extract from handbook below, fig2 Basic connection.
Connecting up a simple 10k Ohm potentiometer gives me a full speed range from close to zero up to 2950rpm which I have measured using a calibrated handheld laser tachometer.
When I connect the PWM circuit board and control via Mach3 "S3000" the maximum speed that get drops down to around 2250rpm. I have my oscilloscope connected to the designated output and can see a good square wave as expected (actually a continuous high line for full speed). Measuring the input voltage at the Lynx, however, I can only see a maximum of around 7.5v which makes sense as this is proportional to the voltage at full speed.
So I guess the problem is something to do with loss of voltage, possibly over the resistors, within the board, but as I don't have a full understanding of how the board works it makes it difficult to come up with a solution. I have tried changing the resistor values at various points, and adding a potentiometer into varios parts of the circuit for experimentation purposes but without success. I felt comfortable doing this without damage to the Lynx as the 10v originated from the Lynx.
So, if anyone with a better understanding of whats going on in this circuit, and how I can get my 10v out for max speed, I would really appreciate your advise.
Thanks ...Sweep
« Last Edit: June 02, 2012, 12:19:17 PM by Sweep »
Re: PWM spindle - Circuit advice
« Reply #1 on: June 03, 2012, 10:58:28 AM »
Hi sweep, as you lie quite right, the voltage drop comes from the electronics.
normally, the 10 volt is provided for potis connection.
Try a externel 12 Volt power supply ( linear type, switching type may cause problems )
Re: PWM spindle - Circuit advice
« Reply #2 on: June 03, 2012, 11:35:06 PM »
Hi Sweep,

Chances are the input impedance of your speed controller is forming a voltage divider with the output of your driver (R5 = 10K) which will exhibit the symptoms you describe.

As well  as an external supply I would suggest an opamp as a non inverting, low impedance buffer. Drop us a line for help if you need it.

Also, you may have to goof around with the RC time constant of R5 and C1 depending on the pulse width from MACH3.

Let us know how you go.


Mike B.
There are 10 kinds of people in the world.
Those that understand binary and those that don't.

Offline Sweep

  •  150 150
    • View Profile
    • pollz.co.uk
Re: PWM spindle - Circuit advice
« Reply #3 on: June 04, 2012, 01:11:26 PM »
Hi Alex & Mike and thanks for your support.
I am pretty much an amateur with electronics so all help would be appreciated.
I am pretty happy today as my homemade home-switch & index pulse circuit board for my 2-wire proximity switches worked perfectly. Result!
Reading through the Lynx manual it mentions, with regard to Speed Reference, "10kOhm potentiometer, 0-10 volts, input impedence 100kOhm filtered" which I guess is something you were taliking about Mike.
There is something in the book (page 16, section vi, attached) which mentions scaling maximum motor speed. I wondered if this would allow me to adjust RV1 to give maximum motor speed (2950rpm) from the 7.5v I get from my existing circuit board or would you suggest that i make a new board to work with 12v supply? I do have a 24vdc (250mA) on my drives motherboard which is designed to power external devices which I could use to reduce to 12vdc. I am already using this to get 9vdc for my home-switch proximimity switches.

Thanks ...Sweep

Offline Sweep

  •  150 150
    • View Profile
    • pollz.co.uk
Re: PWM spindle - Circuit advice
« Reply #4 on: June 09, 2012, 06:44:27 AM »
Considering that my old Lynx08 is really just designed for a mechanical potentiometer control, and everything I seem to do with the original circuit compromises max speed or min speed, I have started to have a look into digital potentiometers. All of the control methods I can find, however, are based on either push button or encoder pulses to raise and lower resistance, i.e. speed in my case.
Does anyone have any ideas how I can build a circuit with a digipot to utilise the PWM signal from Mach, or is there another way that Mach can output a 'push button' type command until the required spindle speed is reached. I do have spindle speed monitoring enabled.

thanks ...Sweep
Re: PWM spindle - Circuit advice
« Reply #5 on: June 10, 2012, 09:09:11 PM »
Hi Sweep,

Sorry it's taken so long for me to get back to you as I have been rebuilding my electronics workshop and the control electronics for a CNC router\milling machine which I bought on Ebay from China. Should have known.
I'm using this for routing\drilling PCB's that I design. Great for prototyping. Get an idea and you've got a product in less than a day.

Anyway, to your problem.

Thanks for the detailed info, pdf's etc. It sure helps.

The pwm circuit you're using is very simple in that R5 and C1 are critical with regards to pulse width from MACH3 and circuit loading by the input of the VSD.
However, if the pwm circuit is connected correctly and the following points are adhered to I would expect approx 9V at the input of the VSD. Albeit with some ripple effect.

You're speed controller (VSD) is quite capable of using a 0-10V control signal. It just depends on how you go about it.

So that we are on the same page could you please check the following -

1) pwm circuit 10-12V connected to terminal 1 (+REF 10V) of the VSD.

2) pwm circuit Analogue out connected to terminal 3 (REF INPUT) of the VSD.

3) pwm circuit Common connected to terminal 4 (0V) of the VSD. DO NOT CONNECT TO TERMINAL 2 (MIN SPEED)
    If you connect to terminal 2 then your pwm circuit common will be raised above 0V (by RV2 MIN SPEED pot) causing the problem you are experiencing.

4) Set VSD MAX SPEED pot to maximum. Set max and min speeds in MACH3.

There are better ways to interface MACH3 to your VSD as without a buffer circuit loading will always be a problem. I'll look into it while awaiting your reply.
I want to do the same thing anyway so we'll both get a result.
Hope this helps. Forums are a wonderful thing. I never stop learning. As I'm new to MACH3 I'm sure I'll be posting a lot of questions myself.
There are 10 kinds of people in the world.
Those that understand binary and those that don't.
Re: PWM spindle - Circuit advice
« Reply #6 on: August 20, 2012, 03:22:07 PM »
I've got the same problem using the schematic (rc-circuit) shown above.
At mach max speed, output voltage was only 6,5V.

If, i disconnected the pwm to 0-10V circuit to the VFD, then I got approx 9V.
In other words, the VFD has a bit low internal resistance and you'll get a voltage drop.

I added an external powersupply to increase the voltage of the circuit.
This is adjustable, and you can trim output voltage to 10V when mach set to max speed.

I added a small transistor to act as a buffer.
This transistor will counter the voltage drop as per low internal resistance, but will introduce
a static voltage drop of 0,6V, not sure if this is the way to go.

I've buildt this circuit and will test as soon as possible.

Re: PWM spindle - Circuit advice
« Reply #7 on: August 21, 2012, 08:15:52 AM »
I'm not sure what the nominal output frequency of the PWM signal from M3 is, but the time constant of C1/R5 should be at least 10 and prefereably 100x the period to give good smoothing.  The values shown have a TC of 10 microfarad x 10k ohm = 0.1 seconds, which should be OK for a PWM prf of 500Hz or more.  Also the effective resistance driving the capacitor is 10k in parallel with the 100k input impedance of the Lynx and the effective output voltage is dropped by 10% as a result, also reducing the max speed by 10%.  Finally the output resistance of the 4011 driver will also reduce the effective output voltage as it is in series with the 10k.  So you could reduce the 10k and increase the capacitor by the same factor.  

If there is adjustment in the lynx for maximum speed (it sounds like there is) then I would just do the following: increase C1 to 22 microF; reduce R5 to 4.7k; trim the max speed adjustment in the Lynx to get 3000 rpm on maximum spindle speed setting through Mach3.  You should not need to worry about separate power supplies or buffers.  

Note that some thyristor/triac DC motor drives (certainly my KB Electronics one and possibly the Lynx one) do NOT have control electronics isolated from mains, which means that you could have severe (or even fatal) problems if you try connecting a DC supply directly which has one side (usually the negative) earthed.  This would normally be the case for your breakout board or controller.
Re: PWM spindle - Circuit advice
« Reply #8 on: August 21, 2012, 08:44:14 AM »
Doh!  A bit of investigation shows that the PWM control pulses have a default base frequency of 5 Hz - for some bizarre reason this is set in the "spindle" tab of "ports and pins".  So the 0.1 second smoothing time constant in your circuit  is actually shorter than the pulse period, rather than 10x bigger!  This will likely account for the problem.

An easy way to fix this is to increase R5 and/or C1 by quite a large factor.  You can also increase the PWM base frequency - this reduces the number of speeds available but even if you increased it to say 20 Hz the number of discrete speeds will be of the order of 1250 at a kernel speed of 25 kHz.

So revised suggestion would be...

Increase PWM base frequency to 20 Hz in above config menu.

Increase R5 to 47 microfarads.

Trim speed adjust to compensate for the 10% loss caused by the potential divider effect of R5 and the Lynx input impedance.
Re: PWM spindle - Circuit advice
« Reply #9 on: August 21, 2012, 10:00:41 AM »
R5......47 uf ?????????