ELECTRONICS - The CNC BOX ETC

(i.e. the hard, or the easy part, depending on who you are)

By Chris Krstanovic

 

The CNC box is a system component, which sits between the controller (your PC), and the machine. It drives the motors, as well provides some other interfacing functions.

 

Arguably, for most people this may be the hardest part of the project. Before I started, I selected the software that will be used as a controller (Mach3). Next decision concerned the motor drivers. I chose the Geckodrive ( http://www.geckodrive.com ) G201 models. If you are looking at a smaller machine and motors up to 260 in.oz., you may want to consider Xylotex ( http://www.xylotex.com ), XS-3525 3 or 4 channel board. The next decision regards the drive voltage: you want as much as you can safely get away with, as this will provide you with far better dynamic (i.e. moving) torque. My unit runs at 75VDC. It is sourced by a hefty, torroid, 800VA transformer. I know it sound like a lot, but you want this to last. This voltage is a bit too high for the smaller stepper, and during initial bench testing it would get quite hot. However, as it turned out, the cooling was not necessary, as the aluminum mount acts as a great heat sink.

 

  

(click on the pics to see the larger version)

 

After looking around for a while, I decided to design and build my own breakout board. I wanted features that were not available on other commercial boards. So, after designing the schematics, I laid out the board, and had 10 raw PCBs manufactured for me (Hint: I only used 1, so I have 9 left. Contact me if you are interested.) This board is a complete drop in the box solution to a 4-axis drive, inclusive of the power supply. It interfaces to up to two PC ports, and is perfect for Mach3. It is a high-end board, and supports any feature Mach 3 has (MPGs, spindle indexes, etc.).  Component assembly went fast, and testing showed a minor, easily fixable bug. The board supports 4-axis, allowing for addition of a rotary table drive at some point in future. The power supply section includes a FET crowbar, which sinks the current coming from the motor as it decelerates (remember, the motor can also generate the current). Everything is over designed by a factor of at least 3X.

 

I decided to house the electronics in a 19" rack. This was very convenient as there is a rack containing my mail server right next to my machine. You can see the layout above. The gecko drivers are mounted on a vertical heat sink, which is mounted in front of a ball bearing fan. As it turned out, they remain stone cold, so you may want to skip the fan.

 

     

(click on the pics to see the larger version)

 

The front panel is simple. Above the power switch are the indicators showing the charge pump link signals coming from the two PC ports. Normally, the motors are disabled unless these are present. There is a momentary MIST and FLOOD over-ride switch, along with individual intensity controls. The output is a 12V 1A, PWM signal. I ended not using this feature, but it is still there. The middle switch allows you to: take motors off line; use PC for control; or keep motors ON irrespective of the charge pumps (for testing only). It is also possible to take individual axis off-line using neighboring three switches. This is useful, when in Lathe mode, as one of the motors is not needed. The rear panel is pretty self-explanatory. It contains all the signals necessary to interface to the machine.

 

 

(click on the pics to see the larger version)

 

Both, mill and the Lathe spindles are equipped with index boards. This is used to measure the RPM, and to provide you with G95 modes (inches/turn). This is crucial for the lathe, as you will not be able to thread without it, and I find myself programming most feeds in IPTs and not IPMs for general turning. I forgot about this board when designing, so I had to crib it manually. It uses a small reflective sensor, which looks for a piece of white tape on the spindle wheels.

 

   

(click on the pics to see the larger version)

 

The control PC is nothing spectacular. I cobbled it together from an old, but reliable 1GHz Thunderbird motherboard. It works well, and will do 25000+ steps/sec. That is all that is needed. It is running win XP-PRO, with Norton Systemworks, network etc. No need for optimization. I also loaded up all the office applications, Solid Edge 3D CAD, ACAD, MacterCam and other machining type applications.

 

PC Interface is done through the silicon keyboard, wireless USB mouse, and mostly through the pendant. The silicone keyboard is a great choice, as it is everything-proof: no worrying about the oil, chips etc. It is too flexible, though, and that necessitated mounting it on a ¼", flat plastic plate. Wireless mouse is handy, but sometimes a bit less than responsive due to RF noise made by the Gecko drives. The pendant is housed in a sturdy aluminum die cast enclosure. It uses an IPAC2 arcade USB interface, as well as other electronics to interface to the MPGs (manual pulse generators). There are 3, one for each axis, and are implemented with 100 pulses/rev. HP opto-encoders. There is also a joystick for jogging around. I selected a model used in car electronics. The unit I chose will not allow more than one axis to be moved at the same time. But that is me…

 

As some jobs take a while, I mounted a wireless web cam on a strong magnet. This can be attached to any convenient point (Z-motor), and I can monitor the streaming video from the comfort of my living room. The CNC PC runs win XP-PRO, so I can remotely log into it, and control things from afar. I have done this on number of occasions, and highly recommend it - but not for the questionable jobs.