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

    Designing a PWM to Analog mini board for fans

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    17
    139
    12.4k
    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.
    • Egon.Netundefined
      Egon.Net
      last edited by Egon.Net

      Hi again!

      I got the Tina-TI model of TLV9352 opamp and simulated the circuit as faithfully as I could. Depending on the input, I can get it to oscillate, but a capacitor in the feedback loop seems to get rid of the oscillation. Now, worst case just rings (when I apply a fast rising clock direct to opamp input, not real use), so I'll put the capacitor in the PCB and test with and without the capacitor.

      Using the opamp model, there's no need for a VBE resistor (you where right @zapta) and max voltage is 23.82V (which is a beliebable output). Tina seems to simulate better than Multisim.

      I just ordered the components for a 10 boards test batch (since I needed to order some components for other project). I'll order a PCB batch too, and report, but will take 15 day the less for the PCB to arrive.

      I think is time to count how many board you all will need:

      PWM signal support:

      • Open drain active low (Duet), 20k impedance
      • VCC level PWM (0.05·VCC to VCC with 10k impedance or 0.1·VCC to VCC 20k impedance)

      Output

      • Scaled %PWM from VCC
      • VCC range: 4.5V - 40V
      • Current depends on power transistor, planned BD139

      Are you interested in single PWM board or dual(more?) PWM board?

      ZipZapundefined zaptaundefined 2 Replies Last reply Reply Quote 0
      • Egon.Netundefined
        Egon.Net
        last edited by

        Now that I read my own post... When I talk about VCC level PWM, 0.05·VCC, I mean that "high" level can be as low as 0.05xVCC, thats 1.2V for 24V VCC, and as high as VCC itself. Low level shoud be 0V.

        1 Reply Last reply Reply Quote 0
        • ZipZapundefined
          ZipZap @Egon.Net
          last edited by

          @Egon-Net said in Designing a PWM to Analog mini board for fans:

          Output

          • Current depends on power transistor, planned BD139

          Does that mean, the user can decide on his own power transistor/fet (NPN) as long as you don't exceed the maximum Current suitable for the PCB-traces (or maybe even strengthen them with solder if necessary)?

          Maybe a single board may be sufficent for most users. Is it possible, do design a dual board, that can be "cut" in two indipendent halves by the user?
          If thats not possible i think it would be good to have dual boards (only).

          Im willing to be a beta-tester for the boards (having a watercooled toolhead with oversized loud 120mm 3-wire-fans on the radiator).
          I would also be interested in up to four (4) dual boards or five to six (6) single boards of the final version.

          /Julien

          Most important guide -> Triffid Hunter's Calibration Guide
          HyperCube EVO (derivate) in 250x250x300 - enclosed for ABS - Duet2WiFi - custom watercooling

          Egon.Netundefined 1 Reply Last reply Reply Quote 0
          • Egon.Netundefined
            Egon.Net @ZipZap
            last edited by

            @ZipZap said in Designing a PWM to Analog mini board for fans:

            @Egon-Net said in Designing a PWM to Analog mini board for fans:

            Output

            • Current depends on power transistor, planned BD139

            Does that mean, the user can decide on his own power transistor/fet (NPN) as long as you don't exceed the maximum Current suitable for the PCB-traces (or maybe even strengthen them with solder if necessary)?

            Maybe a single board may be sufficent for most users. Is it possible, do design a dual board, that can be "cut" in two indipendent halves by the user?
            If thats not possible i think it would be good to have dual boards (only).

            Im willing to be a beta-tester for the boards (having a watercooled toolhead with oversized loud 120mm 3-wire-fans on the radiator).
            I would also be interested in up to four (4) dual boards or five to six (6) single boards of the final version.

            /Julien

            Well, the board is not designed for high currents, but the transistor will limit the current well before the pcb traces would. BD139 IIRC has a thermal resistance of 100ºC/W, and a maxtemp of 150ºC, so it would be ok for currents about... 200mA at 24V with light heatsinking (by heart). And the limit is about disipated power, so if you can lower VCC, you would be able to use higher currents. And sice the transistor footprint is just 3 holes, you could always try different transistors if you want 🙂

            1 Reply Last reply Reply Quote 0
            • zaptaundefined
              zapta @Egon.Net
              last edited by

              @Egon-Net said in Designing a PWM to Analog mini board for fans:

              I'll order a PCB batch too, and report,

              Any thoughts regarding the board dimensions, mounting arrangement, choice of connectors and pin assignment, indicator LEDS, etc?

              Egon.Netundefined 1 Reply Last reply Reply Quote 0
              • KevinSantundefined
                KevinSant @Egon.Net
                last edited by

                @Egon-Net im intrested also in your custoim changer as well

                Egon.Netundefined KevinSantundefined 2 Replies Last reply Reply Quote 0
                • Egon.Netundefined
                  Egon.Net @zapta
                  last edited by Egon.Net

                  @zapta said in Designing a PWM to Analog mini board for fans:

                  @Egon-Net said in Designing a PWM to Analog mini board for fans:

                  I'll order a PCB batch too, and report,

                  Any thoughts regarding the board dimensions, mounting arrangement, choice of connectors and pin assignment, indicator LEDS, etc?

                  This is what I thought:

                  Board dimensions: as small as I manage to do it
                  Mounting arrangment: I though about for 3.5mm holes, one in each corner
                  Connectors: open to suggestions, but I thought screw or pin
                  Leds: I'd prefer not to include any given the VCC variability
                  Arrangement of connectors: VCC/GND/PWM in one side GND/Vanalog in the opposite side.

                  Any suggestion?

                  zaptaundefined 1 Reply Last reply Reply Quote 0
                  • Egon.Netundefined
                    Egon.Net @KevinSant
                    last edited by

                    @bks31 said in Designing a PWM to Analog mini board for fans:

                    @Egon-Net im intrested also in your custoim changer as well

                    Do you mean my tool changer printer?

                    1 Reply Last reply Reply Quote 0
                    • KevinSantundefined
                      KevinSant @KevinSant
                      last edited by

                      @bks31 said in Designing a PWM to Analog mini board for fans:

                      @Egon-Net im intrested also in your custoim changer as well

                      yes wasnt sure if you were making like a attachment for the carraige

                      Egon.Netundefined 1 Reply Last reply Reply Quote 0
                      • Egon.Netundefined
                        Egon.Net @KevinSant
                        last edited by

                        @bks31 said in Designing a PWM to Analog mini board for fans:

                        @bks31 said in Designing a PWM to Analog mini board for fans:

                        @Egon-Net im intrested also in your custoim changer as well
                        

                        yes wasnt sure if you were making like a attachment for the carraige

                        It's a custom motion system, 300mmx300mmx300mm CoreXY, with e3d toolchanger plates...

                        1 Reply Last reply Reply Quote 0
                        • zaptaundefined
                          zapta @Egon.Net
                          last edited by

                          @Egon-Net said in Designing a PWM to Analog mini board for fans:

                          Any suggestion?

                          All sounds reasonable to me. As for the LEDS, since they are for indication only, you can easily have a 1:4 voltage range (e.g. 2 to 8ma) without going out of spec.

                          They are nice for diagnostics, but not absolutely required IMO.

                          1 Reply Last reply Reply Quote 0
                          • marceloriderundefined
                            marcelorider
                            last edited by

                            Well, I have one fan that is pwm regulated so, at least for now I’m in to one PCB also 😉
                            My printer is a Longer LK4, but if that’s not a concern then perfect.

                            Do you think is easy to implement something like a 8v-24v range?

                            Regards

                            Egon.Netundefined 1 Reply Last reply Reply Quote 0
                            • Egon.Netundefined
                              Egon.Net @marcelorider
                              last edited by

                              @marcelorider said in Designing a PWM to Analog mini board for fans:

                              Well, I have one fan that is pwm regulated so, at least for now I’m in to one PCB also 😉
                              My printer is a Longer LK4, but if that’s not a concern then perfect.

                              Do you think is easy to implement something like a 8v-24v range?

                              Regards

                              You can limit the PWM in M106 gcode so if it's less than a value, a minimum value is set (8V->33% equivalent for your case). The bad side is that from 0% to 33%, it would output the same 8V.

                              I'm afraid there's not an easy way to limit the lower side as you'd need.

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

                                Just a reminder that if you are not using a fan output on a DueX2 or DueX5 board, you can increase the PWM frequency to 65535 and then use a simple LC filter, i.e. capacitor in parallel with the fan, and an inductor between the Duet FAN- output and the negative fan wire + capacitor. Suitable component values would be 1mH and 1uF. For the inductor, part # 13R105C is widely available and rated up to 330mA, which should be sufficient for most fans used in 3D printers.

                                If using a heater output on a Duet 2 to drive a fan with LC filter, you also need to add a flyback diode across the output terminals.

                                DueX boards have a fixed PWM frequency, so this approach would need a much larger inductor, making is impractical unless you have some old transformers lying around.

                                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

                                Egon.Netundefined zaptaundefined 2 Replies Last reply Reply Quote 0
                                • Egon.Netundefined
                                  Egon.Net @dc42
                                  last edited by

                                  @dc42 said in Designing a PWM to Analog mini board for fans:

                                  Just a reminder that if you are not using a fan output on a DueX2 or DueX5 board, you can increase the PWM frequency to 65535 and then use a simple LC filter, i.e. capacitor in parallel with the fan, and an inductor between the Duet FAN- output and the negative fan wire + capacitor. Suitable component values would be 1mH and 1uF. For the inductor, part # 13R105C is widely available and rated up to 330mA, which should be sufficient for most fans used in 3D printers.

                                  If using a heater output on a Duet 2 to drive a fan with LC filter, you also need to add a flyback diode across the output terminals.

                                  DueX boards have a fixed PWM frequency, so this approach would need a much larger inductor, making is impractical unless you have some old transformers lying around.

                                  That's the very reason I'm doing all of this: I'm driving 6 fans from a Duex 5 board, and I already calculated that the inductor for a LC filter would be huge, and I'd need 6 of them. That's why I went with this route. But thanks for the advice!

                                  fcwiltundefined 1 Reply Last reply Reply Quote 0
                                  • marceloriderundefined
                                    marcelorider @Egon.Net
                                    last edited by

                                    @Egon-Net
                                    Thanks for the reply.
                                    Honestly I don’t use it below 50% so I don’t think that would be a problem.
                                    Although as of now the fan doesn’t even spin correctly with any pwm state and just rotates above 50% but so slow, not controllable by any means.

                                    1 Reply Last reply Reply Quote 0
                                    • fcwiltundefined
                                      fcwilt @Egon.Net
                                      last edited by

                                      @Egon-Net said in Designing a PWM to Analog mini board for fans:

                                      That's the very reason I'm doing all of this: I'm driving 6 fans from a Duex 5 board, and I already calculated that the inductor for a LC filter would be huge, and I'd need 6 of them. That's why I went with this route. But thanks for the advice!

                                      Have you determined what it is about your fans that cause them to not work with PWM?

                                      I have dozens of different kinds of brushless fans from many different vendors and they all work fine with PWM.

                                      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

                                      Egon.Netundefined 1 Reply Last reply Reply Quote 0
                                      • Egon.Netundefined
                                        Egon.Net @fcwilt
                                        last edited by Egon.Net

                                        @fcwilt said in Designing a PWM to Analog mini board for fans:

                                        @Egon-Net said in Designing a PWM to Analog mini board for fans:

                                        That's the very reason I'm doing all of this: I'm driving 6 fans from a Duex 5 board, and I already calculated that the inductor for a LC filter would be huge, and I'd need 6 of them. That's why I went with this route. But thanks for the advice!

                                        Have you determined what it is about your fans that cause them to not work with PWM?

                                        I have dozens of different kinds of brushless fans from many different vendors and they all work fine with PWM.

                                        Thanks.

                                        Frederick

                                        Yes, I've done quite a lot of test. Some of my fans don't work at all as soon as you drop from 99% PWM. Most of them work, but PWM is not linear at all: 99% is already less than 25% airflow, and 50% PWM is no much less than that, and some of them kinda work with PWM, but whinning an awful lot, since they are connected to a Duex5 and I cannot change PWM frequency at all.
                                        I suppose that 4010 fans, and even more, 4010 brushless radial fans are very tricky to get working with PWM.

                                        By contrast, using my bench power supply, all of them work more or less linearly, at the very least from 12V to 24V.

                                        In my other old printer (an old cartesian Marlin based custom one) I'm using 4020 and 5015 radial fans and managed to get some fans that work ok with PWM.

                                        fcwiltundefined 1 Reply Last reply Reply Quote 1
                                        • fcwiltundefined
                                          fcwilt @Egon.Net
                                          last edited by

                                          @Egon-Net said in Designing a PWM to Analog mini board for fans:

                                          Yes, I've done quite a lot of test. Some of my fans don't work at all as soon as you drop from 99% PWM. Most of them work, but PWM is not linear at all: 99% is already less than 25% airflow

                                          That doesn't make sense.

                                          According to my oscilloscope 100% is pure DC and 99% is 99% "pure DC".

                                          It seems strange that those 1% intervals where the power to the fan drops to 0 would reduce the airflow to 25%.

                                          Weird.

                                          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

                                          zaptaundefined Egon.Netundefined 2 Replies Last reply Reply Quote 0
                                          • zaptaundefined
                                            zapta @fcwilt
                                            last edited by

                                            @fcwilt said in Designing a PWM to Analog mini board for fans:

                                            It seems strange that those 1% intervals where the power to the fan drops to 0 would reduce the airflow to 25%.

                                            I think that those fans are driven by electronics that is embedded in them. Once the PWM cuts the power to the electronics, it's difficult to predict how that electronic will behave, unless it's guaranteed by its datasheet.

                                            Powering electronics that expects DC voltage with intermittent power is a hack. (No offense, I do it as well).

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