MOSFET BUZ11

From Digipool-Wiki
Revision as of 12:30, 3 July 2013 by WikiSysop (Talk | contribs)

Jump to: navigation, search
Arduino MOSFET BUZ11.jpg

Die Output-Pins des Arduino können nur Ströme bis ca. 20 mA und 5V schalten. Die meisten Bauteile, die gerne mit dem Arduino angesteuert werden benötigen größere Strommengen. Mit einem MOSFET BUZ11 kann in einer einfachen Schaltung sehr schnell Ströme bis 50 V und 30 A geschaltet werden.

Setup

Code

Dim Example <source lang="java"> int outPin = 6;

int x = 0;

void setup() // run once, when the sketch starts {

 pinMode(outPin, OUTPUT);      // sets the digital pin as output

}

void loop() // run over and over again {

 analogWrite(outPin, x);
 
 x = x + 1;
 if(x > 255){
   x=1;
 }
 delay(20);
 

} </source>


On Off <source lang="java"> int outPin = 6;

int x = 1000;

void setup() // run once, when the sketch starts {

 pinMode(outPin, OUTPUT);      // sets the digital pin as output

}

void loop() // run over and over again {

 digitalWrite(outPin, HIGH);   // on
 delay(x);                  // waits for a second
 digitalWrite(outPin, LOW);    // off
 delay(x);                  // waits for a second 

} </source>