Teensy 4.1 GrblHal CNC - Lathe spindle sync pulse signal input

TimG

New member
Hello,
I have converted a lathe to stepper motor driven ballscrews with the intension of having synchronised of X-axis, Z-axis and main spindle for threading operations.
I'm using the Teensy 4.1 on PhilB's BOB to run the GrblHal code; all excellent pieces of the whole CNC solution.
The instrumentation on the lathe spindle is two photo coupled interrupters (NTE3100) reading a toothed wheel, one producing 1 pulse per revolution and the other 60 PPR.
I believe that I can create a opto-isolated signal at the 3.3V level for the Teensy while running 12V (shielded cable) to the photo interrupters for good noise immunity over the 1-1.5m distance past the 3-ph AC motor and VFD.
I have searched the GrblHal code but I haven't confirmed for myself that the facility for 1 PPR index and 60 PPR signal inputs are already coded into GrblHal; has anyone already synchronised a spindle in GrblHal? What do I need to configure within the code? Which pins are are used on the Teensy, on the BOB ST0 & ST1?
I appreciate any guidance here.
Tim
 
Back
Top