Hello Guest it is March 28, 2024, 06:48:55 PM

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

0 Members and 1 Guest are viewing this topic.

Re: PWM Spindle Control using Mach3 - How I did it
« Reply #40 on: March 25, 2015, 07:18:16 AM »
right, you have pulses at the input.  Now check the circuit as I have listed.  You don't need the oscilloscope,  just the on/off signal you have been using so far.

There are two signal inversions, one through the optoisolator and the other through the logic chip.

Krypton

Krypton,

I am not an expert so at first I am making the circuit without the opto-isolater(just sticking to the schematics for troubleshooting). Looks like there might be something else which may have gone wrong.  Can this be the problem that I am using capacitors of capacity 10uF 63volt and 100uF 25volt against 10uF 16volt and 100uf 16volt ?? Also I have connected 12volt to pin 14 and GND to pin 7 of 4011 IC, is this to be done or not? These are the gray areas which might be causing trouble as per my brain works.
Re: PWM Spindle Control using Mach3 - How I did it
« Reply #41 on: March 25, 2015, 01:39:55 PM »
Krypton.
I built Chrisjh circuit some time ago but never got around to fitting it into my system, This thread has spurred me into action. I noted your comments about opto isolator of the circuit from the PWM on pin 14. With your opto circuit you say to omit the resistor & transistor in Chrisjh circuit. On my BOB the PWM from pin 14 is already opto isolated so do I just connect this and ground to the I/p & ground of the  4011N ( ie omit R4 & TR1)
Thank you.
Ian
Re: PWM Spindle Control using Mach3 - How I did it
« Reply #42 on: March 25, 2015, 05:01:37 PM »
right, you have pulses at the input.  Now check the circuit as I have listed.  You don't need the oscilloscope,  just the on/off signal you have been using so far.

There are two signal inversions, one through the optoisolator and the other through the logic chip.

Krypton

Krypton,

I am not an expert so at first I am making the circuit without the opto-isolater(just sticking to the schematics for troubleshooting). Looks like there might be something else which may have gone wrong.  Can this be the problem that I am using capacitors of capacity 10uF 63volt and 100uF 25volt against 10uF 16volt and 100uf 16volt ?? Also I have connected 12volt to pin 14 and GND to pin 7 of 4011 IC, is this to be done or not? These are the gray areas which might be causing trouble as per my brain works.

The maximum voltage rating of the capacitors will make no difference.  It must exceed the applied voltage, in this case 12V.

And you are correct that the 4011N pin 14 should be connected to +12V and pin 7 to GND.  If you are not using the N-type (dual-in-line) check the specs for your chip.

In Chris's circuit he had lines to the chip, with no numbers, which in this case he should have added.  Professional engineers sometimes have a shorthand, and often neglect to detail the power connections, in the interests of clarity of operation of the logic.

I said in a previous post that some logic chips are designed for use on 5V supplies, and cannot handle the 12V.  So check that the chip you are using is the correct one.  The easiest way is to google the exact chip name that is printed on the chip you have, and look for the absolute maximum part of the specification.  You will need 16 or 18 V versions.

My apologies for not replying promptly - I am in a very different time zone, GMT+13.

Krypton
Re: PWM Spindle Control using Mach3 - How I did it
« Reply #43 on: March 25, 2015, 05:31:19 PM »
Krypton.
I built Chrisjh circuit some time ago but never got around to fitting it into my system, This thread has spurred me into action. I noted your comments about opto isolator of the circuit from the PWM on pin 14. With your opto circuit you say to omit the resistor & transistor in Chrisjh circuit. On my BOB the PWM from pin 14 is already opto isolated so do I just connect this and ground to the I/p & ground of the  4011N ( ie omit R4 & TR1)
Thank you.
Ian

Yes, you must wire it without R4 and T1, direct into the logic chip.  In Chris's circuit he needed to amplify the voltage from TTL levels to the 12V.  His circuit can also handle 5V inputs, that are more common these days.  The transistor also inverts the signal, and you should get the same inversion through the opto-isolator, depending on how it is wired.  There are spare inverters in the 4011, or you can change the polarity in Mach3.
 
Krypton
Re: PWM Spindle Control using Mach3 - How I did it
« Reply #44 on: March 25, 2015, 09:41:34 PM »
Just a note to tell you why I did not use Chris's circuit directly.  I did not need an external supply, because there was one directly available in the spindle motor drive inverter, with its own analogue earth, for a potentiometer input.  To get the maximum speed the voltage has to range right up to (usually) 10V.  Hence I needed a low resistance drive and a low resistance in the filter.  In my case the potentiometer input resistance was 20K, so that was the load on the filter.  As it turned out the internal power supply was 10.2V, giving me some head room, and it worked out fine - I could get the full speed from the spindle.

So I was then happy to further load the logic chip with the extra filter to drive the forward pin.  I was also happy to use the internal power supply analogue earth for the common, where I should have used the digital earth for this digital signal.  I could get away with this because it is a steady load on the speed signal for the full time of when the spindle is spinning.  If any other digital input loaded the circuit it could alter the speed slightly when active.

And I required optoisolation.

A further note.  There are many thousands of transistors, all with similar specifications.  So it generally does not matter what transistor is used.  Voltage and current rating are important, but for small signal transistors your use will be well below the limits.  FETs have different abilities than bipolar, and there are npn, pnp, n-type and p-type specs that you must get right.

Similarly resistors have voltage and power maximum ratings and capacitors have maximum voltage ratings.  But again you are likely using them well below their maxima.  The same is true for logic gates.  We could have used any NOR, NAND or NOT gates available, because we are using the chip only as an inverter.  Subject to their maximum voltage rating as already noted.

Krypton
Re: PWM Spindle Control using Mach3 - How I did it
« Reply #45 on: March 26, 2015, 01:36:29 PM »
Krypton

You don't need to apologize as you are a contributor, instead I should be apologizing because I'm asking too many questions over a simple circuit. My chip CD4011BE and it can handle 12v, I didn't get time today but I will diagnose the circuit tomorrow and update.

Thanks
Xtreme
Re: PWM Spindle Control using Mach3 - How I did it
« Reply #46 on: March 26, 2015, 01:51:59 PM »
Also I want to tell something ,a so called "expert" friend of mine told me that this is a precise circuit and because of heavy solder joints signal attenuation can be there which may hinder the functioning, can this be the case?
Re: PWM Spindle Control using Mach3 - How I did it
« Reply #47 on: March 30, 2015, 01:44:13 PM »
Help needed!! :-X

Hello,

I have built the Chris's pwm to analogue converter circuit. I have tried calibrating it with the built in Trimpot but there seems to be a big problem with it. At full RPM it is supposed to give out 10volts and at the half RPMs it should give out 5.0 volt. Here lies the problem My full rpm are 3000 @ 10 volt dc but when I issue the command for 1500 rpm the voltage drops to 4.89 or 4.90. How can the loss for RPMs in this case be compensated? If anybody can point me in the right direction I will very thankful.

Xtreme
Re: PWM Spindle Control using Mach3 - How I did it
« Reply #48 on: November 07, 2015, 10:43:11 PM »
Hi All,

I see a lot of queries, especially from novices, regarding methods of Spindle Control.  There are a lot of topics covering this but most do not give a full explanation with examples in one place. 

What I have tried to do is put a lot of scattered info and the benefit of my own personal experience into one document.

Please take advantage of my experiences at www.cjh.com.au//PWM Spindle Control using Mach3.pdf

Regards

Chrisjh
I can't seem to access this document.  It has been quite a long time.  Any chance this would be archived somewhere accessible?

I need to tune a spindle control loop and need all the help I can get.
Re: PWM Spindle Control using Mach3 - How I did it
« Reply #49 on: November 08, 2015, 03:15:46 AM »
Hi,

You should find the document here in Members Docs:

http://www.machsupport.com/forum/index.php?action=dlattach;topic=15457.0;attach=21882

Unfortunately my website is dead (I found an obituary for the bloke who hosted my website after I investigated why my website was down).

Chrisjh