DC motor with Arduino Uno using L298N



DC motor with Arduino Uno using L298N

 In this Arduino instructional exercise, we will figure out how to control DC engines utilizing an Arduino Uno. Moreover, we will have a total audit of the various techniques to interface a DC engine/different DC engines with the Arduino Uno utilizing L298N and L293D engine driver ICs. You can utilize the route table to look down to the code to interface DC engines with the Arduino. Notwithstanding, we would a lot of demand you understanding the idea first. We should start! 

example:



Pins of L298N IC 



The module has two screw terminal squares for the Arduino DC engine An and B, While another screw terminal square is for the Ground pin, the 12V VCC for engine, and a 5V pin, in any case, it can either be an information or yield. 

You may like these posts



It has four computerized input pins for Arduino engine control. Notwithstanding advanced pins, it likewise has two simple information pins for controlling the speed of the engine. 

Appraisals of Arduino engine regulator – H-connect L298N IC

  • Input voltage: up to 40 volts.
  • Output current: up to 3A
  • Power: 25W
  • Moreover, it has two built-in H-bridge, high voltage, large current, full-bridge driver, that can be used to drive DC motors, stepper motors, relay coils, and other inductive loads.
  • Using a standard logic level signal to control.
  • Furthermore, it can drive a two-phase stepper motor or four-phase stepper motor, and two-phase DC motors.
  • Above all, it can adopt a high-capacity filter capacitor yet a freewheeling diode that protects devices in the circuit from being damaged by the reverse current of an inductive load, enhancing reliability
  • Drive voltage: 5-35V
  • logic voltage: 5V

Code for interfacing a single DC motor with an Arduino Uno using L298N

const int rpm = 2 ;

const int in1 = 3 ;

const int in2 = 4 ;

void setup()

{

pinMode(rpm,OUTPUT) ;

pinMode(in1,OUTPUT) ;

pinMode(in2,OUTPUT) ;

}




void loop()

{

digitalWrite(in1,HIGH) ;

digitalWrite(in2,LOW) ;

analogWrite(rpm,255) ;


//Clockwise for 3 secs

delay(2000) ;

//For brake

digitalWrite(in1,HIGH) ;

digitalWrite(in2,HIGH) ;

delay(1300) ;


//For Anti Clock-wise motion - IN1 = LOW , IN2 = HIGH

digitalWrite(in1,LOW) ;

digitalWrite(in2,HIGH) ;

delay(2000) ;

//For brake

digitalWrite(in1,HIGH) ;

digitalWrite(in2,HIGH) ;

delay(1300) ;

}

Commentaires

  1. To insert a code use <i rel="pre">code_here</i>
  2. To insert a quote use <b rel="quote">your_qoute</b>
  3. To insert a picture use <i rel="image">url_image_here</i>
Tinggalkan komentar sesuai topik tulisan, komentar dengan link aktif tidak akan ditampilkan.
Admin dan penulis blog mempunyai hak untuk menampilkan, menghapus, menandai spam, pada komentar yang dikirim
Affordability

Affordability

Design must reflect the practical and aesthetic in business but above all... good design must primarily serve people. Build beautiful websites in mere minutes.

Basic

Create email templates for yourself.

  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
$5 Per User Per Month

Enterprise

Create email templates for yourself.

  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
$10 Per User Per Month
advertise

Business

Create email templates for yourself.

  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
$19.99 Per User Per Month

Retina Ready

Build trust with prospective clients, delight existing customers, and increase the efficiency

Welcome to

Best website for Blog App. Business. Digital. Marketing. Service.

Even in the most uncertain times, Help Scout keeps you connected with customers.

Frequently asked questions

01. How can I download the app ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
02. How can I install the app ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
03. How can I upgrade my current plan ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
04. How can I active the app's features ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
05. How can I download the app ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
06. How can I install the app ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
07. How can I upgrade my current plan ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
08. How can I active the app's features ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?

We tried to make

Integrations

Create stunning, effective sales documents with custom-designed theme & template.

Marketing

Create stunning, effective sales documents with custom-designed theme & template.

Dedicated Support

Create stunning, effective sales documents with custom-designed theme & template.

Best Features

Our features will help
to improve busines

Sales teams use PandaDoc to improve deal workflow, insights, and speed while delivering an amazing buying experience. Get your documents out the door fast to keep deals.

Rechercher dans ce blog

advertise
advertise
advertise

Built in Browsers

Build trust with prospective clients, delight existing customers, and increase the efficiency

Extreme Security

Build trust with prospective clients, delight existing customers, and increase the efficiency

Clean Design

Build trust with prospective clients, delight existing customers, and increase the efficiency

Easy Customize

Build trust with prospective clients, delight existing customers, and increase the efficiency

Awesome Design

Build trust with prospective clients, delight existing customers, and increase the efficiency