Duet Ethernet won't detect my new accelerometer board.
-
At Crocker's suggestion this is a repost from the RepRap forum:
I've been following the instructions to set up an Adafruit LIS3DH accelerometer on my DuetEthernet. I've been running 3.3 up till now, then installed 3.4b3. I have a temp daughterboard so made my cable according to that (see pics).
When I manually attempt to run M955 P0 C"spi.cs4+spi.cs3" S1000 to set up an accelerometer, I get 'accelerometer not found on specified port'.
After double-checking my wire routing, I put an oscilloscope on all the pins of the temp daughterboard's Output connector. There is regular bus data going on, including activity on CS1 and CS2 when the PT100 sensors are read. But CS3 and CS4 don't change when I send the M995 command. I hope my Duet board isn't damaged! It might be the firmware, see below.
Pictures can't show everything clearly so here is my cable mapping. There are three separate shielded cables. They all share ground but only connect to gnd on the Duet side to prevent ground loops.
Duet Temp Daughterboard Output Connector -> Pin names on the accelerometer board:
1 - INT
2 - GND
3 - CS
4 - SCL
5 - SDA
6 - SDO
8 - Vin
Related problems:
...3.4b3 web control is not showing either tool on the dashboard, just the bed. the temp graph however has three heaters in the legend (I have a dual extruder).Config.g file is attached. Below is the diagnostic report form the Duet board.
M122
=== Diagnostics ===
RepRapFirmware for Duet 2 WiFi/Ethernet version 3.3 (2021-06-15 21:44:54) running on Duet Ethernet 1.02 or later
Board ID: 08DGM-9T6BU-FG3SN-6JKDD-3SN6J-TVWHG
Used output buffers: 3 of 24 (15 max)
=== RTOS ===
Static ram: 23876
Dynamic ram: 69888 of which 584 recycled
Never used RAM 20068, free system stack 150 words
Tasks: NETWORK(ready,26.0%,231) HEAT(delaying,0.1%,330) Move(notifyWait,0.1%,317) MAIN(running,73.9%,503) IDLE(ready,0.0%,29), total 100.0%
Owned mutexes:
=== Platform ===
Last reset 01:05:09 ago, cause: software
Last software reset at 2021-09-10 21:02, reason: User, GCodes spinning, available RAM 20308, slot 2
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
Step timer max interval 0
MCU temperature: min 32.7, current 33.2, max 36.0
Supply voltage: min 24.1, current 24.3, max 24.3, under voltage events: 0, over voltage events: 0, power good: yes
Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0
Driver 0: position 150194, standstill, SG min/max not available
Driver 1: position 150194, standstill, SG min/max not available
Driver 2: position 150194, standstill, SG min/max not available
Driver 3: position 0, standstill, SG min/max not available
Driver 4: position 0, standstill, SG min/max not available
Driver 5: position 0
Driver 6: position 0
Driver 7: position 0
Driver 8: position 0
Driver 9: position 0
Driver 10: position 0
Driver 11: position 0
Date/time: 2021-09-10 22:07:28
Cache data hit count 4294967295
Slowest loop: 22.02ms; fastest: 0.17ms
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 2.0ms, write time 8.7ms, max retries 0
=== Move ===
DMs created 83, maxWait 171ms, bed compensation in use: none, comp offset 0.000
=== MainDDARing ===
Scheduled moves 1, completed moves 1, hiccups 130458, 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, chamberHeaters = -1 -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
Daemon is idle in state(s) 0
Autopause is idle in state(s) 0
Code queue is empty.
=== Network ===
Slowest loop: 66.95ms; fastest: 0.02ms
Responder states: HTTP(2) HTTP(2) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions
HTTP sessions: 1 of 8
Interface state active, link 100Mbps full duplex -
@shadowphile if you're using a daughter board, you have to connect the accelerometer to CS1 and CS2 on the daughter board then you can address them with cs2 and cs3
-
@siam That is what I did. The lack of signals on CS3 and CS4 were measured on the Input connector. Check my wiring (pictures and text description of cable routing) in case I am wrong somehow.
Also still have that problem with heaters not showing up on the dashboard. -
@shadowphile for the Accelerator Problem please read this threat
https://forum.duet3d.com/topic/24099/accelerometer-on-duet2wifi-duex5-expansion
and
https://forum.duet3d.com/topic/22878/software-package-3-3beta3-released/91?_=1624809172098How long is your Accelerometer Cable and what kind of cable you use (my first try was a normal cable with 150 cm length and this was not working after replace this cable with an usb3 cable it was working)?
For the other Problem, enter the following command in the console and paste the result here
M98 P"config.g"
also post please your config.g file
-
@siam config.g file is attached to the first post.
M98 reports 'Warning: Macro file 0 not found"
Cable is about 170 cm long. 3 twisted shielded pairs, shielding connected to ground on all. I did somehow route SD0 and CS in the same twisted pair. My bad, but it does not explain the lack of ANY activity on the CS3 or CS4 (even a terrible connection should show the first (messy attempt) to talk to the board before giving up. -
@shadowphile sorry sometimes I be a bit blind
In your config.g I didn't find a call to macro 0 can you post your config-overide.g
In your config.g I can only find one error
; Fans MM950 F0 C"fan0"
Please remove here the second M and try to execute the config.g with M98 P"config.g" again it is possible that the config.g file was interrupted because of this error.
To the accelerator board have you connected this directly to the duet board without the daughter board ? If not, Please try this
-
@siam I finally got it all working!
The issue was the assignment I used from the documentation: M955 P0 C"spi.cs4+spi.cs3". I swapped the 3 and 4 and it all started working. Short jumpers to the sensor worked ok but I need to refine my cabling because bouncing on my CS edges is causing random acquisition failures.
But otherwise I think I'm good, thanks for the help. -
@siam I was also missing the motor mapping assignment, which is a big bad omission. I was wondering why my Z-tower motor was in whining fibrillation mode for 30 seconds after a reset.