ORAC Spindle Control
From the factory, the machine came with an AC motor and a big obnoxious 240VAC VFD. The motor was missing on my machine and I don’t have access to high voltage, so I found myself a free treadmill and salvaged the 2.0 HP continuous duty brushed DC motor and mc2100 controller.
I poked some holes in the flange to mount the motor to the headstock and wrapped the power leads in a Faraday sheath since they make a ton of EM noise. I haven’t decided yet what I’m going to do with the motor’s built-in thermal switch. I may just put it in series with the ground line to disconnect the motor if it overheats or I may connect it to a switch input on the Smoothie and have it trigger an alarm in software. I’ve also designed a cowl and fan for the tail shaft to keep things cool in the first place, but those aren’t ready for production just yet.
My first free treadmill was free because “it stops working sometimes”. I figured it was probably the LCD or controls or something else not overly related to the motor and its controller. Well, it turned out it was the motor controller that stopped working at random. Specifically, it stops acknowledging that its receiving a PWM signal. Onward and upward, I found another free treadmill and this one came with a reliable controller.
When I first started playing with Smoothie’s PWM / PID spindle control, it was pretty apparent that no one else was using it. My first clue was that the module didn’t respond to M3 at all. After that, I found a few more minor things:
- M958 didn’t report anything.
- The spindle did not stop on
HALT
. - M957 was reporting target rpm instead of actual rpm. (Granted, this was on the Analog as opposed to PWM module, but still.)
- M958 only set the P-term instead of P, I, and D.
Rounding out the hardware, I’m using a cheap digital tach and I made a mount for the Hall sensor. Instead of inventing a new part, I found some tiny magnets that fit inside one of the nut slots on the spindle timing pulley I designed a while back and already had on there.
The Hall sensor in the kit has a long tail which I cut just a few inches down and spliced over to the display which I mounted in front of the spindle.
The other end of the tail splits down inside the cabinet with power/ground going over to the motor controller, feeding off it’s console power header and the tach signal from the sensor going into a PWM input on the Smoothie.
It’s worth noting here that after dorking around with various low pass filters for weeks trying to stop the Smoothie from picking up noise as spindle pulses, I just threw a little capacitor across the signal line and a ground pin right on the board and that worked an order of magnitude better than anything else. KISS.
If anyone else happen to have this exact machine, I’ve found that the following parameters work best on the PID control:
P | 0.0001 |
I | 0.000047 |
D | 0.00001 |
If anyone is interested, I may discuss PID tuning in a future post.