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

    Duet3/pi DCS is unavailable after wiring 24V

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    duet 3 rasberry pi
    8
    166
    11.9k
    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.
    • fractalengineerundefined
      fractalengineer
      last edited by

      damn I can't edit the previous post but I figured I messed up the mirroring of the pins on the ribbon; here's the actual result

      pi@duet3:~ $ RDY=22 CS=24 ; {
      > gpio -1 mode $CS out
      > gpio -1 mode $RDY in
      > gpio -1 write $CS 1 && echo "(Pin RDY/$RDY) `gpio -1 read $RDY` should equal `gpio -1 read $CS` (Pin CS/$CS)"
      > gpio -1 write $CS 0 && echo "(Pin RDY/$RDY) `gpio -1 read $RDY` should equal `gpio -1 read $CS` (Pin CS/$CS)"
      > { ~/spidev-test/spidev_test -v -s 8000000 -D /dev/spidev0.0 && echo RX should equal TX. ;} | tail -n3 | cut -b-100 ;}
      (Pin RDY/22) 0 should equal 1 (Pin CS/24)
      (Pin RDY/22) 0 should equal 0 (Pin CS/24)
      TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D
      RX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D
      RX should equal TX.
      

      Railcore II ZL

      A Former User? 1 Reply Last reply Reply Quote 0
      • A Former User?
        A Former User @fractalengineer
        last edited by

        @fractalengineer said in Duet3/pi flashing Diag LED after wiring 24V DCS is unavailable:

        here's the actual result

        ah, i got hung on the "interesting" part, which stayed the same so no worries.

        Its the RDY or CS pin that should get focus for now.

        1 Reply Last reply Reply Quote 0
        • A Former User?
          A Former User @fractalengineer
          last edited by

          @fractalengineer said in Duet3/pi flashing Diag LED after wiring 24V DCS is unavailable:

          So can we try wiring using the duponts? what are the minimum wires required?

          you can, but if jumpering it directly on the pi doesn't work, new wires isn't going to help.

          The pins are shown on the Duet3 wiring diagram, in the note. This does visualize it (I've only connected two of the 5 grounds, but it should suffice). Connect 1:1 from the Duet to the Pi taking care to correctly identifying pin 1.
          ca311733-c5d1-400f-9bec-de11a27423fe-image.png

          fractalengineerundefined 1 Reply Last reply Reply Quote 0
          • fractalengineerundefined
            fractalengineer @A Former User
            last edited by fractalengineer

            @bearer Ok so the next steps would be:

            1-Stopping DCS and rerunning the test
            2-Jump RDY (22) to 3.3v
            3-Change RDY pin
            4-Swap to the other Rpi
            5-Wire with all jumpers

            Am I correct?

            Those are pretty heavy operations I'll try to hang there but I hope I won't mess anything

            Here's 1-Stopping DCS and rerunning the test

            pi@duet3:~ $ sudo systemctl stop duetwebserver
            pi@duet3:~ $ sudo systemctl stop duetcontrolserver
            pi@duet3:~ $ RDY=22 CS=24 ; {
            gpio -1 mode $RDY in
            > gpio -1 mode $CS out
            > gpio -1 mode $RDY in
            > gpio -1 write $CS 1 && echo "(Pin RDY/$RDY) `gpio -1 read $RDY` should equal `gpio -1 read $CS` (Pin CS/$CS)"
            > gpio -1 write $CS 0 && echo "(Pin RDY/$RDY) `gpio -1 read $RDY` should equal `gpio -1 read $CS` (Pin CS/$CS)"
            > { ~/spidev-test/spidev_test -v -s 8000000 -D /dev/spidev0.0 && echo RX should equal TX. ;} | tail -n3 | cut -b-100 ;}
            (Pin RDY/22) 0 should equal 1 (Pin CS/24)
            (Pin RDY/22) 0 should equal 0 (Pin CS/24)
            TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D
            RX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D
            RX should equal TX.
            

            Railcore II ZL

            A Former User? 1 Reply Last reply Reply Quote 0
            • A Former User?
              A Former User @fractalengineer
              last edited by A Former User

              @fractalengineer

              Tbh, I'd start by just having jumpers on the other pi.

              Then I'd move the jumpers to jump RDY(26) to CS(24) and run the gpio test again, targeting the correct RDY pin. edit: actually run the gpio test before and after changing the jumper, ignoring the output the first time (to ensure the pin is in input mode before connecting it)

              If still no dice, then I'd wire RDY to 3.3v and run the gpio test again, targeting the correct RDY pin be it 22 or 26. (again run gpio test before making changes to ensure pin is input)

              If all of that fails then no point in the rest.

              If something succeeds then try with the duet and whatever combination of Pi and RDY pin gave the desired test result.

              Also note I edited the post about editing config.json to reflect which pin number to enter if you get to that point.

              fractalengineerundefined 1 Reply Last reply Reply Quote 0
              • fractalengineerundefined
                fractalengineer @A Former User
                last edited by

                @bearer thanks;

                Ok so here's my wiring;

                I wired both grounds and both +5v; is this about right?

                94243092_2542474216069513_7843403288077664256_n.jpg

                Railcore II ZL

                A Former User? 1 Reply Last reply Reply Quote 0
                • A Former User?
                  A Former User @fractalengineer
                  last edited by A Former User

                  @fractalengineer said in Duet3/pi flashing Diag LED after wiring 24V DCS is unavailable:

                  I wired both grounds and both +5v; is this about right?

                  Yes, they're just double up to reduce voltage drop.

                  It looks right as far as I can tell; but not easy to see if blue/purple was swapped on the way over. The rest I'm reasonable confident in.

                  Although I'd be very surprised to see it working if the gpio test didn't indicate RDY and CS had the same readings on each line.

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

                    Does the soldering of the 26-way connector look OK on the underside of the Duet?

                    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
                    • chrishammundefined
                      chrishamm administrators
                      last edited by

                      Side note: DCS uses the driver that provides /dev/gpiochip because it allows faster reactions to pin level transitions than the standard sysfs GPIO driver. So I recommend using the tools from the gpiod package for GPIO troubleshooting (install via apt-get install gpiod). So by running gpiodetect you can see all the available GPIO lines. Once you shut down DCS, you can check the pin state by running gpioget 0 25 and that should output 1. I'll install that package by default in the next DuetPi version.

                      Duet software engineer

                      A Former User? 1 Reply Last reply Reply Quote 0
                      • A Former User?
                        A Former User @chrishamm
                        last edited by A Former User

                        @chrishamm said in Duet3/pi flashing Diag LED after wiring 24V DCS is unavailable:

                        So I recommend using the tools from the gpiod package for GPIO troubleshooting

                        ah, thats why wiringpi wasn't a dependency any more. I'll work it into the instructions at a later time. thanks for the heads up.

                        So by running gpiodetect you can see all the available GPIO lines.

                        i think you meant gpioinfo but close enough.

                        1 Reply Last reply Reply Quote 0
                        • fractalengineerundefined
                          fractalengineer @A Former User
                          last edited by

                          @bearer damn you caught it!

                          Thanks; ok so the problem still exists with the jumpers; not sure if relevant wired to duet but here's the test:

                          pi@duet3:~ $ RDY=22 CS=24 ; {  gpio -1 mode $CS out; gpio -1 mode $RDY in; gpio -1 write $CS 1 && echo "(Pin RDY/$RDY) `gpio -1 read $RDY` should equal `gpio -1 read $CS` (Pin CS/$CS)"; gpio -1 write $CS 0 && echo "(Pin RDY/$RDY) `gpio -1 read $RDY` should equal `gpio -1 read $CS` (Pin CS/$CS)"; { ~/spidev-test/spidev_test -v -s 8000000 -D /dev/spidev0.0 && echo RX should equal TX. ;} | tail -n3 | cut -b-100 ;}
                          (Pin RDY/22) 0 should equal 1 (Pin CS/24)
                          (Pin RDY/22) 0 should equal 0 (Pin CS/24)
                          TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D
                          RX | 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                          RX should equal TX.
                          

                          @dc42 solderings look perfect; both on the duet and the pi

                          Railcore II ZL

                          A Former User? 1 Reply Last reply Reply Quote 0
                          • A Former User?
                            A Former User @fractalengineer
                            last edited by

                            @fractalengineer said in Duet3/pi flashing Diag LED after wiring 24V DCS is unavailable:

                            not sure if relevant wired to duet but here's the test:

                            no its not, it'll only give the same readings if the pins are shorted; which is why I would wait with connecting the duet until testing with just jumpers show its working properly.

                            1 Reply Last reply Reply Quote 0
                            • fractalengineerundefined
                              fractalengineer
                              last edited by

                              @bearer Ok here's the result moving RDY from 22 to 26:

                              24 is bridged to 26

                              pi@duet3:~ $ gpio -1 mode 26 in
                              pi@duet3:~ $ RDY=26 CS=24 ; {
                              > gpio -1 mode $CS out
                              > gpio -1 mode $RDY in
                              > gpio -1 write $CS 1 && echo "(Pin RDY/$RDY) `gpio -1 read $RDY` should equal `gpio -1 read $CS` (Pin CS/$CS)"
                              > gpio -1 write $CS 0 && echo "(Pin RDY/$RDY) `gpio -1 read $RDY` should equal `gpio -1 read $CS` (Pin CS/$CS)"
                              > { ~/spidev-test/spidev_test -v -s 8000000 -D /dev/spidev0.0 && echo RX should equal TX. ;} | tail -n3 | cut -b-100 ;}
                              (Pin RDY/26) 1 should equal 1 (Pin CS/24)
                              (Pin RDY/26) 0 should equal 0 (Pin CS/24)
                              TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D
                              RX | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                              RX should equal TX.
                              

                              Railcore II ZL

                              1 Reply Last reply Reply Quote 0
                              • A Former User?
                                A Former User
                                last edited by A Former User

                                Okay, pin 22 dead. progress.

                                Now back to editing config.json.

                                The physical pin numbers on the PI does not match the internal numbering in the CPU, config.json needs the internal numbering.

                                Run this mess of a command and check it outputs 7.
                                gpio readall | cut -b41-90 | grep "^| 26 " | cut -b35-38

                                then edit /opt/dsf/conf/config.json and find the line

                                "TransferReadyPin": 25,
                                change it to
                                "TransferReadyPin": 7,

                                (or whatever number the previous gpio readall... command returned)

                                buy volcano insurance and try the duet making sure to wire pin 22 from the duet to pin 26 on the pi

                                edit: suddenly I have a concern about rebooting the pi in this configuration. do not reboot the pi with the modified wiring; I'll need a bit of time to test if its aproblem that the pin reverts to an output at boot. (or maybe its better to just pick anoter pin that defaults to input right of the bat. I picked 26 because it only meant moving the jumper one possition over.

                                Yeah, after consideration I'd use physical pin 18 instead.
                                gpio readall | cut -b41-90 | grep "^| 18 " | cut -b35-38
                                should return (internal pin number) 24, and that number goes into config.json after then wiring physical 18 on the pi to pin 22 on the Duet. Pardon the detour, making the path up as we go - on the bright side you've singel handedly made sure all future troubles have a path to follow and you've done it like a champ!

                                1 Reply Last reply Reply Quote 3
                                • fractalengineerundefined
                                  fractalengineer
                                  last edited by

                                  Wow @bearer you absolutely killed it

                                  552be438-6564-465f-9b82-ecd892c089c8-image.png

                                  Thank you everyone!

                                  Railcore II ZL

                                  A Former User? 1 Reply Last reply Reply Quote 0
                                  • A Former User?
                                    A Former User @fractalengineer
                                    last edited by

                                    @fractalengineer said in Duet3/pi flashing Diag LED after wiring 24V DCS is unavailable:

                                    you absolutely killed it

                                    ...again with the jokes, but technically you killed it, i fixed it, or put a band aid on it at least ...

                                    volcano insurance ftw!

                                    fractalengineerundefined 1 Reply Last reply Reply Quote 1
                                    • Danalundefined
                                      Danal
                                      last edited by

                                      WHOO HOOO! As a mostly bystander, congrats to @bearer for all the "figurin" and to @fractalengineer who now has a running machine.

                                      @fractalengineer, now the fun REALLY starts!

                                      Delta / Kossel printer fanatic

                                      1 Reply Last reply Reply Quote 1
                                      • fractalengineerundefined
                                        fractalengineer @A Former User
                                        last edited by

                                        @bearer lol yess

                                        I was thinking for a neater build would it make sense to swap the 22 and 18 wires like so?

                                        efb6f53a-76ca-4dfc-bdc2-e80289d59138-image.png

                                        Railcore II ZL

                                        A Former User? 1 Reply Last reply Reply Quote 0
                                        • A Former User?
                                          A Former User @fractalengineer
                                          last edited by A Former User

                                          @fractalengineer said in Duet3/pi flashing Diag LED after wiring 24V DCS is unavailable:

                                          @bearer lol yess

                                          I was thinking for a neater build would it make sense to swap the 22 and 18 wires like so?

                                          Its a neat idea, but i'd trim a bit off to avoid reterminating the idc where the insulation is already displaced

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

                                            This way (as on the Duet 2 automated test equipment prototype on my desk) avoids having to disturb the IDC connectors:

                                            2020-04-25 21.28.29.jpg

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