S4 Homing
Posted: Fri Apr 19, 2019 3:03 pm
I have a Roboclaw 2x15 and am trying to set up homing on S4 but am having trouble because the voltage on the data pin of S4 is not what I expect (the + and - S4 pins are 5V and GND, as expected). With nothing connected, the voltage on the data pin is 1.86V. This is the same whether I use Motion Studio to set the S4 mode to "Motor 1 Home(Auto)","Motor 1 Home(User)", or "disabled". I would have thought that the internal pull-up resistor (which is mentioned in a 2015 forum post and I assume is enabled) would pull this up to close to 5V.
When I hook up a NO switch to S4 like in the figure on pg. 45 of the user manual, I get the following behavior:
- With a 10 kOhm resistor between the data pin and the + pin, the voltage on the data pin goes up to 2.1V, When I close the switch, it goes to near GND (-140 mV) as expected. However, when running the motor backwards to trigger the limit switch the motor does not stop when the switch is closed. I assume that the voltage when the switch is open is not high enough for the controller to recognize that it should be ready to look for an active low voltage to trigger that the motor should stop, correct?
- When I use a 1 kOhm resistor, the data pin voltage is 2.85V when the switch is open, and now the motor stops when running in reverse and the switch is closed.
I am puzzled as to why the voltage is so low on the S4 data pin with the internal pull-up. Is this normal, or is my Roboclaw defective? I notice the same voltage on the S5 data pin under the same conditions.
Is there a recommended resistor value for the external pull-up?
When I hook up a NO switch to S4 like in the figure on pg. 45 of the user manual, I get the following behavior:
- With a 10 kOhm resistor between the data pin and the + pin, the voltage on the data pin goes up to 2.1V, When I close the switch, it goes to near GND (-140 mV) as expected. However, when running the motor backwards to trigger the limit switch the motor does not stop when the switch is closed. I assume that the voltage when the switch is open is not high enough for the controller to recognize that it should be ready to look for an active low voltage to trigger that the motor should stop, correct?
- When I use a 1 kOhm resistor, the data pin voltage is 2.85V when the switch is open, and now the motor stops when running in reverse and the switch is closed.
I am puzzled as to why the voltage is so low on the S4 data pin with the internal pull-up. Is this normal, or is my Roboclaw defective? I notice the same voltage on the S5 data pin under the same conditions.
Is there a recommended resistor value for the external pull-up?