Im trying to build a circuit with a PICAXE to drive a 12VDC motor setup with forward, reverse and stop. I need the PICAXE source code set up for this operation:
1st configuration: The DC motor should only rotate forward and reverse 0 to 90 degrees. When it reaches 90 degrees a limit switch should then stop the motor and then go into reverse to go back to 0 degrees then the other limit switch stop the motor. Then at a random time between 3 to 10 seconds trigger the motor again to 90 degrees and repeat the cycle.
2nd configuration: Motor to go forward at 90 degrees then sense an overcurrent then reverse in the other direction at 0 degrees then sense overcurrent since it has reached its limit then stop. Repeat the cycle waiting 3 to 10 seconds randomly before it starts the new cycle again. The sense current circuit should be detected once the motor has reached its end points since the motor will be drawing more current when it has reached its end point limit stops.
I would like a circuit and program for both configuration.
Any help would be appreciated
1st configuration: The DC motor should only rotate forward and reverse 0 to 90 degrees. When it reaches 90 degrees a limit switch should then stop the motor and then go into reverse to go back to 0 degrees then the other limit switch stop the motor. Then at a random time between 3 to 10 seconds trigger the motor again to 90 degrees and repeat the cycle.
2nd configuration: Motor to go forward at 90 degrees then sense an overcurrent then reverse in the other direction at 0 degrees then sense overcurrent since it has reached its limit then stop. Repeat the cycle waiting 3 to 10 seconds randomly before it starts the new cycle again. The sense current circuit should be detected once the motor has reached its end points since the motor will be drawing more current when it has reached its end point limit stops.
I would like a circuit and program for both configuration.
Any help would be appreciated