开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Success and Failure :-/


Steve Blackmore
 

Hi All

I finally managed to get a PWM signal to operate properly via an opto.
The pulse rates match perfectly, albeit inverted. (That isn't the
problem;). Nice square pulses with no spikes or rounding.

The PWM on/off time seems perfect, for full speed its high all the
time, half speed it's half on half off, etc and seems very linear.

What I can't get is a linear voltage to match.

I've tried a simple RC circuit and an LM358AN Op amp.

I'm looking for 0-10V across the speed range, instead of a linear
output it seems to follow a curve?

For example, if I pick a 0-1000rpm range, and set 500rpm to give me
5V, at 250rpm it's 2V and 750rpm it's 8V and the nearer the limits,
the worse it gets.

How are you PWM people getting around this? Are you fudging it and
setting a wider speed range than you really want and just using the
"linear" bit? Can someone suggest values for a resistor and capacitor,
I've tried several without much success.

--
Steve Blackmore


Servo Wizard
 

Steve,

I have hardware that will provide you with 0 to +10VDC and the resolution is extremely accurate. If you were to configure Mach2 at 45kHz with the PWM at 45Hz and the MAX RPM for the Pulley Ratio set at 1000 you would get +.001VDC per 1 revolution. The hardware that I offer has a low offset that will allow the voltage scale to start from 0 along an adjustable high gain that will provide up to and including +20VDC, +10VDC being in that range. The hardware requires a +24VDC isolated power supply along with filtering of the PWM voltage through an RC circuit prior to input. I will up load a photo of the hardware, title will be analog amplifier.

Servo

Steve Blackmore <steve@...> wrote:
Hi All

I finally managed to get a PWM signal to operate properly via an opto.
The pulse rates match perfectly, albeit inverted. (That isn't the
problem;). Nice square pulses with no spikes or rounding.

The PWM on/off time seems perfect, for full speed its high all the
time, half speed it's half on half off, etc and seems very linear.

What I can't get is a linear voltage to match.

I've tried a simple RC circuit and an LM358AN Op amp.

I'm looking for 0-10V across the speed range, instead of a linear
output it seems to follow a curve?

For example, if I pick a 0-1000rpm range, and set 500rpm to give me
5V, at 250rpm it's 2V and 750rpm it's 8V and the nearer the limits,
the worse it gets.

How are you PWM people getting around this? Are you fudging it and
setting a wider speed range than you really want and just using the
"linear" bit? Can someone suggest values for a resistor and capacitor,
I've tried several without much success.

--
Steve Blackmore


Yahoo! Groups SponsorADVERTISEMENT

To unsubscribe from this group, send an email to:
mach1mach2cnc-unsubscribe@...



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software


Steve Blackmore
 

On Sun, 10 Aug 2003 05:21:34 -0700 (PDT), you wrote:


I have hardware that will provide you with 0 to +10VDC and the resolution is extremely accurate. If you were to configure Mach2 at 45kHz with the PWM at 45Hz and the MAX RPM for the Pulley Ratio set at 1000 you would get +.001VDC per 1 revolution. The hardware that I offer has a low offset that will allow the voltage scale to start from 0 along an adjustable high gain that will provide up to and including +20VDC, +10VDC being in that range. The hardware requires a +24VDC isolated power supply along with filtering of the PWM voltage through an RC circuit prior to input. I will up load a photo of the hardware, title will be analog amplifier.
Thanks, but I've already thrown enough money at this problem. There
are people using step/dir or PWM, I'd just like to know how they did
it. 45Khz is out of the question, without buying yet another computer!

I can get very even resultion by fooling Mach2 that my top speed is
higher than I want and forgetting speeds below 100rpm. There must be
a better way though. The problem is that as op amps get close to rail
values they cease to function very well, but you just gave me a nice
clue by mentioning 24V. If I increase my input voltage some more (12V
currently), I can set top and bottom end to work at other than 10 & 0V
and just use the linear bit in the middle ;)

What values are you using for RC circuit?

The only reason I started playing with PWM is the problem RC7.2 has
with step/dir. Perhaps Art's next offering will fix it?

--
Steve Blackmore


Servo Wizard
 

Steve,

You can use either 1k Ohm resistance with 200 MFD capacitance or 10k
Ohm resisitance with 20 MFD capacitance. You are correct when you
state that an OP AMP has a problem with 0VDC. It is for that reason
that I went in search of the hardware that provides a low voltage
offset along with the high voltage gain.

Servo

--- In mach1mach2cnc@..., Steve Blackmore <steve@p...>
wrote:
On Sun, 10 Aug 2003 05:21:34 -0700 (PDT), you wrote:


I have hardware that will provide you with 0 to +10VDC and the
resolution is extremely accurate. If you were to configure Mach2 at
45kHz with the PWM at 45Hz and the MAX RPM for the Pulley Ratio set
at 1000 you would get +.001VDC per 1 revolution. The hardware that I
offer has a low offset that will allow the voltage scale to start
from 0 along an adjustable high gain that will provide up to and
including +20VDC, +10VDC being in that range. The hardware requires a
+24VDC isolated power supply along with filtering of the PWM voltage
through an RC circuit prior to input. I will up load a photo of the
hardware, title will be analog amplifier.

Thanks, but I've already thrown enough money at this problem. There
are people using step/dir or PWM, I'd just like to know how they did
it. 45Khz is out of the question, without buying yet another
computer!

I can get very even resultion by fooling Mach2 that my top speed is
higher than I want and forgetting speeds below 100rpm. There must
be
a better way though. The problem is that as op amps get close to
rail
values they cease to function very well, but you just gave me a nice
clue by mentioning 24V. If I increase my input voltage some more
(12V
currently), I can set top and bottom end to work at other than 10 &
0V
and just use the linear bit in the middle ;)

What values are you using for RC circuit?

The only reason I started playing with PWM is the problem RC7.2 has
with step/dir. Perhaps Art's next offering will fix it?

--
Steve Blackmore


 

Steve,

If you need a linear frequency response from an RC network look up op-
amp integrators.

Bernard

--- In mach1mach2cnc@..., Steve Blackmore <steve@p...>
wrote:
On Sun, 10 Aug 2003 05:21:34 -0700 (PDT), you wrote:


I have hardware that will provide you with 0 to +10VDC and the
resolution is extremely accurate. If you were to configure Mach2 at
45kHz with the PWM at 45Hz and the MAX RPM for the Pulley Ratio set
at 1000 you would get +.001VDC per 1 revolution. The hardware that I
offer has a low offset that will allow the voltage scale to start
from 0 along an adjustable high gain that will provide up to and
including +20VDC, +10VDC being in that range. The hardware requires a
+24VDC isolated power supply along with filtering of the PWM voltage
through an RC circuit prior to input. I will up load a photo of the
hardware, title will be analog amplifier.

Thanks, but I've already thrown enough money at this problem. There
are people using step/dir or PWM, I'd just like to know how they did
it. 45Khz is out of the question, without buying yet another
computer!

I can get very even resultion by fooling Mach2 that my top speed is
higher than I want and forgetting speeds below 100rpm. There must
be
a better way though. The problem is that as op amps get close to
rail
values they cease to function very well, but you just gave me a nice
clue by mentioning 24V. If I increase my input voltage some more
(12V
currently), I can set top and bottom end to work at other than 10 &
0V
and just use the linear bit in the middle ;)

What values are you using for RC circuit?

The only reason I started playing with PWM is the problem RC7.2 has
with step/dir. Perhaps Art's next offering will fix it?

--
Steve Blackmore


Steve Blackmore
 

On Sun, 10 Aug 2003 15:16:03 -0000, you wrote:


If you need a linear frequency response from an RC network look up op-
amp integrators.
Cheers Bernard, after reading what one was I realise I am already
nearly using one <G>. I will try adding a cap across the -ve to output
on the op amp and see what happens. I've a feeling that it may still
be necessary to increase my 12V to 14 and use the range 2-12V but
that's one for tommorrow. I can easily accomodate that with the
low/high trimmers on my interface and those on the speed controller.


--
Steve Blackmore


Steve Blackmore
 

On Sun, 10 Aug 2003 15:16:03 -0000, you wrote:


If you need a linear frequency response from an RC network look up op-
amp integrators.
Hi again Bernard - I altered my circuit, without too much sucess. The
response is still slightly curved. I've posted a file called pwmv.pdf
with a couple of graphs of voltage output versus speed selection. As
you can see altering the pwm rate makes no difference, increasing the
voltage gives a more linear top end, but its still not quite there. It
would appear that from browsing various articles that it is a commom
phenomina and in a lot of commercial systems the top and bottom and of
the scale is discarded.

It would also appear that maybe my assumption of PWM and Art's
implementation is flawed? I incorrectly assumed that RMS values are
proportional to duty on/off cycles, until I read this article



Comments?
--
Steve Blackmore


 

Steve,

When I first started looking at spindle control I had a brief look at
PWM to DC conversion but could't come up with a way of doing it
without a lot of circuitry.

The easy way is to use a PIC but I didn't feel the application
warranted that much effort.

I agree with the conclusions from the referenced article. My
thoughts are that, provided the PWM base frequency is stable, the
useful information is the ON period, this can be used to charge an
integrator and would be linear, this voltage could be then transfered
to a sample & hold circuit, triggered by the falling edge of the
waveform.

I never took it beyond the initial thoughts because it seemed the
FtoV solution seemed so much simpler. It would be interesting to see
how Servo's circuit works.

Bernard

--- In mach1mach2cnc@..., Steve Blackmore <steve@p...>
wrote:
On Sun, 10 Aug 2003 15:16:03 -0000, you wrote:


If you need a linear frequency response from an RC network look up
op-
amp integrators.
Hi again Bernard - I altered my circuit, without too much sucess.
The
response is still slightly curved. I've posted a file called
pwmv.pdf
with a couple of graphs of voltage output versus speed selection. As
you can see altering the pwm rate makes no difference, increasing
the
voltage gives a more linear top end, but its still not quite there.
It
would appear that from browsing various articles that it is a commom
phenomina and in a lot of commercial systems the top and bottom and
of
the scale is discarded.

It would also appear that maybe my assumption of PWM and Art's
implementation is flawed? I incorrectly assumed that RMS values are
proportional to duty on/off cycles, until I read this article



Comments?
--
Steve Blackmore