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

    Coming soon: Accelerometer Support

    Scheduled Pinned Locked Moved
    Beta Firmware
    14
    76
    7.5k
    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.
    • wildblueundefined
      wildblue
      last edited by

      @dc42
      I saw you implementing the upcoming support for a LIS3DH (3-axis MEMS accelerometer).

      As it supports SPI and IIC, my question is whether both protocols are supported by your Implementation. I am with Duet2wifi (as you probably already know) and want to get this feature working on my machine. Can i order such a sensor yet or do you plan to switch to another sensor Platform?

      I would offer to test the Implementation as soon my sensor arrives (If i am to order one, which depends ob your answer).

      o_lampeundefined dc42undefined 2 Replies Last reply Reply Quote 1
      • o_lampeundefined
        o_lampe @wildblue
        last edited by o_lampe

        I was pretty busy with building MultiWii multicopter a few years back.
        What I (vaguely) remember from then, is that the acceleration data is pretty inaccurate and the gyro-data tends to drift over time.
        So they implemented a sensor fusion, where ACC-data was weighted with only 1-10%.
        I'm surprised to see Duet want's to use ACC sensor alone? Seems good enough to figure out resonance...

        CNCModellerundefined 1 Reply Last reply Reply Quote 0
        • CNCModellerundefined
          CNCModeller @o_lampe
          last edited by

          If I understand it correctly I believe the accelerometer is just a temporary fit of test instrumentation to gather the resonance data to set the relevant parameters. I don't think it's part of normal operation.

          The multicopter uses the data to close a control loop which as I said I don't think is happening here.

          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

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

            @cncmodeller said in Coming soon: Accelerometer Support:

            just a temporary fit

            If so, what if I have a linear rail carrier with a growing flat spot on a ball? Wouldn't it be nice to detect the defect before it becomes an issue? IMHO, the accelerometer can do much more than 'ghost busting'

            CNCModellerundefined 1 Reply Last reply Reply Quote 0
            • CNCModellerundefined
              CNCModeller @o_lampe
              last edited by

              @o_lampe said in Coming soon: Accelerometer Support:

              @cncmodeller said in Coming soon: Accelerometer Support:

              just a temporary fit

              If so, what if I have a linear rail carrier with a growing flat spot on a ball? Wouldn't it be nice to detect the defect before it becomes an issue? IMHO, the accelerometer can do much more than 'ghost busting'

              I'm sure there might be other use cases once the capability is available, I just don't think it's part of the current intent. I might be wrong, as I'm only guessing.

              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

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

                @cncmodeller
                I didn't want to offend you, just looking over the fence (as usually beyond the horizon)

                CNCModellerundefined 1 Reply Last reply Reply Quote 0
                • CNCModellerundefined
                  CNCModeller @o_lampe
                  last edited by

                  @o_lampe said in Coming soon: Accelerometer Support:

                  @cncmodeller
                  I didn't want to offend you, just looking over the fence (as usually beyond the horizon)

                  Don't worry I didn't take offense... 🙂

                  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
                  • dc42undefined
                    dc42 administrators @wildblue
                    last edited by

                    @wildblue said in Coming soon: Accelerometer Support:

                    @dc42
                    I saw you implementing the upcoming support for a LIS3DH (3-axis MEMS accelerometer).

                    As it supports SPI and IIC, my question is whether both protocols are supported by your Implementation. I am with Duet2wifi (as you probably already know) and want to get this feature working on my machine. Can i order such a sensor yet or do you plan to switch to another sensor Platform?

                    See https://duet3d.dozuki.com/Wiki/Accelerometers for details of the accelerometer support that will be included in firmware 3.3beta3.

                    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

                    CNCModellerundefined wildblueundefined 2 Replies Last reply Reply Quote 0
                    • CNCModellerundefined
                      CNCModeller @dc42
                      last edited by

                      @dc42
                      Is there a UK supplier for the SammyC21 development board?

                      I'd like to have a play with CAN on my Duet 3 mini and the accelerometer, but delivery from Germany to the UK is prohibitive for just one board.

                      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

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

                        @cncmodeller said in Coming soon: Accelerometer Support:

                        delivery from Germany to the UK is prohibitive for just one board.

                        There are inexpensive alternative with SAMD21G18. Will they work?

                        E.g.

                        https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html

                        https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2380057.m570.l1313&_nkw=SAMD21G18&_sacat=0

                        CNCModellerundefined 1 Reply Last reply Reply Quote 0
                        • CNCModellerundefined
                          CNCModeller @zapta
                          last edited by CNCModeller

                          @zapta said in Coming soon: Accelerometer Support:

                          @cncmodeller said in Coming soon: Accelerometer Support:

                          delivery from Germany to the UK is prohibitive for just one board.

                          There are inexpensive alternative with SAMD21G18. Will they work?

                          E.g.

                          https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html

                          https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2380057.m570.l1313&_nkw=SAMD21G18&_sacat=0

                          Unfortunately it looks lot me that they don't have a CAN interface... And even if they did I doubt the pinout would be compatible with @dc42 s firmware

                          I do have a teensy 3.2 with CAN but I'm assuming a transcode to that board is a massive task, even if it's fast enough.

                          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

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

                            @cncmodeller said in Coming soon: Accelerometer Support:

                            Unfortunately it looks lot me that they don't have a CAN interface.

                            I see, the CAN transceiver are external to the MCU.

                            Edit: In this case, an external CAN transceiver may help. E.g. https://www.aliexpress.com/item/32375462280.html

                            CNCModellerundefined 1 Reply Last reply Reply Quote 0
                            • CNCModellerundefined
                              CNCModeller @zapta
                              last edited by

                              @zapta said in Coming soon: Accelerometer Support:

                              @cncmodeller said in Coming soon: Accelerometer Support:

                              Unfortunately it looks lot me that they don't have a CAN interface.

                              I see, the CAN transceiver are external to the MCU.

                              Edit: In this case, an external CAN transceiver may help. E.g. https://www.aliexpress.com/item/32375462280.html

                              In principle yes if it's the right CAN standard, but it'll require new pin allocations in the firmware and TBH I'm not that interested in reworking @dc42 code.

                              I'm more interested in standing on the shoulders of giants than trying to be one lol.

                              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

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

                                @cncmodeller, let your inner giant free.

                                😉

                                1 Reply Last reply Reply Quote 0
                                • wildblueundefined
                                  wildblue @dc42
                                  last edited by wildblue

                                  @dc42 Okay, a LIS3DSH Sensor is ordered to connect via SPI on my Duet2wifi.

                                  As i understand, the LIS3DSH should be also supported, because its only a more capable version of the LIS3DH. If not, there it goes to my bin of parts and 1.60€ down to the gods of tinkering. Just using the second position of this order (a true and only supported LIS3DH) then.

                                  Just for planing things ahead, when will Version 3.3b3 be released?

                                  I would love to add CAN-bus connectivity to my machine with Duet2 hardware. Is there yet a viable path to go for people capable of soldering and willing to tinker with their hardware?

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

                                    @wildblue said in Coming soon: Accelerometer Support:

                                    As i understand, the LIS3DSH should be also supported, because its only a more capable version of the LIS3DH. If not, there it goes to my bin of parts and 1.60€ down to the gods of tinkering. Just using the second position of this order (a true and only supported LIS3DH) then.

                                    Unfortunately the LIS3DSH is not backwards-compatible with the LIS3DH, so the current firmware will not work with it. The control registers are mostly different, although the output and status registers are the same. So firmware changes would be needed to support it.

                                    Just for planing things ahead, when will Version 3.3b3 be released?

                                    As soon as I find a fix for the ADC/DMA issue in the Duet 3 Mini.

                                    I would love to add CAN-bus connectivity to my machine with Duet2 hardware. Is there yet a viable path to go for people capable of soldering and willing to tinker with their hardware?

                                    Unfortunately the SAM4E8E MCU on Duet 2 supports only basic CAN, not CAN-FD; so no. Even if it did, it has insufficient flash memory and RAM.

                                    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

                                    bzadundefined 1 Reply Last reply Reply Quote 0
                                    • Nuramoriundefined
                                      Nuramori
                                      last edited by Nuramori

                                      @dc42 can you share a quick diagram how you would wire up the LIS3DH with a toolboard? I have a duet3, and it's directly wired to a 1.0 toolboard right now (on the printhead). If I were to add the accelerometer, from what I am reading I need a sammyc21 also, but that all can reside on the printhead, but I'm not clear how it would chain up. I understand that the one side of the toolboard is terminated with the r120, so would that be removed and the sammyc21 put in the chain, with a termination after that?

                                      dc42undefined 1 Reply Last reply Reply Quote 0
                                      • Nuramoriundefined
                                        Nuramori
                                        last edited by Nuramori

                                        @dc42 one other question, for the direct connection method, where you say to connect it to the SPI daughterboard, via MISO and MOSI. I noticed that the temp daughterboard connector also has SPI0_MISO and SPI0_MOSI connections - does that mean those could be used, AND also still connect a SBC, which has SPI1_MISO and SPI1_MOSI?

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

                                          @nuramori said in Coming soon: Accelerometer Support:

                                          I understand that the one side of the toolboard is terminated with the r120, so would that be removed and the sammyc21 put in the chain, with a termination after that?

                                          Yes; or alternatively, connect the SAMMYC21 between the main board and the tool board, so that the termination resistor is still at the end of the chain. Or, if the SAMMYC21 is on the tool head so the wires between it and the tool board are short, just connect the SAMMYC21 CAN pins in parallel with the tool board CAN pins.

                                          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
                                          • dc42undefined
                                            dc42 administrators @Nuramori
                                            last edited by

                                            @nuramori said in Coming soon: Accelerometer Support:

                                            @dc42 one other question, for the direct connection method, where you say to connect it to the SPI daughterboard, via MISO and MOSI. I noticed that the temp daughterboard connector also has SPI0_MISO and SPI0_MOSI connections - does that mean those could be used, AND also still connect a SBC, which has SPI1_MISO and SPI1_MOSI?

                                            Yes, use the temp daughterboard connector to connect an accelerometer directly. The SBC uses a separate SPI bus. However, currently accelerometer data can only be saved to file when running in standalone mode.

                                            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

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