• Tags
  • Documentation
  • Order
  • Register
  • Login
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.
  • undefined
    Egon.Net @zapta
    last edited by 6 Mar 2021, 16:21

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

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

    But as it seems you are a specialist in electronics. Do you have an idea why this simple optocoupler didn't work for that purpose:
    https://forum.duet3d.com/topic/19325/powering-arduino-nano-and-leds-from-5v-rail/12

    What exactly do you want to achieve? An Arduino reading the FAN PWM output from a duet?

    The optocoupler provides electrical isolation which you may or may not need. Then you can convert it to analog signal as feed it to the Arduino as such (see @Egon-Net's explanation) or feed it to the Arduino as a digital signal and let the Arduino determine the PWM value (e.g. using this standard function https://www.arduino.cc/reference/en/language/functions/advanced-io/pulsein/ ).

    Didn't know about pulsein function, but for me it seems the way to go...

    1 Reply Last reply Reply Quote 0
    • undefined
      taconite
      last edited by taconite 3 Jun 2021, 20:06 6 Mar 2021, 20:04

      haven't heard about the pulsein function aswell. I wanted to get the 24V (or 12V) PWM into an equivalent 5V analog voltage hence the optocoupler. But principle should work, shouldn't it?

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

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

      @Egon-Net
      mhh thats a bummer πŸ˜• . I wanted to do 12V PWM to 5 V analog.

      But as it seems you are a specialist in electronics. Do you have an idea why this simple optocoupler didn't work for that purpose:
      https://forum.duet3d.com/topic/19325/powering-arduino-nano-and-leds-from-5v-rail/12

      Do you realize you could just use the PWM- from duet and 5V instead of Duet's Fan Vcc? You are not forced to use 24V/12V from Duet.

      Here you have a example just with passive components:

      SimpleLowPass.png

      Since your load is Arduino's analog input, and assuming it has quite a high input impendance (IIRC, 1MOhm) you could just pull-up with your 5V supply with a 1K resistor (5mA current draw) and use VFan- from Duet (which is a PWM open drain). You'll have a little offset from de resistive divisor around A1, but it would be small. According my simulations, 2.3V for 50% PWM, 0V for 0% PWM and 4.54V por 100% PWM. You can play with R2 and C1 values a bit more to achieve even better results (for example 10k-10u).

      Of course you could also use my board, but I think your problem doesn't need it.

      Oh no I didn't know that this would be possible - thanks!

      Custom ANET A8
      Custom Delta: D-PATCH (Delta Printer with Automatic Tool CHanging) https://forum.duet3d.com/topic/16082/d-patch?_=1596131234754

      All I do here is under this license: CC BY-NC-SA

      1 Reply Last reply Reply Quote 0
      • undefined
        Egon.Net
        last edited by 7 Mar 2021, 15:54

        Well, I think I have the final design:

        PCB3-render.png

        PCB3-render2.png

        Besides minor cosmetic changes, I've added a jumper column to select PWM active high or active low with two jumpers. You can put the pins and jumpers or just solder it fixed. The silkscreen guides you about which ones to short por PWM active HIGH or PWM active LOW. PCB now is a bit bigger, but I think is worth it.

        Any comments before I launch the order?

        undefined 1 Reply Last reply 7 Mar 2021, 18:57 Reply Quote 1
        • undefined
          gaweyo
          last edited by 7 Mar 2021, 18:17

          Nice work! Could you perhaps add a surface mount pad to the diode so the same board can accommodate both the through hole and surface mount part?

          undefined 1 Reply Last reply 7 Mar 2021, 18:53 Reply Quote 0
          • undefined
            Egon.Net @gaweyo
            last edited by 7 Mar 2021, 18:53

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

            Nice work! Could you perhaps add a surface mount pad to the diode so the same board can accommodate both the through hole and surface mount part?

            Good idea!

            1 Reply Last reply Reply Quote 0
            • undefined
              fcwilt @Egon.Net
              last edited by 7 Mar 2021, 18:57

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

              Any comments before I launch the order?

              Are you going to have someone install the parts? Or at least the SMDs?

              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

              undefined 1 Reply Last reply 7 Mar 2021, 19:05 Reply Quote 0
              • undefined
                Egon.Net @fcwilt
                last edited by 7 Mar 2021, 19:05

                @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:

                Any comments before I launch the order?

                Are you going to have someone install the parts? Or at least the SMDs?

                Frederick

                I'll do it by myself, I have a hot air soldering station and I've build many smd boards already.

                BTW, @gaweyo, I've just added the smd diode footprint πŸ™‚

                undefined 1 Reply Last reply 7 Mar 2021, 19:11 Reply Quote 1
                • undefined
                  fcwilt @Egon.Net
                  last edited by 7 Mar 2021, 19:11

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

                  I'll do it by myself, I have a hot air soldering station and I've build many smd boards already.

                  That's a skill I have never tried. I have a hot air soldering station but the project I purchased it for got canceled.

                  So there it sets new and unused.

                  How much are you going to be selling them for - say 25 units.

                  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

                  undefined undefined 2 Replies Last reply 7 Mar 2021, 19:17 Reply Quote 0
                  • undefined
                    Egon.Net @fcwilt
                    last edited by 7 Mar 2021, 19:17

                    @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:

                    I'll do it by myself, I have a hot air soldering station and I've build many smd boards already.

                    That's a skill I have never tried. I have a hot air soldering station but the project I purchased it for got canceled.

                    So there it sets new and unused.

                    How much are you going to be selling them for - say 25 units.

                    Frederick

                    I haven't calculated costs yet, but I my plan is just sharing the costs, just not to loose with each board. Once I have the prototype board working, I'll put a price for the DIY kit (board+components), just the bare PCB, and the complete mounted and tested board. And of course, I can send the gerbers for free too.

                    Would kind of kit would you need? Bare, components kit, mounted...?

                    undefined undefined 2 Replies Last reply 7 Mar 2021, 19:24 Reply Quote 0
                    • undefined
                      fcwilt @Egon.Net
                      last edited by 7 Mar 2021, 19:24

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

                      Would kind of kit would you need? Bare, components kit, mounted...?

                      As busy as I am I would prefer completely assembled units - ready to install in a printer.

                      And you should price them to make some profit.

                      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

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        zapta @fcwilt
                        last edited by 7 Mar 2021, 20:46

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

                        That's a skill I have never tried. I have a hot air soldering station but the project I purchased it for got canceled.

                        You can try one of those practice kits instead. https://www.aliexpress.com/item/32909277203.html

                        A solder iron, flux paste, and solder are all you need. A cheap Chinese stereoscopic optical microscope makes even easier.

                        undefined 1 Reply Last reply 7 Mar 2021, 20:50 Reply Quote 1
                        • undefined
                          fcwilt @zapta
                          last edited by 7 Mar 2021, 20:50

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

                          You can try one of those practice kits instead. https://www.aliexpress.com/item/32909277203.html

                          Great idea.

                          A solder iron, flux paste, and solder are all you need. A cheap Chinese stereoscopic optical microscope makes even easier.

                          I actually have all of those.

                          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

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            zapta @Egon.Net
                            last edited by 7 Mar 2021, 20:53

                            @Egon-Net, one option you have is ordering assembled from vendors such as JLCPCB.

                            https://jlcpcb.com/smt-assembly

                            You may need to make design changes to reduce cost and use their standard parts. https://jlcpcb.com/parts

                            https://www.youtube.com/results?search_query=jlcpcb+assembly

                            Just an idea.

                            undefined 1 Reply Last reply 7 Mar 2021, 21:10 Reply Quote 0
                            • undefined
                              Egon.Net @zapta
                              last edited by 7 Mar 2021, 21:10

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

                              @Egon-Net, one option you have is ordering assembled from vendors such as JLCPCB.

                              https://jlcpcb.com/smt-assembly

                              You may need to make design changes to reduce cost and use their standard parts. https://jlcpcb.com/parts

                              https://www.youtube.com/results?search_query=jlcpcb+assembly

                              Just an idea.

                              I don't think we are going to do so many boards to be an advantage. For the time being I will do the boards by myself, but maybe in the future I'm overwhelmed by all the people wanting the boards and I have to look something like that! ☺

                              BTW, I'm already a costumer of JLCPCB πŸ™‚

                              1 Reply Last reply Reply Quote 0
                              • undefined
                                dc42 administrators
                                last edited by 8 Mar 2021, 07:08

                                PCB assembly is easier if all the SMD components are on the same side. Then it's easily done using a hotplate, solder paste, and a Mylar solder stencil (available in the UK from Hobbytronics).

                                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

                                undefined 1 Reply Last reply 8 Mar 2021, 10:14 Reply Quote 0
                                • undefined
                                  Egon.Net @dc42
                                  last edited by 8 Mar 2021, 10:14

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

                                  PCB assembly is easier if all the SMD components are on the same side. Then it's easily done using a hotplate, solder paste, and a Mylar solder stencil (available in the UK from Hobbytronics).

                                  I know, but for low quantity runs I do it with hot air and without stencil, with very good results. And for this design, size is a constrain. If I were to do a bigger run, I'd rearrange the pcb to be one side only and get it done somewhere lije JLCPCB.

                                  Thanks for the advice anyway πŸ™‚

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    marcelorider
                                    last edited by 10 Mar 2021, 13:42

                                    It’s getting really nice πŸ‘πŸ»
                                    I’m pumped to get my hands on one!

                                    1 Reply Last reply Reply Quote 1
                                    • undefined
                                      Egon.Net
                                      last edited by 10 Mar 2021, 16:05

                                      Please everyone wanting some pcb's PM me with:

                                      • Number of PCB's required
                                      • Bare PCB/DIY kit/assembled
                                      • Where to send in the world

                                      I want to do a small batch first (10 or so), but since I don't know how many boards you all may need, maybe a bit bigger batch could be enough. Once I have this numbers, I'll put a price for every option.

                                      Thanks in advance to everyone!

                                      1 Reply Last reply Reply Quote 0
                                      • undefined
                                        Egon.Net
                                        last edited by 11 Mar 2021, 10:30

                                        Just received one query... No one else wants to enter the first batch?

                                        undefined 1 Reply Last reply 11 Mar 2021, 11:58 Reply Quote 1
                                        • undefined
                                          fcwilt @Egon.Net
                                          last edited by 11 Mar 2021, 11:58

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

                                          Just received one query... No one else wants to enter the first batch?

                                          You asked for a PM but I don't know what that is.

                                          I do want some as I previously mentioned.

                                          If the price is right I would want 25.

                                          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

                                          undefined 1 Reply Last reply 11 Mar 2021, 13:13 Reply Quote 0
                                          81 out of 139
                                          • First post
                                            81/139
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA