• Tags
  • Documentation
  • Order
  • Register
  • Login
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.
  • undefined
    Mike 0
    last edited by 10 Jan 2022, 17:56

    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.

    undefined 1 Reply Last reply 10 Jan 2022, 18:16 Reply Quote 0
    • undefined
      alankilian @Mike 0
      last edited by alankilian 1 Oct 2022, 18:17 10 Jan 2022, 18:16

      @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

      undefined 1 Reply Last reply 10 Jan 2022, 18:29 Reply Quote 0
      • undefined
        Mike 0 @alankilian
        last edited by 10 Jan 2022, 18:29

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

        undefined 1 Reply Last reply 10 Jan 2022, 19:21 Reply Quote 0
        • undefined
          rjenkinsgb @Mike 0
          last edited by rjenkinsgb 1 Oct 2022, 19:23 10 Jan 2022, 19:21

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

          undefined 1 Reply Last reply 14 Jan 2022, 21:13 Reply Quote 0
          • undefined
            Mike 0 @rjenkinsgb
            last edited by 14 Jan 2022, 21:13

            @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
            1 out of 5
            • First post
              1/5
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA