LRTimelapse Forum

Full Version: TLSMC using a lead screw instead of a belt
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Sheba,
I have built a slider which has a movement range of 150 mm and a lead screw drive from a NEMA 17 with no gearbox. For one revolution of the lead screw the gantry moves 2mm forward.

I am at a bit of a loss to know what values to enter in the Arduino code for the lead screw as the software is written for a belt drive. Any suggestions please?
Hi Richard,
in my formula is calculated how many steps are needed to move the slider 0.1 mm. And this depending on the used gear and the belt.
In your case with a lead screw it behaves differently.
With a motor without gear, the stepping resolution of the motor controller is set to 1/16 step
#ifdef nogearMotor
   setsteppresolution(steppResS); // 1/16 step

This requires 200 * 16 = 3200 stepps for one revolution. This corresponds in your case a movement of the slider of 2mm. To calculate the number of stepps for a distance of 0.1 mm, the following formula results:

3200 steps = 2mm; Stepps for 0.1 mm> (3200 / (2.0 / 0.1)) = 160 stepps for 0.1mm

For a quick test, change the code:
   steppsP01m = (SPR * SR) / (TEETH * BELT * 10);
steppsP01m = 160;

I hope, that i could helped you!!

Regards, Hans

Update !!
To speed up the movement you can also try the following setting!

#ifdef nogear engine
   setsteppresolution (steppResF); // 1/1 step

That will give you 200 stepps / revolution

steppsP01m = 20;
This only requires 20 steps for 0.1mm movement !!

Regards, Hans
Hi Hans,
These settings did not really work.
The settings that I had adjusted already were as follows, which gave me the best results

#ifdef nogearMotor
const int SPR = 200; // Stepps per revolution of motor NEMA17 = 200
const int SR = 1; // Stepp resolution set for Motor controller 1,2,4,8,16 "setsteppresolution()"
const int TEETH = 1.5; // Number of teeth of the gear 8,12,20...
const int BELT = 1; // pitch of the toothbelt 2,2.5,5 mm …

After reading your instructions I have altered this setting directly

steppsP01m = 20; //(SPR * SR) / (TEETH * BELT * 10);

Now the motor takes 32 steps to make a complete revolution for the smallest movements over the shortest distance. It does bigger movements when it has to travel the full distance. This is fine as it is for doing focus stacking at the moment. I have the Arduino mounted directly above the TLSMC and it takes it's 5v supply directly from it, so cutting down on a battery.
The display is a yellow one. This has the advantage that the text on it is black and so it can still be read when the back light is turned off, which will help to conserve the battery.
Hello Richard,
with your last settings steppsP01m is calculated with 13.3
I made a mistake in specifying
steppsP01m = 20;
Since your motor makes 200 steps per revolution, and thus a distance of 2mm
he needs for 0.1mm 10 stepps !!
So steppsP01m = 10!!
So very similar to your setting
Try if that is better !!

Greetings Hans
Hi Hans,
Yes I also tried 10 and that gave 64 movements of the stepper motor to complete a revolution at the smallest increments, and all at half the pace.