The IRF540 is an n-channel device. This would require the gate to be brought *higher* than the source to turn on.

Instead, use a p-FET, which switches on when the gate is *lower* than the source.