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

    Trying to control relays through fan connections

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    5
    12
    1.0k
    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.
    • fcwiltundefined
      fcwilt
      last edited by

      Hi,

      The + fan connection on the Duet is just tied to the board supply voltage.

      The - fan connection is the one that is switched (to ground).

      I would think that a PWM setting of 255 would be a constant state, no pulsing.

      We need more information about your relay module.

      Thanks.

      Frederick

      Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

      1 Reply Last reply Reply Quote 0
      • deckingmanundefined
        deckingman @PropellerHat
        last edited by

        @propellerhat It's the negative side of the fan connectors that gets switched and controlled by PWM, not the positive side. BUT, I don't think it's a good idea to connect relays directly to fan connectors. It's not my area of expertise so no doubt someone else will jump in and confirm or correct me if I'm wrong. It has something to do with back EMF when the magnetic field of the coil collapses and I think you need to use fly back diodes or some such (but I could be wrong).

        Ian
        https://somei3deas.wordpress.com/
        https://www.youtube.com/@deckingman

        1 Reply Last reply Reply Quote 0
        • PropellerHatundefined
          PropellerHat
          last edited by PropellerHat

          Bummer.... Tried already a heater channel for the same with same results.

          The module is a no brand optocoupled one.

          This:
          https://www.amazon.es/ILS-acoplador-Canales-activación-Arduino/dp/B07H4KWV5P/ref=sr_1_17?__mk_es_ES=ÅMÅŽÕÑ&keywords=24v+rele+modulo&qid=1556372772&s=gateway&sr=8-17

          Stephen6309undefined 1 Reply Last reply Reply Quote 0
          • PropellerHatundefined
            PropellerHat
            last edited by PropellerHat

            And oh, after confirming the relay module is optoisolated I tried also desperately poking the relay module's control input with the negative wire from fan out and heater out, and also that caused the relay to activate 😮 This doesn't compute at all for me.

            What ever I connect to the module that relay starts pulling right away and the state can not be altered with any command even though my multimeter shows the voltage being what expected in every case.

            1 Reply Last reply Reply Quote 0
            • PropellerHatundefined
              PropellerHat
              last edited by PropellerHat

              How about the expansion header's heater outputs? Are these positive or negative connections (Heater 3-7)?

              Before today I would have expected that every heater connection is positive and switched, and the - of every heater is connected directly to ground.

              Maybe a 3.3v relay module connected in the expansion header's heater pin and ground would do it..?

              1 Reply Last reply Reply Quote 0
              • Stephen6309undefined
                Stephen6309 @PropellerHat
                last edited by Stephen6309

                @propellerhat Did you try setting the input for the relay channel on the board to expect a low signal? The photo shows they are all set to high.

                PropellerHatundefined 1 Reply Last reply Reply Quote 0
                • PropellerHatundefined
                  PropellerHat @Stephen6309
                  last edited by PropellerHat

                  @stephen6309

                  Yes I tried that too, when setting the fan out into 5 volts :I

                  What are they exactly, the HIGH and LOW input voltages?

                  1 Reply Last reply Reply Quote 0
                  • PropellerHatundefined
                    PropellerHat
                    last edited by PropellerHat

                    Just did a few tests with the cheapo relay module. I cut a trace on the negative side of the optocoupler's input and fed external 2 volts into it and the relay latched as I was hoping. Probably gonna try to get the expansion header's 3,3v I/0 to control the optocouplers similarly directly (bypassing the control connectors of the module) if you guys don't throw better ideas :I

                    EDIT:
                    getting the 3,3V from the header's pins 8 and 42 without setting the heater3 on. Doesn't look good, surprisingly.

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

                      @propellerhat

                      I don't understand why setting the relay boards input(s) to the low setting didn't work.

                      Of course it would be good to know what the voltage levels expected at these input are. You would not want to apply too much voltage.

                      Perhaps the inputs don't have pull-up resistors to pull the input up into the "off" state.

                      If you do need a pull-up resistor you could place a resistor (say 1000 ohms) connected to the two fan outputs and then feed the fan- output to the relay input.

                      If you need to limit the voltage to the relay board add a second resistor of a suitable value between fan- and ground.

                      For example if your board is powered with 12 VDC two 1000 ohm resistors would limit the voltage to the relay module to 6 VDC.

                      A 1000 ohm resistor and a 560 ohm resistor would limit the voltage to appx 4 VDC.

                      You should not need to be cutting any traces.

                      Frederick

                      Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

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

                        You can drive a relay (not a relay module) directly from a fan output, if the relay coil voltage is the same as VFAN.

                        To drive a relay module, use a spare heater output on the expansion bus. The heater outputs are active low, so to make the relays be off at power up, connect the optically isolated input of your relay module between +3.3V and the heater output pin on the expansion connector.

                        Make sure your relay module really does have optically isolated inputs, and take great care not to short +3.3V to anything else.

                        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 0
                        • PropellerHatundefined
                          PropellerHat
                          last edited by

                          Thanks for the tips

                          I have been out the workshop a couple of days but connected already the other day one relay directly to the fan pins and looks like it's the no-brainer way to go, at least now.

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