arduino dc motor speed and direction l293d
Home » Blog » arduino dc motor speed and direction l293d

arduino dc motor speed and direction l293d

Views: 0     Author: Site Editor     Publish Time: 2020-09-02      Origin: Site

Inquire

facebook sharing button
twitter sharing button
line sharing button
wechat sharing button
linkedin sharing button
pinterest sharing button
whatsapp sharing button
kakao sharing button
snapchat sharing button
telegram sharing button
sharethis sharing button

This manual will guide you to complete the parts and steps to control the speed and direction of the DC motor with the help of double H-
Arduino Bridge L293D motor driver.
The motor driver has two channels, which means it can control the direction of both DC motors at the same time.
Let me take you through the sections needed to do so. . .
Then there is the step with the code. 1)Arduino uno. .
The original version provided by L293D is very cheap. . .
5 available for 1.
The tactile button is 59 euros. . 100pcs for .
€ 99 10 K potentiometer. . . Breadboard. .
Jumper wires. . .
Computer with arduino IDE. . .
I can\'t provide this link you know.
Let\'s start working now.
L293D pin connection 1 (Enable1)--DigitalPin11(PWM)PIN2(INPUT1)--DigitalPin10(PWM)PIN3(OUTPUT1)--
1 PIN4 motor pin (GND1)--GndPIN6(OUTPUT2)--
Motor pin 2PIN7 (INPUT2)--DigitalPin9(PWM)PIN8(12v)--5vPIN9(Vss3. 3v)--
5 v/pin means 3.
3 v, but you can also connect it to 5 v.
Connection pin 1 (positive)--5vPin2(signal)--analogPIN0PIn3(negative)--
GndPUSH button pin connection 1 pin = gnd2 pin = DigitalPIN7/*/int enablePin = 11; Int in1Pin = 10; int in2Pin = 9;
Int switchPin = 7; int potPin = 0;
Int status pin = 13; void setup(){pinMode(in1Pin, OUTPUT); pinMode(in2Pin, OUTPUT); pinMode(
Output); pinMode(
SwitchPin, input _ pullup); pinMode(
Output status pin; }void loop(){digitalWrite(13,HIGH);
Int speed = analogRead (potPin)/ 4;
Boolean reverse = digitalRead (switchPin); setMotor(speed, reverse); }void setMotor(
Int speed, Boolean reversal){analogWrite(
Speed, speed); digitalWrite(in1Pin, ! reverse); digitalWrite(In2Pin, reverse); }
Turn the potentiometer to control the speed of the motor and press the button to change the direction.

HOPRIO group a professional manufacturer of controller and motors, was established in 2000. Group headquarters in Changzhou City, Jiangsu Province.

Quick Links

Contact Us

WhatsApp: +8618921090987 
Tel: +86-18921090987 
Add: No.19 Mahang South Road, Wujin High-tech District, Changzhou City, Jiangsu Province, China 213167
Leave a Message
CONTACT US
Copyright © 2024 ChangZhou Hoprio E-Commerce Co., Ltd. All Rights Reserved. Sitemap | Privacy Policy