Hi guys,
I have a DC engine I want to power using Arduino PWM. I did succeed with this a couple of weeks ago, but I ran into problems when my L298N burned.
Today I recieved two new ones, but I hope not to burn these as well.
The video tutorial i used is this one:
The "schematics" is here:
(i changed a little bit, to fit my needs, because my Arduino Pin 10 was used by my Ethernet shield.
The pin numbers in the pin numbers on the L298N.
And the code is here:
int IN1 = 12;
int IN2 = A5;
int ENA = 9;
void setup ()
{
pinMode (IN1, OUTPUT);
pinMode (IN2, OUTPUT);
pinMode (ENA, OUTPUT);
Serial.begin (9600);
Serial.println("Motor 1 Speed:");
}
void loop()
{
digitalWrite (IN1, HIGH);
digitalWrite (IN2, LOW);
analogWrite(ENA, 120);
}
How can I prevent burning the Mosfet/driver/L298N? A friend of mine told me to use a diode and something else I have never heard of before or ever since. Tried to research on the subject but found nothing.
Thanks.