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.
WorkshopOpen-hardware
Built withESP32Arduino3D printing
- difficulty
- ●●●●○
- time
- a weekend-plus
- license
- MIT
- repo
- repo ACTIVE392 stars
●●●●○ · a weekend-plus · MIT · 392 stars · repo ACTIVE
WHAT YOU’LL NEED
Jump to section
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 current 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 5-inch Nextion touchscreen, PS2 keyboard, ports for a joystick, handwheels and scales, and it can run G-code sent over WiFi; the author says it is cheaper and much easier to build than H4. The documentation is thorough, and the README recommends the drive hardware: a STEPPERONLINE CL57T closed-loop driver with a NEMA 23 three newton metre stepper and a 600 pulse per revolution encoder. That hardware dominates the cost and the final performance. 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.
IN THE REPO
GOOD TO KNOW
- —Three hardware versions published: H2 (Arduino Nano), H4 (ESP32-S3, four axes), H5 (ESP32-S3, touchscreen).
- —EasyEDA projects and Gerber files for each version are in the repository, with BOM and pick-and-place files for H2 and H4 and a priced parts list in the H5 README.
- —Firmware, assembly guides and usage manuals all present.
- —MIT licence with no commercial restrictions.
- —The README recommends a STEPPERONLINE CL57T closed-loop driver with a NEMA 23 3 Nm motor and a 600 PPR optical encoder; the exact encoder model is up to you.
- —You need a lathe to install this on.
Parts to buy
6 itemsFrom our check of the build. Exact quantities and part numbers are in the creator’s BOM.
Can I build this?
Build at your own risk. Projects involve tools, electronics and sometimes mains voltage — follow the creator’s safety notes.
More builds like this
All projectsGallery
Start here
Navigation into the creator’s own docs — we don’t rewrite the guide, we route you to the source.
- 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.Go to the docs folder for your chosen version and read the assembly guide and BOM.(The README recommends a STEPPERONLINE CL57T closed-loop driver with a NEMA 23 3 Nm motor and a 600 PPR encoder.)
- 3.Order the stepper motor, driver and encoder first, then the microcontroller and common parts once you know the driver pinout.(The recommended setup is a STEPPERONLINE CL57T closed-loop driver, a NEMA 23 3 Nm stepper and a 600 PPR optical encoder.)
- 4.Print the enclosure and mounting brackets for your version.(Case files are in each version's folder: STL for H2 and H4 (h4/case), STEP for H5 (h5/case).)
- 5.Follow the wiring diagram, flash the firmware via USB, mount the encoder on the spindle and the stepper on the leadscrew.(H5 ships pre-compiled binaries you flash from the browser; H2 and H4 are compiled from the .ino sources in their folders.)
- 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
- Picking a different stepper driver or encoder than the recommended STEPPERONLINE CL57T, NEMA 23 3 Nm motor and 600 PPR encoder — substitutes can work, but 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 coupled to the spindle without slip or backlash, or the pitch will be wrong. Mounts for the encoder and stepper depend on your lathe — the repository only has a few dimension-specific examples from the older H1 version, so plan on designing your own.
- If you pick H5, buy the exact ESP32-S3 N16R8 board from the parts list — the custom PCB is laid out for it, and other ESP32-S3 boards have different pinouts.
- Swapping the H5's specified 5-inch Nextion NX8048P050 display for a different model — any Nextion works, but you must recompile the screen file and design your own case.
- 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 — the author says it is cheaper and much easier to make than H4, and supports up to 3 axes. H4 supports up to 4 axes.
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?
The repository does not give a price for the motor and driver; check current STEPPERONLINE listings for a CL57T driver with a NEMA 23 3 Nm closed-loop motor. For the H5 controller itself, the README lists part prices, with the 5-inch Nextion display as the largest item.
Does this turn my lathe into a CNC machine?
Partly. H2 is a pure electronic leadscrew: it drives the leadscrew from spindle position for feed and threads. H4 and H5 are described by the author as CNC and electronic leadscrew controllers for up to 4 and 3 axes, and H5 can run G-code (a small GRBL-style subset) that you upload over WiFi, for example generated with his LatheCode tool. It does not control spindle speed.
Community builds
No community builds yet — be the first, we feature the best ones.
Discussion1
FROM THE COMPAREE TEAM
The README recommends a CL57T closed-loop driver, a NEMA 23 3 Nm motor and a 600 PPR encoder, and lists H2, H4 and H5 builds. Which version would you pick for your lathe, and how would you mount the encoder?
Maxim Kachurovskiy
Maxim built NanoEls to remove the change gear swapping job from his own lathe work. He published several versions over time, from the simple Arduino-based H2 to the ESP32-S3 touchscreen version H5, each documented with EasyEDA schematics, Gerber files and assembly guides.
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.
CompareeTEAM1mo agoedited
Practical notes from our verification: the repository is actively maintained, with commits as recent as August 2026, and it covers several generations of the controller (H2 on an Arduino Nano, H4 and H5 on an ESP32-S3). The hardware is published as EasyEDA projects with Gerbers, BOM and pick-and-place files, and the author recommends a specific drive setup: a STEPPERONLINE CL57T closed-loop driver with a NEMA 23 3 Nm motor and a 600 PPR optical encoder. The H5 parts list also names the exact ESP32-S3 board and Nextion display, and swapping the display for another model means recompiling the screen file and redesigning the case. The real decisions are which version to build (H5 is described by the author as cheaper and easier than H4, with up to 3 axes) and how to mount the encoder on your particular lathe. The author has his own YouTube videos linked from the README, and GitHub Discussions holds build examples from other users that are worth reading before you order parts. Correction (4 October 2026): we re-checked this page line by line against the project's own repository, documentation and videos, and fixed errors in earlier versions.