Go Down

Topic: stepper.h Homing on Setup with limit switch (Read 106 times) previous topic - next topic

esd125

Hi guys, im new to stepper motor. Im using l298n driver to nema 23.. i want to home the stepper motor on setup using limit switch... help please with the code. Thanks

groundFungus

Step the motor 1 step, check the switch, if the switch is open step again and check the switch and so on until the switch is closed.  Stop stepping and set the position to zero.  Often, once the motor is homed and zeroed, people will move the motor a small amount to move it off of the switch.

Since you are new to steppers, this may help   and   this, too.

Robin2

An L298 is unlikely to be a suitable driver for a Nema 23 motor

Post a link to the datasheet for your motor.

...R
Stepper Motor Basics
Simple Stepper Code
Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up