Programming an endstop for an extruder

Hello

I Am bulding a 3D Printer. I use a Radds board with extension and an arduino due.

I have a tool changing system with three hotends.
The hotends are assembled on a plate, so the Stepper Motor has to turn until the right hotend is selected. This motor is configured as a extruder 4.

I already installed 3 endstops for xyz-axis. But I also need a endstop for the tool changing system.
This endstop will be placed on a left space on the board for example y_max.

But currently I have no idea how to programming an endstop for an extruder in the configuration.h file.

Does someone have any suggestions for this problem, or does someone has this problem already solved?

Thanks in advance mates!

Cheers!

Comments

  • Firmware also supports extra stepper driver also they can not be used during moves, they can be used using G20x commands when motion is stopped. One version also supports end stops. So use these drivers instead and put the G20x commands in the extruder select script of firmware. Then you also need no 4th extruder which is a hack you do not want anyway.
  • Thank you. I thought about this too.
    But how do I programm the endstop for the extra motor in the config.h file?

    I don’t have any idea....
  • See github config file at the end

    // #define MOTOR_DRIVER_x StepperDriverWithEndstop<int stepPin, int dirPin, int enablePin,bool invertDir, bool invertEnable,int endstop_pin,bool minEndstop,minEndstop, bool endstopPullup> var(300,10,50)
    #define MOTOR_DRIVER_1(var) StepperDriver<E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, false, false> var(100.0f, 5.0f)

    You see if you use StepperDriverWithEndstop there is a endstop pin/pullup/invert setting for one endstop. Hope it works as I do not have a printer for testing this.
  • edited July 2019
    I tried it with your suggestion. But something went wrong. (picture in attachement)

    I hope you can find the problem.

    Thank you very much.

    https://forum.repetier.com/uploads/editor/04/qfgjef2kp3j4.jpeg
  • Does somebody have any idea? I can’t find the mistake... I checked it several times...
  • I wrote MOTOR_DRIVER_1(var) while you replaced var by u and continued to use var afterwards. That is syntaxtically wrong.
  • I tried it as you said, but there is always coming the same mistake notice "Stepper driver with end stop does not name a type". 

    Do you know where the problem is?


  • you have removed (u) but did not add the (var) instead!
  • Thank you. It worked.
    I tried to change the position with the command G201 P1 X"Distance to travel". The tool-changer is turning, but whatever travel distance I set, the changer always travels the same distance...
    Another point is, that I can't travel in positive or negativ direction twice. I need always to switch between positive and negativ direction. Due to this I can't reach the end stop to for triggering. 
    Do you know why?
Sign In or Register to comment.