Converting an X-Carve into a 3D Printer

 

These instructions are a part of Dr. D-Flo's 3D Food Printer series. The X-Controller native to the X-Carve is unable to interface with 3D printer softwares, and popular 3D printer controller boards, such as RAMPS 1.4 and Rambo, have stepper drivers that are unable to power the large motors of the X-Carve. Therefore, Dr. D-Flo has used RAMPs 1.4 with large "external" stepper drivers. Dr. D-Flo is not an electrical engineer, so if there are any errors in these instruction please email him at dflo@drdflo.com with corrections. 


A Closer Look at RAMPS 1.4

Ramps 1.4 - 3D Printer Controller Board - More Info Here

Ramps 1.4 - 3D Printer Controller Board - More Info Here

Pololu - Stepper Motor Drivers

Pololu - Stepper Motor Drivers

RAMPS 1.4 can accept 5 stepper drivers, 3 for the x, y and z axises and 2 for a dual extruder setup. Typically, these are Pololu stepper drivers powered by the Allegro’s A4988 (pictured to the right). The A4988 is only capable of supplying up to 2 amps for a 2-phase stepper motor. This is not enough amperage to power the NEMA 23 (140oz-in) stepper motors that come standard with the X-Carve. Therefore, the Pololu stepper drivers need to be replaced, so it is important to understand how these drivers interface with RAMPS. Each Pololu stepper driver has a pair of 8 pins and RAMPS has 5 pairs of 8 female sockets, one for each stepper driver. However, only 4 of these 16 sockets are important. The 4 important sockets are Pulse, Direction, Enable and Ground (pictured to the right). The Enable pin is optional for idling the power when pausing, but not necessary. These 4 pins will need to be connected to the "external" driver. The replacement stepper drivers Dr. D-Flo used were 5 ST-M5045 by SainSmart. These drivers are capable of driving stepper motors up to 4.5A and have some serious micro-stepping abilities. These drivers are overkill and cheaper options like the SMAKN TB6600 should work as well. Any stepper drivers that accept TTL level input for the direction and step should work. Basically, any stepper driver that accepts GND and 5V logic for the inputs.


Wiring

Click on the image to make it larger.

Use the header wiring kit to create a custom cable harness connecting the Pulse, Direction, Enable and Ground pins of the RAMPS to the driver as pictured above. The Ground pin is in parallel with the negative connections. Braided sleeving will improve the appearance of the wire run.

The jumpers that are typically used to set micro-stepping on the pololu drivers are unnecessary if your stepper drivers, like the ST-M5045, have switches on the side to set micro-stepping. 16 or 32 micro-steps is perfect but not any higher in order to preserve torque. Make sure you make note of your mico-step value for a later step. 


Marlin

Marlin is the firmware used to run RepRap and commercial 3D printers. Marlin needs to be adjusted to work with a specific printer. Follow this calibration guide if you are not building a 3D food printer. The one detail that is not covered in the guide is the minimum_stepper_pulse. By default this value is 0. However, the minimum pulse duration for the ST-M5045 to work properly is 10 microseconds. This was determined from the ST-M5045 datasheet. This setting is found in the configuration_adv.h tab of the Arduino sketch.

Below is Dr. D-Flo's code that only works for a 750mm X-Carve frame. Please note that all thermal protections are turned off (do not use for regular 3D printer).

Following are a couple noteworthy changes that were made to the stock Marlin firmware for the 3D food printer. All changes were made to the configuration.h tab of the sketch.

Disabling Cold Extrusion

#define Prevent_Cold_Extrusion and #define prevent_length_extrude were commented out because the food printer does not have a thermistor or heating element, so all extrusions are cold extrusions. 

Endstops

The X-Carve has 3 endstops (limit switches), one for each axis. However, the z-axis endstop is located at top of of the axis, so #define Use_Zmax_Plug was un-commentated, and #define Use_Zmin_Plug was commented.

The X-Carve assembly instructions have the limit switches wired in a normally open (NO) configuration. Dr. D-Flo wired them in a normally closed (CO) configuration, and did not have to change the code. If you do not change the wiring then all the above statements need to be changed to true.

Movement

Default_Axis_Steps_Per_Unit makes sure that computer distance equals real life distance. This guide does a great job explaining these parameters. 

If your motors are turning the wrong direction then invert them.

These parameters set homing direction and bed size. Remember the Z-axis limit switch is located at max Z-coordinate. Dr. D-Flo underestimated the bed size of the X-Carve to prevent any collisions. 

 

Supplies:

Inventables X-Carve Frame or any CNC Frame + Stepper Motors

Inventables X-Carve Frame or any CNC Frame + Stepper Motors

Stepper Motor Drivers Rated > 3A (x5)

Stepper Motor Drivers Rated > 3A (x5)

Arduino Mega or Clone Available on Amazon 

Arduino Mega or Clone Available on Amazon 

Please note all links to Amazon are connected with Dr. D-Flo's Amazon Associates account. Therefore, any purchases on your part will result in a small monetary kickback to Dr. D-Flo from Amazon. Thank you for your support.