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

    PWM to 10V via e0heater always gives 10V

    Scheduled Pinned Locked Moved
    CNC
    9
    29
    1.9k
    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.
    • larswundefined
      larsw
      last edited by

      Duet wifi 2 and this PWM to 0-10V board http://www.chinalctech.com/m/view.php?aid=76

      Firmware 3.3

      The PWM converter always outputs 10V, no matter what speed I set the spindle to.

      I only have a multimeter, and when I measure the output on the e0heat directly, this does change when I change speed on the spindle. 50% gives 6V for example.

      Have i missed something in the config, or have I wired the e0heat to the PWM converter wrong?

      M140 H-1                       ; disable heated bed (overrides default heater mapping)
      M564 H0 ; allow movement without homing
      M950 R0 C"e0heat" L0:25000 Q2000 ; create spindle on heater0
      M563 P0 S"Spindle 1" R0 ; Create tool for DWC
      G10 P0 X0 Y0 U0 Z0                    ; set tool 0 axis offsets
      G10 P0 R0 S0                          ; set initial tool 0 active and standby temperatures to 0C
      M568 P0 F0			  ; Set Tool 0 to default RPM of 0
      T0		; Select Tool 0
      M453			; Switch to CNC mode
      
      alankilianundefined EducatingSavvasundefined 2 Replies Last reply Reply Quote 0
      • alankilianundefined
        alankilian @larsw
        last edited by

        @larsw How is your PWM converter connected to the Duet?

        Which Duet pin goes to the PWM converter's Ground pin?
        Which Duet pin goes to the PWM converter's PWM pin?

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

        1 Reply Last reply Reply Quote 1
        • JamesMundefined
          JamesM
          last edited by

          Duet boards perform their PWM on the ground side and the positive side stays full voltage. The PWM converter you listed appears to want the PWM on the positive lead so it won't work with the duet. I know I've read there are ways around that but I don't remember what they are.

          larswundefined 1 Reply Last reply Reply Quote 1
          • larswundefined
            larsw
            last edited by

            E0- is connected to GND on the converter
            Heater VIN is connected to PWM on the converter

            cjmundefined alankilianundefined 2 Replies Last reply Reply Quote 0
            • larswundefined
              larsw @JamesM
              last edited by

              @jamesm said in PWM to 10V via e0heater always gives 10V:

              Duet boards perform their PWM on the ground side and the positive side stays full voltage. The PWM converter you listed appears to want the PWM on the positive lead so it won't work with the duet. I know I've read there are ways around that but I don't remember what they are.

              That makes sense with my observations.

              Looking at the board layout, that seems to be the case for the fans too?

              What about the !e0heat inversion (which I have tried without luck)?

              1 Reply Last reply Reply Quote 0
              • cjmundefined
                cjm @larsw
                last edited by cjm

                @larsw
                Just to check, is this is how the PWM board is connected as it should work, provided the jumper on the board is set for “12V to 24V” operation.

                VCC	DC 12V-30V                    -> Duet VIN 
                GND	Ground.                       -> Duet 0V
                PWM	Positive of PWM input signal. -> Duet VIN
                GND	Negative of input signal.     -> heater0 pin
                VOUT	Output Voltage 0-10V.         -> Analogue Output
                GND	Output Voltage Ground         -> Duet 0V
                
                larswundefined 1 Reply Last reply Reply Quote 0
                • alankilianundefined
                  alankilian @larsw
                  last edited by alankilian

                  @larsw I would connect the PWM board like this:

                  VCC	DC 12V-30V                    -> Duet VIN 
                  GND	Ground.                       -> Duet Ground
                  PWM	Positive of PWM input signal. -> heater0 pin
                  GND	Negative of input signal.     -> Duet Ground
                  VOUT	Output Voltage 0-10V.         -> Analogue Output to spindle controller
                  GND	Output Voltage Ground         -> Ground on the spindle controller
                  

                  Then, you need a pullup resistor on the PWM input to the converter.
                  Connect a resistor in the range 2,000 to 10,000 Ohms from the PWM input on the converter to a 5 Volt pin on the Duet.

                  You can add this resistor on the Duet between the heater0 pin and a 5 Volt pin right at the Duet.

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

                  larswundefined 1 Reply Last reply Reply Quote 0
                  • larswundefined
                    larsw @cjm
                    last edited by larsw

                    @cjm:

                    The jumper is at 24V. I'm not sure exactly which pins you connect. I changed to below to use the names from the Duet 2 wifi board layout. This is how I have it connected.

                    VCC	DC 12V-30V                    -> Duet VIN at DC powersupply - its 12,8V
                    GND	Ground.                       -> Duet GND at DC powersupply
                    PWM	Positive of PWM input signal. -> Heater VIN, it is 12,8V
                    GND	Negative of input signal.     -> E0-
                    VOUT	Output Voltage 0-10V.         -> Analogue Output
                    GND	Output Voltage Ground         -> Duet GND
                    

                    This results in 10V output no matter M3 Sspeed

                    cjmundefined 1 Reply Last reply Reply Quote 0
                    • larswundefined
                      larsw @alankilian
                      last edited by

                      @alankilian I assume that heater0 pin is E0- ?

                      I have tried this - though without the pullup resistor,
                      It almost works - if I use !e0heat in the M950 command I can use the M3 command and adjust from 0 to almost 5V in output.

                      The heater PWM is 12,8V - should this be connected with the pullup resistor to 5V, or was that a mistype?

                      fcwiltundefined alankilianundefined 2 Replies Last reply Reply Quote 0
                      • fcwiltundefined
                        fcwilt @larsw
                        last edited by

                        @larsw

                        On this device, when disconnected from anything else, can you check if there is continuity between the DC GND pin and the PWM GND pin?

                        Frederick

                        Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                        larswundefined 1 Reply Last reply Reply Quote 0
                        • alankilianundefined
                          alankilian @larsw
                          last edited by alankilian

                          @larsw said in PWM to 10V via e0heater always gives 10V:

                          @alankilian I assume that heater0 pin is E0- ?

                          Yes.

                          The heater PWM is 12,8V - should this be connected with the pullup resistor to 5V, or was that a mistype?

                          It should be connected with a pullup to 5 Volts.

                          This is the PWM control input to the converter and it's designed to be driven from a microcontroller, so it's input range is 0 to 5 Volts according to what I can get out of the data sheet you linked to in your first post.

                          Does anyone know what "Fengfeng value" might mean" I'm not hitting anything on the google machine.

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

                          larswundefined 1 Reply Last reply Reply Quote 0
                          • larswundefined
                            larsw @fcwilt
                            last edited by

                            @fcwilt said in PWM to 10V via e0heater always gives 10V:

                            @larsw

                            On this device, when disconnected from anything else, can you check if there is continuity between the DC GND pin and the PWM GND pin?

                            Frederick

                            I just measured and can confirm this.

                            1 Reply Last reply Reply Quote 0
                            • larswundefined
                              larsw @alankilian
                              last edited by

                              @alankilian said in PWM to 10V via e0heater always gives 10V:

                              @larsw said in PWM to 10V via e0heater always gives 10V:
                              It should be connected with a pullup to 5 Volts.

                              This is the PWM control input to the converter and it's designed to be driven from a microcontroller, so it's input range is 0 to 5 Volts according to what I can get out of the data sheet you linked to in your first post.

                              Actually no - the converter has two PWM input modes - 4,5V to 10V or 12V to 24V. Selectable by a jumper (The documentation calls this a jump needle - had me quite confused). I have jumped it for 12-24V.

                              Does anyone know what "Fengfeng value" might mean" I'm not hitting anything on the google machine.

                              Nice to know I was not the only one.. Fengfeng value means peak value. That also took me quite a while to get translated.

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

                                @larsw said in PWM to 10V via e0heater always gives 10V:

                                Actually no - the converter has two PWM input modes - 4,5V to 10V or 12V to 24V. Selectable by a jumper (The documentation calls this a jump needle - had me quite confused). I have jumped it for 12-24V.

                                OK, that's cool. I was getting confused by the data sheet and couldn't quite get that information from it.

                                Then you can just pull up to the heater supply voltage.

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

                                larswundefined 1 Reply Last reply Reply Quote 0
                                • larswundefined
                                  larsw @alankilian
                                  last edited by

                                  @alankilian Perfect. Still same resistor range?

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

                                    @larsw Yes, the pullup resistor value is not critical at all.

                                    i generally use 4.7 KOhms for a quickly changing signal (like this) and a 47 KOhm for slowly changing signals like switches.

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

                                    1 Reply Last reply Reply Quote 0
                                    • cjmundefined
                                      cjm @larsw
                                      last edited by

                                      @larsw Understood - and the reason this is not working is because the "Negative of the PWM input signal" is connected to Ground as you measured and confirmed in your answer to @fcwilt. This is unlike other similar boards where both positive and negative PWM inputs are fully isolated from ground, in which case this connection works fine.

                                      However, with your board, @alankilian's approach is a good one.

                                      larswundefined 2 Replies Last reply Reply Quote 1
                                      • larswundefined
                                        larsw @cjm
                                        last edited by

                                        @cjm Fantastic - I'll try this in the weekend when I get my hands on the machine again.

                                        cjmundefined 1 Reply Last reply Reply Quote 0
                                        • cjmundefined
                                          cjm @larsw
                                          last edited by cjm

                                          @larsw A point to note is that if the photos of your converter board on the web are correct, it uses an opto-isolator with a choice of two series resistor values (selected by the jumpers) to match either 5V or 12V-24V.

                                          The pull-up resistor used in @alankilian’s approach is in series with the opto-isolator’s input resistor and so has to have a low enough value to pass sufficient current to turn on the opto-isolator.

                                          The 2K or 4K values mentioned by @alankilian connected to the heater supply voltage should be fine.

                                          However, some opto-isolators have low efficiency so, if you find you’re not getting reliable results, you might want to try setting the board’s jumper to 5V mode.

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

                                            @cjm I agree, from the photo it appears that it has an opto isolator for the input. So why is there continuity between the PWM input ground and the output ground?

                                            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

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