Home switch wiring into S4

Questions about using encoders with the Roboclaw product line
Post Reply
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Home switch wiring into S4

Post by Basicmicro Support »

For fast responses always call or use our online support system. The forums are mainly for user to user interactions.

The default Limit switch settings are pulled up internally and trigger when you pull the signal line to ground. So a NO switch should do just that. I recommend using an external pullup resistor(1k or 4.7l) to 5v if your signal wire is more than a couple feet though.

Common Roboclaw Ground is the battery/power source - which is usually the ground of your entire system. In no case should there ever be a negative voltage on the Roboclaw anywhere. That would be very bad.

PE1 is a Position Error Limit error. This is disabled by default so it appears you have set a non-zero value in the Position Error Limit setting. Until you have a working PID this should not be set. It basically tells the Roboclaw if the current position is +- more than the Position Error Limit at any instant to stop the motor. This will only work properly if your PID is setup correctly(with low error) AND you are using proper accel and decel values. Why the later? Because you can't tell a motor to instantly change its speed and expect it to change its speed instantly. Which not using proper accel/decel settings is exactly what you end up telling it to do, so the Position error instantly goes high and you get the error and the motor stops.

Post Reply