My project to drive the leadscrew of my G4000 with a stepper motor is complete. It's been a work in progress for several months.
The features are:
- measures the spindle RPM then computes the proper stepper speed for the selected feed rate
- feed rates from 1 thou/Turn up to 10 thou/Turn
- forward and reverse
- tachometer
- micro-adjustable electronic stop (after stopping, the leadscrew reverses 1/2 turn to relieve pressure on feed lever)
- generic 1602 LCD display (2 lines of 16 characters) with I2C 2-wire interface
This version is not intended for threading. That's the next challenge.
The microprocessor is an Arduino Nano. This little gem doesn't even break into a sweat when calculating the acceleration profiles in real time (in floating point). I'm only using about 1/3 of the Flash so there's plenty of room for more features. Best of all the Nano cost about $3.50. I can't say enough good things about the Arduino platform. The code is written in C++ and their development environment is pretty good.
It was an interesting exercise to research the stepper acceleration. I found a paper from 2005 by David Austin that worked like a charm in this application. With Mr. Austin's equations, the stepper can achieve about 1600 RPM even though it only needs 1100 RPM at the max feed rate and max spindle speed.
Attached are a few photos of the setup.
I'll be happy to share the schematics and the software if there is any interest.
Overall picture of the system. The cover is off of the power supply.
Close up of the stepper and coupler.
Closeup of the tachometer sensor. Note that the gear train is disconnected.
Front panel of the controller
Arduino Nano with all the wiring.
Micro-adjustable stop sensor
Glen Zoerner
Spicewood, TX