Connect with us

SMALL CNC SPEED CONTROL

Discussion in 'Microcontrollers, Programming and IoT' started by neweng, Oct 4, 2020.

Scroll to continue with content
  1. neweng

    neweng

    4
    0
    Oct 4, 2020
    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.
     
  2. Minder

    Minder

    3,006
    640
    Apr 24, 2015
    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.
     

    Attached Files:

  3. Minder

    Minder

    3,006
    640
    Apr 24, 2015
    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.
     
  4. neweng

    neweng

    4
    0
    Oct 4, 2020
    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
     
  5. Minder

    Minder

    3,006
    640
    Apr 24, 2015
    So are you looking for a digital to analogue method for controlling or subbing the pot input on the controller?
    M.
     
  6. neweng

    neweng

    4
    0
    Oct 4, 2020
    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
     
  7. Minder

    Minder

    3,006
    640
    Apr 24, 2015
    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.
     
  8. neweng

    neweng

    4
    0
    Oct 4, 2020
    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
     
  9. Neil_R_H

    Neil_R_H

    2
    0
    Sep 29, 2019
    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.
     
  10. Neil_R_H

    Neil_R_H

    2
    0
    Sep 29, 2019
    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.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-