Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login
    1. Home
    2. Trakyan
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 5
    • Best 0
    • Controversial 0
    • Groups 0

    Trakyan

    @Trakyan

    0
    Reputation
    1
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Trakyan Unfollow Follow

    Latest posts made by Trakyan

    • RE: Has anyone tried using external inputs to on board drivers?

      @fcwilt It's a torch height controller (THC) for a cnc plasma. They're quite common for plasma cutters, they read the arc voltage and move the Z axis up and down accordingly to keep the arc voltage (and thus cutting height) consistent.

      dc42 told me about the height following mode in reprap firmware, but the documentation on it isn't too detailed. I'm not sure how the target value is set. The external controller does a few other things which I don't see a way to do on the mainboard.

      The way a cnc plasma starts a cut is the machine first probes for the material height, moves up to a pierce height, fires the torch, waits for the material to be fully pierced, then moves down to a cut height before starting to cut the given shape.

      The THC is alerted when the machine reaches the cut height via an output pin from the mainboard. It then starts a short timer to allow the machine to move aware from the pierce location and the arc voltage to stabilize to the cut height before it is sampled (the arc voltage at the pierce location is higher than what it would normally be at the cut height, because the pierce creates a wide hole which means the arc needs to be longer to reach the material). I've tried implementing this in gcode with the current smoothie setup, by putting M10 (what I use for the THC on gcode, M11 for off) in at some point after the torch has moved away from the pierce location, but this creates a noticeable stutter/stop-start where it is placed between G1 moves.

      This timer delay is the first need for a separate MCU. The second reason for separate MCU is that it also runs some logic with regards to setting the cut height, and what to do in edge cases, that a simple PID controller cannot do. When the timer runs out, the THC takes a few dozen samples of the arc voltage and takes the average, and sets that as the target voltage. It also has a minimum/maximum arc voltage threshold programmed in, so that if there is any issue with the initial readings it doesn't cause the machine to just climb or dive the Z axis. The minimum/maximum allowable z values in the height follower mode cannot replace this function, since the material is almost never flat, and warps while cutting, so you could start at a high point and have to dive into negative Z values in order to follow the surface of the material. There is also handling of edge cases such as if the cut goes off the edge of the sheet or getting too high off the material, or if the torch ends up touching the material being cut (material can sometimes buckle up or down quickly and violently from the heat warping it), and these need to be handled in a way other than a PID controller.

      TLDR; It can take a bunch of measurements from the plasma cutter arc voltage and take the average to use for the target z height. It can implement a delay so that the target voltage is measured once the machine has moved away from the pierce point (which would otherwise give a reading that is too high). And it can handle edge cases which a PID controller can't.

      posted in Duet Hardware and wiring
      Trakyanundefined
      Trakyan
    • Has anyone tried using external inputs to on board drivers?

      Hi all, I've got a CNC Plasma cutter at work. As part of it's function it requires having an external microcontroller take over the step/dir pins of the Z axis on the mainboard in order to keep the torch at the correct cutting height. The electronics are janky and the firmware is lacking some features for a planned upgrade (Dual Y motors and endstops), so I'm thinking about transitioning to a duet.

      Currently the machine runs on smoothieware which lets me do this by setting the pins on the mainboard as open drain, and supplying 5V to them from the external controller. That way the main board can trigger step/dir signals, but so can the microcontroller (it leaves the pins high then it isn't active, so the mainboard can use them). Does anyone know if something like this is possible on the duet boards? Dc42 said the boards don't have an open drain function but it could be done by setting the step/dir pins as inputs, however I can't find anything in the documentation regarding setting driver pins as inputs, or if this would even allow an external controller to trigger step/dir signals. Has anyone here tried anything similar?

      posted in Duet Hardware and wiring
      Trakyanundefined
      Trakyan
    • RE: Open drain/open collector pin option?

      @dc42 Hi, I'm just still wondering if setting the pins as inputs would let another microcontroller run the stepper driver instead. If so, this isn't something I can find in the documentation. Alternatively is it possible to temporarily delete/free up the Z axis for the height controller to work, and re establish it when it's needed again?

      posted in Firmware installation
      Trakyanundefined
      Trakyan
    • RE: Open drain/open collector pin option?

      @dc42 I could be wrong but wouldn't setting them as inputs not let them function as step/dir signals? Would they be able to pull the step /dir pins low and let the height controller pull them high?

      I hadn't seen the height controller module, and it seems useful, but the issue for my case I think is that the target value changes for different cuts. What I currently do is probe the z axis to find the material, move to a pierce height, fire the torch, move to cut height, here the height controller recieves an "on" signal and starts a timer, the x/y axis start moving, (here I think the biggest issue lies) the timer runs out after some xy travel so the arc voltage has a chance to stabilize away from the pierce point, then the height controller takes a few dozen readings and averages them to make up for a noisy arc voltage, and sets that as the target.

      I'm guessing the dynamic setting of the arc voltage target, the sample averaging and especially the starting midway through a random xy move are going to be easier to do on an external microcontroller. The mcu that does the height controller also doubles with some error handling like pausing the cut if the arc doesn't fire, the reading is too high (sign of worn consumables), etc. I think these will be easier to do off board.

      posted in Firmware installation
      Trakyanundefined
      Trakyan
    • Open drain/open collector pin option?

      Hi there, I'm looking at transitioning the cnc plasma at work from a smoothieware controller to reprap firmware, but have a few questions. On a plasma cutter the torch height controller needs to be able to "hijack" the z axis motor while cutting to keep the cut height constant.

      The way I've done this so far is have the height controller provide a high signal on the step/dir pins which are set to open drain. That way the control board can run the z motor as normal, but the height controlller can take over when cutting. I can't seem to find if its possible to do this on a duet. I can see the documentation for inverting pins and the pullup resistors but nothing about using the pins as open drain. There are some hacky ways of achieving the same outcomes using gcode but they are prone to malfunction, so I'd rather do it properly. If anyone could point me to the appropriate documentation that would be helpful, I might be using the wrong words.

      posted in Firmware installation
      Trakyanundefined
      Trakyan