EtteGit / EnragedRabbitProject

GNU General Public License v3.0
2.37k stars 336 forks source link

Happy Hare Driver #173

Closed moggieuk closed 9 months ago

moggieuk commented 1 year ago

Rewrite of ERCF driver software to provide both sensor and sensorless logic, and a host of other features.

Major new features:

Other features:

Other benefits of the code cleanup / rewrite:

jwhite commented 1 year ago

Extremely happy to test this out. I find it interesting that you implemented many of the same features I did while I was trying to debug my ERCF (and many more.)

Perhaps Ette could consider this a contribution to the main code base rather than a fork?

This feels like it pushes the ideas and hard work in splitting the python, and sensorless forward.

jtrucker4 commented 1 year ago

Testing tonight on my mk3/Bear clone with no toolhead sensor, but BMG gearset. Few things found so far: -- easybrd was getting overloaded about half the time on ercf_home until I turned microsteps down on selector_stepper to 8. No issues with the controller failing since -- tuning of loading current is important, and should be highlighted in install. Finding balance of overcoming friction versus chewing filament took a little time. Guessing extruder_homing_current is a percentage of the stepper current and not a discrete value? So one should pick the stepper current first in the config, then tune with ercf_test_config (which is a great tool btw). -- had one load fail when encoder and extruder counts hit 2.5mm. Will edit that in the ercf.py to raise the threshold if it happens again. May want to add that to the config depending on machine tolerances. -- also setup my sync_load to 20mm, which matches my less elegant extruder a little better

Overall I'm very happy with what you did. The sync load should sort out a persistent challenge I had with the prior ercf code. Thanks for sharing!

moggieuk commented 1 year ago

Thanks for the testing and feedback. I've just pushed some updates to address all the issues so far. Specifically:

  1. Better logging on tool change so you know what was suppose to happen in event of failure (blatant bug)
  2. Adjusted default and exposed through ercf_parameters.cfg config variables to control the slippage threshold at which point correction moves will be applied
  3. Fixed bug in detection of toolhead sensor in ERCF_STATUS
  4. Made the slippage detection of sync load move much bigger - turns out the spring in the filament can cause an extra couple of mm where the gear motor struggles because it is waiting for extruder to catch up.
  5. Couple of silly non-serious bugs.
  6. Updated ercf_parameters.cfg and ercf_hardware.cfg templates with comments and better defaults. Step size of 8 is far better for gear motor - don't need more fidelity and avoids Timer too close (although I personally can't get timer too close anymore!)
  7. Added install script. It has functionality to add to moonraker update-manager (currently commented out). I need to figure out how to get the repo validated by Klipper crew...