In part 1 of this series I got the stepper motors for the 3 axes moving. In part 2 I hooked up the home and E-Stop switches. In this post I will describe getting the spindle motor to turn on (and off!) controlled via the parallel port break out card (I’m using Pin 1).
You can watch the video here, or read the text and see the photos below:
To enable the spindle motor, two things have to be done. First, the Spindle Go Relay (SGR) must be turned on, which provides 120 volts AC to the spindle driver board. Second, the spindle driver board input needs a 10 volt input to turn on the output (to the spindle motor) at full blast. The photos below are of my Dispatch Date 2005 mill, but other mills from Denford are similar in their general operation. [If you have an earlier dispatch date mill, you may have a DIN rail of relays mounted individually instead of this custom PCB of relays. Check out this post for a few photos and info about the SGR in that situation.]
Spindle Go Relay (SGR)
This is a picture of the main power distribution board. The large top white rectangle (just above the Denford LTD text) is the main E-STOP relay (R1). It will turn on only if the E-STOP system is not activated. Directly below it are two fuses, and below and to the left are two smaller relays. The center relay (R2) directly to the left of the fuses is the Spindle Go Relay. It’s coil operates on 24 volts DC (higher than 5V TLL, but lower than 120 AC!) One side of the coil is connected to the +24 supply via a magnetic guard switch that is closed only if the plastic door/guard is in the down position. (This keeps the spindle from turning while the protective door is open.) The other end needs to be grounded to activate the relay, and the connection from it connects through the large white wire in the center of the top center connector block with five wires (Green,Green,WHITE, Red, Black). This large white wire is connected to UserOUT-0 on the NextMoveST board, which is connected to pin C6 on the 96 way connector. In summary, connecting C6 to ground will turn on the spindle go relay.
Unfortunately, because the positive voltage is 24 volts, connecting C6 to +5 volts will ALSO turn on the spindle go relay, so you can’t just connect C6 directly to an output pin on your breakout board. Instead, you need to use the 0-5v signal from the breakout board to switch the current between C6 and ground. You could do this with a small 5v coil relay, but if you are not afraid of transistors, you should just use a NPN switching transistor in low side switching mode.
Here is my current switching “circuit” The yellow wire from C6 goes to the transistors’ collector. The blue wire from my 0-5V output signal (pin1 on the break out board) goes into the base via a 1K resistor which limits the current draw. And the emitter of the transistor is wired via the green wire to ground (on the break out board, which eventually links back to a GND pin on the 96 way connector). After I verified operation, I dead-bugged the resistor and transistor together so I could just screw them into the break out board terminals.
This allows pin 1 on my break out board to enable/disable 120 volt power to my spindle control board by controlling the SGR.
This is the spindle driver board, which takes in 120 volts AC, and outputs power for the spindle motor. It uses a 0-10 volt signal to determine the speed that the spindle should go. (This is open loop control as the spindle motor doesn’t have any encoders on it.)
In the photo above, the 120 volts AC that is enabled by the SGR comes into the spindle control board via the blue and brown wires that plug in at the top right. The power to the spindle motor goes out via the Red and Black wires (Red in the top left, Black in the middle right).
The two small red/blue wires in the foreground (plugged into the P2 and P1 0.250 inch blade terminals) are the 0-10 volt signaling wires from the NextMoveST board. (They are connected into the SOUT and SGND lines on the bottom left of the NextMoveST board.)
P1 is a 0 volt (ground) reference for P3 which is a 10 volt supply (actually closer to 11 volts on my board). P2 is the input for the spindle speed controller. If you want to manually control the spindle speed with a potentiometer, you just connect a 5K linear POT between P1 and P3, and connect the wiper (middle terminal) to P2. Turning the POT gives P2 a selectable 0-10 volt input signal.
However, I believe that the MicroMill had full PWM control of the spindle speed via the NextMoveST board. The SOUT and SGND output on the NextMoveST board is isolated from the rest of the logic signals, such that they can float to high voltages with the spindle board. So we can’t just connect P2 to an output pin on our BreakOutBoard to connect 0-5 volts to get up to 1/2 speed.
For now, I have attached a jumper between P3 and P2, which locks the spindle board to full speed output, and I turn it on and off using PIN 1 on my break out board that controls the SGR via C6.
This is not elegant, but for a Sherline mill, full speed is generally just fine. However, I really, really want to figure out how to control the SOUT output on the NextMoveST board. When I first started working on the spindle, the NextMoveST board was outputting an 11 volt signal on SOUT, so as soon as I enabled the SGR the spindle turned on full blast! This persisted for several on-off cycles, but eventually (right after I got the transistor control of the SGR working) it stopped putting out an 11 volt signal, which is why I had to jumper P3 to P2.
I have looked very closely at documentation on the 96 way connector, but I haven’t found anything definitive about if any pins on it can be PWM’ed at 5 volts TTL to control the 0-10 volt output from the SOUT pin. Worst case scenario I may have to purchase an isolated TLL/5V to DC 0-10 volt converter and bypass the SOUT circuitry on the NextMoveST board.
Update: Part 4 of the series shows how to get PWM control working (soldering directly to a chip on the board).