Spindle motor control

More
10 May 2014 05:36 #46782 by bill516
Had a search, but as a detective I'm no Sherlock so I'll ask and someone might throw me a link if one exists.

Got this spindle from the bay of fleas
www.ebay.co.uk/itm/CNC-Spindle-0-3KW-Mot...&hash=item3a8f660c16

I have been using it manually but its getting to be a pain having to turn the motor on and turn it off again at the end of the run, there have been a couple of occassions where I have forgotten to turn it on and it makes a bit of a mess of the job and doesnt do the cutter any good either.

I have had a play with my multimeter and the small jst connector on the board gives me 0, 0-7 and 7 volts, the 0 -7 volts depends on the setting of the speed controller knob. Could I hook this up to linuxcnc and control the spindle via g-code if so how do I do it. I assume that I would have to remove the VR or disable it some way so it did not affect the signal coming from linuxcnc but other than that I have no idea what to do.

Thanks Bill

Please Log in or Create an account to join the conversation.

More
10 May 2014 14:21 - 10 May 2014 14:27 #46786 by Rick G
Last edit: 10 May 2014 14:27 by Rick G.

Please Log in or Create an account to join the conversation.

More
10 May 2014 15:55 #46789 by Mike_Eitel
Replied by Mike_Eitel on topic Spindle motor control
Hi
Simple and cheap...

Use the spindle-on output ( i think available in all hal configs )
and control a small relais. That can short the potentiometer between 0 and middle pin. Only beware of max position. Maybe you have to insert a protective resistor.

Mike

Please Log in or Create an account to join the conversation.

More
10 May 2014 21:57 #46795 by bill516
Replied by bill516 on topic Spindle motor control
Reading my question again I can see that I wasnt asking what I needed to know.

Is the driver that is supplied with the motor capable of being controlled by a signal form Linuxcnc. I assume that the signal will go to the centre connector of the jst as that is the one that varies with the speed of the motor and Linuxcnc will require to be configured for spindle PWM control.

Hardware side is it just a case of connecting the centre connector to a pin on the parallel port.

Software side is it just configure the HAL file to use the selected pin to control the signal.

Bill

Please Log in or Create an account to join the conversation.

More
11 May 2014 03:17 - 11 May 2014 03:18 #46804 by Rick G
Replied by Rick G on topic Spindle motor control
Looking at the picture it looks to me like a variable resistor.
If you read the analog output section of the Mesa link that was posted a good description of how this works and how to handle this is explained.

Just hooking up a parallel port pin to the center is not going to give you the 0-7 volt output you are looking for, not to mention the possible damage to the parallel port, speed control, etc..

Rick G
Last edit: 11 May 2014 03:18 by Rick G.

Please Log in or Create an account to join the conversation.

More
13 May 2014 06:49 #46855 by andypugh
Replied by andypugh on topic Spindle motor control

I have had a play with my multimeter and the small jst connector on the board gives me 0, 0-7 and 7 volts, the 0 -7 volts depends on the setting of the speed controller knob.


Of you want a really silly solution, but one with good electrical isolation, you could rig up a radio-control style servo to turn the knob for you, under LinuxCNC control.

However, it is probably better to replace the physical potentiometer with an electronically-controlled one. As well as the others linked, there is also:
store.mesanet.com/index.php?route=produc...spinx&product_id=205

Please Log in or Create an account to join the conversation.

More
14 May 2014 16:28 #46911 by bill516
Replied by bill516 on topic Spindle motor control
Thanks all the links guys all I can say is I am well confused. I Thought I had a good grasp on PWM but now I'm not so sure.

My understanding of PWM is full power is always sent to the motor but it is not there all the time. A bit like flicking a light switch on and off repeatedly, the faster you swich it the faster the motor will run and visa versa.

The confusion I think is beacuse of the motor driver. On the board I have it has a pot to control the speed which is turned to set the speed you require, where does the PWM come into that as once the pot it it set it does not vary, is it done on the board itself?

www.cjh.com.au//PWM%20Spindle%20Control%20using%20Mach3.pdf

Am I right in thinking that the Converting PWM to DC voltages board mentioned in the above article could be used to replace the pot on the board I have. Where the PWM to DC board has 12v GND and Analogue out, could I replace them with the three pins in the jst connector which are Gnd, 7V and I assume it would be the Analogue in to the centre.

One last question does the selected pin on the parallel port supply the pulse for the PWM?

Please Log in or Create an account to join the conversation.

More
14 May 2014 17:06 #46913 by andypugh
Replied by andypugh on topic Spindle motor control

My understanding of PWM is full power is always sent to the motor but it is not there all the time. A bit like flicking a light switch on and off repeatedly, the faster you swich it the faster the motor will run and visa versa.


No, it doesn't matter how fast you flick the switch on and off, what matters is the relative amount of time that the switch is on and off.
Except that if you don't flick the switch fast enough the lights will flash noticeably, so you need to flick your switch at least 20 times a second or the neighbours will wonder what you are up to.

The confusion I think is beacuse of the motor driver. On the board I have it has a pot to control the speed which is turned to set the speed you require, where does the PWM come into that as once the pot it it set it does not vary, is it done on the board itself?


The pot has 0V on one pin, 7V on the other and a variable (between 0 and 7V) voltage on the other pin. You need to find a way to control that variable voltage from LinuxCNC. The simplest way is to take the 0V and 7V and PWM them into a low-pass filter controlled by a PWM signal from LinuxCNC. (This is exactly what the $25 Mesa SpinX board does).

One last question does the selected pin on the parallel port supply the pulse for the PWM?


Yes, exactly. The P-Port can't do any analogue values, it is digital. So we use a PWM digital signal to create analogue voltages in the analogue world outside the PC.

Please Log in or Create an account to join the conversation.

More
14 May 2014 17:40 #46916 by bill516
Replied by bill516 on topic Spindle motor control
What does that PWM signal to DC voltage convertor do in that PDF I linked to, is it not the same as the spinx board?

Please Log in or Create an account to join the conversation.

More
14 May 2014 19:18 #46918 by andypugh
Replied by andypugh on topic Spindle motor control

What does that PWM signal to DC voltage convertor do in that PDF I linked to, is it not the same as the spinx board?


I think that the SPINX includes isolation, which the example in the pdf doesn't. (because he is using an isolated BoB).

If you want to make your own it could be quite a lot simpler than that one. A totem-pole output opto-isolator, one resistor and one cap works fine.
(it has to be totem-pole to actively discharge the filter when the pulse input is low).
picasaweb.google.com/lh/photo/ss1bl5Wh0i...pFm0?feat=directlink
You don't necessarily need a board, you can just solder surface-mount to the legs of the opto and heat-shrink it into the middle of a cable.

He shows it using 12V, but you would be better using the 0V and 7V on the board, which is another reason to isolate in the converter, as the pot might not have the same 0V as logic ground.
(For example, the KBIC DC motor drivers float the pot at +100V)

Please Log in or Create an account to join the conversation.

Time to create page: 0.256 seconds
Powered by Kunena Forum