Limit Switch Threshold

11 years 5 months ago #29524965 by oneirist
Limit Switch Threshold was created by oneirist
I was trying to use limit switches for a while, and couldn\'t figure it out, then read about the ^04 08 command (the manual says this \"Disables Controller if Encoder detects no movement while power is applied to
the motors\", which I assume is the way the limit switches are supposed to work with the board--by tricking it into thinking the motors aren\'t turning). This command works in that the controller now stops when limit switches are triggered.
However, the motor also seems to be stopping when the encoders themselves go low, or something. I\'ve scoped the signal going into the board, and the encoders oscillate between 1.00 and 4.87 volts, while the limit switches pull the signal to ground. The manual says that a signal less than .5v is needed for the limit switch behavior to occur, but it seems to be occurring already at 1v. I can\'t for the life of me figure out why - Roborun lists a non-zero speed for the short time the motors actually turn. Is there anything I should try?

Please Log in or Create an account to join the conversation.

11 years 5 months ago #29524966 by oneirist
Replied by oneirist on topic Re:Limit Switch Threshold
To clarify: when running the motor in the \"Encoder\" tab of Roborun, the \"switch\" box flickers between red and black. When I scope the voltage, it doesn\'t go below 1v.
This happens for two AX3500 boards that I\'ve tried, so I feel like it must be something I\'m doing wrong, but I don\'t know what that is.

Please Log in or Create an account to join the conversation.

11 years 5 months ago #29524967 by cosma
Replied by cosma on topic Re:Limit Switch Threshold
The 0.5V min specified is the voltage at which for sure the switch will be detected. This doesnt mean that the it would not be detected at 1.0V.

If the resistors to create multilevel signalind do their job, you should be seeing in the Encoder tab of Roborun that the Switch boxes remaining off (black) while you rotate the encoder, during that time you should see the counter change.

Only when you hit the switch should you see the Switch box turn red. At that time the counter will not count or will just have the last digit fluctuate by 1 count.

The encoder error detect is something else. What it does is stop the controller if no counting is detected at all and some power is applied. This would be happening, for example if the encoder failed, or has loose wire(s).

Please Log in or Create an account to join the conversation.

11 years 5 months ago #29524974 by oneirist
Replied by oneirist on topic Re:Limit Switch Threshold
Okay, I\'ll switch around the resistors to make sure that the limit switches aren\'t triggered by the encoders. However, that still leaves me with the problem that the motor doesn\'t stop when the limit switches are triggered. Do you know what could be the problem with that? Is there some configuration flag I have to set? The manual makes it sound like it happens automatically but I can\'t figure it out.
Thanks!

Please Log in or Create an account to join the conversation.

11 years 5 months ago #29524976 by cosma
Replied by cosma on topic Re:Limit Switch Threshold
You will need to enable that function. The enable checkbox is missing from roborun. You should be able to enable it with the console by sending ^04 08. Then reset to activate.

Beware that if you use the wrong limit switch for a given direction, motor will runaway.

Please Log in or Create an account to join the conversation.

11 years 5 months ago #29524978 by oneirist
Replied by oneirist on topic Re:Limit Switch Threshold
Oh, ok. I thought you had said the encoder error detect is something else, though? Or that\'s just how the limit switches work too?

Please Log in or Create an account to join the conversation.

11 years 5 months ago #29524980 by cosma
Replied by cosma on topic Re:Limit Switch Threshold
Encoder error detect protects the controller in case the encoder is locked or disconnected.

Limit switch will stop motion in a given direction when a swith is hit. The motor will be allowed to move to the other direction until the other switch is hit.

Please Log in or Create an account to join the conversation.

11 years 5 months ago #29524982 by oneirist
Replied by oneirist on topic Re:Limit Switch Threshold
But these two functions are both enabled by the same bit (^04 08), and work in the same way, right?

Please Log in or Create an account to join the conversation.

11 years 4 months ago #29524995 by oneirist
Replied by oneirist on topic Re:Limit Switch Threshold
In case anyone comes to this forum later, on my boards (AX3500\'s) the limit switch threshold is about 2V, surprisingly. This means my encoder 0 is at 2.25V, while my encoder 1 is at 4.8V.

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.142 seconds