How to calibrate stepper

88 views
Skip to first unread message

Ross Waddell

unread,
Oct 11, 2024, 4:26:10 PMOct 11
to accelstepper
I have a bunch of small steppers with gear reduction hardware but I don't know the step angle or the gear reduction ratio. How can I figure those two things out? I was thinking I could use move(x) with various values to see yields a 360 rotation, but darned if I can find an example sketch.

This is what I use for a stepper where I know all the deets (constant speed):

const float motorStepperAngle = 18.0;     // stepper motor w/o gear reduction
const float actualGearRatio   = 9.677;    // nominal 10:1 for GM12-15BY
const int stepAngle           = 2;        // 1/2 step angle
const float actualRPM         = 60.0;     // measured RPM of spinning dome

  // Calculate AccelStepper setSpeed(x) value based on details above:
  motorRPM  = ((360/(motorStepperAngle/actualGearRatio))*(actualRPM/60))*stepAngle;


This is the one used in the example above:
IMG_2010.jpg
Also, if anyone knows where I can get a JST Sh 1.0mm pitch 4-pin connector cable I would be most appreciative.

Jim Larson

unread,
Oct 12, 2024, 12:07:52 AMOct 12
to accelstepper
I can't think of a way to determine motor step angle independent of the gear ratio when all you know is step rate and measured rpm. If it's really important, then you have to tear a motor apart (assuming you have duplicates) or buy one with known specs.

The JST connectors can be gotten from Digikey (pretty sure), but that will be just the connector body. The contacts are separate and have to be crimped on. Crimpers can be expensive, so you'll want to search for a reasonable one that will work. You could also try AliExpress for a cable with the correct width connector - you might get lucky.

HTH

                 -jim

gjgsm...@gmail.com

unread,
Oct 12, 2024, 12:35:57 AMOct 12
to accelstepper
You could forget about the motor shaft and just keep stepping the motor (counting steps) until you see one rev at the gearbox. Speed calc would be straightforward after that.
JST connectors are common. I Googled: 'buy jst 4 pole 1 mm pitch male cable connector assembly' and got a big selection.

Ross Waddell

unread,
Oct 12, 2024, 1:52:14 PMOct 12
to accels...@googlegroups.com
Thanks, but none of the Google results are SH connector cables.

That’s a good idea of counting the steps in 360 deg - I’ll try that.

On Oct 12, 2024, at 12:36 AM, gjgsm...@gmail.com <gjgsm...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "accelstepper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to accelstepper...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/accelstepper/5e33b062-9702-46fa-b204-deb889a1b82an%40googlegroups.com.

gjgsm...@gmail.com

unread,
Oct 12, 2024, 8:23:07 PMOct 12
to accelstepper
Just add SH to that search...

xy...@blueyonder.co.uk

unread,
Oct 15, 2024, 4:21:43 PMOct 15
to accels...@googlegroups.com

https://www.jst.co.uk/downloads/series/eSH_(21-03-24).pdf

this is the specification page for the connectors ….

 

They are really hard to do by hand particularly the crimps on the wire… the board mounted connectors are easier

 

Steve

 

From: accels...@googlegroups.com <accels...@googlegroups.com> On Behalf Of Ross Waddell
Sent: 11 October 2024 21:26
To: accelstepper <accels...@googlegroups.com>
Subject: [accelstepper] How to calibrate stepper

 

I have a bunch of small steppers with gear reduction hardware but I don't know the step angle or the gear reduction ratio. How can I figure those two things out? I was thinking I could use move(x) with various values to see yields a 360 rotation, but darned if I can find an example sketch.

 

This is what I use for a stepper where I know all the deets (constant speed):

 

const float motorStepperAngle = 18.0;     // stepper motor w/o gear reduction
const float actualGearRatio   = 9.677;    // nominal 10:1 for GM12-15BY
const int stepAngle           = 2;        // 1/2 step angle
const float actualRPM         = 60.0;     // measured RPM of spinning dome

 

  // Calculate AccelStepper setSpeed(x) value based on details above:
  motorRPM  = ((360/(motorStepperAngle/actualGearRatio))*(actualRPM/60))*stepAngle;

 

This is the one used in the example above:

Also, if anyone knows where I can get a JST Sh 1.0mm pitch 4-pin connector cable I would be most appreciative.

--

You received this message because you are subscribed to the Google Groups "accelstepper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to accelstepper...@googlegroups.com.

image001.jpg
Reply all
Reply to author
Forward
0 new messages