• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

VFD integration: M3, M4, M5 Macros and RPM measurement

Scheduled Pinned Locked Moved
CNC
6
47
2.7k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    kazolar
    last edited by kazolar 31 Aug 2020, 15:34

    @dc42 I'm sure my dwc is older, but again -- I doubt that's supported in the ooznest workbee dwc anyway -- and I intend to move to that to get a better CNC web UI

    undefined 1 Reply Last reply 31 Aug 2020, 15:34 Reply Quote 0
    • undefined
      dc42 administrators @kazolar
      last edited by dc42 31 Aug 2020, 15:34

      @kazolar said in VFD integration: M3, M4, M5 Macros and RPM measurement:

      @dc42 I'm sure my dwc is older, but again -- I doubt that's support in the ooznest workbee dwc anyway -- and I intend to move to that to get a better CNC web UI

      I understand that Ooznest is porting their changes to DWC 3.1.1. We're waiting on that before we do any work to make DWC more CNC-friendly, because it seems like a good starting point.

      Duet WiFi hardware designer and firmware engineer
      Please do not ask me for Duet support via PM or email, use the forum
      http://www.escher3d.com, https://miscsolutions.wordpress.com

      1 Reply Last reply Reply Quote 1
      • undefined
        kazolar
        last edited by 31 Aug 2020, 15:36

        @dc42 either way -- I figured out how to do the same estop via an m command as hitting estop on the paneldue or webui -- it's a combination if M112 and M999 in one command -- works perfectly

        1 Reply Last reply Reply Quote 0
        • undefined
          kazolar
          last edited by 31 Aug 2020, 15:46

          @dc42 after everything is assembled and cutting I will tweak that behavior to retain the coordinate system. I'd like to be able to mimic mach3 on the way hardware limits are handled. I'm not asking you to implement it -- I'll do it myself. I'm coming at this from a perspective that I've been running duet2 on my quad (dual idex) printer and it's been great with i2c stuff now sorted. I have used other CNCs to build that printer and have become pretty comfortable and familiar with how they operate, and I've talked to many folks who do machining for a living. The behaviors I'm implementing are just features which are present on other CNC targeted controllers. I wouldn't run mach3 on a 3D printer. My goal with this CNC mill conversion is to do it without needing a PC to run it - I'm pretty much there -- some minor firmware adjustments and a better web UI, and it's good to go.

          1 Reply Last reply Reply Quote 0
          • undefined
            Visionary @dc42
            last edited by 5 Sept 2020, 21:05

            @dc42

            Duet 3 can drive Nema 34 motors, as long as you are not looking for both high torque and high speed, which would need more than 32V. We're looking at supporting 48v power in future.

            Can high torque nema 23/24 stepper motors be used with Duet 3 even if calculated back EMF is much higher than 32V? I couldn't find a motor that had small enough voltage requirement (using documentation recommended calculations for back EMF) and high torque.

            Calculated voltages (required due to back EMFs) for few motor candidates (@400 rpm, with about 80% current):
            24HS39-4204D, 52V
            24HP39-5004S, 37V
            23HP45-4204S, 36V

            23HS41-1804S, 78V (I currently have these on my CNC and they seem to stall at about 300 RPM with 24V PSU).

            Main printer: 3-5 Axis, 400x400x450 Duet 6HC || https://grabcad.com/eetu-4/models

            undefined 1 Reply Last reply 6 Sept 2020, 20:46 Reply Quote 0
            • undefined
              cjm @dc42
              last edited by 6 Sept 2020, 08:54

              @dc42 I believe what you propose should cover the vast majority of VFD controllers and would be a good step forwards for CNCers.

              As you suggest, a small board with optos for each of the VFD input pins plus a PWM to analogue voltage converter would provide a straightforward VFD wiring solution. I’d be happy to share my schematic if it would be helpful.

              The only other parameter I would suggest is a delay time to enable the spindle to get up to speed before moving from M3/M4 to the next g-code command. On my spindle, you typically need to wait for around 10 seconds for it to reach the specified speed.

              I am not aware of any controllers that use two separate PWM inputs for forward/reverse, but others may know better,

              1 Reply Last reply Reply Quote 0
              • undefined
                dc42 administrators
                last edited by 6 Sept 2020, 09:19

                @cjm, thanks for the feedback.

                Duet WiFi hardware designer and firmware engineer
                Please do not ask me for Duet support via PM or email, use the forum
                http://www.escher3d.com, https://miscsolutions.wordpress.com

                undefined 1 Reply Last reply 19 Sept 2020, 22:33 Reply Quote 0
                • undefined
                  kazolar @Visionary
                  last edited by kazolar 9 Jul 2020, 04:12 6 Sept 2020, 20:46

                  @Visionary
                  I have 5mm pitch ballscrews and the 23HS45-4204S steppers.
                  Here is what I've been able to do with some experimentation.
                  My PSU is variable voltage, so I tried it at 24v, and 50mm/sec is a no go -- and worse than that, I was getting phase warnings going that fast, dropping to about 30mm/sec works fine.
                  I increased the voltage to 31v, and it was better and 50mm/sec was achievable, but not consistently, 37mm/sec workes every time.

                  I tried 8x microstepping and it was stalling at 50mm/sec. I also was getting phase errors on one axis, I will need to re-check the wiring, not sure why I would get phase errors at 50mm/sec, but none at 37mm/sec

                  Edit again.
                  Might be a wiring and just the issue on the axis. Looks like 50mm/sec may work after I sort all that out at 8x microstepping

                  Last update. It seems the EMF generated by the stepper at 50mm/sec is too much for the duet, there is resonance at 40 mm/sec, and it stalls at 45mm/sec -- so I'm going back to 37mm/sec -- oh well.

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    cjm @dc42
                    last edited by 19 Sept 2020, 22:33

                    @dc42

                    Just tried firmware 3.2 beta 1 with CNC mode configured using the new version of M453 that allows three pins to be defined for spindle PWM, run and fwd/rev.

                    Using this, M3 and M4 are now working very nicely with my VFD/spindle.

                    Thank you!

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      kazolar
                      last edited by 19 Sept 2020, 23:03

                      @dc42 just found that you added the pin assignments -- will definitely try that out -- any thought to the dwell time option -- the dwell would apply to M3, M4, M5 -- do the task, then wait dwell time to move to next line. Basically combining M# with G4. Also if M6 just runs a macro, that would also be really useful. I added that in my code since I added a tool height probe, so M6 runs a macro to doing an assisted toolchange with a tool height probe.

                      undefined 1 Reply Last reply 20 Sept 2020, 07:50 Reply Quote 0
                      • undefined
                        cjm @kazolar
                        last edited by 20 Sept 2020, 07:50

                        @kazolar said in VFD integration: M3, M4, M5 Macros and RPM measurement:

                        @dc42 just found that you added the pin assignments -- will definitely try that out -- any thought to the dwell time option -- the dwell would apply to M3, M4, M5 -- do the task, then wait dwell time to move to next line. Basically combining M# with G4. Also if M6 just runs a macro, that would also be really useful. I added that in my code since I added a tool height probe, so M6 runs a macro to doing an assisted toolchange with a tool height probe.

                        Yes, adding a dwell time in seconds would be the icing on the cake...

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA