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

    GPIO input at 5V

    Scheduled Pinned Locked Moved
    Using Duet Controllers
    6
    15
    731
    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.
    • taconiteundefined
      taconite
      last edited by

      Hey guys,

      I declared the pin GPIO2 on GPIO Header of the duet as Input but it is all the time at +5V. Same goes for GPIO1

      M950 J1 C"duex.gp1"
      M950 J3 C"duex.gp2"
      M950 P4 C"duex.gp3"
      

      In the rest of the config.g there is no other J* that could conflict with the definition.

      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

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

        @taconite those pins have 10K pullup resistors to +5V. That's why you measure 5V on them.

        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

        taconiteundefined 1 Reply Last reply Reply Quote 0
        • taconiteundefined
          taconite @dc42
          last edited by taconite

          @dc42 So that means that I can't trigger them with 5V even if the pull up resistor is not enabled with ^

          EDIT: Which would make no sense because I've done this before.

          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

          alankilianundefined zaptaundefined 2 Replies Last reply Reply Quote 0
          • alankilianundefined
            alankilian @taconite
            last edited by

            @taconite A 10,000 Ohm pullup is "weak" so you can connect it to something that can supply a 0 Volt signal and a 5 Volt signal and it will work properly.

            If you have a device that can ONLY supply 5 Volts and cannot "pull to ground" then there will be more work to get it running on these particular inputs.

            • What are you connecting to these inputs?

            Maybe we can help get them running.

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

            TomWundefined 1 Reply Last reply Reply Quote 0
            • TomWundefined
              TomW @alankilian
              last edited by

              @alankilian If you want to trigger those inputs, wire in a CMOS IC such as the 74LV14 inverting buffer. It runs from a +5v supply and will invert your signal, while safely driving the GPIO input on the MPU.

              If you don't want the signal inverted, then cascade two gates, serially. Be sure that you tie any unused input pins (there are 6 of them) to either GND or the +5V (this keeps the gate from oscillating and burning itself out).

              enjoy!

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

                @tomw Yes, that will work.

                Or you can also use a single NPN or PNP transistor in fully-saturated mode depending on which way you want the drive to go.

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

                1 Reply Last reply Reply Quote 0
                • zaptaundefined
                  zapta @taconite
                  last edited by

                  @taconite said in GPIO input at 5V:

                  So that means that I can't trigger them with 5V

                  How do you plan to trigger them? What do you plan to connect to that input?

                  1 Reply Last reply Reply Quote 0
                  • taconiteundefined
                    taconite
                    last edited by

                    Thank you all for your replies @TomW @alankilian @zapta

                    I have been using the GPIOs already several times like this (not on this Duex 5 but on others and on Duet2s aswell)

                    bffd99ea-eeec-4c03-a529-961d66f34572-image.png

                    the only difference is that I am not using a 4N35 anymore but TCMT4100

                    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

                    alankilianundefined dc42undefined 2 Replies Last reply Reply Quote 0
                    • alankilianundefined
                      alankilian @taconite
                      last edited by

                      @taconite Hmmmmm.

                      I'm not understanding your circuit well.

                      I could guess which pins do what, but if you could add a part number and pin numbers above that would make me not have to guess.

                      (OK, I'll guess just to get started.)

                      • I think on the upper-right you mean that you pull that pin up to 5 Volts through a 10K Ohm resistor.
                      • I think there's probably a phototransistor between the upper-right and lower-right pins.
                      • I don't know if it's an NPN or PNP phototransistor.
                      • I think you've got the lower-right pin connected to a GPIO Input pin.
                      • I don't know quite how that's supposed to work.

                      The TCMT4100data sheet shows an example circuit like this and I think it will work for you.

                      7f3eb6cd-b81b-4072-b201-bcb3348c0447-image.png

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

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

                        @taconite if you don't mind the input being inverted, try this:

                        alt text

                        You can leave out R2 because the 10K pullup on the DueX will provide that function.

                        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
                        • taconiteundefined
                          taconite
                          last edited by taconite

                          @alankilian
                          You are totally right - there are no such things as obvious - I am sorry that I did not provide all the information you need.

                          a70e55a3-080f-4ed5-a860-8f8c0224ffce-image.png

                          @dc42
                          So In my head the Duet GPIO Inputs looks something like this

                          3c001f22-d0ee-465b-94c0-ae096092b701-image.png

                          I don't mind if its inverted, the problem is that I already have a PCB with the functionality. Problem is that I am not that deep into circuit design. I don't get why it was working before ( did I plan the TCMT4100 wrong)?

                          EDIT:
                          Oh no I see my error ...

                          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

                          dc42undefined zaptaundefined 2 Replies Last reply Reply Quote 0
                          • dc42undefined
                            dc42 administrators @taconite
                            last edited by

                            @taconite said in GPIO input at 5V:

                            So In my head the Duet GPIO Inputs looks something like this

                            The 10K pullup to +5V is permanent, it's a resistor on the DueX. No need to use ^ to get it.

                            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 1
                            • taconiteundefined
                              taconite
                              last edited by

                              But then I guess the documentation is wrong

                              4a7e4a37-b190-486a-979d-f45c526acf75-image.png

                              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

                              T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
                              • T3P3Tonyundefined
                                T3P3Tony administrators @taconite
                                last edited by

                                @taconite thanks for pointing that out i have updated the M950 documentation to note that some IO pins may be pulled up and to check the hardware pages.

                                www.duet3d.com

                                1 Reply Last reply Reply Quote 1
                                • zaptaundefined
                                  zapta @taconite
                                  last edited by

                                  @taconite a couple of notes regarding your post:

                                  1. The internal circuit of the input looks like this, with no connection to ground.

                                  8811d975-4183-4a84-a65c-041d8c838c5c-image.png

                                  1. Since the input is pulled down, you want to connect your opto coupler between the input and ground and use the inversion symbol "!" if needed. (You could still have an external pullup resistor if the internal 10K is too high for your purpose, if this an issue, you can ask here).

                                  e8edb431-4447-4588-9b03-23c173a71eca-image.png

                                  BTW, if you would use a duet 3 board, you may be able to drop the opto coupler all together since some of the input are can get higher voltages.

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