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

Accelerometer Usage

Scheduled Pinned Locked Moved
Beta Firmware
25
191
19.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.
  • undefined
    CCS86 @dc42
    last edited by 3 Aug 2021, 13:17

    @dc42 said in Accelerometer Usage:

    Reading one less sample doesn't help. I can only assume that communicating with the accelerometer creates an electrical disturbance that slightly affects the reading.

    If you read only 10 samples at a time, do the peaks appear at that new interval?

    undefined 1 Reply Last reply 3 Aug 2021, 13:27 Reply Quote 0
    • undefined
      dc42 administrators @CCS86
      last edited by 3 Aug 2021, 13:27

      @ccs86 said in Accelerometer Usage:

      @dc42 said in Accelerometer Usage:

      Reading one less sample doesn't help. I can only assume that communicating with the accelerometer creates an electrical disturbance that slightly affects the reading.

      If you read only 10 samples at a time, do the peaks appear at that new interval?

      I didn't try that. I did find that the LIS3DSH has smaller peaks are multiples of 20 samples than the LIS3DH.

      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 undefined 2 Replies Last reply 3 Aug 2021, 14:19 Reply Quote 0
      • undefined
        tecno @dc42
        last edited by 3 Aug 2021, 14:19

        @dc42

        Is this one up to the task?

        5b67abea-a9c0-4ce2-958e-37f0360a179e-image.png

        undefined 1 Reply Last reply 3 Aug 2021, 14:20 Reply Quote 0
        • undefined
          dc42 administrators @tecno
          last edited by 3 Aug 2021, 14:20

          @tecno yes, that's the LIS3DSH board that I tested with.

          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 2 Replies Last reply 3 Aug 2021, 14:21 Reply Quote 0
          • undefined
            tecno @dc42
            last edited by 3 Aug 2021, 14:21

            @dc42

            Thanks !

            1 Reply Last reply Reply Quote 0
            • undefined
              Sotidii
              last edited by Sotidii 8 Apr 2021, 06:25 4 Aug 2021, 05:58

              G1 X-20 G4 S2 M956 P121.0 S1000 A0 G4 P10 G1 X50 F20000
              

              Error: M956: Accelerometer is already collecting data

              gives an error message

              Duet 3 3.4.0-b2
              DSF
              Tool Board 1.1

              undefined 1 Reply Last reply 4 Aug 2021, 08:23 Reply Quote 0
              • undefined
                dc42 administrators @Sotidii
                last edited by dc42 8 Apr 2021, 08:24 4 Aug 2021, 08:23

                @sotidii please send M115 B# where # is the CAN address of the tool board, to verify the tool board firmware version. There was a bug with similar symptoms in unofficial beta builds of the tool board, but it was fixed in the official beta release.

                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 4 Aug 2021, 08:37 Reply Quote 0
                • undefined
                  Sotidii @dc42
                  last edited by 4 Aug 2021, 08:37

                  @dc42
                  M115 B 121
                  FIRMWARE_NAME: RepRapFirmware for Duet 3 MB6HC FIRMWARE_VERSION: 3.4.0beta2 ELECTRONICS: Duet 3 MB6HC v0.6 or 1.0 FIRMWARE_DATE: 2021-08-03 12:42:44

                  undefined 1 Reply Last reply 4 Aug 2021, 10:30 Reply Quote 0
                  • undefined
                    dc42 administrators @Sotidii
                    last edited by 4 Aug 2021, 10:30

                    @sotidii said in Accelerometer Usage:

                    @dc42
                    M115 B 121
                    FIRMWARE_NAME: RepRapFirmware for Duet 3 MB6HC FIRMWARE_VERSION: 3.4.0beta2 ELECTRONICS: Duet 3 MB6HC v0.6 or 1.0 FIRMWARE_DATE: 2021-08-03 12:42:44

                    Run the command again, but don't put a space between the B and the 121.

                    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 4 Aug 2021, 10:31 Reply Quote 0
                    • undefined
                      Sotidii @dc42
                      last edited by 4 Aug 2021, 10:31

                      @dc42
                      M115 B121
                      Duet TOOL1LC firmware version 3.3RC3 (2021-05-26 12:30:20)

                      undefined 1 Reply Last reply 4 Aug 2021, 10:32 Reply Quote 0
                      • undefined
                        dc42 administrators @Sotidii
                        last edited by 4 Aug 2021, 10:32

                        @sotidii said in Accelerometer Usage:

                        Duet TOOL1LC firmware version 3.3RC3 (2021-05-26 12:30:20)

                        Please upgrade the tool board firmware to version 3.4beta2.

                        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
                        • undefined
                          Sotidii
                          last edited by 4 Aug 2021, 12:48

                          @dc42 OK!

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            CCS86 @dc42
                            last edited by CCS86 8 Apr 2021, 14:41 4 Aug 2021, 13:26

                            @dc42 said in Accelerometer Usage:

                            @ccs86 said in Accelerometer Usage:

                            @dc42 said in Accelerometer Usage:

                            Reading one less sample doesn't help. I can only assume that communicating with the accelerometer creates an electrical disturbance that slightly affects the reading.

                            If you read only 10 samples at a time, do the peaks appear at that new interval?

                            I didn't try that. I did find that the LIS3DSH has smaller peaks are multiples of 20 samples than the LIS3DH.

                            Is eliminating these false peaks something you plan on pursuing? It seems like they have the ability to skew the analysis.

                            I tried manually removing the peak samples from a copy of one of my logs, for the purpose of comparing the analyzed result. But while the modified log is displayed correctly in DWC, the analysis always shows a blank chart.

                            undefined 1 Reply Last reply 4 Aug 2021, 17:20 Reply Quote 0
                            • undefined
                              dc42 administrators @CCS86
                              last edited by 4 Aug 2021, 17:20

                              @ccs86 said in Accelerometer Usage:

                              Is eliminating these false peaks something you plan on pursuing? It seems like they have the ability to skew the analysis.

                              I have already looked into it, and come to the conclusion that reading the data is what caused the spurious peaks. Apart from avoiding wires running very close to the accelerometer chip, I don't think much can be done about it, except perhaps randomising the times at which data is read.

                              The spurious peaks I see from my LIS3DH accelerometers are very much lower than in your plot, and even lower for my LIS3DSH accelerometer. Perhaps you have either a bad accelerometer, or a wire running right over the chip or right under the PCB.

                              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 Aug 2021, 02:40 Reply Quote 0
                              • undefined
                                CCS86 @dc42
                                last edited by CCS86 8 May 2021, 02:41 5 Aug 2021, 02:40

                                @dc42 said in Accelerometer Usage:

                                The spurious peaks I see from my LIS3DH accelerometers are very much lower than in your plot, and even lower for my LIS3DSH accelerometer. Perhaps you have either a bad accelerometer, or a wire running right over the chip or right under the PCB.

                                In the graph I posted, the Y axis scale was between 1.15 and 0.85. Your graph was 1.2 to -0.2. That is a vertical compression of 4.66 times, which visually downplays the peaks.

                                Even if yours don't have quite as much amplitude, they are still erroneous data on up to 5% of the samples taken. To me, that surely need to be addressed if you want accurate analysis.

                                undefined 1 Reply Last reply 5 Aug 2021, 07:18 Reply Quote 0
                                • undefined
                                  dc42 administrators @CCS86
                                  last edited by 5 Aug 2021, 07:18

                                  @ccs86 if you use the Analyse button, I think you will see that the energy in those spurious peaks is much lower than the energy in genuine ringing. Nevertheless, if this proves to be a problem then I will look at randomising the read times somewhat to spread the spectrum out.

                                  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
                                  • undefined
                                    mendenmh
                                    last edited by mendenmh 8 May 2021, 10:38 5 Aug 2021, 10:37

                                    One could apply a statistical hack if one really knows the problem is every 20 samples, and either the first or last sample in a batch. One can just replace the (known) bad point with the average of the point before and after. This doesn't change the power spectrum significantly. This is equivalent to adding a random Dirac comb of small amplitude (the difference between the correct, missing point and the average) to the data, which has only a very weak effect on the spectrum. The noise floor at frequencies which are harmonics of (sampling rate / 40) will be slightly raised.

                                    undefined 1 Reply Last reply 5 Aug 2021, 16:26 Reply Quote 2
                                    • undefined
                                      tecno @dc42
                                      last edited by 5 Aug 2021, 14:47

                                      @dc42
                                      How critical is the way the board is mounted?

                                      9bef51ba-f0e2-48e7-b888-c960a53d2c5a-image.png

                                      Above picture is a mockup with another accelerometer.

                                      As I am only going to use only X axis in this case does it really matter how it is mounted?

                                      1 Reply Last reply Reply Quote 0
                                      • undefined
                                        CCS86 @mendenmh
                                        last edited by 5 Aug 2021, 16:26

                                        @mendenmh said in Accelerometer Usage:

                                        One could apply a statistical hack if one really knows the problem is every 20 samples, and either the first or last sample in a batch. One can just replace the (known) bad point with the average of the point before and after. This doesn't change the power spectrum significantly. This is equivalent to adding a random Dirac comb of small amplitude (the difference between the correct, missing point and the average) to the data, which has only a very weak effect on the spectrum. The noise floor at frequencies which are harmonics of (sampling rate / 40) will be slightly raised.

                                        As a straightforward fix I think that is a great idea.

                                        1 Reply Last reply Reply Quote 0
                                        • undefined
                                          CCS86
                                          last edited by CCS86 8 Jun 2021, 15:14 6 Aug 2021, 15:09

                                          I did some more testing and found something interesting. This makes me think that the erroneous spikes don't have anything to do with wiring.

                                          Running back to back tests, with the only change being the inclusion / omission of the "X" parameter in the M956 call (just X axis, or XYZ):

                                          Just X:
                                          107d3623-53ae-49d2-9b13-bde053b4ef2a-image.png

                                          XYZ:
                                          09f70d2c-2a0f-4b8a-b2f5-fd7734dfc8fb-image.png

                                          Just X still has some spike on the 20 sample intervals, but they appear much worse when logging all 3 axes (~double).

                                          And here are the analyzed results. Not vastly different, but different enough to warrant elimination of that bad data:

                                          a292211c-a637-4c61-b6e5-3e87394e8af7-image.png
                                          5d89c08d-da4a-4f7f-8ee1-0e4904deef63-image.png

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