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

Two arduinos between Duet2 wifi and BLtouch

Scheduled Pinned Locked Moved
Duet Hardware and wiring
8
15
663
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
    PieTorque
    last edited by 30 Mar 2021, 11:33

    Hello,

    Me and my team are building a giant cable driven 3d printer. A modification of the hangprinter. I've run into a problem with the zprobe.

    The distance from the end effector to duet is over 15 meters. We have and arduino nano on the endeffector and Mega next to duet that are communicating through rs485.

    Our plan was was to get the zprobe commands from duet transferred to mega then from mega to nano. Then nano proceeds to use the BLtouch and sends the data back to mega which sends it to duet. I wonder if it's possible to get it working like this? I can see a possible problem atleast from the delays in the data transfer.

    Also despite my efforts I have not found what kind of data is coming from duet to BLtouch so I have no idea how to pass it through between the arduinos. Also I'd need to know in what form should the data go back to duet?

    Could I for example shove the data into an uint16_t using bitwise operator and transfer it back to duet?

    Anyway, if somebody with more knowledge on the subject could tell if this idea is a fools errand or actually a doable I'd highly appreciate it!

    Best Regards,
    PieTorque

    undefined undefined undefined 4 Replies Last reply 30 Mar 2021, 12:29 Reply Quote 0
    • undefined
      CNCModeller @PieTorque
      last edited by 30 Mar 2021, 12:29

      @pietorque

      As I understand it the bltouch has two interfaces, a standard RC PWM in for probe mode and deeploy / retract and a descrete high low out for probe trigger.

      You can read in the pwm from the duet and write back to the bltouch with Arduino standard RC servo libraries. And the descrete is just a digital read write command.

      Pass the data between the two Arduino how ever you like.

      Hope that helps.

      If anyone knows better please correct me.

      All the best
      Barry M

      Polar Duet3 Mini + 1HCL
      https://youtube.com/playlist?list=PLWjZVEdMv1BY82izahK45qKh-hp3NFkix
      Wanhao D4S: Duet2
      https://forum.duet3d.com/post/296755
      K40 Laser, Duet2
      https://forum.duet3d.com/post/312082
      Wanhao D5S
      https://www.youtube.com/CNCModellerUK

      1 Reply Last reply Reply Quote 0
      • undefined
        CNCModeller @PieTorque
        last edited by 30 Mar 2021, 13:02

        @pietorque
        Have you considered a duet3 + tool daughter board over can bus? Might make it all a duet based drop in solution for you.

        Polar Duet3 Mini + 1HCL
        https://youtube.com/playlist?list=PLWjZVEdMv1BY82izahK45qKh-hp3NFkix
        Wanhao D4S: Duet2
        https://forum.duet3d.com/post/296755
        K40 Laser, Duet2
        https://forum.duet3d.com/post/312082
        Wanhao D5S
        https://www.youtube.com/CNCModellerUK

        undefined 1 Reply Last reply 30 Mar 2021, 13:27 Reply Quote 1
        • undefined
          PieTorque @CNCModeller
          last edited by 30 Mar 2021, 13:27

          @cncmodeller Hello,

          Thank you for responding so briefly. I have not considered it, not yet atleast. Something I'll definately look into since we're planning on migrating to duet3 at some point 🙂

          undefined 1 Reply Last reply 30 Mar 2021, 14:04 Reply Quote 0
          • undefined
            alankilian @PieTorque
            last edited by alankilian 30 Mar 2021, 14:04

            @pietorque Basically, the Duet commands the Z axis to move down and when it sees the digital signal on ZProbe go true, it stops moving down and records the current Z position.

            With your setup, the Duet will command the Z axis to move down, and when the BLTouch detects the bed, it will make its output true, then:

            • Arduino Nano notices the digital input
            • Package up a message to send via RS485
            • Wait for other messages in progress to finish
            • Send message serially.
            • MEGA receives message and decodes it
            • MEGA makes its output true
            • DUET notices Zprobe going true and stops moving down and records the current Z position.

            You can imagine that all the delay and variability in all those conversions are going to either result in your BLTouch crashing right through the bed before the DUET receives the signal, or will be so variable due to conversion times and transmission/receiving times that you'll get a vastly different number for every probe.

            It will take several additional wires going from the Duet to the BLTouch, but you'll get much better results by using a "Line driver/receiver" pair going in each direction.

            The PWM signal from the Duet goes into a line driver, then through wires to the end effector, then to a line receiver and back to TTL.

            The "Contact! signal from the BLTouch goes into a line driver, then through wires to the Duet-end, then to a line receiver and back to TTL.

            There will still be some delays, but they will be small and predictable so you'll get good results.

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

            1 Reply Last reply Reply Quote 0
            • undefined
              o_lampe
              last edited by 30 Mar 2021, 14:16

              @PieTorque
              I agree with alankilian, there is too much latency when sending each probe signal via all these relais stations.
              You could ask the arduino closest to the BLTouch to do all the probepoints and then send the whole heightmap as one file to the duet. That should be doable, since Marlin runs on ATMega328P, they sure have some working bed-leveling routines.

              For such long distances I'd use fiberglass transmitters for peace of mind. They can use standard RX/TX protocol. No need for RS485.

              1 Reply Last reply Reply Quote 0
              • undefined
                zapta @PieTorque
                last edited by 30 Mar 2021, 16:22

                @pietorque said in Two arduinos between Duet2 wifi and BLtouch:

                building a giant cable driven 3d printer

                A side question, is BlTouch a good fit for a giant printer? I would think that it's deployment and detection distances were optimized for much smaller printers.

                undefined 1 Reply Last reply 30 Mar 2021, 18:29 Reply Quote 0
                • undefined
                  fcwilt @zapta
                  last edited by 30 Mar 2021, 18:29

                  @zapta said in Two arduinos between Duet2 wifi and BLtouch:

                  @pietorque said in Two arduinos between Duet2 wifi and BLtouch:

                  building a giant cable driven 3d printer

                  A side question, is BlTouch a good fit for a giant printer? I would think that it's deployment and detection distances were optimized for much smaller printers.

                  I would use an inductive probe if you are not planning on using some sort of magnettically secured printing surface.

                  Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    oliof @PieTorque
                    last edited by 30 Mar 2021, 21:22

                    @pietorque You might be able to use two ESP32s and the ESPNOW protocol as wireless serial bridges. Someone did it to wirelessly connect a paneldue (search the forum if you are interested), so it is possible.

                    https://www.instructables.com/ESP32-With-ESP-Now-Protocol/

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

                    undefined undefined 2 Replies Last reply 31 Mar 2021, 07:57 Reply Quote 0
                    • undefined
                      PieTorque @oliof
                      last edited by 31 Mar 2021, 07:57

                      @oliof I'll definately look into it. Thanks mate!

                      @zapta We might go for another solution later on. But for now we're trying this one 🙂

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        o_lampe @oliof
                        last edited by 31 Mar 2021, 08:13

                        @oliof said in Two arduinos between Duet2 wifi and BLtouch:

                        Someone did it to wirelessly connect a paneldue

                        A panelDue or a Z-probe are two different shoes.
                        If you meant to transfer the whole heightmap at once, I see ESP32 as an option. But WiFi would cause even more latency problems (and higher variation) than a cable driven serial connection. ( and it can take a few attempts to bind two ESP32 with ESPnow AFAIR)

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          dc42 administrators
                          last edited by dc42 31 Mar 2021, 08:48

                          That solution sounds to me like overkill.

                          The servo signal from the Duet is at a slow speed, so I don't think it should have any trouble going over a 15m cable.

                          The signal coming back from the BLTouch is an open-drain signal. In the not-triggered state it should be fairly immune to noise. In the triggered state it will pick up noise from adjacent cables. To mitigate that, it may be sufficient to add a pullup resistor of between 2.2K and 4.7K between the BLTouch output and +5V. Alternatively, at the BLTouch end you could use a pullup resistor and a 74HC chip to buffer the signal.

                          If there are stepper motor wires in the same bundle than either the BLTouch wires (along with other signals wires e.g. for temperature sensors) or the stepper motor wires should be shielded, and the stepper motor wires should be two twisted pairs, one pair per phase.

                          The best solution is probably a Duet 3 plus a tool board, which will also reduce the number of wires going to the print head; but if the axis motors use external drivers or servo drives then you may want to wait for the external driver version of the Duet 3 main board.

                          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

                          undefined 1 Reply Last reply 5 Apr 2021, 07:21 Reply Quote 0
                          • undefined
                            CNCModeller @dc42
                            last edited by 5 Apr 2021, 07:21

                            @dc42 said in Two arduinos between Duet2 wifi and BLtouch:

                            ... but if the axis motors use external drivers or servo drives then you may want to wait for the external driver version of the Duet 3 main board.

                            Hi @dc42, what is the timeline on the external driver version of the Duet 3 main board? Are there details available?

                            Many thanks
                            Barry M

                            Polar Duet3 Mini + 1HCL
                            https://youtube.com/playlist?list=PLWjZVEdMv1BY82izahK45qKh-hp3NFkix
                            Wanhao D4S: Duet2
                            https://forum.duet3d.com/post/296755
                            K40 Laser, Duet2
                            https://forum.duet3d.com/post/312082
                            Wanhao D5S
                            https://www.youtube.com/CNCModellerUK

                            undefined 1 Reply Last reply 5 Apr 2021, 16:01 Reply Quote 0
                            • undefined
                              dc42 administrators @CNCModeller
                              last edited by 5 Apr 2021, 16:01

                              @cncmodeller said in Two arduinos between Duet2 wifi and BLtouch:

                              Hi @dc42, what is the timeline on the external driver version of the Duet 3 main board? Are there details available?

                              My guess is 3 months. However, there is a severe shortage of semiconductors developing, so we may have to change our design plans to suit what is available rather than what we would like to use.

                              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

                              undefined 1 Reply Last reply 5 Apr 2021, 17:27 Reply Quote 0
                              • undefined
                                CNCModeller @dc42
                                last edited by 5 Apr 2021, 17:27

                                @dc42 said in Two arduinos between Duet2 wifi and BLtouch:

                                @cncmodeller said in Two arduinos between Duet2 wifi and BLtouch:

                                Hi @dc42, what is the timeline on the external driver version of the Duet 3 main board? Are there details available?

                                My guess is 3 months. However, there is a severe shortage of semiconductors developing, so we may have to change our design plans to suit what is available rather than what we would like to use.

                                Ok thanks for the info, I'll keep a weather eye in the forum for future updates. 🙂

                                Polar Duet3 Mini + 1HCL
                                https://youtube.com/playlist?list=PLWjZVEdMv1BY82izahK45qKh-hp3NFkix
                                Wanhao D4S: Duet2
                                https://forum.duet3d.com/post/296755
                                K40 Laser, Duet2
                                https://forum.duet3d.com/post/312082
                                Wanhao D5S
                                https://www.youtube.com/CNCModellerUK

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