Maker Pro
Maker Pro

SMALL CNC SPEED CONTROL

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 50k pot giving 0-7.8v to control the speed.

I can program an m26 command which will give me an output of digital 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 have been thinking along the lines of a stairstep generator but cannot get beyond the concept when multiple speed changes are needed ie.needing the voltage changing when the next speed is required during the program.
 
What CNC controller are you using?
Here is a schematic of the popular Gecko G540 that may help in a digital to analogue conversion.
Is this an ex T.M. & motor board?
M.
 

Attachments

  • PWManalog.jpg
    PWManalog.jpg
    64.9 KB · Views: 5
Hi,

I can program an m26 command which will give me an output of digital pulses with a frequency of 100hz,
.

IIRC M26 is set the axis to zero reference when issued?
On some it is send Spindle back to zero ref.
Although there is varied definitions and meaning depending on the controller
M.
 
Hi
The lathe is an Emco compact 5 cnc with the original motor control board.
M26 on this lathe does exactly as described previously with the pulse output through the dnc board
John
 
So are you looking for a digital to analogue method for controlling or subbing the pot input on the controller?
M.
 
Hi,
Yes thats what I am looking for.
I would like to input through the program a 0-7.8v signal to the motor control board
I can see a train of pulses being able to produce a voltage like stairstep
but I cannot see how to make a circuit reset when multiple speed changes are required within the program.
John
 
The way the (free) Mach3 program does it is with a PWM signal and a D to A circuit changes it to either 0-5v or 0-10v analogue for the VFD etc.
What is the origin of the present 0-7.8v signal?
Is this a Treadmill board? I assume it is not one provided by Emco?
Can you output a signal when the M3 Sxxx is issued, for e.g.?
Incidentally, do Emco come with CNC fitted or is this after market?
M.
 
Hi,
The 0-7.8 signal is from a pot on the spindle control board adjusted manually to vary the speed.
The spindle control board is an emco original. The lathe comes from emco as a fully functional
cnc lathe with 209 lines of program available which is fine for me, however the spindle speed is manually controlled via a pot
so to change the speed during a program (perhaps lower for threading )one has to put a stop in the program
and change the speed manually which means being at the control constantly during operation.
Ideally I would like my program to read:-
M26 H80 (80= NO OF PULSES) to produce say 7.8v
G--
G--
G--
M26 H20 say 2.0V
G--
M26 H100 say 7.8V
G--
John
 
Hi,
I think that the problem can be broken down into two basic parts; capturing the pulse output in a suitable form then creating the analogue voltage from that information. If I've understood correctly, it seems that a counter with a latched output could be clocked from the pulse output to capture the number of pulses; a non-retriggerable monostable with a period slightly greater than (221/100) = 2.21 seconds (also driven from the pulse output) could be used to latch the count upon timeout then subsequently trigger a reset of the counter ready for the next burst (speed change). We now have the digital data representing the required motor speed held at the latched counter outputs. From there, a simple R-2R resistor DAC and op-amp could get to the 7.8V level required for a maximum count of 221.
Of course, there are many more details (where the Devil is apparently!) to be filled in but hopefully this idea is along the right lines and might provoke some discussion. I'm also aware that this could be implemented quite easily in a microcontroller (say Arduino, other microcontrollers are available).
N.
 
Hello again,
Doh! Rushed in there a bit, didn't I? Use a retriggerable monostable with a period of (say) 15ms so the speed data can be latched a short time after the last pulse without having to wait for the maximum time of 2.21 seconds.
N.
 
Top