Here's the project:
I press a momentary switch, it starts a motor moving until a limit switch is depressed. The motor then stops. When the momentary switch is pressed again, the motor moves in reverse until another limit switch is depressed.
IN- LimitSwitch1
IN- LimitSwitch2
IN- ActivateSwitch
I am a little confused on how to reverse the motor. I know i can just revrese the polarity, and it will switch directions. However, I will probably need a relay or something to drive the motor.
First off, how should i work with the motor? One idea is to have a output pin on the IC connected to the + lead on the motor, and another one to the - lead. When i want to go forward, i drive the + pin high, and when i want to go backwards, i drive the - pin high. Second, do i need a microcontroller for this or no? Any help would be appreciated. If you need more explanation from me, let me know.
I press a momentary switch, it starts a motor moving until a limit switch is depressed. The motor then stops. When the momentary switch is pressed again, the motor moves in reverse until another limit switch is depressed.
IN- LimitSwitch1
IN- LimitSwitch2
IN- ActivateSwitch
I am a little confused on how to reverse the motor. I know i can just revrese the polarity, and it will switch directions. However, I will probably need a relay or something to drive the motor.
First off, how should i work with the motor? One idea is to have a output pin on the IC connected to the + lead on the motor, and another one to the - lead. When i want to go forward, i drive the + pin high, and when i want to go backwards, i drive the - pin high. Second, do i need a microcontroller for this or no? Any help would be appreciated. If you need more explanation from me, let me know.