Getting Servo Working



  • 0_1547140344325_2019-01-10 17.08.48.jpg
    Working on getting a servo, driven from Duex 5 board.
    Servo is a Tower Pro MG995. Simple hobby servo.

    Using commands

    M307 H7 A-1 C-1 D-1 To disable heater.

    Then tried

    M280 P7 S100 To move servo

    Followed by various S angle.

    However nothing happens. Have scoped the output pin but nothing doing.

    The photo colours are not so good. Its Brown, Red then orange on plug.

    Am I plugged into correct chanel?

    Thanks for any help


  • administrators

    1. If you put the M307 H7 command in config.g, check whether there is another M307 H7 command in config-override.g that is overriding it. You can send M307 H7 with no additional parameters to check whether heater 7 is disabled.

    2. Confirm that you have VIN power applied and the Duet's 5V regulator is enabled. A USB power source probably doesn't provide enough current to move a servo.

    HTH David



  • I strongly suggest you use a dedicated 5V input power supply, on the 5V EXT connector, as a MG995 can sink a lot of current...



  • The commands I used were in the console.
    I can confirm 5v was on connector. It is all power from a 24V supply. No separate 5V supply.

    Power machine up again this morning and it worked? If I scoped could see pulses and if plugged in servo it moved (as per picture). I had not made any physical changes or programmed changes.

    Using M307 H7 it reported disabled. Thinking this action was causing it to work I reset machine and tried without it and still works. It also works without homing.

    So no real explanation and appologies for wasting time.

    Incidentally where is the H7 if used as a heater? Cannot see it on Duex5 - v0.8 diagram.

    Viv


  • administrators

    H7 heater output is on the 10-way terminal block next to the VIN terminal block. It's labelled E6 on the PCB.


Log in to reply