Installing the K40 controller

Installing the R4 Controller

Tools: All you need is a pair of pliers to cut one wire (optional), a screw driver to connect one wire and install the L shaped corner profile adapter for the opto coupler.

Tips: Take photo’s of the existing NanoM2 board/endstop so you know what and how it was connected.


The conversion consists of 5 easy steps designed for easy installation and for non-tech savvy people:

  1. Plugs: Unplug the existing controller plugs one by one and plug them over into the new controller (Y axis motor connector and power connector ‘24V/Gnd/5V/Lo’ which are both 4 wire connectors). The Y axis motor connector is a simple small connector that goes onto the 4 pin header call Y-axis motor. If the machine ‘homes’ via $H command into the wrong Y direction then turn this connector 180 degrees. The power connector is a the biggest connector in a typical 1980s PC power supply. It has a lock on one side of the connector so ensure this lock works with the male header connector (tab)  on the controller.  It can only go into one direction and makes sure you don’t insert it 180 degrees or shifted in pins since it will damage the  power supply!!!(*note)
  2. The 12 way flat ribbon cable (which contains the X,Y end stops and X axis motor connections) goes into the ribbon female connector. It also connects in only in one way. The metal lips of the ribbon cable are facing outwards, away from the controller as depicted below. If you insert it 180 degrees then it just does not do anything (but also no damage, the connection lips are only on one side).
  3. (Optional)Switches: Install the pushbuttons for pause/resume and reset and plug in the wire connectors into the controller. You can add safety door switches (NO normally open) in parallel with the pause button. So, when you open the access lid, the machine stops and when you close the lid, the machine can resume via a push on the resume button. All switches or push buttons have a common ground (normally open).
  4. (Analogue control version K40) Power control: (Optional) Cut the pot meter middle wire and screw this into the connector which leads to the PWM/manual switch so you have the option to choose manual or PWM.OR just take the spindle output from the shield and wire it directly into the power supply (IN) and remove the existing wire that goes to the pot (middle). From this strip, only the IN connection is modified the rest just stays as is.
  5. (Optional – You can use software to manage this)Y-Endstop: Install the L shaped bracket for the Opto coupler Y-end stop and associated Opto flag. You can use a piece of tin or a soft metal and bend it into a flag and mount it to the inner side panel of the K40 box.
  6. Test: Test it all out with manual jog movements X,Y and homing and send a g-code file via the CNC js software tool (See for overall info). If Y moves in the opposite direction then just turn the connector 180 degrees. If X moves in the opposite direction then you can use the GRBL firmware settings ($3 – Direction port invert, mask: $3=1 for X and $3=2 for Y and $3=3 for X and Y inverted) to correct this although it highly unlikely. The GRBL firmware settings can be entered via the command facility in CNCjs (black command box).

Note*: The laser power supply does not have builtin current protection. When drawing more than 1 Amp, the output Schottky diode will short. You can confirm this by measuring it with an Ohm Multimeter. This rectifier diode sits next to the 7805 power regulator and can be easily replaced ($2 component).

The software


The installation of the Open software is straightforward.

Install Inkscape (use the 0.92.0 NOT 92.2!!!) There are MAC and WIN versions and make sure you select the 32 bits version (64 bits has errors). If you don’t have it already see

Install Inkscape plugins by download from Paul’s Github into the inkscape/share/extensions folder (Windows) or … (MAC). The original laser cutting plugin can be downloaded here: and Laser engraving at do have the option to stream g-code from Inkscape).

Install the G code sender(s) (CNC Cheton or script) by clicking on the exe file which installs in on your PC or Mac.

For Install Cheton CNC see: it is a desktop app install which is easier than a node.js installation.

Connect the controller to the G-code sender through selecting the com port and baudrate (115200) of the USB connection, upload a g-code file and start streaming g-code (click start button depicted by an arrow symbol). Or download the script from Grbl Github site. Example: ‘ c:filename.gcode com16’


In case the usb port is not recognised by your machine, you might need to download the usb drivers at

Note: If you just want to use Inkscape then that’s fine but you might not be able to set the laser range for engraving and or tweak the steppers. Alternatively, you can use CNCJS or any other G-code sender for just configuring the power range and then uninstall the gcode sender(s)…

And That’s it, you are on your way!

7 thoughts on “Installing the K40 controller”

  1. Hi Paul
    I am not very “tech savvy” the instructions you give here are confusing to me. The pictures are not much help. As I often the case they are from the point of view of someone who assumes the person doing the work, knows what is what. I would be reluctant to buy the R4 controller if I cannot install it and use the software. Is there any chance that you could do a video showing how things go together?

    1. Hi Pat, a video might be a great way to show the install despite the process being very simple. Three connectors each of different size and structure so you cannot get it wrong unless you offset the plugs. Dan and I will review the page and enhance its instructions and pictures. Please let me know what the confusing areas are so I have a bit of a clue what the issues are so I can address them more efficiently.
      Thanks heaps! Paul

      1. I am looking at buying this controller as well, a video would be very helpful. Tend to follow those a lot easier. It also helps when you can pause and rewind sections

  2. Paul- The standard K40 unit I am looking at says it runs on Win 7, and I have read of people having problems trying to use WIN 10 with this unit. My computer has Win 10. Will this controller allow me to run the K40 from a Win 10 OS? Thanks!

Leave a Reply