How to steer 20v from ATmega pin?
Try this: -



A GPIO pin from your MCU going high activates the BC547 and this draws current through the 1 kohm resistor and applies about 15V on the P channel FET's gate-source. This turns on the FET. When the GPIO pin goes low the BJT turns off and the P channel FET's gate-source voltage discharges in a few microseconds to zero thus turning it off.

Pick a P channel FET that has suitably low on resistance to cope with the load current and there should be no need for a heatsink in most cases. There are plenty of P channel FETs to choose from and I'm not picking one for you - you have to decide what package suits your circuit. If in doubt ask.