User Tools

Site Tools


digispark:tutorials:mosfet

MOSFET Shield Kit Tutorial

Product Description:

mosfet6.jpgmosfet2.jpgmosfet1.jpg

The MOSFET Shield Kit connects a 60 V 30 A N-Channel MOSFET to the Digispark development board. This allows the Digispark to turn DC loads on and off and use PWM with larger loads. The MOSFET is rated for 30 A, but should be used at a far lower amperage without additional cooling.

This is an unassembled kit and requires basic soldering. This is designed for use with the Digispark development board, which is not included.

Parts:

Part Quantity Identification
MOSFET Shield PCB1
FQP30N06L N-Channel MOSFET1
3.5 mm pitch 3-pin screw terminal1
100 kohm 1/4 W 5% resistor1 Brown - Black - Yellow
1N4001 diode1
1x40pin male 0.1“ pitch header 9 pins worth

Soldering: If you are new to soldering we recommend the following tutorials: Soldering Basics (http://www.sparkfun.com/tutorials/106) and Soldering Crash Course from the folks at Sparkfun (http://www.sparkfun.com/tutorials/354). How to solder from the Curious Inventor: http://store.curiousinventor.com/guides/How_to_Solder

Adafruit has this excellent guide that starts with the tools needed and then shows detailed pictures, including some of the common problems that beginners experience (http://learn.adafruit.com/adafruit-guide-excellent-soldering).

We assume for these assembly instructions that you know the basics of thru-hole soldering. If you don't check out the links above, these boards are very easy to solder - we promise!

Assembly:

Empty kit bag (or if using a raw PCB, acquire parts) and verify contents. Note for Kickstarter Backers and Pre-orders: Headers are not included in each kit bag, but the entire order came with more than enough headers for all kits.

mosfet6.jpg

Insert resistor and diode - the diode goes on the bigger outline with the line on one side. Be sure the direction line on the diode is on the same side as the line printed on the board. Solder the leads and clip off the excess.

mosfet5.jpg

Insert the 3-pin screw terminal with the hookup openings facing outward. Solder the two pins.

mosfet4.jpg

Insert the the MOSFET, matching the shape of it with the printing on the board and solder all pins.

mosfet3.jpg

Cut a length of male headers 6 pins long and one 3 pins long. Insert into corresponding positions (on the bottom of the board) and solder each pin.

mosfet2.jpg

Tip: Inseting the headers into a breadboard and then placing the board on top can make this process easier.

Note: If you are using stackable headers, use them here instead of the standard male headers.

Hook-up:

The MOSFET shield connects to a load a bit differently than a relay - here is a hook-up diagram:

And here is a great tutorial with all the how and whys (the diode and resistor in this tutorial are already part of the shield) - http://bildr.org/2012/03/rfp30n06le-arduino/

Programming:

The MOSFET can be turned on and off by simply setting P5 high or low (just like blinking the LED in the blink demo). The MOSFET connects the grounded side of the device, so the device will turn on when p5 is low.

The MOSFET can also be connected to P2 by cutting the thin trace between the solder jumper closest to P5 and bridging the solder jumper closest to P0 with solder. The MOSFET can also be connected to P4 by cutting the thin trace between the solder jumper closest to P5 and bridging the middle solder jumper with solder.

PWM can only be used when the device is connected to P4, though softPWM as used in some of the RGB examples may be possible on the other pins.

void setup() {

  // Initialize the MOSFET pin as output
  pinMode(5, OUTPUT);
}

void loop() {
  digitalWrite(5, LOW);     // Turn the MOSFET on
  delay(1000);              // Wait for a second
  digitalWrite(5, HIGH);    // Turn the MOSFET off
  delay(1000);              // Wait for a second
}
digispark/tutorials/mosfet.txt · Last modified: 2016/06/09 12:03 (external edit)