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 @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
                          • dc42undefined
                            dc42 administrators
                            last edited by dc42

                            The problem is that C1 has nowhere to discharge except through the device that you connect the output to. Here are a few suggestions:

                            1. In your PNP high side driver circuit, increase R2 to 10K and connect a 1K resistor from the transistor collector to ground. I also recommend adding a 10K resistor between base and emitter of the transistor.

                            2. Instead of using a PNP transistor etc. use a 74HCT02 gate connected to an expansion board heater output, gated with +3.3V, as we suggest for driving a laser PWM pin. Then connect your RC network to the output of the 74HCT02.

                            3. Use a PWM to 0-10V VFD converter (readily available on eBay), then a voltage divider to reduce the 0-10V to 0-5V.

                            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 1
                            • Nxt-1undefined
                              Nxt-1 @poohzaza
                              last edited by

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

                              @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

                              I did remove the jumper for external control signal. I also tested in pwm mode and tried some pwm frequencies, without success. Sadly with these cheapo controllers, no datasheet is available (at least that I could find).

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

                              The problem is that C1 has nowhere to discharge except through the device that you connect the output to. Here are a few suggestions:

                              1. In your PNP high side driver circuit, increase R2 to 10K and connect a 1K resistor from the transistor collector to ground. I also recommend adding a 10K resistor between base and emitter of the transistor.

                              2. Instead of using a PNP transistor etc. use a 74HCT02 gate connected to an expansion board heater output, gated with +3.3V, as we suggest for driving a laser PWM pin. Then connect your RC network to the output of the 74HCT02.

                              3. Use a PWM to 0-10V VFD converter (readily available on eBay), then a voltage divider to reduce the 0-10V to 0-5V.

                              I changed the circuit as you suggested and we seem to have a winner. I did lower the LPF capacitance to 10ยตF, as the rise and fall time was unnecessarily long. I did notice my upper voltage limit is ~3,7V instead of the ideal 5V, but this is not really an issue as 3,7V already corresponds to a very large airflow.

                              Now I just need to move the components from the breadboard and neatly arrange them on a piece of protoboard.

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

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