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

    Duet 2 wifi AND LIS3DH

    Scheduled Pinned Locked Moved
    General Discussion
    5
    33
    1.3k
    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.
    • lucundefined
      luc @droftarts
      last edited by

      @droftarts

      No, I haven't mounted it yet. The accelerometer should arrive on friday and I was studying the situation to prepare the wiring in advance.

      I thank you, it is clearer to me now.

      tasundefined 1 Reply Last reply Reply Quote 0
      • tasundefined
        tas @luc
        last edited by

        @luc Please note GND is on pin 2 of the temperature daughterboard connector, not pin 3 as you listed.

        1 Reply Last reply Reply Quote 0
        • lucundefined
          luc
          last edited by luc

          Yes thank you, I had noticed that.

          This should be the correct connection with the wire colors that I will use:

          Accelerometer / Duet

          Red 3 Volt / PIN 8 + 3,3 cavo rosso
          SDA (MOSI) / PIN 5 SPI_MOSI cavo blu
          SDO (MISO) / PIN 6 SPI_MISO cavo giallo
          SCL / PIN 4 SPI_SCK cavo viola
          GND / PIN 2 GND cavo nero

          CS / PIN 9 SPI_CS4 cavo arancione
          INT1 / PIN 7 SPI_CS3 cavo verde

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

            @luc Like I said, it's better to use:

            CS / PIN 1 SPI_CS2 cavo arancione
            INT1 / PIN 3 SPI_CS1 cavo verde

            If you add a temperature daughterboard in the future, you won't have to change the wiring when you plug the accelerometer in on top of the temperature daughterboard, only the configuration.

            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

            lucundefined 1 Reply Last reply Reply Quote 0
            • lucundefined
              luc @droftarts
              last edited by

              @droftarts said in Duet 2 wifi AND LIS3DH:

              @luc Like I said, it's better to use:

              CS / PIN 1 SPI_CS2 cavo arancione
              INT1 / PIN 3 SPI_CS1 cavo verde

              If you add a temperature daughterboard in the future, you won't have to change the wiring when you plug the accelerometer in on top of the temperature daughterboard, only the configuration.

              Ian

              Yeah, yeah...okay, thank you.

              1 Reply Last reply Reply Quote 0
              • lucundefined
                luc
                last edited by

                Here I am again!

                Continuing to study the settings, I arrived at the M955 setting.
                From what I understand in config.g I enter:

                M955 P0 C “spi.cs4+spi.cs3” (change cs4 and cs3 if I use different pins)

                But I also need to set the orientation (which for me will follow the axis orientation) so I add:
                M955 P0 I20

                I am not clear if I also have to add the S and R paramenters so it becomes:
                M955 P0 I20 S5000 R10 ?

                jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                • jay_s_ukundefined
                  jay_s_uk @luc
                  last edited by

                  @luc no need to mess with S and R so don't include them

                  Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                  lucundefined 1 Reply Last reply Reply Quote 0
                  • lucundefined
                    luc @jay_s_uk
                    last edited by

                    @jay_s_uk Okay, thank you.
                    So do I just use M955 P0 I20 or not even that which seems to me that by default it considers it oriented according to the axis direction of the sensor?

                    jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                    • jay_s_ukundefined
                      jay_s_uk @luc
                      last edited by

                      @luc you'll probably need to adjust the I value once you get it installed and work out which way its pointing

                      Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                      1 Reply Last reply Reply Quote 0
                      • lucundefined
                        luc
                        last edited by

                        Connected as per the description above. The acelerometer led is on green.

                        Entered the following string in config.g:
                        M955 P0 C “spi.cs4+spi.cs3”

                        I try to send M955 and get the following message:

                        Error: M955: missing parameter 'P'

                        I read the guidea and for the connection type it seems to me that P0 is correct. What am I doing wrong?

                        tasundefined droftartsundefined 2 Replies Last reply Reply Quote 0
                        • lucundefined
                          luc
                          last edited by

                          Despite the error in my previous post I tried to see if it worked and it did....did the first test.
                          I attach the image and I would like to know from you who are experts what you think. I got an idea nma would like your opinion. Thank you

                          Immagine 2025-04-04 141222.jpg

                          1 Reply Last reply Reply Quote 0
                          • tasundefined
                            tas @luc
                            last edited by

                            @luc That is the hardware wiring part of M955. You must also tell Duet the communication settings.

                            ;M955 P0 C"spi.cs4+spi.cs3";LIS3DH
                            ;M955 P0 I25 S1344 R10  ; S1344 is 1344Hz sample rate.  R10 is 10 bit resolution for LIS3DH.
                            
                            

                            You can enter all of the parameters on one line if you like.

                            Make sure to check your orientation for the I parameter and insert the appropriate two numbers.

                            lucundefined 1 Reply Last reply Reply Quote 0
                            • lucundefined
                              luc @tas
                              last edited by

                              @tas said in Duet 2 wifi AND LIS3DH:

                              M955 P0 I25 S1344 R10 ; S1344 is 1344Hz sample rate. R10 is 10 bit resolution for LIS3DH.

                              Thank you for your response.
                              I added M955 P0 I20 S1344 R10 but if I send m955 I always get: Error: M955: missing parameter 'P'

                              tasundefined 2 Replies Last reply Reply Quote 0
                              • tasundefined
                                tas @luc
                                last edited by

                                @luc You have to send M955 P0. Sorry early in the day for me! There are defaults for the other settings which is why it works for you.

                                lucundefined 1 Reply Last reply Reply Quote 0
                                • tasundefined
                                  tas @luc
                                  last edited by

                                  @luc Also I should have removed the semicolons in front of each line before posting the code. I now use another acclerometer.

                                  1 Reply Last reply Reply Quote 0
                                  • lucundefined
                                    luc @tas
                                    last edited by

                                    @tas
                                    OK...It's ok. Now with m955 po no longer gives error and responds with parameters

                                    many thanks

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

                                      @luc said in Duet 2 wifi AND LIS3DH:

                                      Entered the following string in config.g:
                                      M955 P0 C “spi.cs4+spi.cs3”

                                      Make sure you are using straight quote marks, not curly quote marks, ie the above should be

                                      M955 P0 C"spi.cs4+spi.cs3"
                                      

                                      I try to send M955 and get the following message:
                                      Error: M955: missing parameter 'P'

                                      What firmware version are you using? Send M122 and post the response.

                                      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

                                      lucundefined 1 Reply Last reply Reply Quote 0
                                      • lucundefined
                                        luc @droftarts
                                        last edited by

                                        @droftarts said in Duet 2 wifi AND LIS3DH:

                                        @luc said in Duet 2 wifi AND LIS3DH:

                                        Entered the following string in config.g:
                                        M955 P0 C “spi.cs4+spi.cs3”

                                        Make sure you are using straight quote marks, not curly quote marks, ie the above should be

                                        M955 P0 C"spi.cs4+spi.cs3"
                                        

                                        I try to send M955 and get the following message:
                                        Error: M955: missing parameter 'P'

                                        What firmware version are you using? Send M122 and post the response.

                                        Ian
                                        All ok, thank you too!

                                        The first test performed is what I insierite a few posts above.

                                        Can you give me your opinion on the result?

                                        Is there a document to read that explains how to interpret the values?

                                        droftartsundefined 1 Reply Last reply Reply Quote 0
                                        • lucundefined
                                          luc
                                          last edited by

                                          I am using duet 2 wifi e firmware 3.5.4.

                                          And this is my M122:

                                          4/04/2025, 15:09:29: m122: === Diagnostics ===
                                          RepRapFirmware for Duet 2 WiFi/Ethernet version 3.5.4 (2024-11-24 10:43:42) running on Duet WiFi 1.02 or later + DueX2
                                          Board ID: 08DJM-9178L-L4MSJ-6J1DL-3S46R-TV3GP
                                          Used output buffers: 4 of 26 (25 max)
                                          === RTOS ===
                                          Static ram: 23488
                                          Dynamic ram: 75300 of which 152 recycled
                                          Never used RAM 11420, free system stack 118 words
                                          Tasks: NETWORK(1,ready,16.6%,217) ACCEL(6,nWait 5,0.0%,249) HEAT(3,nWait 5,0.1%,328) Move(4,nWait 5,0.0%,258) DUEX(5,nWait 5,0.0%,23) MAIN(1,running,83.3%,746) IDLE(0,ready,0.0%,29), total 100.0%
                                          Owned mutexes:
                                          === Platform ===
                                          Last reset 00:46:02 ago, cause: software
                                          Last software reset at 2025-04-04 14:23, reason: User, Gcodes spinning, available RAM 11364, slot 0
                                          Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a
                                          Error status: 0x00
                                          Aux0 errors 0,0,0
                                          MCU temperature: min 19.1, current 19.6, max 19.8
                                          Supply voltage: min 12.3, current 12.4, max 12.5, under voltage events: 0, over voltage events: 0, power good: yes
                                          Heap OK, handles allocated/used 99/0, heap memory allocated/used/recyclable 2048/16/16, gc cycles 0
                                          Events: 0 queued, 0 completed
                                          Driver 0: standstill, SG min n/a
                                          Driver 1: standstill, SG min n/a
                                          Driver 2: standstill, SG min n/a
                                          Driver 3: standstill, SG min n/a
                                          Driver 4: standstill, SG min n/a
                                          Driver 5: standstill, SG min n/a
                                          Driver 6: standstill, SG min n/a
                                          Driver 7:
                                          Driver 8:
                                          Driver 9:
                                          Driver 10:
                                          Driver 11:
                                          Date/time: 2025-04-04 15:09:27
                                          Cache data hit count 4294967295
                                          Slowest loop: 6.95ms; fastest: 0.19ms
                                          I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0
                                          === Storage ===
                                          Free file entries: 10
                                          SD card 0 detected, interface speed: 20.0MBytes/sec
                                          SD card longest read time 0.5ms, write time 0.0ms, max retries 0
                                          === Move ===
                                          DMs created 83, segments created 11, maxWait 0ms, bed compensation in use: none, height map offset 0.000, max steps late 0, min interval 0, bad calcs 0, ebfmin 0.00, ebfmax 0.00
                                          no step interrupt scheduled
                                          Moves shaped first try 0, on retry 0, too short 0, wrong shape 0, maybepossible 0
                                          === DDARing 0 ===
                                          Scheduled moves 38, completed 38, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
                                          === Heat ===
                                          Bed heaters 0 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0
                                          Heater 1 is on, I-accum = 0.0
                                          === GCodes ===
                                          Movement locks 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
                                          Daemon is idle in state(s) 0
                                          Autopause is idle in state(s) 0
                                          Q0 segments left 0
                                          Code queue 0 is empty
                                          === DueX ===
                                          Read count 0, 0.00 reads/min
                                          === Network ===
                                          Slowest loop: 20.99ms; fastest: 0.07ms
                                          Responder states: HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0)
                                          HTTP sessions: 1 of 8
                                          === WiFi ===
                                          Interface state: active
                                          Module is connected to access point
                                          Failed messages: pending 0, notrdy 0, noresp 0
                                          Firmware version 2.2.0
                                          MAC address b4:e6:2d:60:b9:99
                                          Module reset reason: Turned on by main processor, Vcc 3.32, flash size 4194304, free heap 39192
                                          WiFi IP address 192.168.0.40
                                          Signal strength -43dBm, channel 1, mode 802.11n, reconnections 0
                                          Clock register 00002002
                                          Socket states: 0 0 0 0 0 0 0 0

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

                                            @luc said in Duet 2 wifi AND LIS3DH:

                                            Is there a document to read that explains how to interpret the values?

                                            https://docs.duet3d.com/en/User_manual/Tuning/Input_shaping_plugin#determining-ringing-frequencies

                                            Your graph is showing a peak at around 74Hz, but this is after the ZVD shaper has been applied. It's also important to look at the 'Amplitude' scale, as this shows there is only a very small amount of ringing. I'd run it a few times, try different shapers, and get a sense for what is changing with the different shapers. Then do a test print, ideally one with IS off, and one with it on, to see if it is making the improvement you hoped for.

                                            It's not really possible from just one image to suggest exactly what settings are best, especially seeing the results after a shaper is applied. Seeing the raw results should show where the largest issue is. I'm also not the best person to ask, as I don't actually have that much experience with tuning input shaping!

                                            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

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