A demonstration on how to connect a large MOSFET to an Arduino for control of a large motor. Also demonstrated. The MOSFET used in the video is a RFP50N06.
int motor = 9; // the pin that the MOSFET gate is attached to
int speed = 0; // initial speed of the motor
int speedincrement = 10; // how many speed points to put the motor through
The Code
____________________________________________________
void setup() {
// declare pin 9 to be an output:
pinMode(motor, OUTPUT);
}
//loop runs forever
void loop() {
// set the speed of motor controller (MOSFET) on pin 9:
analogWrite(motor, speed);
// change the speed for next time through the loop:
speed = speed + speedincrement;
// reverse the direction of the speed after reaching full speed
if (speed == 0 || speed == 250) {
speed = -speed ;
}
// wait for 1 second to see the speed effect
delay(1000);
}
____________________________________________________
Like, Share or Subscribe if you like what you see.
Thanks.
Негізгі бет Ғылым және технология Power MOSFET Motor control with Arduino
Пікірлер: 216