Jetson Orin Nano Servo GPIO (The servo keeps vibrating and won't turn)

Hi. I’m trying to move a servo with the Jetson Orin Nano. I have PWMs 15, 32, and 33 enabled from the Tree Overlay. Currently, I have Pin 2 (5V), Pin 33 (signal), and Pin 39 (GND).
I’m using the MG995 servo.I’ve searched the internet for the servo’s duty cycle, and when I try to program it like the .py example, the servo just keeps vibrating and can’t turn at all, not even 0º, 90º, or 180º.

import time

# Pin configuration (physical pin numbering)
GPIO.setmode(GPIO.BOARD)
PWM_PIN = 33  # Physical pin 33 (PWM5 on Jetson Orin Nano)
FREQ_HZ = 50  # Standard servo frequency: 50 Hz → 20 ms period

# Set up PWM
GPIO.setup(PWM_PIN, GPIO.OUT)
pwm = GPIO.PWM(PWM_PIN, FREQ_HZ)
pwm.start(0)  # Start with 0% duty cycle (no signal)

# MG995 typically uses:
#   ~2.0 ms pulse → 180°  → ~10.0% duty cycle
#   ~1.0 ms pulse →   0°  → ~5.0% duty cycle
# However, some MG995 units require slightly wider pulses to reach full range.
# If the servo vibrates at 0°, try reducing the duty cycle slightly (e.g., 4.5%).

DUTY_180 = 10.0   # 2.0 ms → rightmost position
DUTY_0   = 4.5    # 0.9 ms → leftmost position (reduces vibration)

try:
    print("Moving to 180° (right)...")
    pwm.ChangeDutyCycle(DUTY_180)
    time.sleep(1.5)

    print("Moving to 0° (left)...")
    pwm.ChangeDutyCycle(DUTY_0)
    time.sleep(1.5)

finally:
    # Clean up
    pwm.stop()
    GPIO.cleanup()
    print("PWM stopped and GPIO cleaned up.")

The codes I have tried are from GPTs, the references I have found did not work.

I’ve tried different servos and changed the signal pins to 15, 32, and 33, and try different GND. I’ve also tried using an external power supply, but that doesn’t seem to be the problem.
Any recommendations?

I don’t know if this is related, but are you directly driving from the Jetson to the servo? The GPIO output is quite limited in its output current. You would find a similar behavior if there isn’t a buffer to prevent pulling too much current from the GPIO.

Yes, I’m connecting the servo directly to the GPIO on the board in this case. I’ve tried using an external 5V power supply with a common GND for the board and battery, but the servo behaves the same.
I don’t know what else to try.

Hi miguelezalex,

Are you using the devkit or custom board for Orin Nano?
What’s the Jetpack version in use?

Have you also configured them as PWM from pinmux spreadsheet before use?

Please refer to the following thread to verify if those steps could help for your case. Unable to generate PWM with Nvidia Jetson AGX Orin Development Kit - #6 by KevinFFF

Hi Kevin,

I am currently with version Jetpack 6.2.1 with the standard devkit.

I have not configured them as a PWM from the pinmux spreadsheet before use since in theory those pins are already PWM in the expansion header, right?

Also, once activated in the tree overlay, in principle they already output as PWM, right?


It didn’t come out in the capture but I also activated PWM1 (15) later.

I don’t know if this would serve to activate the outputs, or if you were referring to this.

Hi Kevin,
I’ve been following the steps, and even though the PWM output is activated, the servo still vibrates, even after tweaking the code.

In pinmux I have put it like this

Before flashing the jetson, I put the .dtsi in the image ( padvoltage.dtsi, pinmux.dtsi and gpio.dtsi (in the bootloader))
I also change the first line of the pinmux from include “./gpio.dtsi” to include “gpio.dtsi”

On the Orin nano after the flash I got this:


(Although it says ale-desktop is the jetson orin nano)

I went back to the tree overlay and activated the PWM as before, just in case


Also activate pwm1 (15) even though it is not seen in the screenshot

Then I followed the instructions but with my PWM

But the servo, despite the signal, cannot turn and remains as before, vibrating, making mini turns from one side to the other.

I hope you can help me and thank you for your time.

There is no update from you for a period, assuming this is not an issue anymore.
Hence, we are closing this topic. If need further support, please open a new one.
Thanks
~1022

Since you are using the devkit, Jetson-IO has helped you to configure the pinmux of those pins as PWM.

Do you mean that it still not work even if you’ve referred to the steps I shared in another post?
If so, do you have scope to check its signal output? Or do you have another devkit to reproduce the similar issue to clarify if the issue is specific to current board?