I’m building a ‘robot’ to take panorama pictures: basically a motorized camera gimbal. I’m using an Orangutan to generate signals for a stepper motor controller, which in turn drives a stepper motor.
I drive my stepper motors using a controller which has the following inputs:
- Pulse (makes the stepper motor rotate one step)
- Direction (0= anti-clockwise, +5V=clockwise)
To prevent my stepper motor going round too many times (and tear my cables) I would like to have a limit switch. If I had enough IO lines I would just connect a micro switch to the Orangutan and stop turning once I detect a signal. Unfortunately I barely have enough IO lines to drive my steppers and handle other stuff.
What I need is some electronics that prevents my stepper motor from turning in one direction when the micro switch is pressed.
What these hypothetical electronics need to do:
- limit micro switch not pressed ===> Pulse signal always goes through (the limit is not reached, so the motor can rotate both ways)
- limit micro switch pressed and Direction +5V ===> Pulse signal is blocked (the stepper reached it’s clockwise limit)
- limit micro switch pressed and Direction +0V ===> Pulse signal is goes through (the stepper can still rotate anti-clockwise)
In a schematic:
It something like this easy to build with some simple components, or is there an off the self IC that can do this?
Thanks in advance for the help