A few weeks ago, the XRP was working well. I was able to program auto movement including servo movement. Today, when I took it out of the box again and powered it on, the servo started rapidly moving back and forth across its full range of motion. I re-imaged the XRP and also tested the servo in the servo 2 port. Neither one had any effect.
I’m hoping the servo’s not dead. This XRP has been nothing but fragile since I started working with it.
The servo has 3 connections. 2 are for power and ground, the third is a PWM control signal. The PWM signal will be an approx. 50Hz signal with a positive pulse width between 1000-2000 micro seconds.
Can you verify what the PWM signal is doing when the servo is moving erratically?
Thanks, how do I check the PWM signal? Also, I checked it again today and instead of the erratic movement, it went immediately to the down position and stayed there.
Just as an FYI, when you turn the XRP on it will run the last program that was run with XRPCode. That may be why you are seeing the servo move.
We have seen this same issue on two of our bots - the servos will start moving with no input, and well outside of the limits in the code. So far, I have no idea what triggers this, but the two units that are experiencing this issue are configured with mecanum drive trains. Any advice is greatly appreciated.
Many times when we see this it has to do with the servo being plugged into the board backwards. Make sure the black wire is going to the pin that is labeled GND.
@SparkFro or @jrw4561 do you have other suggestions?
My suggestions are based on pure speculation. I’ve never personally experienced behavior like this, so I don’t know what would cause it.
- Try adding jumper wires between the header on the board, and the servo cable. Only add jumpers for the GND and 5V pins, do not connect the signal pin. Does it move?
- If so, then it’s probably some kind of power issue. Possibly too much noise from the buck regulator, and that servo may just be hyper-sensitive to power noise. Can try adding a capacitor to the power pins, or use a different servo
- If not, then connect the signal pin. Does it move?
- If so, then there’s some signal being sent to the servo by the control board. Try holding the reset button on the control board to see if the behavior changes. Would also help to connect an oscilloscope to see what’s happening on the signal pin.
- Does it happen with all servos, or just one specific servo?
- Does that servo work fine with a different device?