Rebuild a V6 hotend and change the nozzle the right way
Fix clogs and leaks for good: strip, clean and rebuild a V6-style hotend, then hot-tighten a fresh nozzle.
Shop by category
Shop all componentsEvery FDM printer is three of these axes. You will bolt a NEMA 17 motor, a GT2 pulley and idler and a carriage on smooth rods to a length of 2020 aluminium extrusion, drive it from an Arduino Uno with a CNC shield and stepper driver, home it against a micro switch and move it in millimetres. A drag chain keeps the motor cable tidy.
Set the driver current before connecting the motor, and never unplug a motor while the shield is powered.
Tick anything you already have and the total updates.
Runs the sketch and sends step pulses
Holds up to four drivers and has endstop headers
Stepper driver; set its current before connecting the motor
Frame rail; buy the length you want
Stick-on heat sink: drivers get hot near full current
Quieter driver: plugs into the same socket in step/dir mode (check the pin orientation)
If you later move to a RAMPS board and Marlin, this is its display
Follow the colours: red is power, dark grey is ground, blue is a signal.
Needs a 12 V DC supply of at least 2 A on the shield's screw terminal (bought separately). The Uno itself runs from USB.
linear_axis.inoVerify & upload in Electrolark// CNC shield V3 pins: X step D2, X dir D5, enable D8 (LOW = on), X- endstop D9
const int STEP = 2, DIR = 5, EN = 8, ENDSTOP = 9;
// GT2 belt (2 mm pitch) x 20 teeth = 40 mm per turn; 200 steps x 16 microsteps per turn
const float STEPS_PER_MM = 200.0 * 16 / 40.0; // = 80
const float MAX_MM = 300; // usable travel, set for your build
long pos = 0; // current position in steps
void pulse(int us) { digitalWrite(STEP, HIGH); delayMicroseconds(5); digitalWrite(STEP, LOW); delayMicroseconds(us); }
void home() {
digitalWrite(DIR, LOW); // towards the endstop; swap if it runs away
while (digitalRead(ENDSTOP) == HIGH) pulse(400);
digitalWrite(DIR, HIGH);
for (int i = 0; i < 5 * STEPS_PER_MM; i++) pulse(800); // back off 5 mm
pos = 0;
Serial.println("Homed");
}
void moveTo(float mm) {
mm = constrain(mm, 0, MAX_MM);
long target = mm * STEPS_PER_MM;
digitalWrite(DIR, target > pos ? HIGH : LOW);
while (pos != target) { pulse(250); pos += target > pos ? 1 : -1; }
Serial.print("At "); Serial.print(mm); Serial.println(" mm");
}
void setup() {
pinMode(STEP, OUTPUT); pinMode(DIR, OUTPUT); pinMode(EN, OUTPUT);
pinMode(ENDSTOP, INPUT_PULLUP);
digitalWrite(EN, LOW);
Serial.begin(115200);
home();
Serial.println("Type a position in mm");
}
void loop() {
if (Serial.available()) {
float mm = Serial.parseFloat();
if (mm >= 0) moveTo(mm);
}
}
The sketch above runs here on a simulated Arduino Uno. Move the sliders for the sensors and buttons it reads, and watch the Serial monitor, display and outputs change.
The coil pairs are mixed up. Find each pair with the multimeter (low resistance between the two wires of one coil) and swap the middle two wires.
Swap the DIR level in home() or turn the motor plug round.
Raise the delay in pulse(), check the belt tension and the driver current, and make sure the carriage slides freely by hand.
The sketch assumes 1/16 microstepping. With no jumpers the A4988 does full steps: use 200 / 40 = 5 steps per mm.
Yes, the shield has Y and Z sockets (step D3/D4, dir D6/D7) and the same enable pin.
Yes. Flash GRBL to the Uno and send G-code from a sender program; the pin map matches the CNC shield.
One turn is 200 full steps x 16 microsteps = 3200 steps and moves 20 teeth x 2 mm = 40 mm of belt.
17 parts: Uno R3 CH340G ATmega328p Compatible Development Board, CNC Shield V3 for Arduino UNO – A4988 DRV8825 Compatible, Makerbase MKS A4988 Stepper Motor Driver, NEMA 17 2.6 kg-cm Stepper Motor 42HS34-0404 D-Type, GT2 20-Tooth Timing Pulley, 5mm Bore for 6mm Belt, Generic 2GT 20-Tooth 6mm Belt Idler Pulley – 5mm Bore, GT2 6mm Open Timing Belt for 3D Printers – 1 Meter, GT2 6mm Timing Belt Tensioner Torsion Spring – 5 Pcs, EasyMech 20×20 4T Slot Aluminum Extrusion Profile 100mm, EasyMech Cross/Plus 2020 Aluminum Profile Bracket, plus 7 more. Tools: 24 in 1 Precision Screwdriver Set. On this page you can tick the parts you already have and add only the rest to your cart.
It is a intermediate project and takes about 1 day. The build on this page has 6 steps.
No. This page has the complete, tested code (linear_axis.ino).
Yes. The Run it panel under the code runs this exact sketch on a simulated board. Move the sliders or press the buttons for the sensors it reads, and the Serial monitor, display and outputs react as they will on the real build. It is a simulation, so real readings depend on your parts and wiring.
About ₹3,287 for the parts at the prices on this page, plus tools if you do not have them. Quantity price breaks lower the cost when you build several.
Steps per millimetre for a GT2 belt and 20-tooth pulley; Setting stepper driver current (Vref); Homing against an endstop; Belt tension and why it matters for print quality.
Set the driver current before connecting the motor, and never unplug a motor while the shield is powered.
Ideas that reuse this build: Add auto bed levelling and a PEI sheet to a printer. They are listed under Take it further on this page.
Fix clogs and leaks for good: strip, clean and rebuild a V6-style hotend, then hot-tighten a fresh nozzle.
Stop re-levelling by hand: fit a CR Touch probe and a textured PEI spring-steel sheet for first layers that just stick.
Unbox, level, slice and print: a phone stand, a cable clip and a calibration cube, with the checks that save most beginners a week.
Choose the right engineering filament for outdoor parts: a UV-stable box, a soft seal and a stiff carbon-fibre bracket.
Learning project. Check every circuit and the datasheet of each part before you power it up.
A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.