Hello Guest it is July 17, 2019, 09:44:04 AM

Author Topic: Help Please with PWM Spindle Motor Speed  (Read 13256 times)

0 Members and 1 Guest are viewing this topic.

Re: Help Please with PWM Spindle Motor Speed
« Reply #30 on: November 19, 2014, 06:59:24 AM »
Sorry about my absence yesterday, however I am back hopefully with a renewed vigour to put this to bed.

Okay, firstly, I bumped the PWM base frequency down to 2Hz as you recommended and the motor seems to respond in the same manner as you mention, it tries to pick up, but it is pulsed about 5 times per second. When I go back to the Config|Ports & Pins|Spindle Setup, Mach3 has changed the  PWM base frequency to 5Hz. I have some video of it which I will post later.

Secondly, after ringing out the Break Out Board I have amended the schematic of the Break out Board to show the correct routing of the Spindle Output Port. The original is incorrect in so much as Pin 1 of the ‘MOTO’ connection is connected directly to Pin 1 of the LPT Port, whilst Pin 2 is connected Hi (TTL Vdd)  via one segment of the SIL resistor.

You query what I mean about what I mean in ‘Negative Going’ This may be an old term, but Positive and negative going relates to the pulse position with respect to 0v. I have attached a drawing which I used to show the kids at College to demonstrate what is meant by Positve or Negative going.


“Did the supplier send any documentation with the unit”? of course not !!! You’re very lucky if you get a receipt. ::)

The Controller did not come with an external Pot, there is a onboard Jumper option which allows you to select between the onboard Multi-Turn Trimmer which if I remember is about 100k, or external PWM. The jumper I have selected is onto the external PWM option.
« Last Edit: November 19, 2014, 07:02:22 AM by Buggalugs »
God created Ale to make us all happy ..... 8)
Re: Help Please with PWM Spindle Motor Speed
« Reply #31 on: November 19, 2014, 07:28:47 AM »
There is a video of what happened when I bumped the PWM base Frequency down to 5Hz at

http://youtu.be/zptYwb7_8uQ
God created Ale to make us all happy ..... 8)
Re: Help Please with PWM Spindle Motor Speed
« Reply #32 on: November 19, 2014, 08:51:26 AM »
OK, I think I know where we are now!

First, I think the speed controller you have is designed to get its pulse stream externally, and possibly also from an internal oscillator as an option.  The latter is probably a 555 timer.  An option to control the speed with an analogue voltage, which is the conventional approach, is not provided.  So it expects to get a pulse stream with a variable mark:space ratio which it uses to switch the motor supply on and off.  The frequency of this has to be pretty high, so you have to set the Mach 3 PWM base frequency rather high as well.  But Mach 3 trades off base frequency against speed resolution, the normally expected base frequency is of the order of 25 Hz.  I'm afraid that this makes the controller unsuitable for direct connection to the BoB which clearly just outputs the PWM from Mac directly.  Whoever designed it didn't understand how Mach3 works.

It would be possible in principle to convert the Mach PWM signal at 25 Hz say to a voltage (it just needs an R and a C); then convert that back to a PWM signal at 2500 Hz; but all a bit of a faff.

What I would recommend is that you use a controller that expects to see a 0 - 10V signal, which can easily be derived from the normal PWM output using a normal base frequency.  A possible unit is this one on eBay: 151151353460  I have one of these which I haven't yet used, but have seen good reports on them in other forums.  

Then you will need a simple adapter circuit that smooths the PWM output to produce the 0-10V.  I have posted a circuit somewhere in this forum recently.

Alternatively you can buy a board from Roy Harding at http://www.diycnc.co.uk/html/spindle_boards.html - this one actually uses step/direction rather than PWM but it's just another Mach config option.  Roy's documentation is good - you can download the manual.  As this has reversing relays and things it is probably a good get.

Now, on to the wiring.  It isn't correct to say that the signal is "negative going" as the BoB can only product 2 output levels, 0 v and ~+5V.  The signal might be inverted, but that's a different thing.  Almost certainly the motor controller expects to see a pulse train at 0 to 5V on pin 1 and ground (common) on pin 2.  As you have shown the wiring pin 1 on the parallel port will be connected to the common on the motor controller.  The resistor is there to pull up the parallel port output to 5V since normal TTL high level is only ~3V.  I think it was right the first time.  But frankly I would prefer to see some buffering between the parallel port pin 1 and the speed controller.

I hope this all helps - not the best news I fear.
Re: Help Please with PWM Spindle Motor Speed
« Reply #33 on: November 19, 2014, 11:27:58 AM »
Hello again John, and thank you so much for your advice. Well as you say, not the best news, but frankly I was half expecting a reply as such. However, the good news is in one respect, it is not something stupid that I have been doing (Which was what I was also expecting!) and in another respect, it looks like what I have bought is a bit of a pup in so much as in its present form it would never do what it is expected to do.

I have briefly looked at both your recommendations and on reflection I will probably go for the the Chinese option after a little research. I would prefer to go the route of the Roy Harding recommendation for one I prefer to spend money at home if I can, and I still don’t trust the little yellow bugga’s. What does put me off though is that it looks like I am going to need a ‘Motor Speed Inverter Unit’ also..


What I think I will do before I do anything else is to drag the scope over to the Mill and have a poke about to see what exactly is going on with that signal, which is probably what I should have done in the first place.

Once again thank you so much for your help and I’m sure I will get back here to let you know what I find and above all what I do to resolve the issue.
God created Ale to make us all happy ..... 8)
Re: Help Please with PWM Spindle Motor Speed
« Reply #34 on: November 19, 2014, 12:30:33 PM »
I don't know why you think you would need an inverter.  I think you are saying that you may get the motor speed controller and one of Roy's boards.  You can be pretty confident that Roy's board will behave properly without any extras.  Where are you based?