14
Mini FET Shield Hookup Guide a learn.sparkfun.com tutorial Available online at: http://sfe.io/t195 Contents I Shall Call Him... Mini Me Board Overview Assembly Project Time Resources and Going Further I Shall Call Him... Mini Me The Mini FET Shield is an amazing little shield designed for the Arduino Pro Mini 3.3V 8MHz . If you've been using Arduino for some time, you may have noticed that one of the major limitations of the Arduino's digital I/O is the amount of current it can provide on each pin, which is about 40mA. That's enough current to light up a few LEDs or spin small DC motors , but to truly unleash your inner maker, you're going to need more juice to drive those really big projects. Page 1 of 14

Mini FET Shield Hookup Guide - learn.sparkfun...In this hookup guide, we'll go over how the Mini FET Shield functions, discuss some of the different ways you can assemble the shield,

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Mini FET Shield Hookup Guide - learn.sparkfun...In this hookup guide, we'll go over how the Mini FET Shield functions, discuss some of the different ways you can assemble the shield,

Mini FET Shield Hookup Guide alearn.sparkfun.com tutorial

Available online at: http://sfe.io/t195

Contents

I Shall Call Him... Mini MeBoard OverviewAssemblyProject TimeResources and Going Further

I Shall Call Him... Mini Me

The Mini FET Shield is an amazing little shield designed for the Arduino Pro Mini 3.3V 8MHz. Ifyou've been using Arduino for some time, you may have noticed that one of the major limitations ofthe Arduino's digital I/O is the amount of current it can provide on each pin, which is about 40mA.That's enough current to light up a few LEDs or spin small DC motors, but to truly unleash yourinner maker, you're going to need more juice to drive those really big projects.

Page 1 of 14

Page 2: Mini FET Shield Hookup Guide - learn.sparkfun...In this hookup guide, we'll go over how the Mini FET Shield functions, discuss some of the different ways you can assemble the shield,

Covered in this Tutorial

In this hookup guide, we'll go over how the Mini FET Shield functions, discuss some of the differentways you can assemble the shield, and break down some Arduino code to get you started usinghigher current peripherals on your mobile Arduino projects.

Required Materials

In order to use the Mini FET Shield, you will need an Arduino Pro Mini 3.3V 8MHz. Please note thatshield only works with the 3.3V version of the Pro Mini and NOT the 5V version.

There will be various other parts listed throughout the tutorial. Each use case for the Mini FETShield is unique, so all of the parts in this tutorial are merely used to demonstrate the shield'sfunctionality and are by no means required.

Suggested ReadingPage 2 of 14

Page 3: Mini FET Shield Hookup Guide - learn.sparkfun...In this hookup guide, we'll go over how the Mini FET Shield functions, discuss some of the different ways you can assemble the shield,

Before you begin, make sure you are familiar with all these concepts and skills.

What is an Arduino?Installing the Arduino IDEHow to Install FTDI DriversWhat is a Shield?Electric PowerHow to Power Your ProjectBattery TechnologiesHow to Solder - Through HoleWorking with Wire

Board Overview

There's a lot happening on this tiny board. Let's break down each section and discuss in more detailhow to use the Mini FET Shield.

Power

Page 3 of 14

Page 4: Mini FET Shield Hookup Guide - learn.sparkfun...In this hookup guide, we'll go over how the Mini FET Shield functions, discuss some of the different ways you can assemble the shield,

The Mini FET shield was designed with battery power in mind. On the shield, you'll notice the B+and B-. Here, you can attach any battery between 1.8-5.5V, and the on-board regulator will regulateor boost it to 3.3V accordingly. This allows you to create mobile, battery powered projects that useAA, AAA, 9V, or LiPo batteries. It also provides a constant voltage to your devices, so motors andother peripherals will work at full force, even when the battery is nearing depletion.

The TPS61200 IC handles all the boosting/regulating. Keep in mind this IC is rated to deliver600mA of output current. However, we've successfully put 2A through it. As always, be cautiousabout exceeding the maximum ratings for any device.

NOTE: This shield DOES NOT contain a battery charger. If you need to charge your battery, pleasesee our charger offering.

The GND and 3.3V labeled on the right side indicate which pins are used to power the Pro Mini.Alternatively, if you chose to not use battery power for your project, you can power the shieldthrough the Arduino Pro Mini. Note that because of this power scheme, this shield will only work

Page 4 of 14

Page 5: Mini FET Shield Hookup Guide - learn.sparkfun...In this hookup guide, we'll go over how the Mini FET Shield functions, discuss some of the different ways you can assemble the shield,

with 3.3V Arduino Pro Mini and NOT the 5V Pro Mini.

Last, there is an 8-pin 3.3V rail (one for each MOSFET) and a 4-pin GND rail (one for the fourremaining digital I/Os). These are conveniently placed next to the digital pins to allow buttons,motors, and other parts to be connected easily.

The MOSFETS

These FDMA1024NZs are the stars of the show. Each of these ICs contain two N-channelMOSFETs, which is a type of transistor, and each is connected to pins 2-9, leaving us with 8 FETsto control. Transistors work just like electronically controlled switches. Thus, in order to turn on eachtransistor, we must pull the associated pin HIGH. This will allow the current to flow from the 3.3Vsource through your peripheral, through the transistor, and to ground, thus completing the circuit.This will become clearer as we connect more parts in the next section.

Digital I/OPage 5 of 14

Page 6: Mini FET Shield Hookup Guide - learn.sparkfun...In this hookup guide, we'll go over how the Mini FET Shield functions, discuss some of the different ways you can assemble the shield,

Finally, there are four leftover digital I/Os:** pins 10-13**. These can be used as inputs or outputsand have a GND bus next to them to easily connect buttons and switches. If you do decide to addsome inputs to these pins, remember to configure your pins as INPUT_PULLUP to turn on theinternal pull-up resistors on the Pro Mini.

The remaining pins are labeled for your convenience. These pins don't play a role in the function ofthe shield. However, you cam use a variety of headers, such as these stackable headers, to breakout these pins, if you need. You can also solder wire directly to these pins.

Assembly

There is no one, correct way to assemble the Mini FET Shield. It can have a variety of headersadded to it to customize it for your project. However, the method we show here could be consideredthe "standard" assembly method.

Although this is a mini shield, it acts just like a full-sized Arduino shield. Many of the same tips andPage 6 of 14

Page 7: Mini FET Shield Hookup Guide - learn.sparkfun...In this hookup guide, we'll go over how the Mini FET Shield functions, discuss some of the different ways you can assemble the shield,

techniques covered in our Arduino shield tutorial can be applied to this shield, particularly theInstalling Headers section.

We recommend using female headers on the Pro Mini, and straight male headers on the Mini FETShield. Alternatively, you could use machine pin female headers and machine pin male headers.They're slightly more expensive, but they'll give you a better looking final product as well as athinner overall package.

Start by soldering the female headers to the Pro Mini. You can also add some right-angle maleheaders to the Pro Mini's FTDI port.

Next, solder the male headers onto the shield. Make sure the side with the MOSFET ICs is the sidefacing up. You can use the female headers on the Pro Mini to hold the male headers in place whileyou solder, just like on a full-sized Arduino.

Page 7 of 14

Page 8: Mini FET Shield Hookup Guide - learn.sparkfun...In this hookup guide, we'll go over how the Mini FET Shield functions, discuss some of the different ways you can assemble the shield,

The two should mate together like so...

Page 8 of 14

Page 9: Mini FET Shield Hookup Guide - learn.sparkfun...In this hookup guide, we'll go over how the Mini FET Shield functions, discuss some of the different ways you can assemble the shield,

Power

Now, we need to figure out a way to power our stack. The simplest way is to just solder a right-angle JST connector directly to the B+ and B- pins. The positive and negative pins on all our LiPobatteries should line up with B+ and B- as long you solder the JST connector in the correctorientation, with the opening facing pins 8 and 9. You will also need to clip the headers on pins 8and 9 as flush as you can if you go this route. Otherwise, the battery may not fit correctly.

Page 9 of 14

Page 10: Mini FET Shield Hookup Guide - learn.sparkfun...In this hookup guide, we'll go over how the Mini FET Shield functions, discuss some of the different ways you can assemble the shield,

Notice the pins cut flush with the PCB. Be careful when clipping these as getting too close maydamage the pad.

Other options include using one of our many battery holders and soldering it directly to the B+ andB- pins. If you want power and charging built into one device, you could use the Power Cell. Or, ifmobile power isn't what you're after, you could just attach this female barrel jack to JST adapter tothe JST on B+ and B- and power it from the wall. You could also clip off the JST altogether, andsolder the barrel jack directly to the board.

Peripherals

Now comes the fun part, adding all the things we want to move, spin, light up, and turn on. This iswhere your project may differ the most from this example. Just keep a few things in mind as youadd your devices:

The Mini FET Shield can provide a lot more current than the Arduino alone, but, it too, haslimitations. Each MOSFET within each IC is rated for 5A continuous drain current and 6A if it'spulsed. Exceeding these ratings may damage the shield or the other boards attached to it.Still, 5A is a lot of current for such a tiny board!The more devices you hook up, the more power draw you're going to have and the quicker

Page 10 of 14

Page 11: Mini FET Shield Hookup Guide - learn.sparkfun...In this hookup guide, we'll go over how the Mini FET Shield functions, discuss some of the different ways you can assemble the shield,

the battery will drain. Also keep the capacity of your battery in mind as you plan out yourproject.

In this example, I'm going to hook up a laser and one of our many varieties of 3-12V motors* to theshield, as well as a button and switch to control them. I used some good ol' stranded wire to connecteverything to the shield.

The connections in the picture above are as follows:

Motor (+) → 3.3VMotor (−) → FET pin 2Laser (+) → 3.3VLaser (−) → FET pin 3Switch → pin 10 & GNDButton → pin 11 & GND

*I later discovered that this particular motor does not draw a lot of current, about 10mA, whichmakes driving it with the Mini FET Shield a little on the overkill side. However, many DC motors willdraw up to several hundred mA and will need to be driven by an external device.

Project Time

Now that we have all this hardware hooked up to the Mini FET Shield, what can we do with it? Well,for one, we can make a mobile light show!

Page 11 of 14

Page 12: Mini FET Shield Hookup Guide - learn.sparkfun...In this hookup guide, we'll go over how the Mini FET Shield functions, discuss some of the different ways you can assemble the shield,

Laser Show SparkFun Wish List

Tools

To make a truly epic laser show, you'll need a hot glue gun and a few stick of hot glue. Also, if youdon't already have some, you'll need a hex key to assemble the Actobotics parts and a slightlysmaller hex key for the set screws.

Hardware

Along with all the parts we used in the Assembly section, you'll also need a LiPo battery, and somemounting hardware to hold everything in place. You can just use some angle brackets and somehot glue, or, if you want to get serious about your laser show, we've picked out some Actoboticsparts to help you mount the motor and laser.

Single Channel - 90 Degree Angle (short)ROB-12287

These single channel 90 degree angle brackets mate directly to [Actobotics](https://www.sparkfun.com/pages/…

Motor Mount - ClampingROB-12407

The Aluminum Clamping Motor Mount is great for applications where the perfect motor alignment is needed. W…

Machine Screw - Socket Head (6-32 ; 1/4"; 25 pack)ROB-12517

These zinc-plated socket head machine screws are 1/4” long and have a tread pitch of 6-32. Sold in packs of 2…

Machine Screw - Socket Head (6-32 ; 3/8"; 25 pack)ROB-12423

These zinc-plated socket head machine screws are 3/8” long and have a tread pitch of 6-32. Sold in packs of 2…

Set Screw Hub - 1/2" BoreROB-12494

Set screw hubs offer a cheap way to attach hub mount gears or wheels to a shaft. The hub offers 4 equally spa…

Set Screw Hub - 6mm BoreROB-12318

Set screw hubs offer a cheap way to attach hub mount gears or wheels to a shaft. The hub offers 4 equally spa…

Side Mount Bracket CROB-12533

These side mount brackets can function as mounts for encaps for [Actobotics](https://www.sparkfun.com/pages…

Precision Disc Wheel - 4" (Clear, 2 Pack)ROB-12204

These clear precision disk wheels have an outer diameter of 4”, a width of 0.23”, and utilize the 0.77” hub patte…

View Laser Show on SparkFun.com

Going over building the mount is beyond the scope of this tutorial, but here's a picture for guidance.

Page 12 of 14

Page 13: Mini FET Shield Hookup Guide - learn.sparkfun...In this hookup guide, we'll go over how the Mini FET Shield functions, discuss some of the different ways you can assemble the shield,

Add a thin, bumpy layer of hot glue on the outer rim of the clear, acrylic wheel. When you shine thelaser through the glue, it makes for an amazing visual effect reminiscent of an Aurora.

Firmware

Every project needs at least a little bit of code to get it going. Here is a simple sketch that turns thelaser on with the switch and spins the motor when the button is pressed. Upload the code onto thePro Mini using a 3.3V FTDI Basic.

language:cint motor = 2;//write HIGH to turn onint laser = 3;//write HIGH to turn onint swtch = 10;int button = 11;

void setup() {

Page 13 of 14

Page 14: Mini FET Shield Hookup Guide - learn.sparkfun...In this hookup guide, we'll go over how the Mini FET Shield functions, discuss some of the different ways you can assemble the shield,

pinMode(motor,OUTPUT);pinMode(laser,OUTPUT);pinMode(swtch, INPUT_PULLUP);//internal pulluppinMode(button, INPUT_PULLUP);//internal pullup

digitalWrite(motor, LOW);digitalWrite(laser, LOW);}

void loop() {

if(digitalRead(button) == LOW)//spin motor when button is pressed digitalWrite(motor, HIGH); else digitalWrite(motor, LOW);

if(digitalRead(swtch) == LOW)//turn laser on with switch digitalWrite(laser, HIGH); else digitalWrite(laser, LOW);

}

There is one downside to driving a motor with the Mini FET Shield. Unlike a traditional H-bridge,such as the IC found on our Ardumoto Shield, the FET can only turn the motor in one direction. Ifyou need your motor to move in both directions, you may need to find a different solution.

With that, you should have a working project that utilizes the features of the Mini FET Shield.

Resources and Going Further

Thanks for reading. As usual, if you have any feedback, please visit the comments or contact ourtechnical support team at [email protected]. Please enjoy these other product resourcesand SparkFun tutorials for your reading pleasure.

MOSFET Datasheet - TPS61200Boost Converter Datasheet - FDMA1024NZsArduino Pin Current LimitationsArduino Internal Pull-up ResistorsCheck out the original Mini FET Shield design over at IDEO LABSINA-169 Current Sensor Hookup GuideLED Light Bar Hookup GuidePicoBuck LED Driver Hookup GuideMotors and Selecting the Right One

learn.sparkfun.com | CC BY-SA 3.0 | SparkFun Electronics | Niwot, Colorado

Page 14 of 14