Duet 2 wifi AND LIS3DH
-
Hi guys, for the connection of a Duet 2 wifi and the LIS3DH accelerometer I am a bit confused as I read different connections between the instructions and some posts of other users.
In the instructions (https://docs.duet3d.com/en/User_manual/Connecting_hardware/Sensors_Accelerometer) I read:
Duet LIS3DH
SDA (MOSI) PIN 5 (MOSI)
SDO (MISO) PIN 8 (MISO)
SCL PIN 4
GND PIN 3and I don't seem to have any doubts up to here but for the following I read different connections in various posts than the instructions and I have doubts. How should they be connected?
CS PIN 1 or PIN 9?
INT1 PIN 3 or PIN 7?Maybe I can connect them as I want but is it enough then to use the correct M955?
M955 P0 C “spi.cs3+spi.cs1”
M955 P0 C “spi.cs9+spi.cs7”Sorry if this sounds like a stupid question but I couldn't figure it out by myself?
Thank you -
@luc here under the pictures https://docs.duet3d.com/en/User_manual/Connecting_hardware/Sensors_Accelerometer#wiring-schemes it says:
Note: the pictures above show an alternative wiring scheme, using pin 7 for INT1 and pin 9 for CS on the TEMP_DB connector. We now recommend using pin 1 for CS and pin 3 for INT1 on the TEMP_DB connector.
The pins relate to the pins on the TempDB connector, pin 9 is SPI_CS4, pin 7 is SPI_CS3:
If you have already connected it using pins 9 and 7, you'll need
M955 P0 C"spi.cs4+spi.cs3"
The main problem with using pins 9 and 7 is that you then can't stack the accelerometer on top of a temperature daughterboard, as there would be no SPI connection.
Ian
-
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.
-
@luc Please note GND is on pin 2 of the temperature daughterboard connector, not pin 3 as you listed.
-
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 neroCS / PIN 9 SPI_CS4 cavo arancione
INT1 / PIN 7 SPI_CS3 cavo verde -
@luc Like I said, it's better to use:
CS / PIN 1 SPI_CS2 cavo arancione
INT1 / PIN 3 SPI_CS1 cavo verdeIf 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
-
@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 verdeIf 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.
-
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 I20I am not clear if I also have to add the S and R paramenters so it becomes:
M955 P0 I20 S5000 R10 ? -
@luc no need to mess with S and R so don't include them
-
@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? -
@luc you'll probably need to adjust the I value once you get it installed and work out which way its pointing