In this installment, I will show you how to connect the controller to your stepper motors in order to get your CNC moving for the first time. This temporary hookup will be used to tune the machine before we attach the table.

 

Electronic Components

You will need the components shown in Figures 1, 2, and 3 to complete this chapter. These consist of the following:

 

You will also need two 1/4" thick plywood panels 7-7/8” x 15-3/4”.  One of the panels will need a notch cut into one end as shown in Figures 4 and 5. These are used to temporarily hold the controller board and the power supply.  Later you will install these panels inside your KReduCNC CNC frame.

Links to the various components I used will be provided on my KReduCNC support pages, as well as the drawing files for the panels.

 

 

Hardware

  • 6, #6-32 x 1" machine screws
  • 8, #6 washers
  • 6, #6 internal tooth lock washers
  • 10, #6-32 hex nuts
  • 2, M3-.5 10mm cap screws
  • 2, #4 internal tooth lock washers
  • 2' of Red 14 to 18 gauge wire
  • 2' of Black 14 to 18 gauge wire

Get the wire here

Red and black 18 gauge wire

 

Mounting The SainSmart Controller

Start by placing the controller board on the plywood panel, as shown in Figure 6.  The board should be about an inch from the edge of the panel. The area to the right of the controller can be used to mount additional electronics if needed. With the controller in place, trace the four mounting holes with a pencil.

Drill a 3/16” hole at each mark and insert a 1” #6 machine screw with washer into each hole and secure with a #6 hex nut, as shown in Figure 7.

Slip the board over the screws, as shown in Figure 8.  You may need to loosen the nuts a little to allow the screws to slip into the holes of the controller board.  Secure the board with a #6 lock washer and hex nut.

Set the four position switch block to 1=off, 2=on, 3=off, 4=on, as shown in Figure 9. Set the two position switch block to 1=off, 2=on, as shown in Figures 9 and 10.

 

Mounting the Power Supply

To mount the power supply, start by setting the supply in place on the notched panel, as shown in Figure 11. Place it about an inch from the end and trace its outline.

Flip the supply on its side with its back on the line closest to the end of the panel. Using a square, extend the holes to the edge of the supply so that you can transfer the position of the holes to the panel, as shown in Figure 12.

Drill a 3/16” hole at each mark in the panel, then secure with 2 M3-.5 x 10mm screws, #6 washers, #4 lock washers, as shown in Figure 13.

For the next step, you will need the three prong power cord.  Connect the three colored leads on the cord to the AC input terminals on the power supply, as shown in Figure 14.  Connect the green wire to GND, the white wire to N, and the black wire to L.

 

Take the red and black hookup wire and strip about 1/2" of the insulation from both ends. Connect each wire to the provided power connector, as shown in Figure 15.  It is important to take note of the orientation of the red and black wires.

 

Connect the other end of the red wire to the terminal on the power supply marked V+. Connect the other end of the black wire to the terminal on the power supply marked V-, as shown in Figure 16.

 

Hookup

Before starting, I want to talk a little about how to interface the CNC to a PC.  The easiest way is with a parallel port. Unfortunately, PC’s with parallel ports are harder and harder to come by unless you build your own CNC PC.  If you are using a full sized desktop machine with expansion ports, it’s an easy and cheap process to add a card to the computer.  This option is not possible with the use of a laptop.  You cannot use a USB to parallel port converter.  USB has too much latency to control a CNC directly.

In addition, the Mach3 controller software only supports the parallel port on a 32bit version of Windows. The Mach3 parallel port driver does not work on any version of Windows 10.

 OK, what do you do if you can’t use a parallel port?  In this case you have to off load the control of the CNC to a smart controller.  One such controller that I have used is called the SmoothStepper. They will run you about $180 so a parallel port is always my first choice.

I’m not going to cover using the SmoothStepper, as I already have instructions on my website.  I will provide a link on my KReduCNC support pages.

There are other options as well.  I have successfully added an Arduino Uno to my SainSmart and then used software to drive it from a USB interface in all versions of Windows.

For this project I will be using Mach3 on a 32bit Windows 7 PC, using a parallel port.

The PC shown in Figure 17 is a machine I just picked up at a local thrift store.  The machine was $15, the monitor was $5.  I lucked out as it had 32bit Windows 7 Pro already installed.  All I had to do was add a mouse and keyboard.  Which I purchased earlier for about $5.  The machine runs at 2Ghz with a parallel port and works great with all my CNC machines.

Start by laying out the power supply and controller panels with the rear of the CNC on one side and your PC on the other, as shown in Figure 18.

Take the controller power connector that you attached to the power supply earlier and plug it into the controller, as shown in Figure 19. Please note the orientation of the red and black wires. If you reverse these wires, you will destroy the controller.  Once you are happy with the cconnection, plug the power supply AC cord into the wall.  The controller should light up several LEDs.

 

In order to connect the stepper motors to the controller, attach the motor wires to the connectors that come with the controller.  There are several ways to do this.  You can cut the header off the motor wires and connect them directly to the controller connector, I tend to make little connectors by soldering some leads to a four pin header that will plug into the motor connector. This makes it easy for me to move the controller to other CNC machines if needed. Figures 20 and 21 shows one such connector.  The advantage of the little dongle is that you can reverse the motor direction by pulling out the connector, flipping it, then plugging it back in.

Important!!! Never disconnect the motors from the controller while the controller board is powered up.

Figure 22 shows another connecter I made.  It’s about 2 feet long.  Later when the controller is mounted inside the KReduCNC frame, the extension is needed so the motor can reach the controller.

No matter how you decide to connect the motors to the controller connectors, insert each connector into the appropriate socket on the controller, as shown in Figure 23.

 

The last part of the hookup is to connect the included parallel cable from the controller to the PC, as shown in Figures 24 and 25.  At this point, it is probably best to remove power from the controller by unplugging the AC power from the power supply.

 

Software and Configuration

We will be using Mach3 software to control our CNC.  The software is free as long as you use less than 500 lines of Gcode.  You can download a copy from here:

http://www.machsupport.com/software/mach3/

The first step is to download the software and install it.  If you are using a parallel port, be sure to install the parallel port driver.  If you are going to use a SmoothStepper, don’t install the parallel port driver.

I have created three files that will help you get your KReduCNC up and running with very little effort.  They consist of the following:

Place the Kronosrobotics.set and KReduCNC.xml files in you Mach3 install directory.  Place the KReduCNC.lnk on your desktop, as it is the shortcut to start Mach3 with the correct configuration file.

 

Starting Mach3

Let's start by making sure each axis is connected properly.  With your motors connected as outlined earlier, power up your controller power supply and PC.  Start Mach 3 by clicking on the shortcut provided. You will be presented with the startup screen shown in Figure 26. Observe the Reset button in the lower left of the window. When first started, this button will be flashing red and green. This tells you that your machine is in reset mode.  Hit the button, and it should turn to a solid green, as shown in Figure 27.

 

Now, with the Mach 3 window in focus, hit the right arrow on your keyboard, as shown in Figure 28. Your X carriage should move to the right.  If the carriage moves to the left, you will need to power down your controller power supply and reverse the X-axis connector.

 

Repeat the process with the Y-axis by hitting the down arrow, as shown in Figure 29. The table should move towards the back. This may seem reversed at first, but it is from the perspective of the bit in reference to the table so just accept it at this point.  Again, if it does not, reverse the connector. Remember to remove the power before doing so.

 

Next, hit the page down key shown in Figure 30. The Z carriage should move down.  If it does not, reverse the connector.  Remember to remove the power before doing so.

 

Conclusion

This completes the KReduCNC electronics hookup.  Your machine should now be configured and the motor directions are all setup.