Set up Mach 3

Here’s how to set up the Raw 1.5 machines. If you have electronics and machine from us, you can follow this guide straight through

Install Mach3. Note that the computer must have a printer port and Windows, 95, XP, Win7 or later operating system. Windows Vista does not work well. You should also have a 32 bit version. You can download win7 32 bits for free here.

Burn it to an empty DVD disc and reinstall Windows. If you’re unsure, there are lots of guides on Youtube. You can buy a licence for 2 Eur on eBay that is from used computers but works excellent.

Download this file and paste it into the Mach3 folder found in the C: prompt in Windows. Windows asks if you want to replace your old file, select Yes. You still have to set up your Switches as well as the Autotool plate and you’ll see how to do it below

Set the Switches

Open mach and navigate to Config / ports and pins
All machines have different settings for the Switches so we must manually set them. Each switch receives a Pin number between 10-15. You can set them by clicking on “Automated setup of inputs”. Before you do, then EStop on 0. Since we have Auto tool, there is no place for Estop but we can use a switch or “Space” on the keyboard as an emergency stop

Click on “Automated setup of inputs” and select “X-limit Switch ++” and click Auto Set. What’s happening now is that the program is waiting for you to click an X-axis switch so that it can locate which pin it is plugged into. Click a switch on the x-axis. If everything works, then the program will find a location for the switch. If you got a value of eg 15, then all x switches must have 15 as value, see picture above. Repeat with the other switches. Probe is Autotool, just connect the cords when locating it.

When you are done, click ok.

If you exit Mach3, you lose the settings so you have to save them, go to the “Config” menu and “Save settings” at the bottom.

After that, you must set up Homing and Autotool. Instructions can be found in the download folder “Autotool” and “Home switches” Follow the instructions in these files.
Now you’re ready to work with your machine. Read our instructions and look at our video documentation on the website under “Articles”

Set the drivers manually

Open mach3 and navigate to Config / ports and pins (Only applies to the drivers that came with your package)

Then set the switches as shown in the beginning of this guide


Slave Motor (Slave)

If the motor is to be synced to the Y motor, this must be set. Go to Config / Slave Axis and fill in the following


After doing this you must set up Homing and Autotool.

Home switches

The next step is to make the Home function to work properly. Home is used to inform the machine where the absolute zero point is. The principle is the same as for Autotool but for the other axes. The advantage of this is that when you work, you can run multiple programs with different cutting heads when the machine always knows where to start cutting because it is based on the zero point. It might be complicated for you right now but you will understand later on.
Start by checking if the code is correct, do the following

  1. In Mach3 click Operator / Edit Button Script
  2. Now, a couple of buttons will blink. Then click on the flashing “Ref all home” button.
  3. Verify that the code looks like this:
    DoButton (24)
    DoButton (22)
    DoButton (23)
  4. If you have more lines, erase these and type exactly as above save and close.

Also check in General configuration so that “Home Slave with Master Axis” is not ticked

If you now turn off the program, you will lose all the settings so you have to save them, go to the “Config” menu and “Save settings” at the bottom.

Zero the cordinates
In Mach3 make sure RESET is not flashing, and then click Ref All Home. Now the machine starts to look for the switches and if everything goes as it should, the machine has found all the switches after a while. If you now have your piece clamped on the machine and doing the Autotool procedure then the machine is completely zeroed. It should look like the picture.

If you have hard coordinates for the X and Y axis, reset them by clicking on the respective buttons. If everything looks like in the picture, you can basically load your file, start the spindle and get started.


Autotool or level calibration plate
Your machine has a function that allows you to set the height of the cutting head.

The cord in the picture serves as a switch. If we ground the spindle with one cable then touch the end mill with the plate it becomes a switch. This does not work with plastic riuters/spindles, then you need 2 crocodile clips, one that you attach as shown and the other is clamped to the end mill.

You also need code for this as you will see below. Below the code, you will find instructions on how to submit it.

‘Tool Zero Setting Macro Raw 1.5 CNC machine

‘ Change the following three lines to suit your machine
PlateThickness = GetOEMDRO(1001) ‘ Thickness of touch plate
RetractClearance = 5 ‘ Clearance above touch plate to retract to
ProbeFeed = 200 ‘ Feedrate to use for probing

‘ Define some constants
ZDRO = 2 ‘ Z Axis DRO
AbsoluteModeLED = 48 ‘ Absolute Coordinate Mode LED
IncrementalModeLED = 49 ‘ Incremental Coordinate Mode LED
FeedrateDRO = 818 ‘ OEM code for feedrate DRO
ProbeLED = 825 ‘ OEM code for probe input LED
ZTouchDRO = 2002 ‘ OEM code for DRO that holds Z touch position

‘ Do nothing if probe is already grounded
If GetOemLed(ProbeLED) = 0 Then

‘ Wait a few seconds for user to get touchplate in place
Code “G4 P2”

‘ Save current feedrate
CurrentFeed = GetOemDRO(FeedrateDRO)

‘ Save current coordinate mode
AbsMode = GetOemLED(AbsoluteModeLED)

‘ Set absolute coordinate mode
Code “G90”

‘ Zero Z DRO
Call SetDro (ZDRO, 0.0000)

‘ Pause for DRO to update
Code “G4 P0.5”

‘ Do the touch move
Code “G31 Z-40 F” & ProbeFeed

‘ Wait for it to complete
While IsMoving()

‘ Delay a bit for Huh
Code “G4 P0.25”

‘ Get the Z position where probe input triggered
ZProbePos = GetVar(ZTouchDRO)

‘ Go back to touch position (G31 backs off after touch)
Code “G0 Z” & ZProbePos

‘ Wait for it to complete
While IsMoving ()

‘ Set Z DRO to touch plate thickness
Call SetDro (ZDRO, PlateThickness)

‘ Pause for DRO to update
‘Code “G4 P0.5”

‘ Retract Z to SafeZ, if enabled, else to RetractClearance above plate
RetractHeight = PlateThickness + RetractClearance
Code “G0 Z” & RetractHeight

‘ Tell user we’re done
Code “(Z axis is now zeroed)”

‘ Reset feedrate to original value
Code “F” & CurrentFeed

‘ Reset coordinate mode to original value
If AbsMode = 0 Then
Code “G91”
End If
Code “(Z-Plate is grounded, check connection and try again)”
End If

Exit Sub

Do the following.

  • Make a plate of aluminum or any conductive material and attach a crocodile clamp or your own solution.
  • In Mach3 click Operator / Edit Button Script
  • Now, a few buttons will blink. Then click on the flashing button “Auto Tool Zero”
  • Now a white box opens and this is where you erase everything and paste the code that accompanies the download (AutoToolCode) Open the text file and cut the code and paste it into the white box after saving.
  • Go to the Offsets button and change “Gage block height” to +4 as shown (click box enter 4 and click return / enter. +4 is the thickness we have on our plate. Fill in the thickness of your plate.
  • Save and restart Mach3


To see if it works:

  • Attach an end mill to your spindle
  • Use Page down or Page up so that the pin mill is about 3cm from the table or workpiece
  • Obtain the autotool plate and clamp the crocodile clamp on the cable that is not attached to the spindle.
  • Make sure the RESET button is activated and does not flash, then click “Auto tool Zero”
  • After a second, the spindle (Z axis) begins to move downwards to look for the plate, you can lift the plate and touch the end mill. If the machine responds to it and goes up a bit, everything works, if not, press “Space” on the keyboard to stop the program. Be sure to stop the program if it does not work so that the spindle is not damaged by continuing down the table.

If it does not work properly, try restarting Mach 3 and repeat the procedure.