Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login
    1. Home
    2. pfn
    • Profile
    • Following 0
    • Followers 0
    • Topics 21
    • Posts 126
    • Best 21
    • Controversial 0
    • Groups 0

    pfn

    @pfn

    43
    Reputation
    22
    Profile views
    126
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    pfn Unfollow Follow

    Best posts made by pfn

    • Adding support for the enraged rabbit carrot feeder (ERCF)

      Since Ette came out with his carrot feeder, I've been completely intrigued by it, especially when it came to light the simplicity of the mechanism and the minimal software requirements to run it. No one's put together any support for it on RRF yet.

      I recently purchased a kit with the intention of running it on my Duet3 MB6HC-based printer. Here we are, I now have a basic, almost MVP, implementation.

      https://github.com/pfn/EnragedRabbitOnRRF
      https://www.youtube.com/watch?v=lP2_jpP7SuM

      Unfortunately, the kit I got has a less-than-straight D-shaft and I will need to wait until a straight shaft comes in for me to test with (the source of the motor stalls seen in the video, in conjunction with me failing to set acceleration properly)

      PS @fcwilt if you take a look at the macros, this is entirely the reason why an "if U else if V else if W else if A else if B" etc. approach is not usable. (re https://forum.duet3d.com/post/259432)

      posted in Accessories and Add-ons
      pfnundefined
      pfn
    • RE: Adding support for the enraged rabbit carrot feeder (ERCF)

      new demo video:

      https://www.youtube.com/watch?v=N4DiK5DVftM

      posted in Accessories and Add-ons
      pfnundefined
      pfn
    • ESP8266 NeoPixel Driver

      Given all the problems with things like https://forum.duet3d.com/topic/25664/arduino-paneldue-sniffer I started putting together an alternative that runs on ESP8266 (Wemos D1 mini)

      I realize RRF has had support for driving neopixels since 3.0, but it isn't very good at being responsive to status changes. This lead to a new project I put together on ESP.

      https://www.youtube.com/watch?v=OXgH2lOdC04
      https://github.com/pfn/esp-rrf-neopixels

      The firmware runs in pass-through mode (the ESP can forward information from RRF received on D7 out through D4) or sniffing by splicing the existing RX/TX between PanelDue and RRF.

      I'm curious why it hasn't really been considered a problem before with other, arduino based solutions that operate in a similar manner, but the RX pin on Arduino is driven to 4.5V because of the onboard CH340C USB UART chip (TX is tied to arduino RX). This leads to drowning out the signal coming from RRF, and it seems like it could damage the PanelDue/Duet, unless it's 5v tolerant? I've always heard noise that the Duet2 isn't 5v tolerant on its UART pins.

      posted in Accessories and Add-ons
      pfnundefined
      pfn
    • RRF configuration file mirroring and management

      I've been using RRF for the past year, it's great. Configuration management is a little bit of a pain, edit it in DWC or by pulling out the SD card and plopping it into my PC. This is a feature where having SBC-mode is an advantage.

      But, there's no killer feature for SBC-mode, so I refuse to use it 😁 -Instead of that, I wrote a new tool that runs on any local machine that has python2: that would include macOS, Linux and some Windows computers (but untested on macOS and Windows).

      What it does:

      1. Initially downloads all files from a DWC URL under /sys and /macros to a specified directory (-m URL -d DIRECTORY)
      2. Creates a metadata file that remembers the DWC URL and digests of all files downloaded

      Now you have a local copy of your configuration, but that's not so useful yet, on top of that you can operate in the mirrored configuration folder, there are options to:

      1. See if there are any local modifications by checking for differences in digests (run without arguments)
      2. Refresh and download configuration from RRF again (-r option)
      3. Edit files locally, using your choice of editor; I prefer VIM
      4. Upload changed local files to RRF (-u argument)

      Limitations:

      • Passwords set in RRF will prevent this from working
      • Local modifications will be overwritten without notice with -r
      • Only /sys and /macros directory trees are synchronized
      • There is no diffing to determine difference
        • However, there is nothing to prevent the use of git or other SCM to manage configuration and tracking of changes.

      Currently I have it uploaded into a gist, and perhaps it will move into a repo if it gets enough traction:
      https://gist.github.com/pfn/9f28b1e8d70a9e0d1182c77af177161c

      Hope someone finds this useful!

      posted in Third-party software
      pfnundefined
      pfn
    • RE: Adding support for the enraged rabbit carrot feeder (ERCF)

      It prints!

      alt text

      Still some issues to resolve:
      cooling moves performed by superslicer immediately before changing filaments cause RRF to constantly flag that there's a filament-error: "tooLittleMovement" is detected. I don't know how to get around this yet. I'll try to generate a print job that replicates the cooling move and see how this triggers RRF into erroring.

      Errors during filament swapping while printing don't necessarily get handled well, M98 R1 doesn't seem to behave exactly as I expect, sometimes my macros appear to continue executing to the end (macroRestarted is false) and silently failing even though my full call stack has M98 R1 set.

      Some other tuning needs to be done around final filament parking and documenting how this could be used by more folks.

      posted in Accessories and Add-ons
      pfnundefined
      pfn
    • Collecting LIS3DH data outside of RRF

      A while back, someone planted the seed of an idea in my mind: I want to collect accelerometer data, but I don't want to open up my printer case to wire it up; how about an arduino?

      I thought about how to accomplish this with a bare arduino, but stumbled into some difficulty like how would I retrieve the data? Serial isn't a very good solution, reading/writing it is relatively painful, and slow/blocking.

      Luckily, I had some Wemos D1 minis on hand. Wifi check. So I put together this prototype that:

      1. connects the LIS3DH to the Wemos D1 mini
      2. uses a common wiring harness (so I can plug it into my exposed Duet3, or use the ESP8266 to drive the LIS3DH)
      3. Collects data from the LIS3DH on-demand using curl http://lis3dh.local/data

      Code to interface with the LIS3DH was ported directly from RRF, so the behavior should be fairly identical. Formatting of the output data is relatively similar to how RRF stores it into .csv files. Except for the lack of a final footer line and the addition of 2 columns (to support post-processing into the footer line).

      Example:

       $ curl http://lis3dh.local/data
      Sample,X,Y,Z,Overflows,DataRate
      0,0.176,0.508,0.816,0,0
      1,0.176,0.508,0.824,0,0
      2,0.180,0.508,0.820,0,0
      [... snip ...]
      1344,0.176,0.504,0.820,0,1355
      1345,0.180,0.504,0.816,0,1355
      1346,0.176,0.508,0.816,0,1355
      [ ... ]
      

      I went through several iterations to end up at a final stable solution that can be extended into something really useful. The first attempt was polling the interrupt pin directly during the /data request and processing/forwarding it to the HTTP client immediately. This was successful for about 20-40 samples of data before overflowing the FIFO on the LIS3DH. A later attempt tried bumping the clock rate to 160MHz on the ESP8266, this extended the runtime by another handful of samples before overflows. Etc. etc.

      Finally, I landed on a solution hinted to me by @Falcounet : why not keep another buffer on the ESP8266 that's filled up by an interrupt on the INT pin? In 160MHz mode, this method easily runs for 15+ minutes without overflowing any buffers (80MHz keels over after about 30 seconds).

      Anyhow, that's the extent of what I've tried so far. This would be useful for collecting data to tune up input shaping without having to open up a printer case to wire up an accelerometer (it'll certainly be useful on one of my printers for which this is the situation).

      TODOs (maybe I'll do it, or maybe someone else might want to take up the baton):

      1. Better wifi configuration (currently managed by editing the source)
      2. Parse parameters out of the /data request to set accelerometer orientation
      3. Perhaps specify collection interval so that post-processing is unnecessary
      4. Perhaps collect data and stream it directly into RRF via file upload.

      Prototype ESP8266 + LIS3DH source gist

      This is what my setup looks like while testing out this project.
      LIS3DH and Wemos D1 mini

      posted in Tuning and tweaking accelerometer esp8266 input shaper lis3dh
      pfnundefined
      pfn
    • Issue assigning, unassigning and re-assigning GPIO pin

      Hi,

      I'm currently developing an MFM alternative on rp2040 (https://github.com/pfn/rrf-rp2040-mfm-firmware) that supports mode-switching using an output pin from Duet, but I'm also using the output pin to check mode-switch status and read direction when using pulse-mode. When I create a GPIO pin for output, then switch it to input to read via sensors.gpIn[x] and then switch it back to GPIO output, if the Q-frequency setting for M950 is not altered, then M42 to the GPIO pin is subsequently ineffective until the Q parameter to M950 is updated. I am currently testing this behavior on duet2wifi and have seen this occurring on 3.4.6 as well as 3.5rc2

      For example:

      M950 P0 C"exp.heater3" Q1000
      M42 P0 S255
      G4 P10
      M42 P0 S0
      G4 P10
      M950 P0 C"nil"
      M950 J0 C"exp.heater3"
      check sensors.gpIn[0].value
      G4 P10
      check sensors.gpIn[0].value
      M950 J0 C"nil"
      ; any amount of `M950 P0 C"nil"` followed by `M950 P0 C"exp.heater3" Q1000` will not make any difference as long as Q1000 does not change 
      M950 P0 C"exp.heater3" Q1000
      M42 P0 S255 ; this does not take effect
      G4 P10
      M42 P0 S0 ; this does not take effect
      G4 P10
      
      M950 P0 C"exp.heater3" Q10000 ; switch from 1khz to 10khz
      M42 P0 S255 ; this now works
      G4 P10
      M42 P0 S0 ; this now works
      G4 P10
      

      I'm overloading the pin that sends commands to my mfm to send data back to duet for 2 things: confirmation that mode-switches worked, and when operating in pulse-sensor mode also emit the direction of the pulse.

      I don't know if this behavior is duet2wifi specific, the actual device I want to run this on is a duet3mini5. The duet2wifi happens to be an available board I can use for testing.

      9c9fc249-2275-4e09-90b0-0add0376e6f1-image.png

      35.2g
      ee0ff03d-0fe8-4863-b599-8c58e3f82326-image.png

      5001c88e-0e83-4002-91c1-26d515b11a14-image.png

      8e79fe0c-5d95-4976-90cd-d06e9de00fa9-image.png

      posted in General Discussion
      pfnundefined
      pfn
    • Remove filament-sensor and extruder motor same board requirement

      Per https://docs.duet3d.com/en/User_manual/Connecting_hardware/Sensors_filament#connecting-to-the-duet

      Important! If you are using a Duet 3 or 3 Mini with tool or expansion boards, then the filament monitor must be connected to the same board as the motor for the extruder that it is monitoring. Filament monitors connected to tool and expansion boards are supported in RepRapFirmware 3.2beta4 and later.

      However, my installations will not ever place the filament sensor at the extruder, they are all installed near the spool (pulsed sensor). Logically speaking, there is little reason any kind filament sensor needs to be placed at the toolhead itself. Detecting a runout a meter away would be the same either way.

      As a result, if I want to use a toolboard on my print head, I would need to run wires off the toolhead to the location of the runout sensor mounted elsewhere on the printer and nullifying the point of minimizing wires to the toolboard.

      Additionally, I've found hyper-sensitive filament-sensing to be unreliable anyway, and I have to add false-positive handling into my filament-error handlers.

      It would be great if the filament sensor can be decoupled from being plugged into the same board as the E motor.

      posted in Firmware wishlist
      pfnundefined
      pfn
    • RE: Make emergency stop fool proof

      I second this. I am afraid every time I open up my mobile DWC view. E-stop should be intentional but easily accessible. It should not at all be prone to accidental triggering.

      I agree that the button should be moved off to the side, or the bottom of the navigation tray. At the very minimum, it should be inset the width of the hamburger button to prevent accidental double-presses.

      posted in Duet Web Control wishlist
      pfnundefined
      pfn
    • RE: M500 P31 NOT saving XY offset of probe

      @apak I'm confused, doesn't the first line of your macro set X/Y offset to 0? When you save, I would expect it to save 0?

      This situation is clear because you previously had P500 in config.g, but the value saved in config-override is P100, the value from the first line of your macro.

      posted in General Discussion
      pfnundefined
      pfn

    Latest posts made by pfn

    • Issue assigning, unassigning and re-assigning GPIO pin

      Hi,

      I'm currently developing an MFM alternative on rp2040 (https://github.com/pfn/rrf-rp2040-mfm-firmware) that supports mode-switching using an output pin from Duet, but I'm also using the output pin to check mode-switch status and read direction when using pulse-mode. When I create a GPIO pin for output, then switch it to input to read via sensors.gpIn[x] and then switch it back to GPIO output, if the Q-frequency setting for M950 is not altered, then M42 to the GPIO pin is subsequently ineffective until the Q parameter to M950 is updated. I am currently testing this behavior on duet2wifi and have seen this occurring on 3.4.6 as well as 3.5rc2

      For example:

      M950 P0 C"exp.heater3" Q1000
      M42 P0 S255
      G4 P10
      M42 P0 S0
      G4 P10
      M950 P0 C"nil"
      M950 J0 C"exp.heater3"
      check sensors.gpIn[0].value
      G4 P10
      check sensors.gpIn[0].value
      M950 J0 C"nil"
      ; any amount of `M950 P0 C"nil"` followed by `M950 P0 C"exp.heater3" Q1000` will not make any difference as long as Q1000 does not change 
      M950 P0 C"exp.heater3" Q1000
      M42 P0 S255 ; this does not take effect
      G4 P10
      M42 P0 S0 ; this does not take effect
      G4 P10
      
      M950 P0 C"exp.heater3" Q10000 ; switch from 1khz to 10khz
      M42 P0 S255 ; this now works
      G4 P10
      M42 P0 S0 ; this now works
      G4 P10
      

      I'm overloading the pin that sends commands to my mfm to send data back to duet for 2 things: confirmation that mode-switches worked, and when operating in pulse-sensor mode also emit the direction of the pulse.

      I don't know if this behavior is duet2wifi specific, the actual device I want to run this on is a duet3mini5. The duet2wifi happens to be an available board I can use for testing.

      9c9fc249-2275-4e09-90b0-0add0376e6f1-image.png

      35.2g
      ee0ff03d-0fe8-4863-b599-8c58e3f82326-image.png

      5001c88e-0e83-4002-91c1-26d515b11a14-image.png

      8e79fe0c-5d95-4976-90cd-d06e9de00fa9-image.png

      posted in General Discussion
      pfnundefined
      pfn
    • RE: [3.5rc1] 12864 menu issues and multi-stream gcode issues

      It seems the 12864 menu issue is https://github.com/Duet3D/RepRapFirmware/issues/909 I guess we'll see this fixed in rc2? And then I can quote/escape the line to "M98 P""#0""" L"..."? I suppose I could also make the argument embedded in the M98 line...

      Going by that, I would expect my macros menu file to be similarly non-functional as that is simply written as "M98 P#0" (https://github.com/pfn/voron2-rrf-config/blob/master/menu/macros)

      X-Dron created this issue in Duet3D/RepRapFirmware

      closed [Bug]: RepRapFirmware 3.5.0-rc.1 and Screens 12864 #909

      posted in Beta Firmware
      pfnundefined
      pfn
    • [3.5rc1] 12864 menu issues and multi-stream gcode issues

      I recently updated 2 of my printers to 3.5rc1 yesterday, one of them came from 3.4.5, the other from 3.5b4:

      On both printers, my actions file in my menu system no longer function properly, none of the M98 lines execute the macro (https://github.com/pfn/voron2-rrf-config/blob/master/menu/actions). I think I also tried verifying the filelist macros and those didn't work for me, but others on discord were unable to repro.

      Additionally, a problem similar to one I previously had in 3.5b2 has re-surfaced (https://forum.duet3d.com/topic/31812/3-5b2-macros-called-from-a-job-lose-parameters). When I use my job-prologue.g as start gcode in my print job, as soon as the heat-wait loop completes, execution jumps ahead to clean-nozzle.g which causes an abort due to either homing not yet being completed, or the print head temperature not being up-to-temp. The abort occurs immediately, but the job-prologue.g continues executing to completion, so the printer then proceeds to home and then set/wait for the nozzle to reach temperature.

      Aforementioned files for reference:

      • https://github.com/pfn/voron2-rrf-config/blob/master/sys/job-prologue.g
      • https://github.com/pfn/voron2-rrf-config/blob/master/sys/k/clean-nozzle.g

      I also encountered a problem with canceling a job, I don't recall the exact repro steps, but it is similar to what I previously described in https://forum.duet3d.com/topic/32937/3-5b4-dwc-stops-responding-after-canceling-a-job-on-12864 -- I think I canceled a job on DWC, and thereafter, the printer would not respond to any commands at the 12864 or vice versa.

      posted in Beta Firmware
      pfnundefined
      pfn
    • RE: 3.5b4 DWC stops responding after canceling a job on 12864

      @droftarts my guess is 99% a problem in dwc especially with the changes in multi-stream input behavior handling, but I have not had a chance to repro and see what devtools says

      posted in Beta Firmware
      pfnundefined
      pfn
    • RE: 3.5b4 DWC stops responding after canceling a job on 12864

      @chrishamm the setup is not operating in SBC mode. I am using an octopus 429. Next time I encounter this, I will check the js console to see if there is anything interesting of note.

      posted in Beta Firmware
      pfnundefined
      pfn
    • 3.5b4 DWC stops responding after canceling a job on 12864

      With 3.5b4, both DWC & RRF, if I cancel a print job initiated from DWC using my attached 12864 display, DWC will stop responding. Refreshing DWC in the browser will get it to respond again.

      I have not tested other scenarios as starting a job from 12864 is annoying. I discovered this mostly through initiating a job on DWC (re-start a canceled job) and then aborting it on 12864 as I am inspecting the print startup.

      posted in Beta Firmware
      pfnundefined
      pfn
    • RE: 3.5b4 - Abort while homing does not leave homing context

      @dc42 ping!

      posted in Beta Firmware
      pfnundefined
      pfn
    • RE: 3.5b4 - Abort while homing does not leave homing context

      Interestingly, if I do this on 2 different inputs, e.g. I run the testing macro on my 12864 display and force the homing to fail (depressing the endstop before the Y endstop actually hits the end), homing is blocked on DWC, i.e. DWC spins and blocks waiting for a result when I send G28 Y.

      In order to clear this state, I have to G28 Y from the 12864 display.

      posted in Beta Firmware
      pfnundefined
      pfn
    • 3.5b4 - Abort while homing does not leave homing context

      I updated my homing scripts to be aware of an endstop/sensorless homing failure by adding logic to detect the position after the second pass homing move if it is out of range like so:

      if !move.axes[0].homed
      	; raise Z a bit
      	G91
      	G1 H2 Z5 F2400
      	G90
      
      ; reset current position to 0
      G92 Y0
      
      G91
      ; Move quickly to Y axis endstop and stop there (first pass)
      G1 Y315 F12000 H1
      
      ; Go back a few mm
      G1 Y-5 F18000
      
      ; Move slowly to Y axis endstop once more (second pass)
      G1 Y10 F360 H4
      
      if move.axes[1].machinePosition > move.axes[1].max || move.axes[1].machinePosition + 2 < move.axes[1].max
        M84 Y
        abort "Homing Y failed"
        
      G92 Y{move.axes[1].max}
      G90
      

      Now, if the homing move doesn't operate the endstop successfully, the homing script will abort. The interesting thing is, when the homing script is aborted, if I try to home again, I get this error: Error: G28: G28 may not be used within a homing file

      After the error occurs once, I can then proceed to home again. It is as if the previous homing context that is currently running has not exited up a stack level.

      However, I am not sure if this problem is a regression in b4 or always been present. I only just added this logic into my homing scripts due to a wiring problem that has manifested in my endstops over the last few days.

      In case there is more going on due to multiple levels of stack, I am reproducing the above by running this macro over and over until my endstop triggers incorrectly, at which point the first subsequent G28 Y results in the error described:

      G1 Y0 F18000
      G28 Y
      
      posted in Beta Firmware
      pfnundefined
      pfn
    • RE: 3.5b2 - Macros called from a job lose parameters.

      @OwenD This is only true, about not being able to use T, if there is a behavior change (undocumented) from 3.4 to 3.5

      According to your posted quotation, T is only prohibited in custom 'G' code files (e.g. G123.g), and there is no prohibition on T in custom 'M' code files (i.e. completely valid in any of M123xyz.g). Additionally, it is not prohibited from general macros.

      But it does sound plausible that the move to multi-stream processing might have a bug around honoring these rules.

      posted in Beta Firmware
      pfnundefined
      pfn