The circuit works with the IRF510. I am currently using a 24V dc relay but the circuit works fine. I do not know what happened the first time I tried the circuit. thank you all. I might come back if I face any other trouble later on.It works fine with the heating element too....