Arduino PanelDue Sniffer
-
I have 2 different printers I am trying to get this working on. 1 has RRF3.3 and the other has RRF3.4.0beta5. Both have Duet 3 with RPI 4 as SBC, Duet Tool Board v1.1, 5v PSU wired to PS_ON so I can turn the main PSU on and off with the ATX button in DWC.
We use an Arduino Pro Mini to control 3 RGB LED NeoPixel rings to display different printer status. The Arduino polls the PanelDue port with
M409 F"d99f"
.I didn't write the sketch so I'm not completely familiar with it. Even though the 24v PSU is off, the PanelDue and Arduino are still powered off the IO ports. I would like to have the Arduino turn the LEDs off when the ATX power is off.
The sketch can be found here
The RRR3.4.0beta5
M409 F"d99f"
output10/22/2021, 8:07:13 PM M409 F"d99f" { "key": "", "flags": "d99f", "result": { "boards": [ { "mcuTemp": { "current": 43 }, "v12": { "current": 0.2 }, "vIn": { "current": 0.2 } }, { "mcuTemp": { "current": 38.5 }, "vIn": { "current": 14 } } ], "fans": [ { "actualValue": -1, "requestedValue": 0, "rpm": -1 }, { "actualValue": -1, "requestedValue": 1, "rpm": -1 }, { "actualValue": 1, "requestedValue": 1, "rpm": -1 } ], "heat": { "heaters": [ { "active": 0, "avgPwm": 0, "current": 22.4, "standby": 0, "state": "off" }, { "active": 0, "avgPwm": 0, "current": 2000, "standby": 0, "state": "offline" } ] }, "inputs": [ { "feedRate": 250, "inMacro": false, "lineNumber": 0, "state": "waiting" }, { "feedRate": 50, "inMacro": false, "lineNumber": 0, "state": "idle" }, { "feedRate": 85, "inMacro": false, "lineNumber": 46798, "state": "idle" }, { "feedRate": 50, "inMacro": false, "lineNumber": 0, "state": "idle" }, { "feedRate": 50, "inMacro": false, "lineNumber": 466152, "state": "idle" }, { "feedRate": 50, "inMacro": false, "lineNumber": 0, "state": "idle" }, { "feedRate": 50, "inMacro": false, "lineNumber": 4, "state": "idle" }, { "feedRate": 50, "inMacro": false, "lineNumber": 0, "state": "idle" }, { "feedRate": 50, "inMacro": false, "lineNumber": 0, "state": "idle" }, { "feedRate": 50, "inMacro": false, "lineNumber": 0, "state": "idle" }, { "feedRate": 50, "inMacro": false, "lineNumber": 471962, "state": "idle" }, { "feedRate": 50, "inMacro": false, "lineNumber": 0, "state": "idle" } ], "job": { "filePosition": 0, "timesLeft": {} }, "move": { "axes": [ { "machinePosition": -24.4, "userPosition": -24.4 }, { "machinePosition": 300, "userPosition": 300 }, { "machinePosition": 70.02, "userPosition": 70.02 } ], "currentMove": { "acceleration": 0, "deceleration": 0, "requestedSpeed": 0, "topSpeed": 0 }, "extruders": [ { "position": 16371.9, "rawPosition": 16342.9 } ], "virtualEPos": -0.3 }, "sensors": { "analog": [ { "lastReading": 22.4 }, { "lastReading": 2000 }, { "lastReading": 43 } ], "endstops": [ { "triggered": true }, { "triggered": false }, { "triggered": false } ], "filamentMonitors": [], "gpIn": [ null, { "value": 0 } ], "probes": [ { "value": [ 0 ] } ] }, "seqs": { "boards": 2553, "directories": 0, "fans": 12, "global": 0, "heat": 24, "inputs": 5396, "job": 43, "move": 163, "network": 2, "reply": 0, "sensors": 31, "spindles": 0, "state": 30, "tools": 15, "volChanges": [ 0 ], "volumes": 4 }, "spindles": [ { "current": 0, "state": "unconfigured" }, { "current": 0, "state": "unconfigured" } ], "state": { "currentTool": -1, "gpOut": [], "msUpTime": 97, "nextTool": 0, "previousTool": -1, "status": "off", "time": "2021-10-22T20:07:13", "upTime": 355317 }, "tools": [ { "active": [ 0 ], "isRetracted": false, "standby": [ 0 ], "state": "off" } ] } }
The RRR3.3
M409 F"d99f"
output10/22/2021, 8:11:17 PM M409 F"d99f" { "key": "", "flags": "d99f", "result": { "boards": [ { "mcuTemp": { "current": 33.8 }, "v12": { "current": 12.1 }, "vIn": { "current": 24.6 } }, { "mcuTemp": { "current": 0 }, "v12": { "current": 0 }, "vIn": { "current": 0 } } ], "fans": [ { "actualValue": 0, "requestedValue": 0, "rpm": -1 }, { "actualValue": 0, "requestedValue": 0, "rpm": -1 }, { "actualValue": 0, "requestedValue": 1, "rpm": -1 } ], "heat": { "heaters": [ { "active": 0, "current": 29.1, "standby": 0, "state": "off" }, { "active": 0, "current": 26.9, "standby": 0, "state": "off" } ] }, "inputs": [ { "feedRate": 50, "lineNumber": 0, "state": "waiting" }, { "feedRate": 50, "lineNumber": 0, "state": "idle" }, { "feedRate": 60, "lineNumber": 75752, "state": "idle" }, { "feedRate": 50, "lineNumber": 0, "state": "idle" }, { "feedRate": 50, "lineNumber": 4197, "state": "idle" }, { "feedRate": 50, "lineNumber": 0, "state": "idle" }, { "feedRate": 50, "lineNumber": 2625, "state": "idle" }, { "feedRate": 50, "lineNumber": 0, "state": "idle" }, { "feedRate": 50, "lineNumber": 0, "state": "idle" }, { "feedRate": 50, "lineNumber": 0, "state": "idle" }, { "feedRate": 50, "lineNumber": 131557, "state": "idle" }, { "feedRate": 50, "lineNumber": 0, "state": "idle" } ], "job": { "filePosition": 2218005, "timesLeft": {} }, "move": { "axes": [ { "machinePosition": 160, "userPosition": 160 }, { "machinePosition": 184, "userPosition": 184 }, { "machinePosition": 12.602, "userPosition": 12.602 } ], "currentMove": { "acceleration": 0, "deceleration": 0, "requestedSpeed": 0, "topSpeed": 0 }, "extruders": [ { "position": 3500.7, "rawPosition": 3485.1 } ], "virtualEPos": 1.9305 }, "sensors": { "analog": [ { "lastReading": 29.1 }, { "lastReading": 26.9 } ], "endstops": [ { "triggered": false }, { "triggered": false }, { "triggered": false } ], "filamentMonitors": [], "gpIn": [ null, { "value": 0 } ], "probes": [ { "value": [ 0 ] } ] }, "seqs": { "boards": 3, "directories": 0, "fans": 12, "global": 0, "heat": 24, "inputs": 177, "job": 63, "move": 162, "network": 2, "reply": 0, "sensors": 30, "spindles": 0, "state": 19, "tools": 15, "volChanges": [ 0 ], "volumes": 0 }, "spindles": [ { "current": 0, "state": "unconfigured" }, { "current": 0, "state": "unconfigured" } ], "state": { "atxPower": true, "currentTool": -1, "gpOut": [ { "pwm": 0.07 } ], "msUpTime": 232, "nextTool": 0, "previousTool": -1, "status": "idle", "time": "2021-10-22T20:11:15", "upTime": 7548 }, "tools": [ { "active": [ 0 ], "standby": [ 0 ], "state": "off" } ] } }
-
@dhusolo I don't know if it would solve the problem, but why not port the Arduino sketch to a python script, running on the RPi4?
-
@dhusolo if you monitor object model field state.status this will have value "off" when the Duet has turned off power using the PS_ON output.
-
@o_lampe I'm a moderator with the BLV printing community. So anything I do I have to make sure it stays close to the standard BOM. The BOM calls for a Duet 2 WiFi. Eventually we'll move it to ESP8266 but at the moment it's easier to maintain it on an Arduino.
-
-
-