{"id":3681,"date":"2016-01-21T20:24:15","date_gmt":"2016-01-22T01:24:15","guid":{"rendered":"http:\/\/www.summet.com\/blog\/?p=3681"},"modified":"2017-09-23T20:16:53","modified_gmt":"2017-09-24T01:16:53","slug":"how-to-convert-a-denford-scantek-2000-micromill-to-linuxcnc-mach3-control-part-3-spindle-motor-control","status":"publish","type":"post","link":"https:\/\/www.summet.com\/blog\/2016\/01\/21\/how-to-convert-a-denford-scantek-2000-micromill-to-linuxcnc-mach3-control-part-3-spindle-motor-control\/","title":{"rendered":"How to convert a Denford \/ ScanTek 2000 Micromill to LinuxCNC \/ Mach3 control: Part 3 \u2014 Spindle Motor Control"},"content":{"rendered":"<p>In <a href=\"http:\/\/www.summet.com\/blog\/2016\/01\/16\/how-to-convert-a-denford-scantek-2000-micromill-to-linuxcnc-mach3-control-part-1-3-axis-control\/\">part 1<\/a> of this series I got the stepper motors for the 3 axes moving. In<a href=\"http:\/\/www.summet.com\/blog\/2016\/01\/17\/how-to-convert-a-denford-scantek-2000-micromill-to-linuxcnc-mach3-control-part-2-home-switches-e-stop\/\"> part 2<\/a> 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&#8217;m using Pin 1).<\/p>\n<p>You can watch the video here, or read the text and see the photos below:<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube-nocookie.com\/embed\/k2JIZhhJJsQ?rel=0\" width=\"640\" height=\"480\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>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 <a href=\"https:\/\/www.summet.com\/blog\/2017\/09\/23\/denford-micromill-2000-january-2003-dispatch-date-sgr-location\/\">this post<\/a> for a few photos and info about the SGR in that situation.]<br \/>\n<!--more--><\/p>\n<p><strong>Spindle Go Relay (SGR)<\/strong><br \/>\n<a href=\"http:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/IMG_20160108_153909.jpg\" rel=\"attachment wp-att-3734\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-3734\" src=\"http:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/IMG_20160108_153909-1024x768.jpg\" alt=\"IMG_20160108_153909\" width=\"584\" height=\"438\" srcset=\"https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/IMG_20160108_153909-1024x768.jpg 1024w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/IMG_20160108_153909-300x225.jpg 300w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/IMG_20160108_153909-768x576.jpg 768w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/IMG_20160108_153909-400x300.jpg 400w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><br \/>\nThis 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&#8217;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. \u00a0<em> In summary, connecting C6 to ground will turn on the spindle go relay.<\/em><\/p>\n<p>Unfortunately, because the positive voltage is 24 volts, connecting C6 to +5 volts will ALSO turn on the spindle go relay, so you can&#8217;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.<\/p>\n<p><a href=\"http:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/2222_transistor_SGR_C6-e1453344601839.jpg\" rel=\"attachment wp-att-3735\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-3735\" src=\"http:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/2222_transistor_SGR_C6-e1453344601839-1024x1010.jpg\" alt=\"2222_transistor_SGR_C6\" width=\"584\" height=\"576\" srcset=\"https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/2222_transistor_SGR_C6-e1453344601839-1024x1010.jpg 1024w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/2222_transistor_SGR_C6-e1453344601839-300x296.jpg 300w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/2222_transistor_SGR_C6-e1453344601839-768x758.jpg 768w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/2222_transistor_SGR_C6-e1453344601839-304x300.jpg 304w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/2222_transistor_SGR_C6-e1453344601839.jpg 1836w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><\/p>\n<p>Here is my current switching &#8220;circuit&#8221; The yellow wire from C6 goes to the transistors&#8217; 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.<\/p>\n<p><a href=\"http:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/transistor_deadbug-e1453344823136.jpg\" rel=\"attachment wp-att-3736\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-3736\" src=\"http:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/transistor_deadbug-e1453344823136-1024x926.jpg\" alt=\"transistor_deadbug\" width=\"584\" height=\"528\" srcset=\"https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/transistor_deadbug-e1453344823136-1024x926.jpg 1024w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/transistor_deadbug-e1453344823136-300x271.jpg 300w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/transistor_deadbug-e1453344823136-768x694.jpg 768w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/transistor_deadbug-e1453344823136-332x300.jpg 332w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/transistor_deadbug-e1453344823136.jpg 1534w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a> <a href=\"http:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/transistor_plugged_in-e1453344852842.jpg\" rel=\"attachment wp-att-3737\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3737\" src=\"http:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/transistor_plugged_in-e1453344852842-300x294.jpg\" alt=\"transistor_plugged_in\" width=\"300\" height=\"294\" srcset=\"https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/transistor_plugged_in-e1453344852842-300x294.jpg 300w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/transistor_plugged_in-e1453344852842-768x752.jpg 768w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/transistor_plugged_in-e1453344852842-1024x1003.jpg 1024w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/transistor_plugged_in-e1453344852842-306x300.jpg 306w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/transistor_plugged_in-e1453344852842.jpg 1933w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>This allows pin 1 on my break out board to enable\/disable 120 volt power to my spindle control board by controlling the SGR.<\/p>\n<p><strong>Spindle Driver Board<br \/>\n<a href=\"http:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/IMG_20160108_153916.jpg\" rel=\"attachment wp-att-3738\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-3738\" src=\"http:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/IMG_20160108_153916-1024x768.jpg\" alt=\"IMG_20160108_153916\" width=\"584\" height=\"438\" srcset=\"https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/IMG_20160108_153916-1024x768.jpg 1024w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/IMG_20160108_153916-300x225.jpg 300w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/IMG_20160108_153916-768x576.jpg 768w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/IMG_20160108_153916-400x300.jpg 400w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><\/strong><\/p>\n<p>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&#8217;t have any encoders on it.)<\/p>\n<p>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).<\/p>\n<p>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.)<\/p>\n<p>P1 is a 0 volt (ground) reference for P3 which is a 10 volt supply (actually closer to 11 volts on my board). \u00a0 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.<\/p>\n<p>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&#8217;t just connect P2 to an output pin on our BreakOutBoard to connect 0-5 volts to get up to 1\/2 speed.<\/p>\n<p>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.<\/p>\n<p><a href=\"http:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/spindle_control_board_jumpered.jpg\" rel=\"attachment wp-att-3739\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-3739\" src=\"http:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/spindle_control_board_jumpered-1024x768.jpg\" alt=\"spindle_control_board_jumpered\" width=\"584\" height=\"438\" srcset=\"https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/spindle_control_board_jumpered-1024x768.jpg 1024w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/spindle_control_board_jumpered-300x225.jpg 300w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/spindle_control_board_jumpered-768x576.jpg 768w, https:\/\/www.summet.com\/blog\/wp-content\/uploads\/2016\/01\/spindle_control_board_jumpered-400x300.jpg 400w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><\/p>\n<p>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! \u00a0 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.<\/p>\n<p>I have looked very closely at documentation on the 96 way connector, but I haven&#8217;t found anything definitive about if any pins on it can be PWM&#8217;ed at 5 volts TTL to control the 0-10 volt output from the SOUT pin. \u00a0 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.<\/p>\n<p><strong>Update: <\/strong> <a href=\"http:\/\/www.summet.com\/blog\/2016\/01\/29\/how-to-convert-a-denford-scantek-2000-micromill-to-linuxcnc-mach3-control-part-4-spindle-speed-control\/\">Part 4 <\/a>of the series shows how to get PWM control working (soldering directly to a chip on the board).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip; <a href=\"https:\/\/www.summet.com\/blog\/2016\/01\/21\/how-to-convert-a-denford-scantek-2000-micromill-to-linuxcnc-mach3-control-part-3-spindle-motor-control\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[121],"class_list":["post-3681","post","type-post","status-publish","format-standard","hentry","category-projects","tag-micromill"],"_links":{"self":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts\/3681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/comments?post=3681"}],"version-history":[{"count":9,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts\/3681\/revisions"}],"predecessor-version":[{"id":4415,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts\/3681\/revisions\/4415"}],"wp:attachment":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/media?parent=3681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/categories?post=3681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/tags?post=3681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}