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

    Duet 3 DC motor control & Tacho Feedback?

    Scheduled Pinned Locked Moved Unsolved
    CNC
    2
    2
    288
    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.
    • HebigTundefined
      HebigT
      last edited by HebigT

      Hello,

      I found this snapmaker CNC tool 2nd hand and I want to use it on a small CNC mill.

      I'll be using a Duet 3.

      The motor itself is supposedly 50W at 24v, and I cannot find any more details online, so far.

      There's a daughter board nearby with the power and other connections (possibly CAN-based?):

      • PWM (guessing speed control)
      • DIR (not sure how this would be handled by duet..)
      • FG (Frequency Generation - possibly a hall sensor?)
      • NC (I'm assuming "no connection" on this one)

      In principle, do you think I can control this motor directly from the board (power, speed control and feedback?)

      I see some docs which recommend using a flyback diode.

      Some also recommend a not sharing ground connection between duet and the motor.

      Any advice is appreciated!

      Spindle.jpeg

      Motor.jpeg

      Daughter_Board.jpeg

      Signals.jpeg

      Connector.jpeg

      droftartsundefined 1 Reply Last reply Reply Quote 0
      • HebigTundefined HebigT marked this topic as a question
      • droftartsundefined
        droftarts administrators @HebigT
        last edited by

        @HebigT Which Duet 3 are you using?

        I had a Google around, but there's really very little info on this spindle as far as I can see. The best info seems to be in the snapmaker forums, ie https://forum.snapmaker.com/search?q=cnc %23snapmaker-20
        I found this thread where someone had take the module apart, and has some information: https://forum.snapmaker.com/t/cnc-spindle-not-running/24696
        Someone replied:

        The FG pin is the frequency generator internal to the motor that tells the machine how fast the spindle is actually going and is irrelevant to what you need.

        So the FG pin is the tacho, but you'll need to put an oscilloscope on it to check the voltage and signal, I would guess, once you get the spindle turning. If it's within specs, you could set up a dummy fan and connect this to a the dummy fan's tacho input. While the Duet can accept a tacho input, it would need to conform to the Intel PC fan specification, which expects 2 Pulses Per Revolution (PPR) from the tacho, and the RPM reading calculated assumes that.

        The PWM pin should set the spindle speed. The thread above talks a lot about 5V and 3.3V traces on the board; try 3.3V PWM, then 5V if it doesn't work. Try using the Laser/Servo/VFD pin, which provides a 5V PWM signal. All other PWM signals switch on the ground side, so you need a circuit to pull them up to whatever voltage you need to drive the PWM signal. Also try different PWM frequencies (Q parameter in M950).

        Again, you'll have to play around with the Direction pin. I guess it's either high or low. So leaving it disconnected should get it spinning one way. Applying a voltage would, I imagine, make it spin the other way. Though it's also possible it is an enable pin, so needs a voltage to work.

        For testing, you could set up a PWM pin to drive the motor only. Use M950 to create an output (use the Laser/Servo/VFD pin) and control it with M42. See https://docs.duet3d.com/User_manual/Connecting_hardware/Motors_servos#connecting-dc-motors

        For actual configuration, see M950 and M453. There's also this page: https://docs.duet3d.com/User_manual/Machine_configuration/Configuration_CNC

        Ian

        Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

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