0

Schematic

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

Hal
  • 25
  • 4
  • Can you use the built-in schematic editor to post a schematic? – ThreePhaseEel Dec 09 '16 at 02:29
  • @threephaseeel no they cant. Not enough rep. – Passerby Dec 09 '16 at 02:41
  • @Passerby removed original schematic link check the first link – Hal Dec 09 '16 at 02: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 09 '16 at 02:55
  • Which way should I tilt my heard in order to be able to read your schematic? [Rules and guidelines for drawing good schematics](http://electronics.stackexchange.com/questions/28251/rules-and-guidelines-for-drawing-good-schematics) – Nick Alexeev Dec 09 '16 at 03:06
  • 1
    @owg60 yea it is a n-chanel here is the fixed schematic: http://imgur.com/a/dYliz I moved the ground that is connected to the arduino to the negative of the battery like this http://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 09 '16 at 03:08

2 Answers2

1

Based on the newest schematic, Your pull-down resistor is too strong for the Arduino's output to overcome. A 220Ω resistor pretty much guarantees issues. Try bumping it to 2.2kΩ or 22kΩ.

See the two answers in Calculating the pulldown resistance for a given MOSFET's gate for more info, one math heavy, the other one more plain terms.

Passerby
  • 72,580
  • 7
  • 90
  • 202
  • So I bumped it down to a 10k resistor and it still isn't working, the 5v pin on the arduino is able to open the transistor but none of the digital pins are doing anything when they are High – Hal Dec 09 '16 at 03:33
0

Well to all of you sitting on the edge of your seat awaiting an answer to this trivial problem I have it. The transistor was bad.

Hal
  • 25
  • 4