Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login
    1. Home
    2. Piet
    3. Posts
    • Profile
    • Following 0
    • Followers 0
    • Topics 15
    • Posts 64
    • Best 7
    • Controversial 0
    • Groups 0

    Posts made by Piet

    • Accelerometer INT1 error

      Hi All,

      I'm upgrading my printer a bit and decided to install an accelerometer, an lLIS3DSH to be exact.
      I followed the instructions in the documentation for the connections and about 50% of the time it recognises the accelerometer and other times I'll get Error in start-up file macro line 50: Accelerometer not found on specified port.

      If it gets recognised I can call it with M955 P0 and it responds with Accelerometer 0 type LIS3DH with orientation 20 samples at 1344Hz with 10-bit resolution, SPI frequency 2000000. I declared it with M955 P0 C"spi.cs2+spi.cs1"M955 P0 C"spi.cs2+spi.cs1"
      I used an old Cat5e cable of ~70cm with the following connections:

      • VCC (3.3V) - Orange
      • GND - Orange/White
      • SCK - Green
      • SDA - Green/White
      • INT1 - Brown
      • SDO - Brown/White
      • CS - Blue

      When I use the plugin and it makes the first move it will return the following error:
      c423f742-db9a-4c81-a669-a467b227d374-image.png
      Error: M956: Failed to start accelerometer data collection: INT1 error

      I checked the wiring and also used a multimeter to beep the wires.

      My 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
      Board ID: 08DGM-956GU-DJMSN-6JKD2-3S46Q-TVQBH
      Used output buffers: 6 of 26 (14 max)
      Error in macro line 50 while starting up: Accelerometer not found on specified port
      === RTOS ===
      Static ram: 23488
      Dynamic ram: 72168 of which 32 recycled
      Never used RAM 14936, free system stack 184 words
      Tasks: NETWORK(2,nWait 6,13.9%,222) HEAT(3,nWait 5,0.0%,328) Move(4,nWait 5,0.0%,361) MAIN(1,running,85.3%,758) IDLE(0,ready,0.8%,29), total 100.0%
      Owned mutexes:
      === Platform ===
      Last reset 00:02:01 ago, cause: power up
      Last software reset at 2025-03-22 22:10, reason: User, Gcodes spinning, available RAM 14936, slot 1
      Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a
      Error status: 0x00
      MCU temperature: min 24.2, current 29.7, max 30.0
      Supply voltage: min 24.1, current 24.3, max 24.6, under voltage events: 0, over voltage events: 0, power good: yes
      Heap OK, handles allocated/used 99/2, heap memory allocated/used/recyclable 2048/52/0, 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: 
      Driver 6: 
      Driver 7: 
      Driver 8: 
      Driver 9: 
      Driver 10: 
      Driver 11: 
      Date/time: 2025-03-22 22:40:39
      Cache data hit count 4277550534
      Slowest loop: 7.27ms; 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 1.2ms, write time 0.0ms, max retries 0
      === Move ===
      DMs created 83, segments created 0, 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 0, completed 0, 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
      === 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
      === Filament sensors ===
      check 0 clear 493929
      Extruder 0 sensor: no data received
      === Network ===
      Slowest loop: 133.35ms; fastest: 0.00ms
      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 60:01:94:73:5f:25
      Module reset reason: Turned on by main processor, Vcc 3.36, flash size 4194304, free heap 34260
      WiFi IP address 192.168.178.206
      Signal strength -66dBm, channel 11, mode 802.11n, reconnections 0
      Clock register 00002002
      Socket states: 0 5 0 0 0 0 0 0
      

      Can anyone give me some pointers or tell me what I'm doing wrong? That would be greatly appreciated!
      Thanks in advance.

      Kind regards, Piet.

      posted in Duet Web Control
      Pietundefined
      Piet
    • RE: Skip desktop view in SBC mode

      @chrishamm That worked, thanks.

      posted in Duet Web Control
      Pietundefined
      Piet
    • RE: Failed Duet3 & SBC firmware update (again)

      @chrishamm

      That definitely helps! Updating to 3.4 takes around 30min I'd say 😌

      posted in Firmware installation
      Pietundefined
      Piet
    • RE: Failed Duet3 & SBC firmware update (again)

      @rushmere3d

      Good to hear, I'm not sure i had the same error message coming from a clean image (Invalid protocol version 6). Read somewhere on the forum that it had to do with dissimilair versions on the pi and duet but I'm not sure.

      posted in Firmware installation
      Pietundefined
      Piet
    • RE: Failed Duet3 & SBC firmware update (again)

      @rushmere3d I had the same thing with a fresh DuetPi installation.
      Can you check what it posts if you type sudo journalctl -u duetcontrolserver into putty.
      For me i think it had to do with dissimilair firmware versions on the RPi and duet but i'm not sure. When i updated to the newest stable release (3.4) it started working again.

      posted in Firmware installation
      Pietundefined
      Piet
    • Skip desktop view in SBC mode

      Hi all,

      I was wondering if there is a way to skip the desktop screen when starting up my printer using an RPi. Right now when it boots up it shows the desktop screen off the RPi for a couple seconds before starting DWC.

      Thanks in advance,
      Piet.

      posted in Duet Web Control
      Pietundefined
      Piet
    • Website DWC does not work

      Hi all,

      I'm running in SBC mode.

      Yesterday i accidentally deleted a directory from my SD card which made it so the UI wouldn't show on the rpi screen. I opted to go for a new install so I flashed a new image of duetpi and updated RRF to 3.4RC2.

      Now it does not show the web interface in the browser (I am using the right IP). I can connect to it using SSH and it does show the interface on the rpi screen just not in the browser. Strange thing is normally when i scan for IPs using advanced IP scanner I can see a dropdown arrow which shows the webpage however now that's not the case.

      I've uploaded the new 3.3 DWC files to the /www folder but it's still not working.

      Does anyone have any idea?

      Thanks in advance, Piet.

      posted in Duet Web Control
      Pietundefined
      Piet
    • RE: Mesh bed leveling without M557

      For future reference, this works.
      The probe file can be adjusted to allow for different types of probing.

      if !exists(param.X) || !exists(param.Y)														;if parameter X and Y are given
      	echo "Make sure parameter X and Y are given (C and S optional). Aborting probe move."	;notify user
      	
      G1 X{param.X} Y{param.Y} Z{sensors.probes[0].diveHeight} F6000								;move to given X and Y coordinates and predefined diveheight
      M400																						;wait for moves to finish
      
      M98 P"waitForHeaters.g" H01
      
      M568 P0 A0																					;turn the extruder heater off (interference changes sensor reading)
      
      G4 S1																						;wait 1 second
      
      M98 P"preprobe.g"																			;call macro to determine triggervalue and see if it is okay to proceed probing
      
      ;M291 R"Probing." P" " S1
      
      if global.proceedProbe = true																;if its okay to proceed probing
      	if exists(param.C)																		;if parameter C is given
      		if exists(param.S)																	;if parameter S is given
      			G30 X{param.X} Y{param.Y} P{param.C} S{param.S} Z-9999							;probe move
      		else																				;otherwise
      			G30 X{param.X} Y{param.Y} P{param.C} Z-9999										;probe move
      	elif exists(param.S)																	;if parameter S is given
      		G30 X{param.X} Y{param.Y} S{param.S} Z-9999											;probe move
      	else																					;otherwise
      		G30 X{param.X} Y{param.Y} Z-9999													;probe move
      		
      elif (global.proceedProbe = false)															;if it isnt okay to proceed probing
      	echo "Aborting probe move"																;notify user
      
      ;M292
      
      M568 P0 A1																					;set the extruder heater to standby
      
      if global.bedLeveled == 0	
      	G32
      
      M98 P"probe.g" X525 Y250
      
      echo >"heightmap.csv" "Height map file generated at", state.time
      echo >>"heightmap.csv" "xmin,xmax,ymin,ymax,radius,xspacing,yspacing,xnum,ynum"
      echo >>"heightmap.csv" global.xMin,",",global.xMax,",",global.yMin,",",global.yMax, ", -1 ,",global.xSpacing,",",global.ySpacing,",",global.xNum,",",global.yNum
      var y = global.yMin
      var i = 0
      
      G90
      
      while var.i < global.yNum
      	var x = global.xMin
      	var j = 0
      	while var.j < global.xNum
      		M98 P"probe.g" X{var.x} Y{var.y} S-1
      		M400
      	
      		if var.j == 0
      			set global.meshLine = sensors.probes[0].lastStopHeight - sensors.probes[0].triggerHeight
      		else 
      			set global.meshLine = global.meshLine ^ "," ^ sensors.probes[0].lastStopHeight - sensors.probes[0].triggerHeight
      		
      		set var.x = var.x + global.xSpacing
      		set var.j = var.j + 1
      	
      	echo >>"heightmap.csv" global.meshLine
      	set var.y = var.y + global.ySpacing
      	set var.i = var.i + 1
      
      posted in Gcode meta commands
      Pietundefined
      Piet
    • Writing M122 to file

      Dear users,

      I'm wondering if there is a way to write the diagnostics output of the M122 command to a text file using meta Gcode.

      Thanks in advance, Piet.

      posted in Gcode meta commands
      Pietundefined
      Piet
    • RE: Mesh bed leveling without M557

      @t3p3tony Smart! I don't have a heightmap saved, do you by any chance have an example so i can see how it's formatted?

      posted in Gcode meta commands
      Pietundefined
      Piet
    • Mesh bed leveling without M557

      Dear users,

      I noticed there is a possibility to create a mesh.g file and I'm wondering if i can use it to do the following. (I'm not totally sure how to use it so please enlighten me)

      I have some hysteresis in my Z-probe. This means that if I run the G29 command and automatically probe all the predefined points, the value starts to shift to a point that the mesh is unusable. Normally before probing I measure the analog value of the probe and set a new threshold by adding a value to that measured value. Is there a way I can set a new threshold to trigger before every probe move in the mesh.g. I already have this code set up for regular bed leveling but I'm assuming I can't use the G30 command to do mesh bed leveling. Is this correct?

      This is the code i already use:
      probe.g

      if !exists(param.X) || !exists(param.Y)														;if parameter X and Y are given
      	echo "Make sure parameter X and Y are given (C and S optional). Aborting probe move."	;notify user
      	
      G1 X{param.X} Y{param.Y} Z{sensors.probes[0].diveHeight} F6000								;move to given X and Y coordinates and predefined diveheight
      M400																						;wait for moves to finish
      
      M291 R"Waiting for extruder." P" " S1
      M116 P0 S2																					;wait for extruder to reach temperature
      
      M568 P0 A0																					;turn the extruder heater off (interference changes sensor reading)
      
      G4 S1																						;wait 1 second
      
      M98 P"preprobe.g"																			;call macro to determine triggervalue and see if it is okay to proceed probing
      M292
      
      M291 R"Probing." P" " S1
      
      if global.proceedProbe = true																;if its okay to proceed probing
      	if exists(param.C)																		;if parameter C is given
      		if exists(param.S)																	;if parameter S is given
      			G30 X{param.X} Y{param.Y} P{param.C} S{param.S} Z-9999							;probe move
      		else																				;otherwise
      			G30 X{param.X} Y{param.Y} P{param.C} Z-9999										;probe move
      	elif exists(param.S)																	;if parameter S is given
      		G30 X{param.X} Y{param.Y} S{param.S} Z-9999											;probe move
      	else																					;otherwise
      		G30 X{param.X} Y{param.Y} Z-9999													;probe move
      		
      elif (global.proceedProbe = false)															;if it isnt okay to proceed probing
      	echo "Aborting probe move"																;notify user
      
      M292
      
      M568 P0 A1																					;set the extruder heater to standby
      

      preprobe.g

      if !exists(global.proceedProbe)																										;if variable doesnt exist yet
      	global proceedProbe = false																										;initialize variable
      	
      if exists(global.triggerVal)																										;if a triggervalue has been defined
      	if sensors.probes[0].value[0] <= 922 && sensors.probes[0].value[0] >= 200														;if the sensorvalue is within acceptable range
      		var measuredVal = {sensors.probes[0].value[0]}																				;measure the sensor value
      		G31 P{var.measuredVal + global.triggerVal}																					;set the triggervalue to the measured value + the triggervalue
      		;echo "Measured sensor value is", {var.measuredVal}, ". Triggervalue has been set to", {sensors.probes[0].threshold}, "."	;notify user
      		set global.proceedProbe = true																								;set variable so probing can proceed
      	
      	else																															;otherwise
      		echo "Measured sensor voltage is out of range at ", {(var.measuredVal * 5)/1024}, "V."										;notify user
      		set global.proceedProbe = false																								;set variable so probing wont proceed
      		
      else																																;otherwise
      	echo "The variable triggerVal has not been declared in the config.g file (default = 100)"										;notify user
      	set global.proceedProbe = false																									;set variable so probing wont proceed
      	
      

      So instead of using the G30 command to probe i use M98 P"probe.g".

      posted in Gcode meta commands
      Pietundefined
      Piet
    • RE: Problem when turning on printer

      @chrishamm Thanks for reporting back! I actually also had the problem of another chromium window opening over DWC, that is fixed. Will check if the config loading is fixed too.

      posted in Using Duet Controllers
      Pietundefined
      Piet
    • RE: Trouble with heating up using a toolboard

      @t3p3tony It's an 80W heater with a custom heater block about the size of a supervolcano and full aluminium. It's not insulated so it probably is losing quite a bit of heat, I'm going to look into that in the future.
      However regarding this issue. It seems the toolboard is limiting the amount of current for some reason if I'm thinking correctly. Do you agree or should I look elsewhere?

      posted in My Duet controlled machine
      Pietundefined
      Piet
    • RE: Trouble with heating up using a toolboard

      @t3p3tony

      how much current does the heater draw if you connect it (briefly) directly to the power supply. Leave the temp sensor connected to the duet so you can monitor the temperature and cut the power before it gets too high.

      I attached the heater to a seperate 24V supply. It draws 3.33A and it gets up to, albeit pretty slow, to 300C. However measuring using the thermocouple it only gets to about 285C.

      posted in My Duet controlled machine
      Pietundefined
      Piet
    • RE: Trouble with heating up using a toolboard

      @t3p3tony I'm guessing this was an error on my part, see my reply to gixxerfast.

      how much current does the heater draw if you connect it (briefly) directly to the power supply. Leave the temp sensor connected to the duet so you can monitor the temperature and cut the power before it gets too high.

      I'm going to try this now.

      posted in My Duet controlled machine
      Pietundefined
      Piet
    • RE: Trouble with heating up using a toolboard

      @gixxerfast

      You Vin is very low I think.

      I noticed this and actually already turned the supply up, that's why there is such a big difference in voltage.

      I also run AWG20 to the toolboard, but maybe you should check the wiring to make sure all is connected as it should. and that you really have thick enough wire 0.5mm2 (double check 🙂 )*

      Yup double checked it.

      I actually measured the current wrong, it shows 3A now. The voltage across the heater is 22.8V so I'm approximately 10W short. (22.8 * 3 = 68.4W)

      posted in My Duet controlled machine
      Pietundefined
      Piet
    • RE: Trouble with heating up using a toolboard

      @gixxerfast I set the max temperature to 300C, forgot to include that.

      M143 H1 S300                                             ; set temperature limit for heater 1 to 300C 
      

      Btw. Do a m122 B20 for some diagnostics. They usually want that 🙂

      m122 B20
      Diagnostics for board 20:
      Duet TOOL1LC rev 1.1 or later firmware version 3.4.0beta5 (2021-10-12 13:59:06)
      Bootloader ID: SAMC21 bootloader version 2.3 (2021-01-26b1)
      Never used RAM 2484, free system stack 2789 words
      Tasks: Move(notifyWait,0.0%,153) HEAT(notifyWait,0.3%,115) CanAsync(notifyWait,0.0%,64) CanRecv(notifyWait,0.0%,77) CanClock(notifyWait,0.0%,64) ACCEL(notifyWait,0.0%,61) TMC(delaying,3.0%,57) MAIN(running,91.8%,350) IDLE(ready,0.0%,27) AIN(delaying,4.9%,142), total 100.0%
      Last reset 00:33:35 ago, cause: power up
      Last software reset data not available
      Driver 0: pos 0, 348.0 steps/mm, standstill, SG min/max 0/0, read errors 0, write errors 0, ifcnt 11, reads 24700, writes 11, timeouts 0, DMA errors 0, steps req 0 done 0
      Moves scheduled 0, completed 0, in progress 0, hiccups 0, step errors 0, maxPrep 0, maxOverdue 0, maxInc 0, mcErrs 0, gcmErrs 0
      Peak sync jitter 0/5, peak Rx sync delay 215, resyncs 0/0, no step interrupt scheduled
      VIN voltage: min 21.6, current 21.6, max 24.4
      MCU temperature: min 32.5C, current 49.8C, max 51.8C
      Last sensors broadcast 0x00000006 found 2 36 ticks ago, loop time 0
      CAN messages queued 41092, send timeouts 0, received 18096, lost 0, free buffers 37, min 37, error reg 0
      dup 0, oos 0/0/0/0, bm 0, wbm 0, rxMotionDelay 0
      Accelerometer detected: yes, status: 00
      I2C bus errors 0, naks 3, other errors 0
      === Filament sensors ===
      Interrupt 5726621 to 0us, poll 2 to 773us
      Driver 0: no data received
      

      Btw2, you are taking 24V directly from the PSU I assume
      Yes

      Btw3, I print mainly ASA and I rarely go above 260C, but that's another question
      True i was just about to run some temperature testing when I noticed it doesn't reach temperatures it should.

      posted in My Duet controlled machine
      Pietundefined
      Piet
    • Trouble with heating up using a toolboard

      Dear users,

      I'm trying to start printing ASA for which i ran PID tuning at 280C. After some time i got the error that it didn't reach the desired temperature. It only reached about 270ish. This confused me as i have an identical printer, with a different control board (not duet), with the same extruder that can easily reach 300C (and faster too).

      To make sure the temperature reading was correct I measured using a thermocouple inside the heater block. The other printer's temperature reading was basically spot on while the duet with a pt1000 was about 15C higher than the actual temperature (maybe i did something wrong here because that seems like alot).

      I'm using a duet3 + sbc connected to a toolboard. The PT1000 is connected to temp0, the voltage i measured going to the toolboard is 24V and the voltage to the heater when it's on is ~21.8V. The heater is supposed to be 80W which is correct as i measured 7 Ohms over the heater.

      Is this a power issue? The power wiring to the toolboard is 2x0.5mm, i assumed this was thick enough for the 3.3A (should be good to about 5A i thought).

      At the moment I'm seeing if there is a difference if i use bangbang instead of PID but that doesn't seem to be the case.

      The config of the heater and temperature sensor:

      M308 S1 P"20.temp0" Y"pt1000" A"Extruder"				 ; configure sensor 1 as thermistor on pin 20.temp0
      M950 H1 C"20.out0" T1                                    ; create nozzle heater output on 20.out0 and map it to sensor 1
      ;M307 H1 B0 R1.821 C159.8:143.3 D6.60 S1.00 V21.8		 ; disable bang-bang mode for heater  and set PWM limit
      M307 H1 B1
      

      Any help would be appreciated!

      Piet.

      Edit: Just measured the current going to the toolboard and it's only 1.8A. So it makes sense it doesn't heat up very fast as that is only 40W (21.8*1.8). Not sure where the problem lies.

      posted in My Duet controlled machine
      Pietundefined
      Piet
    • RE: Problem when turning on printer

      @t3p3tony Excuse me, i saw a bookmark next to my message and wondered what it was and clicked it and it disappeared. I accidentally reported myself after... Woops 🙂

      posted in Using Duet Controllers
      Pietundefined
      Piet
    • RE: Problem when turning on printer

      @t3p3tony alright thank you. I guess as a workaround for now I'll check with daemon.g if the config is run and otherwise I'll run it again

      posted in Using Duet Controllers
      Pietundefined
      Piet