YOU CAN BUILD A BOX THAT MAKES AN OLD METAL LATHE CUT ANY SCREW THREAD

A stepper motor and an encoder delete the change gear train on a manual lathe, so the thread pitch becomes a number you type instead of a stack of gears you swap.

by Maxim Kachurovskiy

FULL CAD BOM FIRMWARE DOCS

WorkshopOpen-hardware

difficulty
●●●●
time
a weekend-plus
license
MIT
repo
repo ACTIVE374 stars

WHAT YOU’LL NEED

  • 3D printer + filamentprintable parts — files are in the repo
  • Electronic partsfull list with part numbers in the repo BOM
  • Dev board / microcontrollerruns the project firmware

Partner

A portfolio for your buildsShow your work on a clean portfolio site — makers get up to 55% off annual plans.Try Pixpa
1

COMPAREE VERDICT

NanoEls is for someone who already owns a manual lathe and is tired of swapping change gears. The idea is simple: a stepper motor drives the leadscrew, an optical encoder on the spindle tells the controller where the spindle is, and the software keeps them in step. The pitch becomes a number you type. Three versions are published. H2 is the cheap one on an Arduino Nano and does feed, thread pitches, soft limits and multi-start threads. H4 runs on an ESP32-S3, controls up to four axes and adds automatic multi-pass turning, facing and cones. H5 is the newest, also ESP32-S3, with a touchscreen, PS2 keyboard and ports for handwheels and scales, and the author says it is cheaper and easier to build than H4. The documentation is thorough, but the single biggest decision is not in the repository: which stepper driver and encoder to buy. The author recommends a closed-loop driver with a NEMA 23 three newton metre stepper and a 600 pulse per revolution encoder, but does not name a model. That decision dominates the cost and the final performance, and you will spend more time on forums and supplier pages than the repository warns you about. If you have never wired a stepper driver or tuned a closed-loop system, this is not the first project to learn on. If you have, and you are already competent on the lathe, this is a weekend that pays back on the second thread you cut.

NOT IN THE REPO

  • Three hardware versions published: H2 (Arduino Nano), H4 (ESP32-S3, four axes), H5 (ESP32-S3, touchscreen).
  • Hand-drawn schematics and board layouts for each version in the repository.
  • Firmware, assembly guides and usage manuals all present.
  • MIT licence with no commercial restrictions.
  • The repository does not specify which closed-loop driver or encoder model to buy — those are left to the builder.
  • You need a lathe to install this on.

Can I build this?

PrintEnclosure parts for the chosen version (H2, H4 or H5) and mounting brackets for the encoder and stepper.
BuyStepper motor (NEMA 23 recommended), closed-loop driver, optical rotary encoder (600 PPR recommended), microcontroller board (Arduino Nano for H2, ESP32-S3 for H4/H5), touchscreen for H5, and common electronics (resistors, connectors, PSU).
ToolsSoldering iron, multimeter, lathe to install it on, basic hand tools for mechanical mounting.
SkillsIntermediate electronics (stepper driver wiring, encoder installation), beginner firmware (flashing via USB), competent lathe operator — if you have never cut a thread manually, this will not teach you.
TimeA weekend-plus if you have wired steppers before, closer to two weekends if you are choosing and tuning the driver for the first time.
Cost$$ — the stepper, driver and encoder together account for most of it; the microcontroller and enclosure are secondary.
SafetyLathe work carries the usual risks (rotating parts, swarf, workpiece ejection). The electronics are low-voltage. The stepper driver will need a mains-rated power supply if you use a large motor, but that is standard workshop equipment.

Build at your own risk. Projects involve tools, electronics and sometimes mains voltage — follow the creator’s safety notes.

A desktop 3D printer that prints in full colorPartner · Kickstarter
A desktop 3D printer that prints in full color

HeyGears G1: 10M+ colors and transparent parts in one print, plus UV printing on flat objects. Figures, parts and labels — no painting.

See how it prints

Gallery

upload://cmsu6goyu1l2epd1zjaf8r65u/upload-3e9e33c8.jpg
upload://cmsu6goyu1l2epd1zjaf8r65u/upload-f4ffc0c0.jpg
upload://cmsu6goyu1l2epd1zjaf8r65u/upload-1a255418.jpg
upload://cmsu6goyu1l2epd1zjaf8r65u/upload-2723f35c.jpg
upload://cmsu6goyu1l2epd1zjaf8r65u/upload-98f68c73.jpg
upload://cmsu6goyu1l2epd1zjaf8r65u/upload-9c143d71.jpg
upload://cmsu6goyu1l2epd1zjaf8r65u/upload-ee3f8a43.jpg
upload://cmsu6goyu1l2epd1zjaf8r65u/upload-3abf56d1.jpg

Start here

Navigation into the creator’s own docs — we don’t rewrite the guide, we route you to the source.

  1. 1.Read the version comparison in the README and pick H2, H4 or H5 based on how many axes you want to control and whether you want a touchscreen. (H2 is the simplest and cheapest; H5 is the most capable and the author says easier to build than H4.)
  2. 2.Go to the docs folder for your chosen version and read the assembly guide and BOM.(The BOM does not name specific stepper drivers or encoders — you will need to choose those based on your lathe and budget.)
  3. 3.Order the stepper motor, driver and encoder first, then the microcontroller and common parts once you know the driver pinout.(The recommended spec is a NEMA 23 3 Nm stepper, a closed-loop driver and a 600 PPR optical encoder, but the exact models are not specified.)
  4. 4.Print the enclosure and mounting brackets for your version.(Files are in the stl folder for each version.)
  5. 5.Follow the wiring diagram, flash the firmware via USB, mount the encoder on the spindle and the stepper on the leadscrew.(The firmware folder contains pre-compiled binaries and instructions for each version.)
  6. 6.Read the usage manual for your version before you start the lathe.(Each version has a separate usage guide with keybindings and calibration steps.)

KNOWN ISSUES

  • The repository does not name a specific stepper driver or encoder model. You will spend time on forums and supplier pages choosing one, and that choice affects cost, noise, torque and whether it works at all on your lathe.
  • Closed-loop drivers are more forgiving than open-loop ones, but they are also more expensive and require tuning. If you have never set up a closed-loop stepper before, budget time to learn or accept that the first driver you buy might not be the one you keep.
  • The encoder must be mounted to the spindle with no backlash and no runout, or the thread pitch will be wrong. The mounting brackets in the repository are for a generic lathe — yours will likely need a custom bracket.
  • If you pick H4 or H5, the ESP32-S3 board must have enough GPIO pins for the number of axes you want to control. Not all ESP32-S3 boards expose the same pins, and the docs do not list a specific board model.
  • The touchscreen on H5 is not specified by model number. You will need to match the pinout and driver chip yourself, and if you get it wrong, the screen will not work and you will be back to the keypad.
  • This does not teach you how to cut threads on a lathe. If you do not already know how to set tool height, spindle speed and depth of cut, the electronics will not help.

Can I use this on any lathe?

Yes, if the lathe has a leadscrew you can motorise and a spindle you can mount an encoder on. The repository is written for manual lathes without electronic controls already.

Which version should I build?

H2 if you only need the Z axis and want the cheapest build. H5 if you want a touchscreen and are willing to spend more on the ESP32-S3 and display. H4 is the middle option but the author now says H5 is easier to build.

What does a closed-loop driver do that an open-loop one does not?

A closed-loop driver watches the motor position with an encoder built into the motor and corrects for missed steps. An open-loop driver does not, so if the motor stalls or misses a step, the pitch is wrong and you do not find out until the thread is cut.

How much does the stepper and driver cost?

A NEMA 23 closed-loop stepper and driver together typically cost $80–150 depending on supplier and torque rating. That is the bulk of the hardware cost.

Does this turn my lathe into a CNC machine?

No. It controls the leadscrew based on spindle position, so it automates threading and feed. It does not control spindle speed, tool position or run G-code.

Community builds

No community builds yet — be the first, we feature the best ones.

Discussion1

FROM THE COMPAREE TEAM

The repository lists three versions but does not name a specific stepper driver or encoder model — that choice is left to the builder. Which version would you pick, and what driver would you start with?

CompareeTEAM8d ago

Practical notes from our verification: the repository is actively maintained with regular commits through early 2025. The hand-drawn schematics are clear and the assembly guides are thorough, but the single biggest time sink is not documented: choosing the stepper driver and encoder. The recommended spec is a NEMA 23 3 Nm motor and a 600 PPR encoder, but no supplier links or model numbers are given, and that decision dominates cost and performance. We found build logs on hobby-machinist.com and practical-machinist.com where builders discussed driver tuning and encoder mounting — those threads are worth reading before you order parts. The author is responsive to issues on GitHub. No official video walkthrough exists; the good build videos are community-made.

Maxim Kachurovskiy

Maxim built NanoEls to remove the change gear swapping job from his own lathe work. He published three versions over time, starting with the simplest Arduino-based H2 and iterating to the ESP32-S3 touchscreen version H5, each one documented with hand-drawn schematics and assembly guides.

GitHub

Star the project on GitHub

DISCLAIMER

  • Comparee is not the author of the projects featured here. All rights to each project belong to its creator — every page links to the original source, and we never host creators’ files.
  • Information is provided without warranty and may become outdated as projects evolve. Prices are indicative bands only — always check the creator’s parts list for current costs.
  • Building and operating any project is at your own responsibility. Protective equipment, safe workshop practice and compliance with local regulations are the builder’s responsibility.