Arduino with stepper motor to steer

Hello i want to steer with encoder + stepper motor so how can i add a limit but be able to turn back

How is it all connected right now and does it work correctly right now?

i haven't connected any thing i wanted to know first if it is possible

Until you can give more details, the answer is perhaps.

1 Like

Okay I want to use arduino one + Dm860I driver with nema 34 stepper motor and 2 stop switches ant each end. then use a analog encoder to steer the stepper motor

And your power supplies for the Arduino and for the stepper motor are?

What will you steer with the motor?

Better, what do you want the motor to do, given switches and an analog encoder?

12v dc for arduino and 24v for driver

I just want the motor to stop so it won't over turn

For that, no Arduino is required and for safety reasons, should not be involved.

To protect from overrun, have the limit switch cut off power or step pulses to the motor.

And the maximum current they can supply to your project is:?

about 200 amps

OK, good. Then finally back to you original question about how to add a limit switch. That answer ALL depends on the physical layout and construction of your device. You need to include something to actually turn your switch on or off as you steer. What do you have in mind to make that work?

Is it sort of like Stepper.h's knob example or AccelStepper's Proportional control, but with an encoder instead of a pot and some limit switches like MobaTools's Stepper Reference Example?

200A at 24V is a dangerous amount of power. Definitely use some limit switches to cut the power electrically for safety, and maybe use a separate switch or two for homing/machine control.

I have in mind a sensor
Something like this

ih

Looks like a reasonable start. Please continue!

Thanks

Do you think that you can help with the program once I get there

Hopefully you mean when you are testing!