Review of XY-GMOS 10A MOSFET Motor driver and HIGH LOW trigger stwich Module
Review of XY-GMOS 10A MOSFET Motor driver and HIGH LOWtrigger stwich Module
This can be used as 10A High or Low trigger switch works with 4V to 60V. Or you can control Speed of DC motor with 10A power using PWM.
XY-GMOS 10A MOSFET module
Click on image to enlarge
XY-GMOS 10A MOSFET Module 1
Click on image to enlarge
Chapters in this video
- 01:03 Introduction
- 03:48 Wiring Explained
- 04:53 Code Explained
- 11:39 Demonstration Motor control
- 14:11 Demonstration Switch Control with 10A to 15A test
- 16:53 Demonstration Low Trigger Control
- 19:44 Conclusion remarks
Components used in XY-GMOS. See Video for details
1-A0D2801 80V N-Channel MOSFET Datasheet (pdf)2-Datasheet (pdf)
3-XL7005 Buck DC to DC Converter Datasheet (pdf) 4-MT3608 2A Step Up Converter Datasheet (pdf)
5-SS110 Schottky Rectifier Diode Datasheet (pdf)
6-SS34 Schottky Barrier Rectifier Datasheet (pdf)
7-EL817 Optocoupler Datasheet (pdf)
Ohter Resources
- Learn Arduino in 30 Minuetes (video)
- Robojax Arduino Course on Udemy
- Get Early Access to my videos via Patreon
/*
* This Arduin Contorl Speed DC motor and START/STOP is using push button
* using XY-GMOS Mosfet Speed Switch Module
*
* Watch Video instrution for this code:https://youtu.be/El5Dd51HBG8
*
* Full explanation of this code and wiring diagram is available at
* my Arduino Course at Udemy.com here: http://robojax.com/L/?id=62
* Written by Ahmad Shamshiri on May 31, 2020 at 17:49 in Ajax, Ontario, Canada
* in Ajax, Ontario, Canada. www.robojax.com
*
* Get this code and other Arduino codes from Robojax.com
Learn Arduino step by step in structured course with all material, wiring diagram and library
all in once place. Purchase My course on Udemy.com http://robojax.com/L/?id=62
If you found this tutorial helpful, please support me so I can continue creating
content like this. You can support me on Patreon http://robojax.com/L/?id=63
or make donation using PayPal http://robojax.com/L/?id=64
* * This code is "AS IS" without warranty or liability. Free to be used as long as you keep this note intact.*
* This code has been download from Robojax.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
const int POT_PIN =A0;//can change
const int MOTOR_OUT_PIN = 3;
const int START_STOP_PIN=2;
const int SPEED_MAX = 100;// in %
const int SPEED_MIN = 0;//in %
const int STOP=0;
const int RUN=1;
int motorState=RUN;//
int motorSpeed = 0;//between 0 to 100%.
void pushButton();
void setup() {
//Robojax XY-GMOS MOSFET Motor driver code
Serial.begin(9600);
Serial.println("Robojax XY-GMOS Motor, Arduino");
pinMode(START_STOP_PIN, INPUT_PULLUP);
pinMode(MOTOR_OUT_PIN, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
pushButton();
int potValue =analogRead(POT_PIN);
int speedPercent = map(potValue, 0, 1023, 0, 100);
Serial.print("speedPercent: "); Serial.println(speedPercent);
if(motorState ==RUN)
{
motorControl(speedPercent);
}else{
stopMotor();
}
delay(500);
//Robojax XY-GMOS MOSFET Motor driver code
}//loop end
/*
* motorControl(int s)
* @brief controls the motor with the value s
* @param return nothing
* @param "type" is character
* on May 08, 2020 at 02:36 in Ajax, Ontario, Canada
*/
void motorControl(int s)
{
//Robojax XY-GMOS MOSFET Motor driver code
s = map(s, SPEED_MIN, SPEED_MAX, 0, 255);
Serial.print("Speed: "); Serial.println(s);
analogWrite(MOTOR_OUT_PIN, s);
}//motorControl
/*
* stopMotor()
* @brief stops the motor
* @param return nothing
* @param
* on May 08, 2020 at 02:36 in Ajax, Ontario, Canada
*/
void stopMotor(){
//Robojax XY-GMOS MOSFET Motor driver code
analogWrite( MOTOR_OUT_PIN, 0);
Serial.println("STOPPED");
}//stopMotor()
/*
* pushButton()
* @brief reads the push button
* @param return nothing
* @param
* on May 08, 2020 at 02:36 in Ajax, Ontario, Canada
*/
void pushButton()
{
//Robojax XY-GMOS MOSFET Motor driver code
if(digitalRead(START_STOP_PIN) ==LOW)
{
motorState =!motorState;
delay(100);
}
}//pushButton()