Posted in CNC Router

An Affordable DIY Manual Mill CNC conversion with the KFLOP

The purpose of this post is to present an Affordable DIY Manual Mill CNC conversion using the KFLOP Motion Controller.  If you look on the web site, https://www.automationtechnologiesinc.com/, you can get most of the parts for under a thousand dollars.  You will have to buy the KFLOP from another vendor, because Automation Technologies does not sell the KFLOP.

item Description Price Total
1 KFLOP Motion Controller 249 249
3 Gecko Servo Amplifiers 114 342
3 Motors 350 oz-inch 79.95 239.85
3 AMT Encoders 38.95 116.85
947.7

Once you have the parts for the 3 axis machine, you will need to figure out a way to connect the motor to the machine.   This is only an estimate based on the following components.

  1. 2 timing belt pulleys (around $12 each),
  2. 1 timing belt around $15.
  3. 1 idler pulley and tighter around $100.
  4. 6″ x 24″ x 1/2″ aluminum around $40.
  5. 1 clamp to idler.

It will cost about $500 for the 3 axes.

If you have a machine shop or have access to one and you do the work yourself, your CNC Conversion cost is about $1,500.  However, this is excluding the cost of the CAD/CAM software.

Just for review, CNC stands for Computer Numerical Control.   A computer controls the movement of the Mill.  The CNC machine operates by the user doing the following steps;

  • Set the part onto a fixture with respect to work and tool offsets.
  • Load a G-Code program, to make the part, into the CNC control software.
  • Runs G-Code to machine the part.

I will explain more about the G-Code.

G-Code.

The g-code files tells the machine what to do and where to move.  You can find a good overview of G-code at this link

http://www.cnccookbook.com/CCCNCGCodeRef.html

G-code commands can be classified as Motion, Coordinate, Compensation, and Canned commands.  The most common Motion commands are G0, G1, G2, G3;

  • G0 – Tells the machine to move to a position XYZ.  The move is not in a straight line.
  • G1- Tells the machine to move linearly to a position.  During a linear move the mill move in a straight line.  Each axis moves and stops at the same time.  It is also known a coordinated move.
  • G2, G3 Tells the machine to move in a circular motion.

The Coordinate type commands would be G17, G18, G19 which allows you to select XY Plane, YZ Plane, ZX Plane respectively. 

The Compensation type commands such as G52 to G59 are used to set work and tool offsets on the machine.  

Canned commands such as, but not limited, G81 to G89 are used for drilling, boring, tapping.

This paragraph is only scratches the surface about G-code.  Refer to the above link for more details.

The CNC mill conversion 2.0 using the KFLOP

If you have read my post “DIY CNC Demo Using CAMBAM”, you would recognize that the new mill uses a lot of the mechanical parts from the old mill.  The old mill was prototype to verify that the design worked as expected.  It can do quite a bit of tasks, but it can only handle small jobs, because the motors are smaller and low power.  The new mill is larger and suited for industrial applications, and it uses larger motors.  The newer mill incorporates the same mechanical design, but it will also have;

  • New Servo Motors-sized better for the larger Mill/Drill.
  • New Motion Controller Card (Dynomotion KFLOP).
  • 3 Gecko G-320X Servo Amplifiers.
  • 3 additional mounting plates to connect the motor assemblies to the machine.

Originally, I was going to use the Gecko amplifiers with the Kerr Motion Control Cards, but I was not sure if they were compatible.  Besides I wanted to try something new and experience the KFLOP in action.

Old CNC Mill

 

New CNC Mill

 

The Dynomotion KLOP Motion Controller

The KLOP motion controller was recommended to me by a friend (Eric) at work.  Eric’s CNC mill broke down and he was going to fix it using the KFLOP.  He decided to use the KFLOP, because the parts for his old mill were too expensive.  He encouraged me to buy the KFLOP, so I bought the KFLOP.  I discovered that the KFLOP has a lot of nice features;

  • Controls up to 8 Axis Servo or Stepper motor.
  • USB interface.
  • Provides a G-Code Interpreter (Open source).
  • Provides good software examples.  The application KMotionCNC.exe, provided with the samples,  is a complete CNC solution.
  • The software can also be used by the .NET Framework.
  • Provides good documentation.
  • Only costs $250.
  • You can use a Game Console to move the stage.

The new mill requires 1 KFLOP motion Controller, 3 Gecko Servo Amplifiers and 3 Servo motors with encoders.   As shown below, each axis requires 1 servo motor.

Each motor uses an Incremental Encoder.  I recommend purchasing the encoders from US digital or AMT CUI INC.  I favor the encoders from AMT CUI INC because of the cost/performance ratio.  Check the prices for both manufacturers.  If you want a 2048 count encoder from US Digital it will cost about $76.  The similar product from AMT CUI INC would cost around $23.  If you are going to sell the CNC machines professionally you might consider US Digital.

KFLOP and Gecko Servo Amplifiers

 

Attaching the Motors to the machine.

Attaching the motors to the Milling machine took some thought.  This task required drilling 7 holes into the machine itself; 2 holes for the x-axis; 2 holes for the y-axis, and 3 for the z-axis.  It was a dreaded task.  Potentially ruining your machine is not a good feeling to have.

I don’t guarantee this is the best and only way, but it works.  Each axis required an additional mounting plate to connect the motor assembly.  Also, spacers were required between the mounting plate and the machine so the timing belt would be parallel to the motor assembly.  You will see this in the annotated X-Axis image.  The Z-Axis did not require spacers.  You will also see an annotated Z-Axis image.

Additional Machining for the X, Y and Z axis pulleys

Both the X and Y axes use a 2 ¼“ diameter pulley that needed modifications.  The bore diameters needed to be expanded from ¼“ to 7/10”.  To increase the bore diameter, I recommend using a boring head rather than using a drill bit.  Finding a drill bit with the exact diameter takes time.  When you re-drill the bore with a drill bit, the bit will make the hole off centered.  So when the pulley turns it will wobble.  Using the bore head does not have this problem.  The bore head can be adjusted easily for any size diameter.

The pulleys hubs needed to be machined so they would lock onto the axis of the mill.  If you remove the crank handle from the XY Table; this what the pulley needs attach to. 

Location to attach the Axis pulley

 

The modified pulley has a larger bore diameter and the hub was machine to interlock with the axis.  Basically you use a smaller end mill and cut straight across the hub.  The first cut is easy.  The second cut requires you to measure the arc distance on the mill axis.

 

Axis Pulley Interlocking with the Axis

The pulleys and timing belts were purchased from “Stock Drive Products and Sterling Instruments”.

The tools such as the bore head, end mill, drill bits were purchased from MSC Industrial.

 X-Axis Motor Assembly

 

 Y-Axis Motor Assembly

The work on the Y-Axis required the same work as the X-Axis.  The only difference is the mounting plate and the length of the spacers.

Y-Axis

 Z-Axis Motor Assembly

Attaching the Z-Axis motor assembly was about the same effort.  The assembly required; an additional mounting plate, extra shaft extended, and a shaft coupler.  Spacers were not needed.

Parts needed to attach the Z-Axis

 

Adjusting the PID (Proportional–Integral–Derivative) settings for each  Servo Motor Drive.

Setting these values were tricky at first.  It is best to start adjusting 1 motor without it attached to the machine.  Basically, adjust the PID values, on the Gecko amplifier, to the lowest settings.  Follow the instructions provided by Gecko.  Once you have the power and encoder lines hooked up to the amplifier, apply the minimum 18 volts.  It is best to start with the lower voltage, because the motor oscillations tend be worse with larger voltages.  Increase the voltage until the motors start oscillating.  Adjust the PID settings by turning the potentiometer on the side of the amplifier.  The “P”, “I”, and “D” are marked on the side of the amplifier.

  1. Turn the potentiometer for “P” so the oscillation stops and the motor is only humming.
  2. Turn the potentiometer for “D” so the humming decreases.
  3. Turn the potentiometer for “I” so the humming decreases even more.

After you connect the motors to the machine you might need to readjust the PID settings.  I ran into this problem when I was trying to control the machine.  The motor would move the machine in one direction without problems, but it vibrate in the reverse direction.

Creating the Initialization code for the KFLOP.

This section covers setting up the machine configuration, input/output channels, limit switch options.  The objective is to provide an overview of creating the “Initialization code” rather than repeat the manual.   The KFLOP user manual covers the task in detail.  

The main part to remember is to get the “Configuration”, and the “Step Response” Dialogs.  Both of these dialogs need to be open.  Select the menu options as shown in the image below.

Kmotion “Config & Flash” and “Step Response” Menu

On the dialog you will need to set the following.  This assumes your amplifier is setup for “Step” and “Dir” mode.

  • Hit the “Load Channel” button select KStepAxis0.mot for x-axis.
  • Set the Channel number.  For the x-axis it will be 0.
  • Set the Axis Mode as shown below.
  • Set your Input/output Channels.
  • Set the IO numbers for the limit switches.  This can be done later.
  • On the Step Response dialog set your PID, velocity and acceleration.
  • Hit the move button to set the step response.
  • Repeat for each axis.
Configuration Dialog

 

Step Response Dialog
  • Next, on the Kmotion.exe, hit the “C Programs” button.  Load a default program such as C:\KMotion433\C Programs\KStep\InitKStep3Axis.c
C Programs Dialog
  • Save the program as another program such as InitKStep3Axis-12-22-2016.c.
  • From the “Configuration” dialog hit “Export All to Open C Program” to update your setup C program.

Remember the name of the C program that you saved.  You will read this program from the KMotionCNC.exe.

YouTube has a good video for the KFLOP – “KSTEP Introduction – Getting Started with KSTEP Stepper Driver”

KMotionCNC application.

This application is a complete CNC solution.  The application provides a CNC Control Panel, G-Code Interpreter, G-Code Viewer.  The YouTube video, “KSTEP Introduction – Getting Started with KSTEP Stepper Driver”, and KFLOP user manual explains the application in detail.

The “INIT” button calls the C program that you saved in the previous section.  The video show you how to set the button to point to the C code.

KMotionCNC

 

Video of the New CNC Mill in Action.

The new mill uses the old mechanical design from the previous CNC mill.  Just to reiterate the machine uses the following parts;

  • KFLOP Motion Controller from Dynomotion.
  • Gecko g-320X Servo Amplifiers.
  • Servo Motors (300 oz/in XY axis, 240 oz/in for Z axis).
  • Encoders came with the YX motors.  Only the z-axis required a new encoder from AMT CUI.
  • XBox Joystick

The following video will show you how to run the KMotionCNC.exe application.

Xbox JoyStick

Video Of the Retrofitted Mill

If you have any questions or comment please let me know.