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

    Assistance Needed for Wiring in a Prototype CNC Gantry System

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    8
    20
    578
    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.
    • username19undefined
      username19
      last edited by

      Hello everyone,

      I'm currently working on a project to design an automated gantry system for a warehouse environment, aimed at handling the transportation and palletizing of bags. The setup includes a CNC kit with a Duet 2 controller, a Raspberry Pi, an ultrasonic sensor on the gantry's end effector, and a camera overseeing the pallet area. The end effector is equipped with a vacuum system with suction cups for lifting bags.

      I'm reaching out for advice on the best practices for wiring these components together. Here are the key aspects I need help with:

      Integrating the Raspberry Pi with the Duet 2 controller for data communication.
      Wiring the ultrasonic sensor to the gantry system to ensure accurate distance measurement.
      Connecting the camera to the Raspberry Pi for image processing and location identification.
      Implementing the wiring for the vacuum system to be controlled by the gantry's movements and sensor inputs.
      Any suggestions, wiring diagrams, or tips on best practices for ensuring reliable and efficient connections among these components would be greatly appreciated.

      Thanks in advance for your help!

      o_lampeundefined droftartsundefined dc42undefined 3 Replies Last reply Reply Quote 0
      • o_lampeundefined
        o_lampe @username19
        last edited by

        @Rackan-Mansour To me it seems, the Raspberry does all the hard work and you should start looking in their forums for help.

        • How to read the ultrasonic sensor
        • How to process camera images

        then let the RasPi send a gcode line to the duet with the new found coordinates and trigger some predefined macros (eg. M98 "start-suction.g" )
        The duet can handle the gcode, move the gantry, switch vacuum valves on/off, etc.

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

          @Rackan-Mansour as @o_lampe says, it sounds like the Duet is being used quite simply as a motion controller for the gantry, and RPi is doing most of the work. To add, connect the Duet via USB, and send commands to it via USB as a serial port.

          Depending on the size of the gantry, you may need to use external stepper drivers if you use motors bigger than the Duet can handle, ie bigger than 2A at 24V. There is an external drive adapter for the Duet 2, see https://docs.duet3d.com/Duet3D_hardware/Duet_2_family/Duet_Expansion_Breakout_Board

          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

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

            @Rackan-Mansour just a note that if you are likely to make more of these, I strongly recommend that you base it on a Duet 3 board instead of Duet 2.

            It would be possible to add support for the ultrasonic sensor in RRF for Duet 3, if that would be helpful in controlling the system.

            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
            • username19undefined
              username19 @o_lampe
              last edited by

              @o_lampe Hello, thank you for your insight. Could you explain more about the g code or direct me to where i could learn more please?

              infiniteloopundefined T3P3Tonyundefined 2 Replies Last reply Reply Quote 0
              • infiniteloopundefined
                infiniteloop @username19
                last edited by

                @Rackan-Mansour

                Could you explain more about the g code

                Read: https://docs.duet3d.com/en/User_manual/Reference/Gcodes

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

                  @Rackan-Mansour

                  @Rackan-Mansour said in Assistance Needed for Wiring in a Prototype CNC Gantry System:

                  Integrating the Raspberry Pi with the Duet 2 controller for data communication.

                  As @droftarts said, you can send gcodes over USB or over the network - this part of the project can be looked at in more detail once you have the core of its sorted - the cor part is the image processing/location identification

                  Wiring the ultrasonic sensor to the gantry system to ensure accurate distance measurement.

                  You will need to provide the details of the ultrasonic sensor and any control electronics it comes with.

                  Connecting the camera to the Raspberry Pi for image processing and location identification.

                  This is the core of the work by the look of it and while there may be people here who have experience at this, it would be better looking ad, and seeking support from, the machine vision / OpenCV community. Once you have a setup that can process the images and produce the required output movement (i.e. see image, that means move X by "n"mm and Y by "m"mm then its straightforward to send those commands to the Duet.

                  Implementing the wiring for the vacuum system to be controlled by the gantry's movements and sensor inputs.

                  You would need to provide details of the actuators and sensors involved in this system, Once again sounds like something to tackle once you have the machine vision and gantry movement steps done.

                  www.duet3d.com

                  username19undefined 1 Reply Last reply Reply Quote 0
                  • o_lampeundefined
                    o_lampe
                    last edited by

                    There is another thing we should check. The kinematic model of the gantry.
                    Robotic 5-axis kinematic is still in the development-process, but several other geometries are working well.

                    1 Reply Last reply Reply Quote 0
                    • username19undefined
                      username19 @T3P3Tony
                      last edited by

                      @T3P3Tony @o_lampe Thanks a lot guys, these comments are helping me get an idea of how to continue. Could you also give me a brief idea of how all the items should be wired? the duet, the raspberry pi, the pi camera, the ultrasonic sensor, the screen for the pi, the pump.

                      what would connect using ethernet and what would use normal jumper cables.

                      infiniteloopundefined 1 Reply Last reply Reply Quote 0
                      • infiniteloopundefined
                        infiniteloop @username19
                        last edited by

                        @Rackan-Mansour said in Assistance Needed for Wiring in a Prototype CNC Gantry System:

                        Could you also give me a brief idea of how all the items should be wired? the duet, the raspberry pi, the pi camera, the ultrasonic sensor, the screen for the pi, the pump.

                        Really now? You're asking for a complete circuit diagram? Are you serious?

                        Your initial post lists a couple of electronic devices and asks how to wire them - entirely all of them. Same with your latest post. In a near-duplicate post, you request advice on the programming aspects - to be precise: on all of them.

                        Honestly, that’s quite a big shot, so it might be helpful to give us an idea of what base knowledge on your part we can build upon. So far, your request is just a mix of dropping names of components and marketing speech. At least you obviously master the latter one 🕶

                        username19undefined 1 Reply Last reply Reply Quote 1
                        • username19undefined
                          username19 @infiniteloop
                          last edited by

                          @infiniteloop

                          Hey, yeah i get what you mean and i am sorry about that. i used Ai to create two different posts, based on the specifications i had, for the two different forums to get insight from each. I really have no base knowledge. This is for a senior design project, where we are given a sponsor and a problem statement, and are instructed to research, design and manufacture a prototype. We are now in the manufacturing stage after consulting different lab coordinators about the components we need to purchase, and i thought it would be best to ask directly on the duet forum for help on where to start and how to continue. Sorry for the ambiguity. All help is welcome really. There really is no need to be aggressive about it though, it is not that deep. Im just trying to learn

                          infiniteloopundefined 1 Reply Last reply Reply Quote 0
                          • infiniteloopundefined
                            infiniteloop @username19
                            last edited by

                            @Rackan-Mansour

                            I used Ai to create two different posts, based on the specifications i had, for the two different forums to get insight from each.

                            Thanks for the honest answer. You have just yourself to blame for my aggression, it's my natural reaction to stupid AI chatter. Take my good advice and better use your own device - the one between your ears.

                            I really have no base knowledge.

                            Great! I suggest to start with the RasPI. Attach a power supply, keyboard and screen. Then, play with it to explore the operating system. Tutorials can be found on the internet (but don't waste your time on YouTube). Get used to the PI's command line interface (CLI).

                            Next step is to attach the ultrasonic sensor. On the fly, you will learn a lot about the PI’s interfaces and how to deal with them. Pick one of these tutorial projects who address your specific sensor - there are plenty of them. And don’t panic: most of them cover the wiring, too.

                            Then, go and add a camera. Use a low-resolution device, it makes image recognition easier. Once again, use the internet to educate yourself. Main purpose of this exercise is to become familiar with a suitable framework (or library) and how to write code for your specific requirements.

                            Some weeks later, when you are confident to operate the PI and the sensors in a manner which fits with your project, return to this thread: Then, we will talk about the mechanics and how to control them. Your post will not stay unnoticed.

                            o_lampeundefined username19undefined 2 Replies Last reply Reply Quote 0
                            • o_lampeundefined
                              o_lampe @infiniteloop
                              last edited by

                              Sorry [Rant]
                              @Rackan-Mansour Using ChatGPT-AI for your Senior design project fits like a glove to this smart generation.
                              If that's the rule and not the exeption, I see a bright future ahead of us.
                              Is it legal to use AI for such purposes where you come from?

                              oliofundefined username19undefined 2 Replies Last reply Reply Quote 0
                              • oliofundefined
                                oliof @o_lampe
                                last edited by

                                @o_lampe it may not be illegal but as we see it may not be as helpful as people want to believe (-;

                                <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                                1 Reply Last reply Reply Quote 0
                                • username19undefined
                                  username19 @infiniteloop
                                  last edited by

                                  @infiniteloop said in Assistance Needed for Wiring in a Prototype CNC Gantry System:

                                  Great! I suggest to start with the RasPI. Attach a power supply, keyboard and screen. Then, play with it to explore the operating system. Tutorials can be found on the internet (but don't waste your time on YouTube). Get used to the PI's command line interface (CLI).
                                  Next step is to attach the ultrasonic sensor. On the fly, you will learn a lot about the PI’s interfaces and how to deal with them. Pick one of these tutorial projects who address your specific sensor - there are plenty of them. And don’t panic: most of them cover the wiring, too.
                                  Then, go and add a camera. Use a low-resolution device, it makes image recognition easier. Once again, use the internet to educate yourself. Main purpose of this exercise is to become familiar with a suitable framework (or library) and how to write code for your specific requirements.
                                  Some weeks later, when you are confident to operate the PI and the sensors in a manner which fits with your project, return to this thread: Then, we will talk about the mechanics and how to control them. Your post will not stay unnoticed.

                                  Okay great. Thank you, i should have the pi by this coming sunday and i will update you after messing around with it.

                                  1 Reply Last reply Reply Quote 0
                                  • username19undefined
                                    username19 @o_lampe
                                    last edited by

                                    @o_lampe said in Assistance Needed for Wiring in a Prototype CNC Gantry System:

                                    Using ChatGPT-AI for your Senior design project fits like a glove to this smart generation.
                                    If that's the rule and not the exeption, I see a bright future ahead of us.
                                    Is it legal to use AI for such purposes where you come from?

                                    I see what you mean, but if I was able to use it for the whole project i wouldn't be asking questions on this forum 😅. I just used to it to save time writing comprehensive forum posts. I don't believe it is illegal anywhere. It is being used as an enhancement, meaning it should allow us to take on harder challenges. Similar to the introduction of the calculator way back when.

                                    infiniteloopundefined o_lampeundefined 2 Replies Last reply Reply Quote 0
                                    • infiniteloopundefined
                                      infiniteloop @username19
                                      last edited by infiniteloop

                                      @Rackan-Mansour

                                      I just used to it to save time writing comprehensive forum posts.

                                      Dream on. Recall my reaction on that ”stupid AI chatter” as I called it? Read it again. I don't like you to waste my time on such dumb posts just to save a bit of your own. 🤢

                                      I don't believe it is illegal anywhere.

                                      Stupidity has always been free and available in vast quantities. And yes: it’s perfectly legal.

                                      It is being used as an enhancement …

                                      Right, AI amplifies the collective incompetence it has been trained with. So long, and thanks for the fish!

                                      1 Reply Last reply Reply Quote 0
                                      • o_lampeundefined
                                        o_lampe @username19
                                        last edited by

                                        @Rackan-Mansour said in Assistance Needed for Wiring in a Prototype CNC Gantry System:

                                        Similar to the introduction of the calculator way back when.

                                        I'd compare a calculator with a translator, but not with AI.
                                        Because for both cases you need to know what to type in.

                                        infiniteloopundefined 1 Reply Last reply Reply Quote 0
                                        • infiniteloopundefined
                                          infiniteloop @o_lampe
                                          last edited by infiniteloop

                                          @o_lampe I fully agree. Type ’42’ into the calculator - it will never return ’Douglas Adams’, the single reasonable answer I would accept.

                                          Same here: If you don’t know the question, the AI can’t answer it. Having no clue whatsoever, and utterly missing ’Big Thought’, the poor OP even asked the AI to generate the question on its own. Well, the AI wasn’t that bad, in essence, it stated:

                                          ”We want to automate our major enterprise, look at my mixed bag treasury of ’something’, uh, no idea, c'mon and elaborate the blueprints - adhering to best practice, of course.”

                                          Sounds like a lucrative job offer - lest the salary😲. Our admins removed an identical post asking for the required codework to be sent, but the OP simply reposted it a few days later, thus proving a rather limited understanding of social interaction. 🤦

                                          Of course you were perfectly right with your ”Rant”, the OP is a gambler, always looking to reduce the wear of his precious brain cells to a minimum by putting the burden of thinking on others. Let's see how far he comes - be sure that, at some point, he'll smash into the wall of reality.

                                          1 Reply Last reply Reply Quote 0
                                          • Phaedruxundefined
                                            Phaedrux Moderator
                                            last edited by

                                            Alright this has gone far enough off the rails. If you want to discuss our future AI overlords, take it to off topic.

                                            Z-Bot CoreXY Build | Thingiverse Profile

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