# Problems with IRF520 Transistor

This is the schematic for the project. I'm using an IRF520 transistor (http://www.futurlec.com/Transistors/IRF520.shtml) which goes from left to right Gate->Drain->Source. So the problem is that when gate is connected to a pin on the arduino the transistor will always be open regardless of what that pins state is but if I pull it out the transistor closes. Any help would be appreciated. imgur.com/a/dYliz EDIT: Added Schematic link

• Can you use the built-in schematic editor to post a schematic? – ThreePhaseEel Dec 9 '16 at 2:29
• @threephaseeel no they cant. Not enough rep. – Passerby Dec 9 '16 at 2:41
• @Passerby removed original schematic link check the first link – Hal Dec 9 '16 at 2:42
• Hal your image shows a p-channel device and the datasheet you included is an n-channel device. If it is n channel, your ground is connected to the wrong side of the battery. It should go ground, battery minus, battery plus, motor, drain, and source back to ground. – owg60 Dec 9 '16 at 2:55
• @owg60 yea it is a n-chanel here is the fixed schematic: imgur.com/a/dYliz I moved the ground that is connected to the arduino to the negative of the battery like this imgur.com/a/jih8B and now when the gate is connected to the arduino 5v it is on but if it is connected to a pin on the arduino regardless of the state of the pin the transistor is closed – Hal Dec 9 '16 at 3:08

• You burnt out a perfectly good transistor by exceeding the Avalanche Energy ?? $E=200mJ (abs.max)= \frac {1}{2}LI^2$ – Tony Stewart Sunnyskyguy EE75 Dec 9 '16 at 5:29