Hello Guest it is March 28, 2024, 04:42:53 PM

Author Topic: BLDC Motor Control  (Read 5490 times)

0 Members and 1 Guest are viewing this topic.

BLDC Motor Control
« on: September 17, 2009, 10:06:34 AM »
I am in the UK and have access to a KX3 Machine supplied from China which is fitted with a 1000W BLDC motor and uses PWM for speed control.  The machine has a 1:1 direct belt drive to the spindle.

 We have had a lot of trouble getting the motor to run over the full  range of speeds.  We were told it ran from 100 to 5000RPM.  Initially with the setup file supplied it would not run or would accelerate up to 6000 RPM.

To cut a long story short we have got it to run by resetting the pin settings and adjusting the PWM Base Frequency higher & higher.  We now have this at 900Hz at 35000 kernel speed this gives about 38 speed settings. The pulley is set for 0 min to 6500 max.

The pulses from MACH 3 are clean (0v to 3.4v) but the pulse train has gaps in it.  (processor?)
The pulses out of the breakout board (Maker not known) are not so good and only 1/2volt high.
The pulses going into the BLDC Motor control look like noisy mains hum! with a 250mv amplitude.

My problem is that the results are not linear and the motor starts at 350RPM.

                      MACH 3     Speed RPM   
                      s600         0
                      s700         350
                      s800         425
                      s1000       650
                      s2000       1600
                      s3000       2750
                      s4000       3750
                      s5000       5000
                      s6000       6000

Does anybody have experience of PWM operation with MACH 3?  Am I being unrealistic in expecting a better result?

Thanks for any help.

Offline Dan13

*
  •  1,208 1,208
    • View Profile
    • DY Engineering
Re: BLDC Motor Control
« Reply #1 on: September 17, 2009, 10:21:35 AM »
I don't have any experience with PWM, but 500mV and 250mV as signals?! If this is the way it's meant to be it's not good. Very prone to noise.

Daniel
Re: BLDC Motor Control
« Reply #2 on: September 17, 2009, 10:32:01 AM »
FWIW - I use PWM for my spindle, andit works perfectly.  Very fine resolution, and perfectly linear response across the entire range.  You really need to address that low signal level - that will never work well.  And, if you're seeing gaps in the PWM, you need to get to the bottom of that.  There is going to be some jitter, but not gaps.

Regards,
Ray L.
Regards,
Ray L.
Re: BLDC Motor Control
« Reply #3 on: September 17, 2009, 12:13:50 PM »
Thanks for your thoughts.  I will try to bypass the internal wiring, which is all bunched together, with a screened feed.

I am not happy with the PWM frequency and the low number of speed change steps but I do not know the requirements of the motor control.

I looked at the outline spec. of a SANGMUTAN control unit on another thread and that stated 500Hz to 5kHz I think so I guess I am about right.

When I look at the PWM signal on 25 way cable, Pin 2 in my case the pulses come in blocks with gaps between.  Is this normal?

Thanks again.
Re: BLDC Motor Control
« Reply #4 on: September 17, 2009, 01:36:32 PM »
Thanks for your thoughts.  I will try to bypass the internal wiring, which is all bunched together, with a screened feed.

I am not happy with the PWM frequency and the low number of speed change steps but I do not know the requirements of the motor control.

I looked at the outline spec. of a SANGMUTAN control unit on another thread and that stated 500Hz to 5kHz I think so I guess I am about right.

When I look at the PWM signal on 25 way cable, Pin 2 in my case the pulses come in blocks with gaps between.  Is this normal?

Thanks again.

No, that absolutely is NOT normal, and you should have very fine resolution on the PWM duty cycle.  I can easily set my VFD frequency anywhere from 0 to 90Hz, with 0.1Hz precision, using the Mach PWM output.

What settings are you using?  Pulse Width, Steps/Unit, etc.  Any pulleys setup in Mach?

Regards,
Ray L.
Regards,
Ray L.
Re: BLDC Motor Control
« Reply #5 on: September 17, 2009, 09:25:15 PM »
A couple of things about PWM signals for speed control.

1. The PWM waveforms are converted to a dc voltage by filtering. The DC voltage should be equal to the ratio of the mark space  ratio multiplied by the supply voltage generating the PWM waveform.

If you have gaps in the PWM waveform, then the dc voltage produced will be less than expected as you are experiencing.

The higher the PWM frequency, the less susceptible tit will be to noise.


The first thing to do is find out why there are gaps in the PWM signal. Solve that and your problem may be fixed.  It sounds like there is a program such as Quicktime interfering with Mach3.

Cheers,

Peter.

----------------------------------------------------
Homann Designs
http://www.homanndesigns.com
email: peter at homanndesigns.com
Re: BLDC Motor Control
« Reply #6 on: November 16, 2009, 09:07:56 AM »
Further Thoughts,

I have got back to testing my Chinese mill with BLDC motor and tried a few more things.

Some of my problems must be put down to bad contacts, cheap test equipment etc but I still have the same basic problem of getting a good correlation between

the input "S" word and the output speed.

I have been trying a Smooth Stepper and this does give much better pulses and speed steps as it uses a 32KHz clock just for this function.

The one thing I have noticed is that If I could add a fixed offset to every input "S" value of about 370RPM I would then get a reasonable speed correlation from

300 to 6000 RPM with a maximum of +7% difference.

Is it possible to modify Mach3 to do this?

I notice in an answer to another question HimyKabibble said

"    Or, do what I did - customize the post for your CAM software.  I wrote a post-processor to manage the spindle on mine.  The CAM program spits out G-code,

with spindle RPM in the S words.  My post-processor parses the G-code, finds the S words, and figures out the best motor speed (I have a 2-speed motor) and

pulleys to use to minimize the number of pulley changes, then adds code to prompt me to change pulleys/motor speeds when necessary, and changes the S

words to the proper values to make the VFD run at the correct speed.  Doing that would allow you to have a linear command value in the S words in your CMA

program, but generate non-linear S words in the actual G-code you run on the machine, so it works the way you want it to.  With a simple relationship like you

seem to have, you could easily do the translation directly in the CAM post processor."

How do I write a post processor to add a fixed increment to the "S" input?

Thanks,

JohnD