Spindle control?

Home Forums TinyG TinyG Support Spindle control?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1357
    barclayo
    Member

    I just stumbled upon TinyG, and am excited to try it out for my next CNC project. I’m new to CNC and am in the planning stages for my second mill. I noticed that the interfaces section (http://www.synthetos.com/wiki/index.php?title=Projects:TinyG-Hardware-Info:) doesn’t list an interface to the spindle, although M[345] are documented as being supported. Where is the spindle control interface? How would you recommend I hook up the spindle control to something like a standard woodworking router that is being supplied power externally?

    Thanks,
    -Barclay

    #1358
    alden
    Member

    I’d say that the spindle control is “roughed in” at this point, but it is not functioning. The interpreter reads M3, M4 and M5, but the spindle control functions are stubbed out. What these should probably do is fire 2 output pins, one for ON/OFF, and the other for CW/CCW motion. Also, a full implementation would have a PWM channel and pin to output a motor control speed signal. The pins are there on the board to do this, but the code has not been written. Some form of external power management would also have to be provided for driving the motors – which TinyG does not do as it’s outside the current design.

    That said, most people are using the board without automatic spindle control just by turning the cutter on and off manually. That’s why this function has lagged the others. TinyG is quite hackable and the code is all on the github for anyone to add these functions, I just haven’t gotten to them.

    Hope this helps, and let us know if you have any other questions

    #1359
    saci
    Member

    Hello, in “system.h” and the bottom of “stepper.h” files it is mentionned that fourth axis max and min limit switches are respectively used as Direction and Enable output signal to control the Spindle ( PD7 and PD6 of ATXMEGA ) but in this page http://www.synthetos.com/wiki/index.php?title=Projects:TinyG-Hardware-Info: the 4th motor controller uses the PORTF instead of the PORTD.

    #1360
    alden
    Member

    Thanks for pointing that out. The correct mapping is in the system.h file and is:
    #define DEVICE_PORT_MOTOR_1 PORTA
    #define DEVICE_PORT_MOTOR_2 PORTF
    #define DEVICE_PORT_MOTOR_3 PORTE
    #define DEVICE_PORT_MOTOR_4 PORTD

    I’ll fix the wiki

    #1361
    barclayo
    Member

    alden: for what I’m planning on building, I’ll likely not be able to use PWM for spindle speed control, since I don’t plan on cracking open my router and messing around with the pot that does the speed control. But, it would be nice to have a pin or two that could trigger a relay that’s inline with the router’s power cord to control on/off. That would enable something like an EPO switch to kill the spindle and motors all at once.

    #1362
    alden
    Member

    This is pretty straightforward to code in – I just haven’t done it yet. Let’s get it on the list over the next couple of months

    #1363
    jpcnc
    Member

    I am also interested in this. What is the current plan?

    #1364
    alden
    Member

    I am about to release version 0.93. I want to hammer it over the weekend and run some final tests. Version 0.93 has spindle and coolant controls implemented (M3,M4,M5 and M7,M8,M9). The exact pin mapping will be on the wiki, but heres the functional pinout:

    – Spindle on/off bit
    – Spindle direction bit
    – Coolant on/off bit

    Coolant is mapped down to a single bit, so mist coolant (M7) and flood coolant (M8) both enable the same bit.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.