BitRunner and losing connection

It’s been a couple of years since I installed it. Usually the big flash eaters are the COREXY and PARKING options. The latter is standard on Carbide machines, I think. I would say that there is a small chance it could fit without COREXY.

4 Likes

@MarkLince, @neilferreri, it seems like the universe (well, Sonny) is telling us that one of us should try it :slight_smile:

3 Likes

Of course.
Its difficult to be vigilant if your’re absent!

it would be very interesting :wink:

Ok, just because it sounded like a fun week-end challenge, I had a go at this and merged the SLEEP mode from Grbl-Mega into Grbl, and adapted it to the ATMega328.
Since all timers are already used in the code (the three timers and one watchdog timer), I had to sacrifice something. The three timers are used to control the stepper and PWM signals, so that’s a no-no. I noticed that the watchdog timer is used only for the optional “software debouncing” of the limit switches, which is not enabled in the Shapeoko firmware anyway, so that’s what I hacked.

Luckily the added code fit in the memory when using the Shapeoko configuration, 176bytes short of the 32256 bytes limit. Phew.

Anyway, here’s a first test using that patched firmware, and pulling the USB cable while the spindle (and shopvac…) are running, with SLEEP mode enable and a 5 seconds timeout value

(warning: turn volume down)

The spindle stops and the machine parks upon pulling the cable.

So it works fine when using Carbide Motion (which does send a continuous stream of status queries to the controller, keeping the firmware alive), but that’s when I realized that CNCjs does not, which is a problem for me since I use both (and I don’t feel like patching CNCjs to send commands continuously), so I guess this will remain a fun experiment for now.

7 Likes

This is fantastic well done @Julien. If its doable then I think it should be considered by carbide3d as an important safety update to the system. I’m fitting my replacement board today/ tomorrow so I think this is a must do, especially when using the BitRunner. Again well done. See I said it should be possible, even though I had no idea how :upside_down_face: I’m going to need to pick your brains to get this into my new board.

2 Likes

This topic was automatically closed after 30 days. New replies are no longer allowed.