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

    Fan: switched GND to switched positive

    Scheduled Pinned Locked Moved Solved
    Duet Hardware and wiring
    6
    22
    1.2k
    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.
    • Nxt-1undefined
      Nxt-1
      last edited by Nxt-1

      My main PSU is 24V for the heaters and motors. From that, I wired a stepdown converter to 12V to V_fan, unsurprisingly powering my 12V fans. I recently went the route of incorporating a hdd motor for a part cooling fan.
      To drive the motor I got myself a cheap BLDC driver board from Amazon. To control the speed I wired the control input to a Duet fan output which promptly made the driver release its magic smoke. This finally gets me to my question can I get a 5V PWM output from the Duet in my case. I was thinking a simple resistive divider from a fan output as there is no real current requirement. Any input on this?
      557b43cc-7d60-4114-9523-57129b14f0c7-image.png

      Duet3D and delta printer enthousiast. Buildlog
      Looking for Duet3D configuration support, check out Nxt-3D

      1 Reply Last reply Reply Quote 0
      • mrehorstdmdundefined
        mrehorstdmd
        last edited by

        Those BLDC drivers from China don't usually come with a lot of info or specs, so you have to experiment a little before you commit to a full-on voltage test, as you have discovered. I think that in PWM input mode, the speed range for the motor is from zero to some maximum value set by the pot on the BLDC driver board.

        I would set the board up with the motor and power supply and then experiment a little with the voltage at the PWM input. Also check the voltage levels at the Duet board fan connector- set the fan port to maximum speed and read the voltage and then set it to minimum speed and read it again.

        If the Duet is switching between 0 and 12V, a resistive divider should be OK to drop the voltage to a safe range for the PWM input on the BLDC driver. The BLDC driver might be looking for a positive input while the Duet may switch ground which could invert the speed that you get from the motor- i.e. when the Duet is trying to turn the fan off, it may be running full tilt because of the BLDC driver board. I think you can invert the PWM output in the Duet in that case.

        https://drmrehorst.blogspot.com/

        Nxt-1undefined 1 Reply Last reply Reply Quote 0
        • A Former User?
          A Former User
          last edited by

          might worth noting that the low side switched fan won't be quite 0v when enabled, but with the low current for a control signal the voltage drop should hopefully be insignificant.

          1 Reply Last reply Reply Quote 0
          • Nxt-1undefined
            Nxt-1 @mrehorstdmd
            last edited by

            @mrehorstdmd and @bearer
            Yeah info, let alone a datasheet is not something that you get with these kind of products hehe. I should have assumed it's 5V for the pwm as well though. I play around with a couple of resistors and see what I get.

            Duet3D and delta printer enthousiast. Buildlog
            Looking for Duet3D configuration support, check out Nxt-3D

            1 Reply Last reply Reply Quote 0
            • Nxt-1undefined
              Nxt-1
              last edited by

              The problem has evolved from converting voltage levels to something else, so I have updated the thread title as well.

              The BLDC driver board that I am using has multiple GND pins, and seem internally connected. The main GND pin (next to Vcc) is directly connected to my main PSU's negative terminal. When the 2nd ground and 5V signal is connected to the logic signal side of the board, it basically just adds a permanent 5V source. Normally the Duet would switch the fan output's GND pin, but that has no use in this case.

              Any ideas on how to convert a negative switched signal and convert it to positive switched?

              Duet3D and delta printer enthousiast. Buildlog
              Looking for Duet3D configuration support, check out Nxt-3D

              poohzazaundefined A Former User? 2 Replies Last reply Reply Quote 0
              • poohzazaundefined
                poohzaza @Nxt-1
                last edited by poohzaza

                @Nxt-1
                I have an ideas why not hijack the fan mosfet conector and conect it to external mosfet board useing M106 I1 to invert the fan signal or take a look at M950 command there an option to invert siginal
                and you can do any thing with the signal bare in mind that the logic will be 3.3 volt you can use opto coupler to convet logic

                1 Reply Last reply Reply Quote 0
                • fcwiltundefined
                  fcwilt
                  last edited by

                  Hi,

                  What is the idea behind using HDD motors?

                  I use 12 VDC 40x40x20 mm blowers on the normal Duet fan outputs and they work just fine.

                  Thanks.

                  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

                  Nxt-1undefined 1 Reply Last reply Reply Quote 0
                  • A Former User?
                    A Former User @Nxt-1
                    last edited by

                    @Nxt-1 said in Fan: switched GND to switched positive:

                    Any ideas on how to convert a negative switched signal and convert it to positive switched?

                    You'd essentially need to throw a pnp bjt or p-channel mosfet in to do high side switching.

                    this might give you some insight if you sift out all the irrelevant bits
                    https://www.baldengineer.com/pwm-3-pin-pc-fan-arduino.html

                    Nxt-1undefined 1 Reply Last reply Reply Quote 0
                    • Nxt-1undefined
                      Nxt-1 @fcwilt
                      last edited by

                      @fcwilt said in Fan: switched GND to switched positive:

                      Hi,

                      What is the idea behind using HDD motors?

                      I use 12 VDC 40x40x20 mm blowers on the normal Duet fan outputs and they work just fine.

                      Thanks.

                      Frederick

                      Well first of all, hdd motors and abundant and cheap. Second, I was intrigued by Mark's Rehorst's design, so I decided to play around with it.

                      @poohzaza said in Fan: switched GND to switched positive:

                      @Nxt-1
                      I have an ideas why not hijack the fan mosfet conector and conect it to external mosfet board useing M106 I1 to invert the fan signal or take a look at M950 command there an option to invert siginal
                      and you can do any thing with the signal bare in mind that the logic will be 3.3 volt you can use opto coupler to convet logic

                      No need to attach directly to the mosfet connector I would say? I am interested in going the optocoupler way. Drive the coupler with the fan output and switch the 5V path to the driver board, maybe with somthing like a 10k resistor in series to limit current.

                      Duet3D and delta printer enthousiast. Buildlog
                      Looking for Duet3D configuration support, check out Nxt-3D

                      1 Reply Last reply Reply Quote 0
                      • Nxt-1undefined
                        Nxt-1 @A Former User
                        last edited by

                        @bearer said in Fan: switched GND to switched positive:

                        @Nxt-1 said in Fan: switched GND to switched positive:

                        Any ideas on how to convert a negative switched signal and convert it to positive switched?

                        You'd essentially need to throw a pnp bjt or p-channel mosfet in to do high side switching.

                        this might give you some insight if you sift out all the irrelevant bits
                        https://www.baldengineer.com/pwm-3-pin-pc-fan-arduino.html

                        Any specific reason why a simple optocoupler (see my above post) might not work? I have a bag of optocoupler still laying around so that would be the easy route for me 🙂

                        Duet3D and delta printer enthousiast. Buildlog
                        Looking for Duet3D configuration support, check out Nxt-3D

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

                          @Nxt-1 said in Fan: switched GND to switched positive:

                          Any specific reason why a simple optocoupler (see my above post) might not work? I have a bag of optocoupler still laying around so that would be the easy route for me

                          None other than still needing a PNP output from the optocoupler which is less common, and what output current you need.

                          Nxt-1undefined 1 Reply Last reply Reply Quote 0
                          • Nxt-1undefined
                            Nxt-1 @A Former User
                            last edited by

                            @bearer said in Fan: switched GND to switched positive:

                            @Nxt-1 said in Fan: switched GND to switched positive:

                            Any specific reason why a simple optocoupler (see my above post) might not work? I have a bag of optocoupler still laying around so that would be the easy route for me

                            None other than still needing a PNP output from the optocoupler which is less common, and what output current you need.

                            Mind sketching a diagram one would wire the transistor (with or without the opto)? 🙂

                            Duet3D and delta printer enthousiast. Buildlog
                            Looking for Duet3D configuration support, check out Nxt-3D

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

                              either get an optocoupler with an internal PNP instead of the common NPN type, or the link I posted has the plenty of relevant schematics.

                              1 Reply Last reply Reply Quote 0
                              • poohzazaundefined
                                poohzaza
                                last edited by

                                what is you opto model number

                                Nxt-1undefined 1 Reply Last reply Reply Quote 0
                                • Nxt-1undefined
                                  Nxt-1 @poohzaza
                                  last edited by

                                  @poohzaza said in Fan: switched GND to switched positive:

                                  what is you opto model number

                                  I have a bag of these laying around and just found some old salvaged pnp's. At the moment, my plan is to use the output npn of the opto to drive the pnp transistor as high side switch. I am currently brushing up my bjt knowledge though 🙂

                                  Duet3D and delta printer enthousiast. Buildlog
                                  Looking for Duet3D configuration support, check out Nxt-3D

                                  1 Reply Last reply Reply Quote 0
                                  • Nxt-1undefined
                                    Nxt-1
                                    last edited by

                                    This is what I have in mind atm, I figured the opto coupler does not add a benefit. I also simplified the internal part Duet on the diagram to a simple switch. I decided it is easier to take the 5V output from the driver board instead of a resistive voltage divider from the Duet's V_fan.

                                    I have yet to figure out what current limiting resistors need to be placed in the circuit.

                                    52d7b241-b0e0-4d4a-85fb-b23e35acbe65-image.png

                                    Duet3D and delta printer enthousiast. Buildlog
                                    Looking for Duet3D configuration support, check out Nxt-3D

                                    1 Reply Last reply Reply Quote 0
                                    • poohzazaundefined
                                      poohzaza
                                      last edited by

                                      this viedo may help you figure out current limiting resistors
                                      https://www.youtube.com/watch?v=WRm2oUw4owE&list=PLAROrg3NQn7cyu01HpOv5BWo217XWBZu0&index=22&t=0s

                                      1 Reply Last reply Reply Quote 0
                                      • Nxt-1undefined
                                        Nxt-1
                                        last edited by

                                        So I assumed a collector current of 50mA, which for the bjt I used, resulted in a ~22K base resistor (if I got it right 🙂 ). This left me with a working high side switch, pulsing ~0-5V, succes! Sadly hooking the signal to the driver board did not do what I wanted it to. The motor ramped up to max speed and stayed there. My assumption is that the Duet's default 250Hz pwm frequency is not what the driver expects.

                                        Therefore I decided to add an aggressive low pass filter to the output and remove the driver board solder bridge (so it expects an analogue voltage 0-5V as speed control). For some unknown reason the output voltage at the cap increased to 5V at the cap charged and stayed there, no matter what pan speed I selected.

                                        Kind of reaching end of my patience for just getting speed control working sadly 😞

                                        1bcb6951-d4d6-48e4-aecf-87e517e73dae-image.png

                                        Duet3D and delta printer enthousiast. Buildlog
                                        Looking for Duet3D configuration support, check out Nxt-3D

                                        1 Reply Last reply Reply Quote 0
                                        • Nxt-1undefined
                                          Nxt-1
                                          last edited by

                                          I should add that I tried changing the Duet fan frequency to 25kHz as well, without success.

                                          Duet3D and delta printer enthousiast. Buildlog
                                          Looking for Duet3D configuration support, check out Nxt-3D

                                          1 Reply Last reply Reply Quote 0
                                          • poohzazaundefined
                                            poohzaza
                                            last edited by poohzaza

                                            @Nxt-1 said in Fan: switched GND to switched positive:

                                            Kind of reaching end of my patience for just getting speed control working sadl

                                            you can have a look at
                                            1.did you jumper use external control signal
                                            2.remove low pass fliter and conect pwm siginal then conect jumper for pwm control

                                            can i have a look at esc datasheet

                                            or cheak that pwm work correctly by conect mutimeter in volt mode you shoud see variable voltage when you adjust the fan siginal

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