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

    LIS3DSH on Duet 2 having trouble with the latest firmware

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    4
    13
    478
    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.
    • ericraneundefined
      ericrane
      last edited by

      I've been trying to figure out why my Duet 2 Wifi can't talk to the LIS3DSH breakout board (https://www.sparkfun.com/products/13963)

      I've tried a cat5 ethernet cable and 2 different USB 3 cables, one with a 1k resistor on the CS of the breakout board and one without.

      CS is on the white wire of the USB3 cable in both cases.

      I'm configuring my accelerometer with: M955 P0 I21 C"spi.cs4+spi.cs3"

      I've also downloaded and compiled the latest firmware and hacked in some diagnostics to try and figure out where the disconnect could be. During my hacking I found the WhoAmI register is returning 0x24 which isn't one of the expected values (0x83 and 0x84). Is the breakout board that I purchased not compatible for some reason?

      I've lost count how many times I've checked the connections and the wiring.

      Any help would be greatly appreciated.

      1 Reply Last reply Reply Quote 0
      • ericraneundefined
        ericrane
        last edited by

        Here's my full config:

        ; Configuration file for Duet WiFi (firmware version 3.3)
        ; executed by the firmware on start-up
        ;
        ; generated by RepRapFirmware Configuration Tool v3.3.15 on Fri Feb 17 2023 11:45:47 GMT-0500 (Eastern Standard Time)

        ; General preferences
        G90 ; send absolute coordinates...
        M83 ; ...but relative extruder moves
        M550 P"Green" ; set printer name
        M669 K1 ; select CoreXY mode

        ; Network
        M552 S0 ; enable network
        M586 P0 S1 ; enable HTTP
        M586 P1 S0 ; disable FTP
        M586 P2 S0 ; disable Telnet

        ; Drives
        M569 P0 S1 ; physical drive 0 goes forwards
        M569 P1 S1 ; physical drive 1 goes forwards
        M569 P2 S1 ; physical drive 2 goes forwards
        M569 P3 S0 ; physical drive 3 goes backwards
        M584 X0 Y1 Z2 E3 ; set drive mapping
        M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation
        M92 X80.00 Y80.00 Z400.00 E420 ; set steps per mm
        M566 X600.00 Y600.00 Z60 E240.00 ; set maximum instantaneous speed changes (mm/min)
        M203 X21000.00 Y21000.00 Z6000.00 E1684 ; set maximum speeds (mm/min)
        M201 X750.00 Y750.00 Z250.00 E300.00 ; set accelerations (mm/s^2)
        M906 X1250 Y1250 Z1250 E700 I30 ; set motor currents (mA) and motor idle factor in per cent
        M84 S30 ; Set idle timeout

        M574 Z0 P"nil"
        M950 H3 C"nil" ; Disable heaters h3-h7 to free up pins
        M950 H4 C"nil"
        M950 H5 C"nil"
        M950 H6 C"nil"
        M950 H7 C"nil"

        ; Axis Limits
        M208 X0 Y-20 Z0 S1 ; set axis minima
        M208 X290 Y280 Z372 S0 ; set axis maxima

        ; Endstops
        M574 X1 S1 P"xstop" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin xstop
        M574 Y1 S1 P"ystop" ; configure switch-type (e.g. microswitch) endstop for low end on y via pin ystop
        M574 Z1 S2 ; configure Z-probe endstop for low end on Z

        ; Z-Probe
        M950 S0 C"exp.heater3" ; create servo pin 0 for BLTouch
        M558 P9 C"zprobe.in" H6 F120 T6000 ; set Z probe type to bltouch and the dive height + speeds
        G31 X-35 Y-4 Z1.11 P125 ; set Z probe trigger value, offset and trigger height
        M557 X0:265 Y10:280 S25 ; define mesh grid

        ; Heaters
        M308 S0 P"bedtemp" Y"thermistor" T100000 B4138 R4700 ; configure sensor 0 as thermistor on pin bedtemp
        M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0
        M307 H0 B1 S1.00 ; enable bang-bang mode for the bed heater and set PWM limit
        M140 H0 ; map heated bed to heater 0
        M143 H0 S120 ; set temperature limit for heater 0 to 120C
        M308 S1 P"e0temp" Y"thermistor" T100000 B4138 R4700 ; configure sensor 1 as thermistor on pin e0temp
        M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1
        M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
        M143 H1 S320 ; set temperature limit for heater 1 to 280C

        ; Fans
        M950 F2 C"fan2" Q500 ; create fan 0 on pin fan0 and set its frequency
        M106 P2 S0 H-1 ; set fan 0 value. Thermostatic control is turned off
        M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency
        M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off
        M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency
        M106 P1 S1 H1 T45 ; set fan 1 value. Thermostatic control is turned on

        ; Tools
        M563 P0 D0 H1 F0:2 ; define tool 0
        G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets
        G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C

        ; Custom settings are not defined
        M376 H10
        ;M572 D0 S0.025 Pressure Advance

        ; Accelerometer
        M955 P0 I21 C"spi.cs4+spi.cs3"

        ; Miscellaneous
        M501 ; load saved parameters from non-volatile memory
        M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss
        T0 ; select first tool

        G29 S1 P"heightmap.csv"

        M552 S1

        1 Reply Last reply Reply Quote 0
        • Phaedruxundefined
          Phaedrux Moderator
          last edited by

          which firmware exactly?

          Z-Bot CoreXY Build | Thingiverse Profile

          ericraneundefined 1 Reply Last reply Reply Quote 0
          • ericraneundefined
            ericrane @Phaedrux
            last edited by

            @Phaedrux 3.4.5 (the latest) I pulled down the git repository yesterday afternoon

            ericraneundefined 1 Reply Last reply Reply Quote 0
            • ericraneundefined
              ericrane @ericrane
              last edited by

              I should add that I've hooked the device up to an Adruino and I'm getting 0x33 from WHO_AM_I and everything looks normal. I guess I could try wiring it up with some really short wires to see if I can get anything out of it. So far I've not had any luck.

              1 Reply Last reply Reply Quote 1
              • ericraneundefined
                ericrane
                last edited by

                The problem is entirely the cable. I'm not really excited about cutting up and adding connectors to another USB3 cable. The one I used was a pretty high quality one as well. I seem to remember reading something about connecting one of the wires to the insolation.

                Any suggestions? This is on a heavily modified FT-5, with the duet on the back near the bottom, so I need around 3-4 ft. of cable. I'm considering moving the panel up to the top of the machine in order to fix this.

                1 Reply Last reply Reply Quote 0
                • ericraneundefined
                  ericrane
                  last edited by

                  Wrapping the cable in aluminum foil did nothing.

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

                    @ericrane can you send a close up photo of the board, good enough for us to read the markings on the chip?

                    The WhoAmI register should return 0x3F for LIS3DSH and 0x33 for LIS3DH. These are checked in function LIS3DH::CheckPresent().

                    The issue I have seen with these accelerometers is that the CS pin is very sensitive to glitches, so it needs to be kept away from all the other signal wires. However, I have used a LIS3DH successfully with approx. 1m of unscreened 8-core cable and a Duet 2. I have also used one with 1m of ribbon cable, but I had the CS conductor at one end of the cable and a ground conductor between it and the next one.

                    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

                    ericraneundefined 1 Reply Last reply Reply Quote 0
                    • ericraneundefined
                      ericrane @dc42
                      last edited by

                      @dc42 Sorry it took so long. I had a busy week. Thanks for taking a look!

                      20230304_070336.jpg 20230304_070229.jpg 20230304_070218.jpg 20230304_070244.jpg

                      1 Reply Last reply Reply Quote 0
                      • Phaedruxundefined
                        Phaedrux Moderator
                        last edited by

                        Can you get one a little clearer of the black chip in the middle?

                        Z-Bot CoreXY Build | Thingiverse Profile

                        ericraneundefined 1 Reply Last reply Reply Quote 0
                        • ericraneundefined
                          ericrane @Phaedrux
                          last edited by

                          @Phaedrux CM230304-144810005.jpg

                          T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
                          • Phaedruxundefined
                            Phaedrux Moderator
                            last edited by

                            Thanks that's better. @dc42 should be able to make out what that is.

                            Z-Bot CoreXY Build | Thingiverse Profile

                            1 Reply Last reply Reply Quote 0
                            • T3P3Tonyundefined
                              T3P3Tony administrators @ericrane
                              last edited by

                              @ericrane thanks for the picture. I have flagged it for @dc42 however in the mean time if you are still having communication issues then you might want to try with a short cable just to rule our the CS pin noise sensitivity on the LIS

                              www.duet3d.com

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