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

    Machine Power-On Sequence

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    3
    11
    306
    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.
    • Zdenkoundefined
      Zdenko
      last edited by

      Hello,

      I am trying to find the best Power-On sequence for my PnP machine.

      I have an enclosure with complete electronics where the Duet 3 Main Board 6XD and Duet 3 Mini 5+ are. From the enclosure to the head of the machine, I run the +24V and CAN-FD lines for two Duet 3 Expansion Board 3HC-s.

      The computer on which the complete machine runs is outside of the enclosure, and I run the USB cable through the panel connector to the Duet 3 Main Board 6XD, and also the LAN.

      The problem I am facing is that if I Power on the computer first, the USB will power Duet 3 Main Board 6XD, and when I activate the Main Switch located on the enclosure, power will be delivered to servo drives and +24V PSU which delivers power to Duet 3 Mini 5+ and two Duet 3 Expansion Board 3HC-s in the head of the machine. In this sequence, all three boards do not initialize properly, I need to run M999 in DWC then everything is ok, all boards are synchronized perfectly and the machine is working as it should.

      Option two is, when the computer is turned off and there is no power over USB, I activate the Main Switch on the enclosure to power up the servo drives and +24PSU, all Duet boards power on inside of the enclosure and in the head of the machine in the same time then I turn on the computer and I can see all boards are connected/synced successfully.

      Is there a way to combat this, for example using only data cable for USB (without +5V) or something else so that if the computer is powered on first I do not have an issue if the +24V is powered on after, what would be the best approach to this?

      Thank you,

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

        @Zdenko you could use a loop near the start of config.g to wait until VIN is high enough before proceeding with the rest of config.g.

        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

        Zdenkoundefined 1 Reply Last reply Reply Quote 0
        • Zdenkoundefined
          Zdenko @dc42
          last edited by

          @dc42

          Hello David, thank you for the replay.

          In that case, I would need to use one gpIn[1].value as a "sensor" where I connect +24V to detect its presence, right? Or is there some other elegant solution?

          Or is it better to do it over daemon.g and config.g together and to implement some kind of continuous monitoring?

          Thank you,

          droftartsundefined 1 Reply Last reply Reply Quote 0
          • droftartsundefined
            droftarts administrators @Zdenko
            last edited by

            @Zdenko Why do you have USB connected anyway? Do you need to communicate over USB when power is off to the rest of the system? You could modify the USB cable so it doesn't provide +5V.

            What dc42 is suggesting is to query the object model, and the loop would be in config.g. No need for external power monitor. I think the correct variable to check is boards[0].vIn.current. It would mean that the board is not accessible until main power is turned on.

            Ian

            Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

            Zdenkoundefined 1 Reply Last reply Reply Quote 0
            • Zdenkoundefined
              Zdenko @droftarts
              last edited by

              @droftarts

              Hello Ian,

              Thank you for the replay,

              I do not need to communicate with the system when the main power is off.

              It was also my idea to modify the cable as you mentioned or to remove the +5V regulator from PCI-E which is used only for Duet 3 Main Board 6XD.

              I will investigate if I can implement it with boards[0].vIn.current, thanks for the tip!

              droftartsundefined 1 Reply Last reply Reply Quote 0
              • droftartsundefined
                droftarts administrators @Zdenko
                last edited by

                @Zdenko I would modify the cheap cable, rather than risking desoldering anything from the expensive PC motherboard, or expensive Duet. Putting a piece of Kapton tape over the +5V contact (assuming USB 2 cable) might be enough.

                Ian

                Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                Zdenkoundefined 1 Reply Last reply Reply Quote 0
                • Zdenkoundefined
                  Zdenko @droftarts
                  last edited by

                  @droftarts
                  Hi Ian,

                  I have 4 separate PCI-E to USB controllers connected to MB, one is like 8Eur and one of them is only dedicated to Duet, so removing 5V regulator from a single card is not an issue.

                  I tried to modify the config.g with boards[0].vIn.current, but I end up in some kind of a loop, need to investigate that approach in more detail.

                  Thank you,

                  droftartsundefined 1 Reply Last reply Reply Quote 0
                  • droftartsundefined
                    droftarts administrators @Zdenko
                    last edited by

                    @Zdenko Something like this at the beginning of config.g:

                    while boards[0].vIn.current < 10
                        G4 S2
                    

                    That should check if VIN is less than 10V every two seconds. If it is less than 10, it loops, if it is more than 10, it continues through the config.g.

                    Ian

                    Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                    Zdenkoundefined 1 Reply Last reply Reply Quote 0
                    • Zdenkoundefined
                      Zdenko @droftarts
                      last edited by

                      @droftarts

                      Cheers Ian,

                      That works as intended, but unfortunately, it is not "bulletproof" as much as I hoped so.

                      In case Main switch is powered off, extension boards lose power but Duet 3 Main Board 6XD still has power from USB meaning extension boards drop the CAN connection, and powering up the main switch from the enclosure will not re-initialize the config.g to sync extension boards.

                      It seems to me I will need to cut/remove the USB power, or make some constant monitoring loop.

                      Thank you,

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

                        @Zdenko you could use daemon.g to reset the board if VIN power is lost.

                        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

                        Zdenkoundefined 1 Reply Last reply Reply Quote 0
                        • Zdenkoundefined
                          Zdenko @dc42
                          last edited by

                          Hey @dc42,

                          Currently I removed +5V from dedicated PCI-Ex to USB adapter for Duet 3 Main Board 6XD and the system is working as intended.

                          When I catch some time I will investigate the option with daemon.g and VIN power monitoring so that this external modification is not needed.

                          Thank you,

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