control Constant Current-Electromagnet

the code is real simple. just controlling the analogWrite value from outside. (works with led)

the problem seems to be on the circuit. (see above) my transistor http://www.irf.com/product-info/datasheets/data/irlz24npbf.pdf

im measuring small variances in amperes but insignificant to make a change.
sorry for newbiness . really apreciate your replys