How to convert 0-3 V (PWM range) to 0-24 V (device voltage requirement)
This circuit here will allow a low-voltage signal to PWM switch a higher voltage source through a load. If you actually need to reverse polarity through the load (such as to drive something like a DC motor in reverse, the you will need an H-bridge instead).

You may also replace the NMOSFET with an NPN BJT, especially if you can't find a logic level MOSFET. A base resistor will be required for the BJT.







simulate this circuit &ndash; Schematic created using CircuitLab