EDIT: took me way too long, no idea what was missing, just started working as it should, thanks

Posts made by awitc
-
RE: Sending data from a microcontroller to Duet3 (with SBC)
-
RE: Sending data from a microcontroller to Duet3 (with SBC)
@jay_s_uk @chrishamm Yes, I have added the command, using 115200 as baudrate, but from what I see, I had the parameter S set to be default. I will try with the raw mode, that might have been the problem. Thanks!
-
RE: Sending data from a microcontroller to Duet3 (with SBC)
@jay_s_uk for now I have a STM32F411RE, will switch up to STM32F491RE in the following days. So it has Arm Cortex-M4. The STM is used to run a custom PID controller, which manipulates the speed of the extruder stepper motor, based on pressure.
EDIT: not extruder motor, but a drive which provides material to be extruded. I want to have the pressure in the extruder at a certain level.
-
Sending data from a microcontroller to Duet3 (with SBC)
Hi,
I have an STM32F4 board running a custom pressure controller, with a melt pressure transducer connected to it. I can achieve basic functionalities with toggling IO pins on the Duet3, but my goal would be to establish a two-way communication with a custom protocol for future features. I am trying to setup an USART connection between IO0 and the STM32 pins, but seems like the Duet3 does not receive anything. I am sending this with the hopes of seeing something pop up in the DWC:
"M118 P3 S\"Hello from STM32!\"\n\r"
I lack the general understanding of how to wire things up - is the Raspberry Pi SBC setup 'overriding' the standalone functions of the Duet3 board? Maybe I should connect the STM32 to RPi, and then have a Python script that sends the commands to DWC?
I would greatly appreciate any info on how this should be done, ideally I would love to add many modules this way, so the communication method needs to be reliable.
TLDR: I need to send pressure readings to Duet3 from STM32, to have a macro which stops a print when the pressure is too low.
Thanks,
AW -
RE: Two motor extruder custom setting
@droftarts Great! Exactly what I was looking for, must have overlooked the note. Thanks!
-
Two motor extruder custom setting
Hi!
I have configured an extruder with two motors, with a given step ratio. I am wondering if it is possible to override that setting in specific moments, ie. during a retraction,
to obtain a different ratio than the one in the config.For instance, a normal command (here the E value is used for both motors, according to config ratio):
G1 X151.683 Y193.377 E0.60904
At certain moments, I want to change the value, so that one of the motors does not move:
G1 X151.683 Y193.377 E0.60904:0
I am looking forward to any solution ideas!
Best regards,
AW -
Trigger gcode execution question
Hi!
I am trying to set up a sensor, which will indicate the level of pellet material in the extruder, in the case when no material is detected, it will trigger a trigger, and perform the action of loading pellets, by setting a valve ON for a certain amount of time. My question is, does pause gcode (G4 command) return the attention to the printed file, while executed in a trigger.g? Ideally, I would want something like this:
set_valve_on(); // freeze this thread for 30 seconds G4 S30 set_valve_off()
Best regards,
AW -
RE: Connecting a capacitive sensor, but not as a probe
The addition of "^" helped to bring the voltages to 0.7V and 3.3V respectively. I thought the pullup on the input is enabled by default. Thanks a lot!
I found also that testing the trigger with a M117 message makes the message show up only the first time the trigger is evoked. At least in my case.
-
Connecting a capacitive sensor, but not as a probe
Hi!
I am trying to set up a capacitive sensor not as a probe, but as a switch, which triggers some macro, whenever its "pressed". I am working with a Duet3 6XD, sensor information and config lines can be found below. My idea was to connect it as I have my endstops:
brown -> 24V
blue -> io_in_iso_neg
black -> io_in_iso_posHowever, this connection causes the sensor to not respond. Therefore, I did this:
brown -> 24V
blue -> io_GND
black -> io_inWith this connection, the sensor operates correctly, lighting up an LED whenever something is close to it, but the Duet3 does not recognize any change to the GPIO state:
21.11.2023, 16:05:50 M409 K"sensors.gpIn[1]" { "key": "sensors.gpIn[1]", "flags": "", "result": { "value": 0 } }
When I measure the voltage of the black wire, it is 8V or 9V depending on the state of the sensor. I figure, that changes between 0 and 3,3V would be needed, but do not know what to change to make it work.
; proximity sensor for pellet loading system M950 J2 C"io8.in" M581 P2 T2
-
Temperature readings randomly show fault (2000°C)
Hi!
I am experiencing a weird problem, where at startup, the readings from thermocouples randomly (ie. it is not specifically one of them) show the value of 2000°C. It can be most of them, it can be two, generally it changes each time. After some time, the readings go back to normal, but during 3D printer operation singular readings will also jump to 2000°C, creating random spikes in the plot. During all of this, the wiring of the Duet3 6XD, Duet3 3HC, and 4 Duet3 thermocouple boards does not change, it is enclosed in an electrical box. The reading faults do not occur specifically on the thermocouples connected to one of the driver boards either.
Best regards,
AW -
RE: Duet3 6XD driver microstepping error
@dc42 thanks for the quick answer! I assumed I have to match the M350 to the DIP switches.
-
Duet3 6XD driver microstepping error
Hi!
I am seeing the following error:
It does not happen everytime I start/restart my printer. The printer is working properly, according to the given steps. It seems as if the error is only present in the console.
I use external stepper motor drivers - EM882S, which definitely support 32 microsteps. Driver 4 is the extruder, and I have a different motor, hence the different microstep value.Config:
M350 X32 Y32 Z32 E8 I0 ; microstepping with/without interpolation
It is more of an esthetical issue than anything else, but I would love to solve it nevertheless.
Best regards,
AW -
RE: daemon.g usage cases
I am using the latest version of the firmware, 3.4.6.
Here I have created a post regarding the pausing: link.
Edit:
I have gone through the information regarding daemon.g on the docs page once more. Is it possible that a G4 S30 is making the code to be 'a loop that takes a long time to complete'? I assumed that no matter the parameter of G4, it will return the control to the main process.I will try to redo my daemon.g to contain a loop with shorter pauses, instead one G4 command.
-
RE: daemon.g usage cases
Yes, my goal was to have a function checking a sensor state with 1 second intervals, and to disable fans with a 30 second delay. However, I found the G4 blocking, ie. in one of my prints a typical layer takes about 5 seconds to finish, but some of them are ~35 seconds. This behaviour disappears completely when I do not use the daemon.g, and I determined it to be for sure linked to the G4 S30 command.
This is why I am left confused as to what is the exact behaviour of G4 in daemon.g.
-
RE: Duet3 6XD based 3D printer freezes mid-print, then continues
I might have tracked the issue down, asked a question with more information here. If my daemon.g was the culprit, sorry for the waste of time.
-
RE: daemon.g usage cases
@dc42 said in daemon.g usage cases:
@OwenD said in daemon.g usage cases:
Does G4 pass control back to the main process when used in a loop?
Yes.
I have some issues understanding the G4 command. I assumed that it works like a delay, which makes the 'thread' dormant, so that the next task in line can get the processing power. I have used it in a daemon.g:
var trigger = 0 while true if sensors.analog[9].lastReading > global.pump_trigger_temp && var.trigger == 0 set var.trigger = 1 M42 P1 S1 ; enable pump M106 P3 S255 ; enable fans if sensors.analog[9].lastReading < global.pump_trigger_temp set var.trigger = 0 M42 P1 S0 ; disable pump G4 S30 ; wait 30 seconds M106 P3 S0 ; disable fans G4 S1
where a pump and radiator fans are controlled. The program works fine, but I experienced some pauses in my printing, occuring quite randomly. I made a forum post about it. I feel quite silly now, because the delays I experienced might align with the G4 S30 command.
I am perplexed, as the G4 S1 command does not seem to block the events, but the G4 S30 is probably the culprit of my problems. What would be a way of creating a non-blocking delay command in a daemon.g?
-
RE: Custom temperature control
Hi, do you know if there is a variable which can allow for continuous speed monitoring? I have a stepper motor for the extruder, which has a gearbox, and would love to setup a custom panel which shows the output speed.
-
RE: Duet3 6XD based 3D printer freezes mid-print, then continues
I tried such microsteps:
M350 X16 Y16 Z16 E16 I1
but the same problem, back to back, in short time interval, in the middle of the print. Also I find the printer to be way louder in this interpolation mode.
-
RE: Duet3 6XD based 3D printer freezes mid-print, then continues
I've changed the SD card for the new one, however, during the first test print the issue occured again, here is the M122 result, done right after it paused and resumed:
8.09.2023, 12:34:59 M122 === Diagnostics === RepRapFirmware for Duet 3 MB6XD version 3.4.6 (2023-07-21 14:11:58) running on Duet 3 MB6XD v1.0 (SBC mode) Board ID: 08DLM-956DA-M24S4-7JKD0-3SJ6P-1BJLU Used output buffers: 1 of 40 (15 max) === RTOS === Static ram: 151692 Dynamic ram: 67564 of which 0 recycled Never used RAM 128416, free system stack 154 words Tasks: SBC(ready,0.6%,487) HEAT(notifyWait,0.1%,346) Move(notifyWait,0.2%,252) CanReceiv(notifyWait,0.0%,798) CanSender(notifyWait,0.0%,335) CanClock(delaying,0.0%,349) MAIN(running,99.0%,1232) IDLE(ready,0.1%,29), total 100.0% Owned mutexes: HTTP(MAIN) === Platform === Last reset 00:20:18 ago, cause: software Last software reset at 2023-09-08 12:14, reason: User, GCodes spinning, available RAM 131648, slot 1 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0x00000000 SP 0x00000000 Task SBC Freestk 0 n/a Error status: 0x00 Step timer max interval 18681 MCU temperature: min 37.3, current 39.0, max 39.1 Supply voltage: min 23.9, current 23.9, max 24.0, under voltage events: 0, over voltage events: 0, power good: yes 12V rail voltage: min 11.8, current 12.2, max 12.4, under voltage events: 0 Heap OK, handles allocated/used 99/3, heap memory allocated/used/recyclable 2048/54/10, gc cycles 0 Events: 0 queued, 0 completed Driver 0: ok Driver 1: ok Driver 2: ok Driver 3: ok Driver 4: ok Driver 5: ok Date/time: 2023-09-08 12:34:58 Slowest loop: 55.53ms; fastest: 0.03ms === Storage === Free file entries: 10 SD card 0 not detected, interface speed: 37.5MBytes/sec SD card longest read time 0.0ms, write time 0.0ms, max retries 0 === Move === DMs created 125, segments created 6, maxWait 551121ms, bed compensation in use: none, comp offset 0.000 === MainDDARing === Scheduled moves 1345, completed 1320, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 1], CDDA state 3 === AuxDDARing === Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters 8 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0 Heater 1 is on, I-accum = 0.3 Heater 2 is on, I-accum = 0.2 Heater 3 is on, I-accum = 0.3 Heater 4 is on, I-accum = 0.0 Heater 5 is on, I-accum = 0.0 Heater 6 is on, I-accum = 0.0 Heater 8 is on, I-accum = 0.1 === GCodes === Segments left: 1 Movement lock held by null HTTP* is doing "M122" in state(s) 0 Telnet is idle in state(s) 0 File* is doing "G1 X244.630997 Y217.218002 Z13.319000 E0.823970" 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 SBC is idle in state(s) 0 Daemon* is doing "G4 S30" in state(s) 0 0, running macro Aux2 is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty === CAN === Messages queued 10972, received 19471, lost 0, boc 0 Longest wait 1ms for reply type 6018, peak Tx sync delay 389, free buffers 50 (min 49), ts 6091/6090/0 Tx timeouts 0,0,0,0,0,0 === SBC interface === Transfer state: 5, failed transfers: 0, checksum errors: 0 RX/TX seq numbers: 33732/33732 SPI underruns 0, overruns 0 State: 5, disconnects: 1, timeouts: 1 total, 1 by SBC, IAP RAM available 0x2b584 Buffer RX/TX: 3616/1704-3688, open files: 0 === Duet Control Server === Duet Control Server v3.4.6 File /opt/dsf/sd/gcodes/CFFFP_budVase.gcode is selected, processing File: Buffered code: G1 X244.631 Y217.218 Z13.319 E0.82397 Buffered code: G1 X245.087 Y218.482 Z13.33 E0.83802 Buffered code: G1 X245.455 Y219.748 Z13.34 E0.82221 Buffered code: G1 X245.745 Y221.039 Z13.349 E0.82518 Buffered code: G1 X245.954 Y222.354 Z13.36 E0.83039 Buffered code: G1 X246.08 Y223.673 Z13.369 E0.82633 Buffered code: G1 X246.122 Y225 Z13.379 E0.82799 Buffered code: G1 X246.082 Y226.327 Z13.389 E0.82795 Buffered code: G1 X245.958 Y227.647 Z13.399 E0.82684 Buffered code: G1 X245.751 Y228.962 Z13.41 E0.8302 Buffered code: G1 X245.464 Y230.253 Z13.419 E0.82478 Buffered code: G1 X245.096 Y231.522 Z13.429 E0.82401 Buffered code: G1 X244.642 Y232.786 Z13.44 E0.8376 Buffered code: G1 X244.117 Y234 Z13.45 E0.82487 Buffered code: G1 X243.524 Y235.166 Z13.459 E0.81581 Buffered code: G1 X242.837 Y236.33 Z13.47 E0.84293 Buffered code: G1 X242.102 Y237.413 Z13.479 E0.81626 Buffered code: G1 X241.275 Y238.48 Z13.49 E0.84191 Buffered code: G1 X240.412 Y239.46 Z13.499 E0.81437 Buffered code: G1 X239.469 Y240.408 Z13.509 E0.8339 Buffered code: G1 X238.476 Y241.283 Z13.519 E0.8254 Buffered code: G1 X237.416 Y242.106 Z13.53 E0.83693 Buffered code: G1 X236.334 Y242.842 Z13.539 E0.81609 Buffered code: G1 X235.17 Y243.532 Z13.55 E0.84389 Buffered code: G1 X234.004 Y244.127 Z13.559 E0.81637 Buffered code: G1 X232.79 Y244.653 Z13.569 E0.82512 Buffered code: G1 X231.527 Y245.109 Z13.58 E0.83743 ==> 1512 bytes Pending code: G1 X230.257 Y245.479 Z13.59 E0.82496 Pending code: G1 X228.966 Y245.768 Z13.599 E0.82505 Pending code: G1 X227.649 Y245.978 Z13.61 E0.83172 Pending code: G1 X226.328 Y246.104 Z13.62 E0.82757 Pending code: G1 X225 Y246.146 Z13.63 E0.82861 Daemon: Buffered code: G4 S30 ; wait 30 seconds Buffered code: M106 P3 S0 ; disable fans Buffered code: G4 S1 ==> 104 bytes Executing macro daemon.g, started by system Number of flush requests: 1 > Next stack level Code buffer space: 1856 Configured SPI speed: 8000000Hz, TfrRdy pin glitches: 0 Full transfers per second: 38.67, max time between full transfers: 74.3ms, max pin wait times: 64.8ms/5.6ms Codes per second: 1.87 Maximum length of RX/TX data transfers: 3772/1392
-
RE: Duet3 6XD based 3D printer freezes mid-print, then continues
Thanks for the replies, I have ordered a new SD card, it has 200/90 MB/s speeds:
Will give an update after I get the card.