Wiring Arduino and transistor with ground as switch

An IRF540n (not IR540n) is not a logic level mosfet.

An Arduino pin can't provide enough drive voltage to turn this mosfet fully on.
Leo..