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

    Spindle speed control

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    3
    8
    1.1k
    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.
    • TonyPagettundefined
      TonyPagett
      last edited by

      I want to add a PWM output from my Duet3D board to control a VFD and spindle.
      I have a PWM to voltage (1-10v) board that converts a PWM value into voltage. (5v =50%, 10v=100% etc) that connects to my VFD.

      QUESTION:

      Can I use heater 4 (on pin 13 of the Duet board) as a PWM output by using the following in my post processor?

      M307 H4 A-1 C-1 D-1 -- to disable heater 4
      M42 P4 Snnn --to send a PWM value

      A Former User? 1 Reply Last reply Reply Quote 0
      • jay_s_ukundefined
        jay_s_uk
        last edited by

        What firmware version are you on?
        Have you seen M453 which sets the machine in CNC mode to allow the use of M3 and M5?

        Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

        TonyPagettundefined 1 Reply Last reply Reply Quote 0
        • A Former User?
          A Former User @TonyPagett
          last edited by

          my Duet3D board

          presume you have a duet 2 wifi or duet 2 ethernet? running reprapfirmware v2.x?

          Can I use heater 4 (on pin 13 of the Duet board) as a PWM output by using the following in my post processor?
          M307 H4 A-1 C-1 D-1 -- to disable heater 4
          M42 P4 Snnn --to send a PWM value

          by persuming its a duet 2 you're refering to the 50 pin expansion header, that should give you a 3.3v pwm signal, but you might want to use

          https://duet3d.dozuki.com/Wiki/Gcode#Section_M453_Select_CNC_Device_Mode
          https://duet3d.dozuki.com/Wiki/Gcode#Section_M3_Spindle_On_Clockwise_CNC_specific_Laser_on_Laser_specific

          instead of M42, also beware in some case the firmware invert the heater output pins

          1 Reply Last reply Reply Quote 0
          • TonyPagettundefined
            TonyPagett @jay_s_uk
            last edited by

            @jay_s_uk
            I do use M453 cnc mode. How do I assign a particular pin as a PWM output?
            Would it just be a case of M453 P4 R24000 (max spindle speed) and then M3 S255 for max speed?

            jay_s_ukundefined 1 Reply Last reply Reply Quote 0
            • jay_s_ukundefined
              jay_s_uk
              last edited by

              depends of the version of the firmware you are on.
              Whats the output from M115?

              Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

              TonyPagettundefined 1 Reply Last reply Reply Quote 0
              • TonyPagettundefined
                TonyPagett @jay_s_uk
                last edited by

                @jay_s_uk
                v2.03

                I have just been looking at using a fan output instead. M106 P2 Snnn.
                Would this work?

                1 Reply Last reply Reply Quote 0
                • jay_s_ukundefined
                  jay_s_uk @TonyPagett
                  last edited by jay_s_uk

                  @TonyPagett said in Spindle speed control:

                  Would it just be a case of M453 P4 R24000 (max spindle speed) and then M3 S255 for max speed?

                  If your standard heater ports are available I would just use one of those.
                  And yes, it would be as you've suggested, just using the right pin number (and freeing up the pin)

                  I would also consider upgrading to RRF3 when a CNC orientated version of DWC is released as you can also add a direction pin rather than jumpering forward to ground.

                  This is a helpful page. https://openbuilds.com/threads/workbee-cnc-w-duet2-and-chinese-spindle-control.14004/
                  Also connect the grounds on the VFD to a ground on the PSU for the duet (but this would be a DC ground and not an AC ground).

                  I use 3.2 beta 2 on my machine and I have this PWM converter https://www.amazon.co.uk/1-3KHZ-Voltage-Module-Digital-Converter/dp/B0789738RC/ref=sr_1_3?crid=AAYEZCBCA2WZ&dchild=1&keywords=pwm+to+analog+converter&qid=1603813874&sprefix=pwm+to+ana%2Caps%2C160&sr=8-3

                  Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                  TonyPagettundefined 1 Reply Last reply Reply Quote 0
                  • TonyPagettundefined
                    TonyPagett @jay_s_uk
                    last edited by

                    @jay_s_uk
                    Many thanks. I will do a few tests using various options.
                    FYI, my VFD allows me to disable the REV direction (which I have already done to prevent broken end mills!!)
                    Many thanks again.

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