Small CNC Lathe Speed Control, help in constructing a circuit .

Thread Starter

jab1

Joined Oct 13, 2020
2
Hi,
This is my first post I am a mechanical engineer with small electronic knowledge.
I am looking for some help in constructing a circuit .
I have a small cnc lathe and I would like to program multiple speed changes within the program. The motor is a 90v dc motor.The control circuit has a manual 50k pot giving 0-7.8v nominally to control the speed.
I can program an m26 command which will give me an output of logic pulses with a frequency of 100hz, the number of pulses being programable up to 221, initial condition-lo
The main program is interrupted during the output time and then subsequently continued.
I need a circuit that will let me input a number of pulses using m26 to create a voltage I can insert into the motor control circuit .Then hold that voltage until a new string of pulses is input changing it to a lower or higher voltage and so on.
John
 

Alec_t

Joined Sep 17, 2013
14,280
Welcome to AAC!
I would like to program multiple speed changes within the program.
What will be the minimum interval between speed change commands?
A small PIC or Arduino should be able to provide a PWM output which when processed could drive the control circuit.
 

jpanhalt

Joined Jan 18, 2008
11,087
Are you trying to vary the spindle speed to keep a constant cutting speed as when facing a piece? If so, you will need a sensor for the crossfeed. Since your lathe is CNC, do you know what that output is like?
 

MaxHeadRoom

Joined Jul 18, 2013
28,617
What is the nature of the controller? Who's?
What control format is it using?
An M code is usually a general machine code.
The normal spindle codes are M3/M4 for FWD/REV and M5 for spindle stop. & Sxxx value to set the speed.
The typical DIY systems such as Mach3 etc, use a LF PWM frequency output when a Sxxx value is issued, that is converted to an analogue value for the motor control. Which replaces the Pot.
Max.
 

MaxHeadRoom

Joined Jul 18, 2013
28,617
This from Centroid.

"M26 resets machine zero on an axis where-ever that axis happens to sit. Since part zero is recorded internally as a distance relative to machine zero, moving machine zero will move part zero as well.
As a rule, part programs should not contain M26. The machine's homing macro will use M26, usually after the appropriate M91 or M92 home-to-switch operation, to set a repeatable machine zero position on power up.
Thereafter you should leave machine zero alone.

An exception is for rotary axes on a mill control. If you run jobs with continuous rotation (e.g. a rotisserie-style prosthetics carver) then you need a way to "reset" the axis back to zero turns in between parts, so the control won't want to unwind all those turns to get from the end point of one job back to the start point of the next.
In that case it is reasonable to put M26, possibly combined with G92, at the end or start of the rotary job."

Max.
 

Thread Starter

jab1

Joined Oct 13, 2020
2
Hi ,
Thanks for all the interest shown
In answer to all your questions
Time delay between speed changes 5secs +
Step change speed is only needed typically for threading
M26 on this lathe (Emco compact 5 cnc )puts out pulses through the dnc board as previously stated
Controller is Emco original although built into the lathe it is totally separate to the cnc control
John
 
Top