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

Accelerometer data interpretation

Scheduled Pinned Locked Moved
Using Duet Controllers
5
21
1.8k
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
    MikeS
    last edited by MikeS 8 Apr 2021, 15:54 4 Aug 2021, 15:52

    Hi guys,
    so i hooked up my accelerometer to my Voron 2.4 and latest beta with input shaping. Board is a Duet 2 Wifi + Duex5. Accelerometer is LIS3DSH and seems to work fairly well.

    After checking belt tension i run the 2 readings with the following gcode:

    AccelerometroX.gcode

    M593 P"none"
    G1 X-50 G4 S2  G4 P10 G1 X100 F20000 M956 P0 S1000 A0 F"AsseX.csv"
    

    AccelerometroY.gcode

    M593 P"none"
    G1 Y-50 G4 S2  G4 P10 G1 Y100 F20000 M956 P0 S1000 A0 F"AsseY.csv"
    

    These are the results i get:
    5e231be3-19c6-4a9b-adc3-2600ad7d2b12-immagine.png
    83314c1d-cb87-4ba3-9dd0-2072faa58b40-immagine.png

    So my question is: is that low frequency amplitude ok? I would pick a frequency of about 30Hz and try ZVD for less smoothing possible but i think that low frequency ringing is not good.

    undefined 1 Reply Last reply 4 Aug 2021, 16:36 Reply Quote 0
    • undefined
      engikeneer @MikeS
      last edited by 4 Aug 2021, 16:36

      @mikes that very low frequency might be your whole machine moving on its stands... if you can, stick your accelerometer to your bed and repeat the test, that way you can see what is actual ringing and what is rigid body motion of the whole machine.

      Or just go for 30Hz and see what happens 😛

      E3D TC with D3Mini and Toolboards.
      Home-built CoreXY, Duet Wifi, Chimera direct drive, 2x BMG, 300x300x300 build volume
      i3 clone with a bunch of mods

      undefined 1 Reply Last reply 4 Aug 2021, 16:52 Reply Quote 0
      • undefined
        MikeS @engikeneer
        last edited by MikeS 8 Apr 2021, 16:53 4 Aug 2021, 16:52

        @engikeneer
        b1a942fb-63ff-4bb6-9c4d-4ba1e0e67c1a-immagine.png

        da6196d6-0899-4ba1-93d3-e368ff9a0dc4-immagine.png

        This with the accelerometer on the bed. Don't look at axis markin because i didn't change orientation at declaration time. It seems to me that the frame is pretty rigid and "ringing" at low frequency is not generated by the frame. Also consider that the accelerometer is sticked to the bed with tape, so probably the frame is more rigid than what the graphs shows.

        undefined 1 Reply Last reply 4 Aug 2021, 16:57 Reply Quote 0
        • undefined
          engikeneer @MikeS
          last edited by 4 Aug 2021, 16:57

          @mikes well there goes my theory...

          Maybe it's the accelerometer mount? Or some backlash in your rails/belts?

          Or could just be an artefact of running the FFT on a short segment of data...

          E3D TC with D3Mini and Toolboards.
          Home-built CoreXY, Duet Wifi, Chimera direct drive, 2x BMG, 300x300x300 build volume
          i3 clone with a bunch of mods

          undefined 1 Reply Last reply 4 Aug 2021, 17:09 Reply Quote 0
          • undefined
            dc42 administrators
            last edited by dc42 8 Apr 2021, 20:21 4 Aug 2021, 17:08

            @mikes said in Accelerometer data interpretation:

            G1 X-50 G4 S2 G4 P10 G1 X100 F20000 M956 P0 S1000 A0 F"AsseX.csv"

            It may be easier to interpret the data if you use:

            G1 X-50 G4 S2 G4 P10 G1 X100 F20000 M400 M956 P0 S1000 A0 F"AsseX.csv"

            That way the accelerometer will see only the ringing after the move completes, not the move itself.

            EDIT: Something isn't right. One of the axes should be showing average acceleration close to 1G.

            We have an input shaping plugin for DWC under development.

            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 4 Aug 2021, 17:30 Reply Quote 1
            • undefined
              MikeS @engikeneer
              last edited by MikeS 8 Apr 2021, 17:14 4 Aug 2021, 17:09

              @engikeneer accelerometer is mounted in a sturdy way, also i should have no backlash. I don't know if this type of results is common because accelerometer support is new in duet and all other example i see are from the klipper algorithm that uses a different technique to obtain the data from what i saw.

              thank you @dc42 :

              My fault, i didn't probably revert the orientation...i'll check it!

              1 Reply Last reply Reply Quote 0
              • undefined
                MikeS @dc42
                last edited by MikeS 8 Apr 2021, 17:41 4 Aug 2021, 17:30

                @dc42 so turned out that i was using wrong orientation. Here are the new graphs with the wait for end of move:

                303ff9f3-294c-49db-9d59-8bda9281df6e-immagine.png

                d365889a-c427-431d-b53a-70eb3acfb55f-immagine.png

                Edit: more problems for me to solve... This is the datasheet of the LIS3DSH
                b323fcd8-fe57-455d-b653-fd772518722a-immagine.png

                and this is what i got:

                ffa7f452-ef15-4b6f-b757-90816733d820-immagine.png

                So definetly something is wrong.

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

                  @mikes it looks like you have a strong resonance at around 64Hz on the X axis. Can you post the raw data before analysis too?

                  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 7 Aug 2021, 09:37 Reply Quote 0
                  • undefined
                    SilviuZ @dc42
                    last edited by 5 Aug 2021, 17:35

                    @dc42 Hello
                    After using the bellow commands I get those results:
                    There is any chance that the accelerometer data can be interpreted in a way that can be implemented with input shaping considering that X and Y ring in a total different way?
                    I am running RRF 3.4 Beta2 on a Duet 3 MB6HC and 1LC V1.1 . The printer axis are Cartesian and quite heavy ( Stratasys FDM 2000 ) but extremely rigid.
                    Thank you.
                    G1 X-50 G4 S2 G4 P10 G1 X100 F20000 M400 M956 P121.0 S1000 A0 F"AsseX.csv"
                    G1 Y-50 G4 S2 G4 P10 G1 Y100 F20000 M400 M956 P121.0 S1000 A0 F"AsseY.csv"
                    Yaxis.png image url)YaxisANALIZE.png Xaxis.png XaxisANALIZE.png
                    M122
                    === Diagnostics ===
                    RepRapFirmware for Duet 3 MB6HC version 3.4.0beta2 (2021-08-03 12:42:33) running on Duet 3 MB6HC v0.6 or 1.0 (standalone mode)
                    Board ID: 08DJM-956L2-G43S8-6JTD6-3SS6L-KA16H
                    Used output buffers: 3 of 40 (20 max)
                    === RTOS ===
                    Static ram: 151128
                    Dynamic ram: 93032 of which 0 recycled
                    Never used RAM 106440, free system stack 152 words
                    Tasks: NETWORK(ready,29.2%,230) ETHERNET(notifyWait,0.1%,176) HEAT(delaying,0.0%,326) Move(notifyWait,0.0%,280) CanReceiv(notifyWait,0.0%,773) CanSender(notifyWait,0.0%,373) CanClock(delaying,0.0%,340) TMC(notifyWait,9.0%,59) MAIN(running,61.7%,1118) IDLE(ready,0.0%,29), total 100.0%
                    Owned mutexes:
                    === Platform ===
                    Last reset 00:32:37 ago, cause: software
                    Last software reset at 2021-08-05 17:55, reason: User, GCodes spinning, available RAM 106104, slot 0
                    Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0x00000000 SP 0x00000000 Task MAIN Freestk 0 n/a
                    Error status: 0x00
                    Aux0 errors 0,0,0
                    Step timer max interval 736
                    MCU temperature: min 43.5, current 44.5, max 45.2
                    Supply voltage: min 29.2, current 29.3, max 29.4, under voltage events: 0, over voltage events: 0, power good: yes
                    12V rail voltage: min 11.8, current 12.1, max 12.6, under voltage events: 0
                    Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0
                    Driver 0: position 126480, standstill, reads 62138, writes 22 timeouts 0, SG min/max 0/1023
                    Driver 1: position 126480, standstill, reads 62138, writes 22 timeouts 0, SG min/max 0/1023
                    Driver 2: position 0, standstill, reads 62143, writes 17 timeouts 0, SG min/max 0/784
                    Driver 3: position 0, standstill, reads 62150, writes 11 timeouts 0, SG min/max 0/0
                    Driver 4: position 0, standstill, reads 62150, writes 11 timeouts 0, SG min/max 0/0
                    Driver 5: position 0, standstill, reads 62150, writes 11 timeouts 0, SG min/max 0/0
                    Date/time: 2021-08-05 18:27:59
                    Slowest loop: 124.51ms; fastest: 0.05ms
                    === Storage ===
                    Free file entries: 10
                    SD card 0 detected, interface speed: 25.0MBytes/sec
                    SD card longest read time 0.8ms, write time 3.1ms, max retries 0
                    === Move ===
                    DMs created 125, segments created 3, maxWait 25575ms, bed compensation in use: none, comp offset 0.000
                    === MainDDARing ===
                    Scheduled moves 18, completed moves 18, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
                    === AuxDDARing ===
                    Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
                    === Heat ===
                    Bed heaters = 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamberHeaters = 2 -1 -1 -1
                    === GCodes ===
                    Segments left: 0
                    Movement lock held by null
                    HTTP is idle in state(s) 0
                    Telnet is idle in state(s) 0
                    File is idle in state(s) 0
                    USB is idle in state(s) 0
                    Aux is idle in state(s) 0
                    Trigger is idle in state(s) 0
                    Queue is idle in state(s) 0
                    LCD is idle in state(s) 0
                    SBC is idle in state(s) 0
                    Daemon is idle in state(s) 0
                    Aux2 is idle in state(s) 0
                    Autopause is idle in state(s) 0
                    Code queue is empty
                    === CAN ===
                    Messages queued 17640, received 15810, lost 0, longest wait 2ms for reply type 6049, peak Tx sync delay 301, free buffers 49 (min 48), ts 9790/9789/0
                    Tx timeouts 0,0,0,0,0,0
                    === Network ===
                    Slowest loop: 17.10ms; fastest: 0.02ms
                    Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions Telnet(0), 0 sessions
                    HTTP sessions: 1 of 8

                    • Ethernet -
                      State: active
                      Error counts: 0 0 0 0 0
                      Socket states: 5 2 2 2 2 0 0 0
                    undefined 1 Reply Last reply 5 Aug 2021, 17:51 Reply Quote 0
                    • undefined
                      sebkritikel @SilviuZ
                      last edited by sebkritikel 8 May 2021, 17:53 5 Aug 2021, 17:51

                      @silviuz said in Accelerometer data interpretation:

                      YaxisANALIZE.png
                      XaxisANALIZE.png

                      Not exactly scientific, but check out the magnitudes of the X and Y vibrations. Typically the recommendation is to select an input shaping frequency that is the lowest of the frequencies of interest. For both you Y and X tests, you have X-axis peaks around 61Hz, at amplitudes between .0025-.0035. Y-axis peaks at ~.0055, which is higher than the X peaks, and occurs at ~41Hz. My thoughts are that if you select ~41Hz as your input shaping frequency, you'll target the worst frequency of the entire system.

                      Also, super cool on converting a Stratasys FDM 2000 over to the Duet ecosystem.

                      Large(ish?) IDEX - 6HC, 1HCL
                      Stratasys Dimension 1200es to 6HC Conversion

                      undefined 1 Reply Last reply 5 Aug 2021, 17:59 Reply Quote 1
                      • undefined
                        SilviuZ @sebkritikel
                        last edited by 5 Aug 2021, 17:59

                        @sebkritikel
                        Thank you! I will try to implement your recommendations
                        20210405_224705.jpg image url)20210726_235600.jpg

                        undefined 1 Reply Last reply 5 Aug 2021, 20:17 Reply Quote 1
                        • undefined
                          dc42 administrators @SilviuZ
                          last edited by 5 Aug 2021, 20:17

                          @silviuz you can also choose EI3 input shaping centred on a frequency between the X and Y ringing frequencies, which should be fairly effective at suppressing both.

                          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, 21:03 Reply Quote 1
                          • undefined
                            SilviuZ @dc42
                            last edited by 5 Aug 2021, 21:03

                            @dc42 Thank you for your reply.
                            I've tried 41HZ without a significant success.
                            After a couple of ringhing towers I found that indeed "ei3" it's doing the best cancellation at 28HZ.
                            I hope that in the future if it's possible..... to have implemented a automatic axis tuning similar like the Teknic Clearpath.
                            Thank you again for your help.

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              MikeS @dc42
                              last edited by MikeS 8 Jul 2021, 10:08 7 Aug 2021, 09:37

                              @dc42 Sorry for the delay. I figured out that despite the chip is marked differently than the image on the datasheet, the axed are oriented in the same way. To test it i did statical reading while holding the accelerometers in different position and checking if the expected axes reported nearly 1g.

                              Now that i have figured that out, here's the results of the previous macros before and after FFT:

                              X AXIS:
                              503a2433-59fa-40aa-9bab-19ef509606c9-immagine.png
                              3ce2cb30-2bc9-470a-8c5d-1e989639b073-immagine.png

                              Y AXIS:
                              e410c6af-bdce-4ddf-9df4-f161079364b6-immagine.png
                              08212721-771a-4e0e-8fa3-03192068eb88-immagine.png

                              Edit:
                              There's seems to be something wrong when selecting axes to be acquired with M956.
                              If i don't specify axes, i get all the readings (but i don't know if they are in the correct order).
                              If i specify X then i get readings
                              I i specify Y i get all 0 values
                              I i specify XY i get same values for X as only X and all 0 values for Y
                              I i specify XYZ i get same results as nothing specified.

                              Here's some graph:

                              ONLY X
                              e0bb1f59-4f98-4bf3-9be1-e74f6cfd7b5e-immagine.png

                              ONLY Y
                              751a986b-630f-4301-b460-fcfade4bc627-immagine.png

                              X AND Y
                              41ef22af-17ad-442a-946a-7a1fd5dc4bfe-immagine.png

                              Code (changed axes just after M956)

                              M593 P"none"
                              G1 Y-50 G4 S2 G4 P10 G1 Y100 F20000 M400 M956 X P0 S1000 A0 F"test.csv"
                              
                              undefined 1 Reply Last reply 7 Aug 2021, 10:33 Reply Quote 0
                              • undefined
                                dc42 administrators @MikeS
                                last edited by dc42 8 Jul 2021, 10:38 7 Aug 2021, 10:33

                                @mikes said in Accelerometer data interpretation:

                                There's seems to be something wrong when selecting axes to be acquired with M956.
                                If i don't specify axes, i get all the readings (but i don't know if they are in the correct order).
                                If i specify X then i get readings
                                I i specify Y i get all 0 values
                                I i specify XY i get same values for X as only X and all 0 values for Y
                                I i specify XYZ i get same results as nothing specified.

                                Thanks, I'll check it. It could be that incorrect values are stored in the .csv files, or the plugin is interpreting them the wrong way. Can you open the .csv files in the System tab of DWC and see if the data and column headings look OK?

                                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 7 Aug 2021, 11:25 Reply Quote 0
                                • undefined
                                  MikeS @dc42
                                  last edited by 7 Aug 2021, 11:25

                                  @dc42 csv is displayed correctly as csv contains 0 for each row in Y axis.
                                  bc2ea66a-e0d4-4e8f-b3fc-9ec3411ee4d0-immagine.png

                                  undefined 2 Replies Last reply 7 Aug 2021, 12:04 Reply Quote 0
                                  • undefined
                                    dc42 administrators @MikeS
                                    last edited by 7 Aug 2021, 12:04

                                    @mikes thanks, the problem is in RRF then.

                                    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
                                      dc42 administrators @MikeS
                                      last edited by dc42 8 Aug 2021, 13:59 8 Aug 2021, 13:58

                                      @mikes this issue is now fixed in the source code. The fix will be included in the next beta.

                                      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 8 Aug 2021, 15:17 Reply Quote 0
                                      • undefined
                                        MikeS @dc42
                                        last edited by 8 Aug 2021, 15:17

                                        @dc42 thank you David. Any chance to get a compiled binaries for Duet2wifi to test it out? Still have to test input shaping because i was not sure if the data was reliable... i saw resonance on Z axis for example while testing X or Y axis.

                                        undefined 1 Reply Last reply 17 Aug 2021, 19:39 Reply Quote 0
                                        • undefined
                                          MikeS @dc42
                                          last edited by MikeS 17 Aug 2021, 16:32

                                          @dc42 just had 2 hours to play with a VM and managed to compile the source.

                                          On the current source i can read correct data from X and Y axes (both together or alone) but Z axis is always reading -1.9995 as value. Also X Values is near -2 and it seems not correct to me. Shouldn't X and Y be near 0 and Z to -1 with a reading without moves?

                                          6238a84b-026b-4077-9636-1b1c81dff014-immagine.png

                                          UPDATE:
                                          So i've looked at the changes you made in the latest version and came up with this fix:
                                          054a956d-164e-4f8c-8aec-d3680ced6da9-immagine.png

                                          I am not a programmer, but i've tested it and it seems that it has fixed it. Can you confirm?Maybe it's only another error that fixes my particular issue 😅

                                          Nevermind all! I've looked more at C++ language and understood that in the for loop ++i has the same behaviour of i++ so that was not the fix. However now it seems to be working fine. I'll do more tests but it seems that there was something wrong with the accelerometers itself, returning wrong data...

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