I did this, among other things, when I upgraded my Nomad’s electronics.
The controller I went for was the EdingCNC CNC720 and I’m quite happy with it. It has its own G-code sender which definitely supports 4-axis G-code and also has built-in toolpath previews.
And FWIW, if you’re replacing the controller anyway, I’d recommend using a more capable controller than GRBL. EdingCNC of course is great but there are other budget-friendly options as well.
The controller I’ve been eyeing recently is LinuxCNC on a Raspberry Pi with a Mesa Electronics board like the 7C81 or 7i76e.
Controllers like these have a number of benefits that can be really handy, especially if you decide to upgrade more in the future:
- Inputs and support for encoders
- Differential outputs for stepper drivers (so you can run longer cables and separate the steppers from the controller, if you prefer)
- Various GPIO outputs for coolant, toolchangers, alarms and the like
- RS485 and/or MODBUS communication
- High step rates (if you want to use high-resolution servos or tons of microstepping on a stepper driver)
- Some of them come with support (EdingCNC is pretty responsive to me, I see the Mesa Electronics folks are pretty active on the LinuxCNC forums)
- Better G-code support (e.g. flow control and macros in your G-code)
- Pretty universal support for 4-axis toolpaths
- I believe LinuxCNC has support for 4-axis toolpath previews as well
- Support for tool width/length compensation
- More rugged build, e.g. terminal blocks for I/O rather than flimsy dupont connectors
And a LinuxCNC + Mesa build should cost ~$250, not much more than what the links @mikep posted.