Last night I was cutting with my Ox which uses a control board and

Last night I was cutting with my Ox which uses a tinyg control board and a quiet cut spindle I got from #SMW3D, which has been working well for quite a while now. After a cut was going awry (bad gcode), I hit the emergency off button. After a few minutes I turned it back on and the spindle came on, too. Left it off and unplugged all night just in case some minor power was saving the awkward state. This morning I tried issuing spindle gcode commands to turn it off (M3 S0, M5, etc.), but they had no effect. So now my spindle is stuck on. Has anybody had this happen to them before? Any suggestions on how to fix or debug it?
http://SMW3D.com

I wonder if for some reason your parameters got reset.
What is the value of $p1pof?
Should be $p1p0f=0, this is the off state 'phase", a.k.a. pulse width.

Have a look at other parameters

Did you measure the pin to see if TinyG is working with the M codes?

@cmcgrath5035 Damn. $$ shows “[p1pof] pwm phase off 0.000”. However, if I issue an M3 S10000 (that usually turns it on) it still shows this state.

@Steve_Anken I just checked the output pins (pwm and gnd) with a voltmeter and got nothing. Could it be that whatever is “driving” the pwm is fried?

Of course, the fact that software doesn’t show it being turned on is puzzling, but if it is broken, then perhaps the firmware is correctly reporting the state and I just have a busted pwm pin?

BTW, other controls (e.g. jog) seem to be working fine. I just can’t turn off the spindle.

If I can’t figure this out, I guess I can just slap a switch inline with the power to the spindle. Then it will pretty much be like having a Makita on it, which I’m thinking of doing anyway if only to get higher RPMs and torque.

If the PWM lead were outputting PWM the reading you would get with a typical VOM would be tough to predict - they are not designed to measure average, peak, etc.
But, one has to wonder why the pwm controller is turning on if the voltage at the pwm lead is in fact 0.0v. What sort of interface do you have between tinyG and the Spindle controller?
PWM is active high, so there must be something there.
Does the spindle stop if you disconnect the wire from the PWM port? Perhaps the spindle controller is fried

What is the value of $p1cph, the high speed phase.?
If it is > 0.9 or so, you should read approx 3V on the PWM pin after sending an "M3 S[your max speed] " Gcode command (turn on spindle at max RPM)

What do you have for all the other $p1* variables like $p1frq? A dump of those vairables would be enlightening.

I just finished a job (hey, the spindle was running, so why not?). The spindle is off now, but M3 S10000 would not turn it back on… Weird. Here is the $$ dump:

$$
{“ej”:""}
[fb] firmware build 440.20
[fv] firmware version 0.97
[hp] hardware platform 1.00
[hv] hardware version 8.00
[id] TinyG ID 3X3566-3ZW
[ja] junction acceleration 2000000 mm
[ct] chordal tolerance 0.0100 mm
[sl] soft limit enable 0
[st] switch type 1 [0=NO,1=NC]
[mt] motor idle timeout 2.00 Sec
[ej] enable json mode 0 [0=text,1=JSON]
[jv] json verbosity 4 [0=silent,1=footer,2=messages,3=configs,4=linenum,5=verbose]
[js] json serialize style 1 [0=relaxed,1=strict]
[tv] text verbosity 1 [0=silent,1=verbose]
[qv] queue report verbosity 1 [0=off,1=single,2=triple]
[sv] status report verbosity 1 [0=off,1=filtered,2=verbose]
[si] status interval 250 ms
[ec] expand LF to CRLF on TX 0 [0=off,1=on]
[ee] enable echo 0 [0=off,1=on]
[ex] enable flow control 1 [0=off,1=XON/XOFF, 2=RTS/CTS]
[baud] USB baud rate 5 [1=9600,2=19200,3=38400,4=57600,5=115200,6=230400]
[net] network mode 0 [0=master]
[gpl] default gcode plane 0 [0=G17,1=G18,2=G19]
[gun] default gcode units mode 1 [0=G20,1=G21]
[gco] default gcode coord system 1 [1-6 (G54-G59)]
[gpa] default gcode path control 2 [0=G61,1=G61.1,2=G64]
[gdi] default gcode distance mode 0 [0=G90,1=G91]
[1ma] m1 map to axis 0 [0=X,1=Y,2=Z…]
[1sa] m1 step angle 1.800 deg
[1tr] m1 travel per revolution 60.0000 mm
[1mi] m1 microsteps 8 [1,2,4,8]
[1po] m1 polarity 1 [0=normal,1=reverse]
[1pm] m1 power management 2 [0=disabled,1=always on,2=in cycle,3=when moving]
[2ma] m2 map to axis 1 [0=X,1=Y,2=Z…]
[2sa] m2 step angle 1.800 deg
[2tr] m2 travel per revolution 60.0000 mm
[2mi] m2 microsteps 8 [1,2,4,8]
[2po] m2 polarity 1 [0=normal,1=reverse]
[2pm] m2 power management 2 [0=disabled,1=always on,2=in cycle,3=when moving]
[3ma] m3 map to axis 1 [0=X,1=Y,2=Z…]
[3sa] m3 step angle 1.800 deg
[3tr] m3 travel per revolution 60.0000 mm
[3mi] m3 microsteps 8 [1,2,4,8]
[3po] m3 polarity 0 [0=normal,1=reverse]
[3pm] m3 power management 2 [0=disabled,1=always on,2=in cycle,3=when moving]
[4ma] m4 map to axis 2 [0=X,1=Y,2=Z…]
[4sa] m4 step angle 1.800 deg
[4tr] m4 travel per revolution 8.0000 mm
[4mi] m4 microsteps 8 [1,2,4,8]
[4po] m4 polarity 1 [0=normal,1=reverse]
[4pm] m4 power management 2 [0=disabled,1=always on,2=in cycle,3=when moving]
[xam] x axis mode 1 [standard]
[xvm] x velocity maximum 16000 mm/min
[xfr] x feedrate maximum 16000 mm/min
[xtn] x travel minimum 0.000 mm
[xtm] x travel maximum 290.000 mm
[xjm] x jerk maximum 5000 mm/min^3 * 1 million
[xjh] x jerk homing 10000 mm/min^3 * 1 million
[xjd] x junction deviation 0.0100 mm (larger is faster)
[xsn] x switch min 1 [0=off,1=homing,2=limit,3=limit+homing]
[xsx] x switch max 0 [0=off,1=homing,2=limit,3=limit+homing]
[xsv] x search velocity 3000 mm/min
[xlv] x latch velocity 100 mm/min
[xlb] x latch backoff 10.000 mm
[xzb] x zero backoff 2.000 mm
[yam] y axis mode 1 [standard]
[yvm] y velocity maximum 16000 mm/min
[yfr] y feedrate maximum 16000 mm/min
[ytn] y travel minimum 0.000 mm
[ytm] y travel maximum 320.000 mm
[yjm] y jerk maximum 5000 mm/min^3 * 1 million
[yjh] y jerk homing 10000 mm/min^3 * 1 million
[yjd] y junction deviation 0.0100 mm (larger is faster)
[ysn] y switch min 1 [0=off,1=homing,2=limit,3=limit+homing]
[ysx] y switch max 0 [0=off,1=homing,2=limit,3=limit+homing]
[ysv] y search velocity 3000 mm/min
[ylv] y latch velocity 100 mm/min
[ylb] y latch backoff 10.000 mm
[yzb] y zero backoff 2.000 mm
[zam] z axis mode 1 [standard]
[zvm] z velocity maximum 1000 mm/min
[zfr] z feedrate maximum 1000 mm/min
[ztn] z travel minimum -120.000 mm
[ztm] z travel maximum 0.000 mm
[zjm] z jerk maximum 50 mm/min^3 * 1 million
[zjh] z jerk homing 1000 mm/min^3 * 1 million
[zjd] z junction deviation 0.0100 mm (larger is faster)
[zsn] z switch min 0 [0=off,1=homing,2=limit,3=limit+homing]
[zsx] z switch max 1 [0=off,1=homing,2=limit,3=limit+homing]
[zsv] z search velocity 1000 mm/min
[zlv] z latch velocity 100 mm/min
[zlb] z latch backoff 10.000 mm
[zzb] z zero backoff 3.000 mm
[aam] a axis mode 3 [radius]
[avm] a velocity maximum 25920 deg/min
[afr] a feedrate maximum 12960 deg/min
[atn] a travel minimum -1.000 deg
[atm] a travel maximum -1.000 deg
[ajm] a jerk maximum 324000 deg/min^3 * 1 million
[ajh] a jerk homing 324000 deg/min^3 * 1 million
[ajd] a junction deviation 0.1000 deg (larger is faster)
[ara] a radius value 5.3052 deg
[asn] a switch min 1 [0=off,1=homing,2=limit,3=limit+homing]
[asx] a switch max 0 [0=off,1=homing,2=limit,3=limit+homing]
[asv] a search velocity 2000 deg/min
[alv] a latch velocity 2000 deg/min
[alb] a latch backoff 5.000 deg
[azb] a zero backoff 2.000 deg
[bam] b axis mode 0 [disabled]
[bvm] b velocity maximum 3600 deg/min
[bfr] b feedrate maximum 3600 deg/min
[btn] b travel minimum -1.000 deg
[btm] b travel maximum -1.000 deg
[bjm] b jerk maximum 20 deg/min^3 * 1 million
[bjd] b junction deviation 0.0100 deg (larger is faster)
[bra] b radius value 1.0000 deg
[cam] c axis mode 0 [disabled]
[cvm] c velocity maximum 3600 deg/min
[cfr] c feedrate maximum 3600 deg/min
[ctn] c travel minimum -1.000 deg
[ctm] c travel maximum -1.000 deg
[cjm] c jerk maximum 20 deg/min^3 * 1 million
[cjd] c junction deviation 0.0100 deg (larger is faster)
[cra] c radius value 1.0000 deg
[p1frq] pwm frequency 3000 Hz
[p1csl] pwm cw speed lo 0 RPM
[p1csh] pwm cw speed hi 12000 RPM
[p1cpl] pwm cw phase lo 0.063 [0…1]
[p1cph] pwm cw phase hi 0.085 [0…1]
[p1wsl] pwm ccw speed lo 0 RPM
[p1wsh] pwm ccw speed hi 10000 RPM
[p1wpl] pwm ccw phase lo 0.000 [0…1]
[p1wph] pwm ccw phase hi 1.000 [0…1]
[p1pof] pwm phase off 0.000 [0…1]
[g54x] g54 x offset 119.900 mm
[g54y] g54 y offset 64.600 mm
[g54z] g54 z offset 0.000 mm
[g54a] g54 a offset 0.000 deg
[g54b] g54 b offset 0.000 deg
[g54c] g54 c offset 0.000 deg
[g55x] g55 x offset 145.000 mm
[g55y] g55 y offset 160.000 mm
[g55z] g55 z offset 0.000 mm
[g55a] g55 a offset 0.000 deg
[g55b] g55 b offset 0.000 deg
[g55c] g55 c offset 0.000 deg
[g56x] g56 x offset 0.000 mm
[g56y] g56 y offset 0.000 mm
[g56z] g56 z offset 0.000 mm
[g56a] g56 a offset 0.000 deg
[g56b] g56 b offset 0.000 deg
[g56c] g56 c offset 0.000 deg
[g57x] g57 x offset 0.000 mm
[g57y] g57 y offset 0.000 mm
[g57z] g57 z offset 0.000 mm
[g57a] g57 a offset 0.000 deg
[g57b] g57 b offset 0.000 deg
[g57c] g57 c offset 0.000 deg
[g58x] g58 x offset 0.000 mm
[g58y] g58 y offset 0.000 mm
[g58z] g58 z offset 0.000 mm
[g58a] g58 a offset 0.000 deg
[g58b] g58 b offset 0.000 deg
[g58c] g58 c offset 0.000 deg
[g59x] g59 x offset 0.000 mm
[g59y] g59 y offset 0.000 mm
[g59z] g59 z offset 0.000 mm
[g59a] g59 a offset 0.000 deg
[g59b] g59 b offset 0.000 deg
[g59c] g59 c offset 0.000 deg
[g92x] g92 x offset 0.000 mm
[g92y] g92 y offset 0.000 mm
[g92z] g92 z offset 0.000 mm
[g92a] g92 a offset 0.000 deg
[g92b] g92 b offset 0.000 deg
[g92c] g92 c offset 0.000 deg
[g28x] g28 x position 0.000 mm
[g28y] g28 y position 0.000 mm
[g28z] g28 z position 0.000 mm
[g28a] g28 a position 0.000 deg
[g28b] g28 b position 0.000 deg
[g28c] g28 c position 0.000 deg
[g30x] g30 x position 0.000 mm
[g30y] g30 y position 0.000 mm
[g30z] g30 z position 0.000 mm
[g30a] g30 a position 0.000 deg
[g30b] g30 b position 0.000 deg
[g30c] g30 c position 0.000 deg
tinyg [mm] ok>

Ugh. So basically, the spindle is now stuck off. FML.

Do you have any control of the LEDs -Cool (M7, M9), Spin (3,M5) ? That will test the other I/O functionality.
I’ll assume LED-SPWM (M3,M5) is inoperative.

How do you connect your SPWM lead to the Spindle controller., hard wire? 3.3V is usually not enough to get the job done.

I took a look at SWM3D, looks like they sell the same controller I use. FWIW, I found that in my setup setting $p1cph=0.95 worked better than 1.0

@SirGeekALot this is a rather odd one. Have you checked the easy stuff like wiring and fuse?

After verifying the spindle was not broken by connecting it directly to the 48V power supply (it works), I checked the 48V power going from the supply into the speed control at its terminals (power good, no wire problem going into it).

I set the spindle speed on (M3 S10000, which was working until just before I started this thread), then, with the spindle wires still disconnected from the spindle test, I checked the output terminals from the speed controller: no voltage (almost; it read about .2v-.3v).

Next, I checked the fuse on the speed controller.

The fuse is blown.

So the question is: what caused the fuse to blow?

Nothing else seems to be malfunctioning, so I’m more than a little puzzled. Could a heavy load on the spindle cause the fuse to blow?

However, the blown fuse doesn’t explain the spindle stuck on, so there seems to be 2 problems here (or one caused the other).

?? Could a heavy load on the spindle cause the fuse to blow? ??
Sure.
Do you have a manual speed pot for the controller?
If so, leave tinyG disconnected and see if the spindle spins ok.

@SirGeekALot no telling about the fuse bud.

Once replaced, agree with Carl. Leave everything plugged as usual and switch jumper. Try manual a bit and let us know.

We know you have a 48V supply for the Spindle power.
Assume you have a separate 24V supply (??) for tinyG and the Stepper Motors?
How is your emergency stop switch wired?
Kill 24V?
Kill 24V and 48V?
The more I reread this thread, the more I wonder if your PWM controller died a slow death - full on until the fuse blow event.

@cmcgrath5035 Yes, I have a separate 24v PS for the TinyG. My e-stop switch only kills the 24v (blindly followed someone else’s wiring diagram–rethinking this now). But, I have the mains input to both on a power strip, which I always turn off whenever I leave the room (unless a job is running).