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

    MQL System with Diesel Heater Pump

    Scheduled Pinned Locked Moved
    CNC
    3
    8
    302
    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.
    • NineMileundefined
      NineMile
      last edited by

      So I bought a Diesel heater pump on a whim that I'm planning to use for an MQL lubrication system on my CNC.

      These pumps are activated by a pulse (in this case 24v) and flow rate can be controlled very accurately by varying the pulse frequency, so for example at 1Hz the pump would dispense ~57ml of fluid an hour.

      I'd like to control this via RRF, but my understanding is it's not currently possible to dynamically vary the frequency of a GPIO pin using M42, only the pulse width.

      These pumps require a fixed pulse width of ~40ms but the frequency needs to be varied to control the flow rate. Can this be achieved with RRF?

      Pic of pump below.

      IMG_20241017_125535.jpg

      gloomyandyundefined 1 Reply Last reply Reply Quote 0
      • gloomyandyundefined
        gloomyandy @NineMile
        last edited by

        @NineMile You should be able to vary the PWM frequency using the Q parameter to M950. I assume you will not be changing it that often? One thing I'm not sure about is how low a frequency you can actually generate. I don't think you will be able to set Q any lower than 1 and it is an integer I think. You may also need to adjust the M42 value when you change the frequency. I'm also not sure how glitch free changing the frequency will be, in the STM32 version we free and reallocate the timer when you change the frequency as we do not expect that to happen very often and doing that maximises that chance of being able to use a hardware timer.

        NineMileundefined 1 Reply Last reply Reply Quote 0
        • NineMileundefined
          NineMile @gloomyandy
          last edited by

          @gloomyandy At lower than 1Hz I could maybe drive the pin by toggling it from 1.0 to 0.0 via M42 in daemon.g, but that quickly becomes an issue if wanting to go much above say... 4Hz 🤔

          gloomyandyundefined 1 Reply Last reply Reply Quote 0
          • gloomyandyundefined
            gloomyandy @NineMile
            last edited by

            @NineMile What's the lowest (and highest) frequency you are likely to need? Maybe just try hooking it up and see how well it works?

            NineMileundefined 1 Reply Last reply Reply Quote 0
            • NineMileundefined
              NineMile @gloomyandy
              last edited by

              @gloomyandy Reasonably... probably 0.5Hz minimum and maybe 5Hz max.

              I just tried it out in a macro:

              while { iterations < 25 }
                  M42 P1 S1
                  G4 P80
                  M42 P1 S0
                  G4 P120
              

              Ran that a couple of times to prime the pump and then started getting oil out of it, so it does work at ~5Hz, but whether or not that can be done reliably in daemon.g I don't know.

              gloomyandyundefined 1 Reply Last reply Reply Quote 0
              • gloomyandyundefined
                gloomyandy @NineMile
                last edited by

                @NineMile Have you tried doing 1-5Hz just using M950?

                NineMileundefined 1 Reply Last reply Reply Quote 0
                • NineMileundefined
                  NineMile @gloomyandy
                  last edited by

                  @gloomyandy said in MQL System with Diesel Heater Pump:

                  @NineMile Have you tried doing 1-5Hz just using M950?

                  I have a basic implementation of this now that uses M950 for anything equal to or over 1Hz, and then for anything lower I use daemon.g to run the on/off cycle, which seems to work nicely.

                  dc42undefined 1 Reply Last reply Reply Quote 3
                  • dc42undefined
                    dc42 administrators @NineMile
                    last edited by

                    @NineMile one option would be to program an Arduino Micro or similar to count pulses received from the Duet and output a 40ms pulse on every e.g. 10th pulse received.

                    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 0
                    • First post
                      Last post
                    Unless otherwise noted, all forum content is licensed under CC-BY-SA