ServoMotor PID loop to run on RepRapFirmware ?

  • G'day Folks,

    I am well into a project that will replace the trajectory control logic in a Stratasys uPrint with a Duet. To try and answer some of the 'Why on earth are you trying to do it that way' questions, one of my design constraints is I can not make permanent modifications to the printer.

    The main driver behind the project is the uPrint has excellent motion hardware and a heated build chamber for reliable ABS printing but the closed filament ecosystem makes operating costs unbearable in the academic environment.

    At a block level the uPrint runs an industrial PC for interfacing to the world, a separate trajectory control board that handles all the conversion from GCode to motor phase outputs and a separate power amplifier, switching and distribution board. X/Y/Z are 24V steppers with belt reduction which I can only drive using step +direction. Extruder is a DC servomotor driven by an H-Bridge driver with single ended TTL level encoder feedback to the logic board.

    I am building a fit/function replacement for the industrial PC and trajectory control boards. I am retaining the power board for a whole host of reasons although this has presented a few challenges.

    Interfacing 3V3 logic to TTL, endstops and enclosure heating control is simple enough.
    Controlling the stepper power amplifiers can only be done using step/direction and results in full step motion only. I have a cunning plan to allow microstepping but that is V2 idea and requires permanent modifications.

    My problem is generating the drive logic for the extruder servomotor.
    I have considered;
    Small commercial servo drivers like the machdrive and equivalent, level shift the drive down to TTL and interface that to the OEM power amp. My concern is whether the drives use motor current as part of their PID loop.
    Amateur, open-source servo PID loop implementations on uControllers but have yet to find an implementation with a large and diverse user base to give me confidence in the implementation.
    The UHU controller seems to have been effective but appears to be dormant and unavailable.

    I'm curious whether the Duet has sufficient free capacity to implement a servomotor PID loop?

    Does anybody have experience with converting between step/direction to closed loop servomotor drive ?


  • Hi Pete,

    First, the Stratasys - Intelligent people have cracked the eeprom chip encryption and have allowed to reprogram them to be full again with a raspberry pi. That is openly available. The ABS M30 that the uPrint uses is Sabic MG94. rigidink sells that for example (50€ per kg i think). It is preferred to use that because the stratasys extrudes that at quite a hot temperature - 290c. "normal" abs does not like that, paired with the higher chamber temperature.
    if you want to use cheaper standard ABS, there is a software floating around called Maraca EX- this allows you to change the temperatures.

    Secondly, about servo drives.

    I remember that someone did that conversion already- here it is. it is from a dimension, but the servomotors are similar.

    Hope that helps you.

  • Thanks Max,

    I looked closely at the chip hack for uPrint but in the SE they changed the crypto chip so the tools don't work and I don't have the patience or skillset to figure that one out in anything like a reasonable timeframe.

    Thanks for the imgur link, I hadn't come across that one before. It also lead me to , which I also hadn't come across before.

    My digging has turned up PIC_SERVO


    and YAPSC

    Cost isn't a huge factor but ease of integration and tuning is a much bigger factor for me.

  • Ok sorry, i was unaware of the crypto chip change in the SE.

    the DC motor closed loop control software is what i had in mind, i just wanted to show you the finished project to show that someone used it on a similar project.
    I have some experience with the YAPSC:10V, the standalone version to convert step/dir interface to the +-10V logic that industrial AC servo drives use. But i couldn´t get it to work. So i have 3 boards sitting here collecting dust.
    The original creator of the YAPSC is also no longer active, and no one is using it so it is a dead project.

    If cost isn´t that big of a concern, i would use an ODrive control board since that project is still alive and you can get support. It is a pretty good application for that case since you have an existing servo that you want to retrofit.
    You would just need the 119€ control board, the servo already has the encoder.

    For standalone applications i think that is a pretty bad deal since you also need the motor and encoder, and there are way better options for that which are plug & play ( for example the JMC)

    You just need to check the voltage the motor runs at. I remember diffusely that the two motors in my 768 BST run at 110V, but i could be wrong. The wires are pretty thin tho.

Log in to reply