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

    Controling a Relay

    Scheduled Pinned Locked Moved
    Using Duet Controllers
    3
    5
    303
    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.
    • Mike 0undefined
      Mike 0
      last edited by

      I have an E3D toolchanger and I connected an 5V Relay to a GPIO Pin 1 on my duex board.
      This is the configuration in the config.g file.

      M950 P10 C"duex.gp1"  ; Load GPIO 1 Pint to output P10 
      M42 P10 S0            ; Switch off output P10     
      

      I then switch the Relay on and off via a macro with the command

      M42 P10 S1            ; Switch on output P10     
      

      and

      M42 P10 S0            ; Switch off output P10     
      

      this works fine.
      But when I'm printing and the relay is connected, I get this error messages:
      Error messages.JPG

      Another problem I have is that during longer prints and if the relay is connected the fans (T2 and T3) connected to the Duex stop working and the relay is also not working anymore. Only after a power off and Power on, the duex operates normally.

      The relay I'm using is rated for 5VDC and 71mA SRD-05VDC-SL-C-Datasheet.pdf
      Songle SRD-05VDC-SL-C.

      The 5V power supply and the GND I also took from the GPIO pin "Bar".

      What could be the reason that the Duex board stops working and why I get this error messages.

      alankilianundefined 1 Reply Last reply Reply Quote 0
      • alankilianundefined
        alankilian @Mike 0
        last edited by alankilian

        @mike-0 I think you are trying to draw too much current from that GPIO pin.
        (Note, I do not have this board, so I'm going on previous conversations.)

        HERE is a link to a thread that discusses it.

        SeemeCNC Rostock Max V3 converted to V3.2 with a Duet2 Ethernet Firmware 3.2 and SE300

        Mike 0undefined 1 Reply Last reply Reply Quote 0
        • Mike 0undefined
          Mike 0 @alankilian
          last edited by

          @alankilian Thanks a lot for the link. I think that could the problem, I do not found any information how much high the current of the 5V output of the Duex GPIO pins is rated.

          But as mentioned in your linked thread, I could try to grab 5V from the "main board".
          Some People also used spare fan outputs. But I think the GPIO are the correct way of doing it, and in the future I might need the fan outputs.

          Thanks again.

          rjenkinsgbundefined 1 Reply Last reply Reply Quote 0
          • rjenkinsgbundefined
            rjenkinsgb @Mike 0
            last edited by rjenkinsgb

            @mike-0
            71mA is not a lot in general terms, but it is when direct from a microcontroller I/O pin; they are more typically rated in the 5 - 25mA range, depending on the exact device.

            A fan (or heater) output would be far more appropriate for such a load, and it would not cause overheating.

            As is is, you could slowly be destroying the MCU on the duex.

            Also, do you have a flywheel diode connected across the relay coil?
            If not, it may be causing a high voltage spike when you switch it off.

            Robert J.

            Printers: Overlord pro, Kossel XL+ with Duet 6HC and "Frankentron", TronXY X5SA Pro converted to E3D toolchange with Duet 6HC and 1LC toolboards.

            Mike 0undefined 1 Reply Last reply Reply Quote 0
            • Mike 0undefined
              Mike 0 @rjenkinsgb
              last edited by

              @rjenkinsgb The load is not on the GPIO pin. It is on the 5V power supply of the GPIO pin bar, but I guess that power supply is also not strong enough. I did not come around to try it jet, connecting it to main 5V power supply.

              I know I can still use the fan output. But I try to avoid it, because I might need them later.

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