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

    PWM to Voltage Converter Issues - Again!

    Scheduled Pinned Locked Moved
    CNC
    5
    19
    792
    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.
    • Nightowlundefined
      Nightowl
      last edited by Nightowl

      Happy new Year!

      Sorry to start a new thread on this, but I think the previous one got a bit, erm, tangled.

      I have a Duet3 MB6HC v1.01 control board running RRF 3.4.5 with a Sorotec (Mafell) digitally controlled spindle via a PWM to Voltage converter, but I can't seem to get the speed tuned up properly.

      I'm inclined to trust the 6HC to output the correct PWM to the converter, and the milling motor to convert the voltage from the converter into a spindle speed, believing it's the converter in the middle that seems to be the issue, but now I'm not so sure...

      Here goes...

      The spindle's speed is controlled by the voltage in, with the following specification:

      0.0V input produces 4,000rpm
      2.0V input produces 8,200rpm
      4.0V input produces 12,400rpm
      6.0V input produces 16,600rpm
      8.0V input produces 20,800rpm
      10.0V input produces 25,000rpm
      

      However, when I run M3 Snnnn with those speeds, I get the following measured output voltages from the converter and corresponding speeds from the spindle:

      0.0V input produces 4,066rpm
      2.4V input produces 8,729rpm
      4.1V input produces 12,670rpm
      5.9V input produces 16,371rpm
      7.4V input produces 20,065rpm
      8.6V input produces 23,052rpm
      

      The voltage measured with a Robin analogue multimeter and spindle speeds with a cheap laser tachometer, but the graph lines for both sets of data are similar, which makes me wonder if the Duet3 is wonky (but I have no idea how to test this) or if the converter is the wonky piece.

      Because chip load is important in a CNC machine, I'm hoping to get these speeds as accurate as possible (i.e. program 10,000rpm and get 10,000rpm), so if anyone has some pointers, I would be grateful.

      Note: I have adjusted the converter's little brass screw, but the graph lines for the outputs are fairly consistent.

      Thank you

      Few things are more dangerous than taking the advice of someone who thinks he knows what he's doing.
      I'm still on my learning curve, so take everything I say with caution!

      RatRig 1075, Duet3 MB6HC, Sorotec SFM 1000 PV-ER milling motor, Hobbyist

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

        @Nightowl If you disconnect the converter from the Duet and just feed a 100% pwm signal (which is simply 3.3V or whatever the input voltage is for that device), what voltage output do you get?

        Nightowlundefined 1 Reply Last reply Reply Quote 0
        • Nightowlundefined
          Nightowl @gloomyandy
          last edited by

          Hi, @gloomyandy

          I haven't tried that, but I will tomorrow morning.

          I wasn't sure if measuring across the PWM terminals with a voltmeter would give me a true reading, as it's a digital signal, but would I be correct in thinking I should measure across Out9 (in this case) and GND? I'll use a separate cable/plug setup so I don't risk a short circuit on the board

          As the spindle has a maximum of 25,000rpm, should I expect to read 10V across those terminals?

          Thanks

          Few things are more dangerous than taking the advice of someone who thinks he knows what he's doing.
          I'm still on my learning curve, so take everything I say with caution!

          RatRig 1075, Duet3 MB6HC, Sorotec SFM 1000 PV-ER milling motor, Hobbyist

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

            @Nightowl I'm not sure you understood my suggestion. I wasn't suggesting you measure the output from the Duet board, rather I was suggesting you feed a 100% pwm signal (which basically means a signal that is on all of the time), into the pwm to voltage converter and then measure the output from the converter. That voltage should be 10V if it is not then you need to adjust the converter until it is.

            Nightowlundefined 1 Reply Last reply Reply Quote 0
            • Nightowlundefined
              Nightowl @gloomyandy
              last edited by

              @gloomyandy
              No I didn't, sorry, and I'm not sure I do now 😵

              With it all connected as is and entering M3 S25000 in the command line, doesn't that provide a "100% PWM signal"? If so, the output is only 8.6V.

              But, at the lowest settings, the spindle speed is high, but at the higher settings, the speed is low (probably because it only achieves 8.6V).

              If I were to adjust the upper end to provide 10V, wouldn't that make the lower end speeds even higher?

              Sorry if I'm being a bit slow...

              Few things are more dangerous than taking the advice of someone who thinks he knows what he's doing.
              I'm still on my learning curve, so take everything I say with caution!

              RatRig 1075, Duet3 MB6HC, Sorotec SFM 1000 PV-ER milling motor, Hobbyist

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

                @Nightowl Since you have decided to start a new thread on this topic, you should post details of the converter you are using and your config.g file. Otherwise folks need to go looking for your previous thread...

                I'm assuming you are using a converter that maps a 0% PWM signal to 0V and 100% PWM to 10V like this device does: https://www.amazon.co.uk/voltage-module-Voltage-Converter-Digital-Analog/dp/B07X2KB4X3

                I'm trying to give you a way to separate a potential Duet problem from a potential problem with your PWM converter. As I said above, disconnect the Duet and simply feed a constant 3.3V (or 5V of that is what your PWM converter takes) into the input. If that does not generate 10V output then the PWM converter is at fault (you may be able to correct it by adjusting the converter, but without details of what you are using it is hard to say). You then need to repeat the process with a 0V input to the converter and measure the output again. If you can't get the converter set up to generate 0V with a 0% PWM signal and 10V with a 100% PWM signal then you may need to think again about your setup.

                alankilianundefined Nightowlundefined 3 Replies Last reply Reply Quote 0
                • alankilianundefined
                  alankilian @gloomyandy
                  last edited by

                  Also, there's a calibration procedure listed in that ad:

                  Input a signal with 50% duty cycle and 3.3V amplitude to DIN- and DIN+.
                  The frequency is 1-3KHZ.
                  
                  Use a multimeter to measure two ports of AO and GND.
                  Adjust the potentiometer on the board to make the multimeter display 5.40V
                  

                  It's a bit of a mystery to me why they want a 50% duty cycle to output 5.4 Volts, but that's what it says anyway.

                  Can you use the Duet to generate different PWM duty cycles (like 0, 50 and 100%) and measure the OUTPUT votlage of the converter when it's not connected to the spindle controller?

                  SeemeCNC Rostock Max V3 converted to V3.2 with a Duet2 Ethernet Firmware 3.2 and SE300

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

                    @alankilian You don't need a duet to generate 0% and 100%. Using those signals eliminates the Duet board. That calibration process makes no sense to me either, why would you want a 50% signal to generate 5.4V rather than 5V?

                    Nightowlundefined 1 Reply Last reply Reply Quote 0
                    • Nightowlundefined
                      Nightowl @gloomyandy
                      last edited by

                      @gloomyandy said in PWM to Voltage Converter Issues - Again!:

                      Since you have decided to start a new thread on this topic, you should post details of the converter you are using and your config.g file. Otherwise folks need to go looking for your previous thread...

                      Ok, sorry.

                      This is a link to the converter I'm using, which appears to be similar to the one you linked to.

                      The spindle section of the config.g file is shown below:

                      ; Milling motor and relay configuration
                      M950 R0 C"vfd+out7" L4000:25000 Q1000	; enable router relay on out7
                      M563 P0 S"George" R0 			; assign spindle 0 to tool 0 and name it George
                      T0					; select tool 0
                      M5					; ensure motor is turned off
                      

                      Note: out7 enables/disables the relay providing mains power to the spindle. This is because the minimum speed, when connected to a digital interface is 4,000rpm (not 0rpm).

                      I've attached the config.g as a .txt file, in case you want to check it out.

                      What I needed to be sure of was that "...feeding a 100% signal..." to the converter is exactly the same as "...applying 3.3V..." to it, although it seems this one requires 5V (according to the product page), but I understand that now.

                      I'll test it tomorrow and report back here.

                      Thank you 👍

                      config.txt

                      Few things are more dangerous than taking the advice of someone who thinks he knows what he's doing.
                      I'm still on my learning curve, so take everything I say with caution!

                      RatRig 1075, Duet3 MB6HC, Sorotec SFM 1000 PV-ER milling motor, Hobbyist

                      1 Reply Last reply Reply Quote 0
                      • Nightowlundefined
                        Nightowl @gloomyandy
                        last edited by

                        @gloomyandy

                        Tested the converter and it is defective. I cannot get more than 8.4V out from the spindle control pins when I actually need 10V, so a new one is on order!

                        Thanks for pointing me in the right direction in getting this sorted.

                        Few things are more dangerous than taking the advice of someone who thinks he knows what he's doing.
                        I'm still on my learning curve, so take everything I say with caution!

                        RatRig 1075, Duet3 MB6HC, Sorotec SFM 1000 PV-ER milling motor, Hobbyist

                        1 Reply Last reply Reply Quote 1
                        • Nightowlundefined
                          Nightowl @gloomyandy
                          last edited by

                          @gloomyandy

                          I've ordered two of these, from different manufacturers (at least as far as the trading name goes) but both of the new ones have an output of between 0 and 8.6VDC, and turning the small screw has absolutely no effect at all.

                          The input voltage is 12VDC (measured) and the PWM voltage is 5VDC (measured) to get an output of 8.4VDC, or a PWM voltage of 0VDC to get an output of 0.0VDC

                          So now I'm clean out of ideas.

                          Few things are more dangerous than taking the advice of someone who thinks he knows what he's doing.
                          I'm still on my learning curve, so take everything I say with caution!

                          RatRig 1075, Duet3 MB6HC, Sorotec SFM 1000 PV-ER milling motor, Hobbyist

                          dc42undefined T3P3Tonyundefined 2 Replies Last reply Reply Quote 0
                          • dc42undefined
                            dc42 administrators @Nightowl
                            last edited by

                            @Nightowl can you trace the schematic of them?

                            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

                            Nightowlundefined 1 Reply Last reply Reply Quote 0
                            • Nightowlundefined
                              Nightowl @dc42
                              last edited by Nightowl

                              @dc42
                              Not very well, I'm afraid. What would I need to know?

                              I could provide a photo 🙄

                              Few things are more dangerous than taking the advice of someone who thinks he knows what he's doing.
                              I'm still on my learning curve, so take everything I say with caution!

                              RatRig 1075, Duet3 MB6HC, Sorotec SFM 1000 PV-ER milling motor, Hobbyist

                              dc42undefined 1 Reply Last reply Reply Quote 0
                              • dc42undefined
                                dc42 administrators @Nightowl
                                last edited by

                                @Nightowl I have one somewhere, but it may take me a while to find it.

                                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

                                Nightowlundefined 1 Reply Last reply Reply Quote 0
                                • Nightowlundefined
                                  Nightowl @dc42
                                  last edited by

                                  @dc42 Isn't it in the cupboard, behind the clock?

                                  That's where I keep finding 'lost' stuff 😁 😁

                                  Few things are more dangerous than taking the advice of someone who thinks he knows what he's doing.
                                  I'm still on my learning curve, so take everything I say with caution!

                                  RatRig 1075, Duet3 MB6HC, Sorotec SFM 1000 PV-ER milling motor, Hobbyist

                                  1 Reply Last reply Reply Quote 0
                                  • T3P3Tonyundefined
                                    T3P3Tony administrators @Nightowl
                                    last edited by

                                    @Nightowl said in PWM to Voltage Converter Issues - Again!:

                                    've ordered two of these, from different manufacturers (at least as far as the trading name goes) but both of the new ones have an output of between 0 and 8.6VDC, and turning the small screw has absolutely no effect at all.

                                    I would return them as faulty as a start!

                                    www.duet3d.com

                                    Nightowlundefined 1 Reply Last reply Reply Quote 0
                                    • Nightowlundefined
                                      Nightowl @T3P3Tony
                                      last edited by Nightowl

                                      @T3P3Tony

                                      Yup, they're gone!

                                      Further to this, though... The one that does come close still only provides 9.6VDC, and that's with the brass screw all the way in, but I had to use 24V directly from the PSU, not 12V/GND supply adjacent to the VFD/Laser/Servo Driver header.

                                      I really don't understand why the converter won't give the 10V the spindle needs.

                                      Perhaps it's time to persuade Duet to design it into the control board 🙄 🙄

                                      Few things are more dangerous than taking the advice of someone who thinks he knows what he's doing.
                                      I'm still on my learning curve, so take everything I say with caution!

                                      RatRig 1075, Duet3 MB6HC, Sorotec SFM 1000 PV-ER milling motor, Hobbyist

                                      1 Reply Last reply Reply Quote 1
                                      • Nightowlundefined
                                        Nightowl
                                        last edited by

                                        So, I've been out to the workshed (too small to be a workshop, too big to be a toolshed) and, with the (cheapest) PWM-Voltage converter managed to achieve the following:

                                        Programmed - Actual Speeds
                                        M10000 gives 10,150rpm
                                        M14000 gives 14,010rpm
                                        M18000 gives 18,000rpm
                                        

                                        As this is the speed range within which I primarily use the spindle, I think that'll do!

                                        Thanks to you all for your help!

                                        Few things are more dangerous than taking the advice of someone who thinks he knows what he's doing.
                                        I'm still on my learning curve, so take everything I say with caution!

                                        RatRig 1075, Duet3 MB6HC, Sorotec SFM 1000 PV-ER milling motor, Hobbyist

                                        alankilianundefined 1 Reply Last reply Reply Quote 1
                                        • alankilianundefined
                                          alankilian @Nightowl
                                          last edited by

                                          @Nightowl EXCELLENT!!!

                                          SeemeCNC Rostock Max V3 converted to V3.2 with a Duet2 Ethernet Firmware 3.2 and SE300

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