Rumba32 - controlling two servos

Hello,

trying to configure dev2 Firmware for Rumba32 board.
Since I plan to use BLTouch and try to construct an extruder lift (dual extruder system), I#m testing if two servos can be controlled.

One servo signal at output PA4 works with this configuration (took your Rumba32 Delta Sample)
    configuration_io.h:
        // Servo for z-probe
        IO_OUTPUT(Servo1Pin, 4)
        SERVO_ANALOG(ZProbeServo, 0, Servo1Pin, 500, 2500, 1473)

    configuration.h:
        #define NUM_SERVOS 1
        
        #define SERVO_LIST \
          { &ZProbeServo }

    Result: controllable signal at EXT3 / Pin7 (named PA4) using M340 P0 Sxxx.


Test with mit 2 Servo signals using this configuration
    configuration_io.h:
        // Servo for z-probe
        IO_OUTPUT(Servo1Pin, 4)
        SERVO_ANALOG(ZProbeServo, 0, Servo1Pin, 500, 2500, 1473)
    
        // Servo for Extruderlift
        IO_OUTPUT(Servo2Pin, PD14)
        SERVO_ANALOG(ExtruderLiftServo, 0, Servo2Pin, 500, 2500, 1473)

    configuration.h:
        #define NUM_SERVOS 2
        
        #define SERVO_LIST \
          { &ZProbeServo, &ExtruderLiftServo}

    Result:
    at Ext3 / Pin7 (PA4) the servo signal is missing now
    at Ext3 / Pin5 (named PD14) there is a servo signal
    interesting: the signal at Ext3 / Pin5 can be controlled by
    M340 P0 Sxxx AND at the same time by M340 P1 Sxxx.
    
    and also strange: PA4 is not linked to a timer at the table in ConfigurationPins.h (framework ST STM32) nor at HAL.cpp


Am I missing any definition to get both servo signals to work?
By the way: I tried a lot more combinations with no success.


Thank you very much in advance.

Comments

  • The second parameter in SERVO_ANALOG is the slot used by the servo (0 - 3). You have both at 0 so second one replaces first instance. With
    SERVO_ANALOG(ExtruderLiftServo, 1, Servo2Pin, 500, 2500, 1473)

    It should work as expected.
  • Perfect, now it works!
    Thanks for your quick answer!
Sign In or Register to comment.