So this means you are happy running the head at 24V? Here’s the deal: MOSFETs fail on. This means that if you depend on PWM to reduce the 24V supply to your pyrograving head, when the MOSFET fails you’ll provide a continuous 24V to the head, with no way to turn it off short of physically disconnecting power to your machine. If that’s a fire risk, you have a dangerous design.
If you know that the head is safe at 15V always on, then provide 15V to the independent “big MOSFET” supply on the smoothieboard, instead of 24V. This will also give you more PWM control; you’ll be able to use the full range of PWM values instead of only 60% of them.
To monitor average current through PWM, you need a substantially higher sampling rate than the PWM base frequency (so you probably need a different current sensor), and then to average that in software (the digital route). Alternatively, you want an integrator circuit (the analog route).
If this were my own project, I’d probably go the analog route. You need to measure voltage drop across a shunt resistor. You want to buffer that voltage, and probably amplify it for measurement. This is a good application for an op amp (for high input impedance). Then I would use an RC integrator and buffer its output with another op amp (for the same reason) before sampling the voltage with a A/D converter. I’d set up adjustable gain on the first stage so that the full range of PWM inputs to the head result in output values that are accurately read by the A/D converter. I don’t know whether you have any background in circuit design; if you have, this probably sounds easy; if you don’t, it’s probably not a best first project.
Alternatively, if you can measure the temperature of the head, say with the ubiquitous K-type thermocouple and a thermocouple driver (which you probably want to mount on the head so the wires don’t flex), and you can characterize resistance as a function of temperature, you don’t actually have to measure current at all. The MAX31855 thermocouple driver supports K-type thermocouples, so probably that would work. But that goes only to 1350°C, and the MAX31855 from adafruit it looks like only supports K-type, even though the MAX31855 supports S-type as well so you should be able to find other breakouts that do support S-type. An S-type thermocouple can read to 1600°C but it certainly costs more than a K-type!
I would expect in any case for this project that you’ll be writing custom code.
I hope that’s useful!