Monday, February 24, 2014

Chinese CNC 3040T Router/Mill through USB Easily

I finally got a CNC Router.  This one is one of the low cost Chinese CNC Routers.  It's a great machine for the price.

The first problem I had with it though was the CNC Controller being Parallel port.  I could've sworn I had a PC laying around that had Windows XP and a Parallel port, but I was wrong.  Wanting to get this Router up and running I decided to look into a USB to Parallel bridge via an Arduino UNO I had laying around.

After doing some research I came accross GRBL (  This opensource firmware for the Arduino will take G code via USB Serial and output the corresponding step/direction signals to a Stepper controller.

I had a female parallel port connector in a bin and straightened out pins 2-7 and just inserted them into the arduino digital pins 2-7. I then connected Pin 25 to GND on the Arduino.

I then downloaded and modified the GRBL source code (pin_map.h) to reflect the YOOCNC pinout to the DB-25 connector.

#define X_STEP_BIT 2 // Uno Digital Pin 2
#define Y_STEP_BIT 4 // Uno Digital Pin 4
#define Z_STEP_BIT 6 // Uno Digital Pin 6
#define X_DIRECTION_BIT 3 // Uno Digital Pin 3
#define Y_DIRECTION_BIT 5 // Uno Digital Pin 5
#define Z_DIRECTION_BIT 7 // Uno Digital Pin 7
Recompiled. Loaded into the Arduino... And within 20 minutes had my Chinese CNC up
and running using a USB port and Gcode sender. 

If you would like to donate to my projects fund, my paypal is:  All donations will contribute to open source efforts and documentation to make others lives easier.  It's a pain trailblazing a new or dirty path, especially with limited funds...