Arduino solenoid project behaves strangely when operated on PC power supply

I am trying to control a solenoid using arduino UNO. I followed instructions described in this tutorial: Controlling Solenoids With Arduino : 5 Steps - Instructables.
The solenoids are, 5V small solenoid: and 36V big solenoid The resister is 10 klohm, transister is IRF520, the diod is IN4007.

When I use a 9 V DC battery, it worked fine. But bec of less power solenoid was not generating powerful enough force. I modifies a computer power supply as power source. Now when provide +12 V (15.0 A) power, 36V big solenoid(not using 5V small anymore) valve is pulled once & then it sticks with the body of solenoid. If I pushed it back, & keep pushing so to not touch the body of solenoid, it works. & if it is stick with body, it remains same even after I turn off power & have to push it to seperate. The Serial.print I put in program is not printing.

Whats problem here?

What I guessed is that the inductance of solenoid bec of much current generates magnetism in the body of the solenoid that sticks the valve & it keeps it stck even after power is tuened off so I have to push valve to separate. One more thing is that the solenoid starts moving even if I put 12 V lead to power supply without supplying ground to it.

Here is my code:

int solPin = 13;

void setup() {                
  // initialize the digital pin as an output.
  pinMode(solPin, OUTPUT);

void loop() {
  Serial.println("Loop start");
  digitalWrite(solPin, HIGH);   // turn the trnsister's BASE on (HIGH is the voltage level)
  delay(100);               // wait for a second
  digitalWrite(solPin, LOW);    // turn the trnsister's BASE off by making the voltage LOW
  delay(100);               // wait for a second
  Serial.println("Loop end");

It is likely the loop is going to fast for the solenoid to keep up.

delay(100) // wait for a second

First: 100 milliseconds is not second.1000 is.

it remains same even after I turn off power & have to push it to seperate.

That's probably the solenoid's fault. Seems there is enough power going to it for it to jam itself. Either lower the power or lubricate the solenoid.

The Serial.print I put in program is not printing.

Is it printing anything?

//It is likely the loop is going to fast for the solenoid to keep up.
I changed it to different values, keeping this fact in mind. Something like 10000, 100000 but same result. Have changed it like giving little value for HIGH like 100 & bigger like 10000 for LOW output so that it has enough time to come back but again same result

// Either lower the power or lubricate the solenoid.
If I use less volt like 9 or 5, it has not enough push power. It's is just opened brand new solenoid, should again I need to lubricate it ?

//Is it printing anything?
no printout at all

there is one more thing as I mentioned in OP too, it was working with 9V DC battery.

It has the feel of a mechanical problem. If you move the solenoid plunger by hand, can you make it stick in the same way? Is the return spring present and intact? Are you applying any side load to the solenoid plunger? Your comment about "keep pushing so to not touch the body of solenoid" makes me wonder whether the solenoid is missing a component which is supposed to guide the plunger.

As I mentioned in OP, it works fine with 9 V DC battery. The return spring is intact. I do not get what you mean by applying side load, but it is a bare solenoid bough a week ago & put straight into experiment. When circuit if run, the plunger stick to casing with 1st pull. Part of plunger is outside casing from bottom of solenoid with a nice plastic core over it. If I push from bottom to keep plunger not touching casing from spring side, it keeps vibrating. No, if it is pushed down un-powered, the spring pushed it back when left.

I added schematic diagram

Schematic should look like this

//Is it printing anything?
no printout at all

That looks like the Arduino is resetting or being hung somehow.

My suspicion is that ElectroMagnetic Interference is causing the fail. See some of this on that subject:

Also make sure that diode is connected right at the solenoid terminals.

@codlink: OK, it's printing now. Some problem may be. I checked serial print out while attaching small 5V solenoid. As I mentioned in OP, small solenoid works fine. Serial printout printed while small solenoid attached. Then I replace 36V big solenoid & provided 12 V (15.0A). It did same, stick to casing with fist pul & while serial print out continued printing. Then I test my hypothesis of electromagnetism created in the body by inductance by putting small solenoid near to it & it stick to body of big solenoid. When I disconnect power, there was no sticking. This is how understood things by far.

Refer to my inductance hypothesis, Is it a phenomenon observed by people working with solenoids or coils ?

@codlink: can you please describe in words too which pin of which component is connected to what connection following the schematic you mentioned. I am a novice in electronics, so I have a fear of burning my board if nor properly connected. Especially confusion about pins of MOFSET.

OR may be if you have a link to tutorial or guide for this schematic building.