|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Motor Limits
Quote:
|
|
#2
|
||||
|
||||
|
Re: Motor Limits
Limit switches definetly recommended for physical stops over pots. We had a problem last year with a pot rotating with our arm, causing one side to only shut off when it hit the limit switch, and preventing us from turning in the other direction because we designed the code to stop if it hit a certain pot value or the limit switch. A locked arm was pretty close to useless.
On the note of a gate to stop balls, you might want to use a pneumatic or servo instead. It won't be a massive amount of weight to hold back so either of these should work, if you already have pneumatics you might as well use one more (that's what we're going with). |
|
#3
|
|||
|
|||
|
Re: Motor Limits
Well, the gate I think we decided on the window motor. And when the limit switch is hit, it will stop the motor. Will the motor still be able to turn in the opposite direction. BEcause we dont want a locked arm.
And I just went to Radio Shack, they had them. They only had two left. They were only $2.69 so I decided to buy them right then. http://www.radioshack.com/product/in...entPage=search |
|
#4
|
|||||
|
|||||
|
Re: Motor Limits
The limit switches will be listed as "micro switches" in a catalog or at Radio Shack. Digikey and Mouser both have tons of different types. On a really important application, back up a pot with a limit switch set (mounted) to the absolute farthest travel you can allow. The pot works but might not stop a fast moving motor in time to prevent damage.
|
|
#5
|
|||
|
|||
|
Re: Motor Limits
Okay, so we got his code from Salad
Quote:
|
|
#6
|
||||
|
||||
|
Re: Motor Limits
Quote:
NOTE: Yes, our speed controllers are calibrated. Last edited by ForgottenSalad : 06-02-2006 at 01:57. |
|
#7
|
||||
|
||||
|
Re: Motor Limits
That should be the code to stop them. We have it in the code, but haven't tested it yet.
When hit, the limit switch should only stop your motor from moving in one direction, unless their was an error made programming it. What pwms and inputs are you using when it's not working properly? I keep hearing bad things about pwms 13-16, if you're using one of those try a different one. |
|
#8
|
|||
|
|||
|
Re: Motor Limits
Hmm, does that get put some where in the user_routines.c file? If so, what section of it? I woudl liek to see how it works with our motors. Thanks
|
|
#9
|
||||
|
||||
|
Re: Motor Limits
The call to the limit switch function can be put where ever you like it (this will be in a function called in user_routines.c or directly in there), just make sure that it is called AFTER the other code you use to set pwm values. It makes no sense to limit your motor so it can't drive further, then to command it to drive beyond it afterwards, since the last command will be the one the motor sees.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|