N-CHANNEL MOSFET + BASIC STAMP 2

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
fuichris
 
Posts: 21
Joined: Mon Oct 27, 2014 6:07 am

N-CHANNEL MOSFET + BASIC STAMP 2

Post by fuichris »

HI folks!
Can a N-Channel Mosfet https://www.adafruit.com/product/355 work on a Basic Stamp 2 breadboard?
I'm trying it out, but it only fits horizontally, not vertically.

(Sorry for this potentially dumb question)

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: N-CHANNEL MOSFET + BASIC STAMP 2

Post by adafruit_support_bill »

Can you post a photo showing the problem? The MOSFET should be compatible with most breadboards.

User avatar
fuichris
 
Posts: 21
Joined: Mon Oct 27, 2014 6:07 am

Re: N-CHANNEL MOSFET + BASIC STAMP 2

Post by fuichris »

Aren't the GDS pins suppose tobe inserted into different I/O pins (vertically) on the BS2 board?

I'm just starting out learning how to use the MOSFET. ;P
Attachments
IMG_7349.JPG-1.jpeg
IMG_7349.JPG-1.jpeg (128.62 KiB) Viewed 818 times

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: N-CHANNEL MOSFET + BASIC STAMP 2

Post by adafruit_support_bill »

The orientation of the MOSFET as shown in your photo is correct. The pins are a little wide, so it takes a firm push to insert it into the breadboard.

User avatar
fuichris
 
Posts: 21
Joined: Mon Oct 27, 2014 6:07 am

Re: N-CHANNEL MOSFET + BASIC STAMP 2

Post by fuichris »

Got it. I"m a little too delicate.

By the way, do you know of any projects/tutorials of how to work with a mosfet and a Basic Stamp board? I can't seem to find anyonline.
I'm just trying to do a simple on/off switch. I've seen many sites, but they explain theoretically, but is there a more visual practical link?

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: N-CHANNEL MOSFET + BASIC STAMP 2

Post by adafruit_support_bill »

We don't carry the Basic Stamp and don't have any tutorials for it. But 5v GPIO pins are all pretty much the same, so at least the wiring part of the Arduino tutorials should be applicable.

You just wire the MOSFET on the ground side of the circuit and connect the gate to a GPIO pin. Setting the pin HIGH turns on the MOSFET.
This tutorial shows how to switch power to a solenoid.
https://learn.adafruit.com/biometric-se ... /circuitry

User avatar
GuillaumeO
 
Posts: 22
Joined: Fri Oct 17, 2014 7:46 am

Re: N-CHANNEL MOSFET + BASIC STAMP 2

Post by GuillaumeO »

There is as great tutorial here http://mchobby.be/wiki/index.php?title= ... _Hobbyiste
Even if it's in french, there are diagrams

User avatar
fuichris
 
Posts: 21
Joined: Mon Oct 27, 2014 6:07 am

Re: N-CHANNEL MOSFET + BASIC STAMP 2

Post by fuichris »

I took your advice...thanks! ... see pic.
MOSFET - TEST 4 - 1WING-RESISTOR ISSUE - 9nov14 smaller.jpeg
MOSFET - TEST 4 - 1WING-RESISTOR ISSUE - 9nov14 smaller.jpeg (929.35 KiB) Viewed 774 times
Question #1: How do I know WHAT NUMBER RESISTOR to use from the I/O pin to the Gate? In the pic, I randomly used 10k for no reason.

Question #2: This resistor protects the microcontroller from the external power source, right? The board can handle 5V, but I want to use 9V external battery, so I assume the resistor protects the board from all that external power?

Hope to get your advice THANKS!

User avatar
GuillaumeO
 
Posts: 22
Joined: Fri Oct 17, 2014 7:46 am

Re: N-CHANNEL MOSFET + BASIC STAMP 2

Post by GuillaumeO »

Cool !

Response to Q1 : the resistor between the gate and ground is used as "pull down". So, yes 10kOhms is enough for 3v-5v-9v-12v. (I don't know for higher voltage).
For testing (with transistors), I use the blink example from arduino with the output linked to gain.

Response to Q2 : no it does not protect. If you want to make a good protection between circuits, you can use relay or opto-isolator http://en.wikipedia.org/wiki/Opto-isolator. You can find cheap opto-isolator in arduino kits to make a try.

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: N-CHANNEL MOSFET + BASIC STAMP 2

Post by adafruit_support_bill »

Using that MOSFET, no resistor is necessary on the gate. Sometimes a resistor to ground is used as a pulldown to get the charge off the gate, but it is really not necessary wit that device.

User avatar
fuichris
 
Posts: 21
Joined: Mon Oct 27, 2014 6:07 am

Re: N-CHANNEL MOSFET + BASIC STAMP 2

Post by fuichris »

MOSFET NO RESISTOR TO GATE: noted. tks!

But if I wanted to control the external power into my load (which in this case is flexinol wire, off screen) - see pic, then I would add a resistor from SOURCE -> GROUND. Correct? See pic.

My flexinol wire load burns out without a resistor, but when I put a 10Ω resistor, there's no reaction, so I just need to know if the placement of this resistor is correct?

:D
MOSFET - TEST 5 - StoG-RESISTOR ISSUE - 10nov14.JPG
MOSFET - TEST 5 - StoG-RESISTOR ISSUE - 10nov14.JPG (857.92 KiB) Viewed 755 times

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: N-CHANNEL MOSFET + BASIC STAMP 2

Post by adafruit_support_bill »

then I would add a resistor from SOURCE -> GROUND.
No. That would move the ground reference of the MOSFET so the gate voltage would not be able to switch it. A current limiting resistor for the load show go between the drain and the load.

User avatar
fuichris
 
Posts: 21
Joined: Mon Oct 27, 2014 6:07 am

Re: N-CHANNEL MOSFET + BASIC STAMP 2

Post by fuichris »

adafruit_support_bill wrote:
then I would add a resistor from SOURCE -> GROUND.
No. That would move the ground reference of the MOSFET so the gate voltage would not be able to switch it. A current limiting resistor for the load show go between the drain and the load.
SOURCE -> GROUND : regular wire from SOURCE -> GROUND, no resistor.
DRAIN -> LOAD : add resistor to control amount of voltage going to the load

Is that right? (thanks for your patience ;p)

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: N-CHANNEL MOSFET + BASIC STAMP 2

Post by adafruit_support_bill »

Yes, that sounds right.

User avatar
fuichris
 
Posts: 21
Joined: Mon Oct 27, 2014 6:07 am

Re: N-CHANNEL MOSFET + BASIC STAMP 2

Post by fuichris »

This is my first ever circuit diagram from what I've translated of what we've been talking about... looks right?
Circuit diagram 1 - 11nov14.jpg
Circuit diagram 1 - 11nov14.jpg (648.91 KiB) Viewed 731 times

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”