L293D 스텝모터 - L293D seutebmoteo

Introduction: Arduino : How to Control a Stepper Motor With L293D Motor Driver

This instructable is the written version of my "Arduino :How To Control a Stepper Motor with L293D Motor Driver" YouTube video that I've uploaded recently. I strongly recommend you to check it out.

My YouTube Channel

Step 1: Tutorial

In this tutorial you will learn how to control a stepper motor using your L293D motor control chip

Stepper motors fall somewhere in between a regular DC motor and a servo motor. They have the advantage that they can be positioned accurately, moved forward or backwards one 'step' at a time, but they can also rotate continuously.

Step 2: Hardware Required

Arduino or Genuino Board

Stepper L293D Motor Driver (Chip)

Breadboard

Battery

Jumper Wires

Step 3: Circuit & Connections

Hardware (L293D)

Run four solenoids, two DC motors or one bi-polar or uni-polar stepper with up to 600mA per channel using the L293D. These are perhaps better known as "the drivers in Adafruit Motorshield". If you accidentally damaged the drivers in a shield, you can use one of these puppies to replace it. Or you can breadboard something on your own! Each chip contains two full H-bridges (four half H-bridges). That means you can drive four solenoids, two DC motors bi-directionally, or one stepper motor. There's a PWM input per driver so you can control motor speed. Runs at 5V logic. Good for motor voltages from 4.5V up to 36V! This wont work well for 3V motors. The motor voltage is separate from the logic voltage.

The stepper motor has five leads, and we will be using both halves of the L293D this time. This means that there are a lot of connections to make on the breadboard. The motor has a 5-way socket on the end. Push jumper wires into the sockets to allow the motor to be connected to the breadboard.

Note that the red lead of the Stepper motor is not connected to anything.
Use the colors of the leads to identify them, not the position from which they emerge from the motor.

Bipolar Stepper Motor

Driving a bipolar stepper motor with the L293D is very similar to driving a unipolar stepper motor. The pulse sequence is the same. The only difference between driving a unipolar stepper motor and driving a bipolar stepper motor is that there is an extra wire in a unipolar stepper motor you have to hook up.

Step 4: Programming

Step 5: If I Was Helpful

First of all, I would like to thank you for reading this guide ! I hope it helps you.

If you want to support me, you can subscribe my channel and watch my videos.

My YouTube Channel

2 People Made This Project!

Recommendations

  • Anything Goes Contest

    L293D 스텝모터 - L293D seutebmoteo

Skip to content

L293D – Motor Drive Shield Expansion Board

L293D – Motor Drive Shield Expansion Board

1. L293D – Motor Drive Shield Expansion Board

L293D 는 고전압, 고전류를 지원하는 4채널 모터 드라이버입니다.
4.5V~36V 까지 전원을 입력할 수 있으며 채널당 600mA의(1.2A peak current) 전류를 인가할 수 있습니다.(thermal protection 내장) 주로 큰 용량의 DC/Stepper 모터를 제어하는데 적합합니다.
5V servo 모터를 제어하기 위한 2개의 인터페이스가 별도로 있으며 4개의 DC 모터 또는 2개의 stepper 모터를 제어할 수 있습니다. Stepper 모터는 single coil, double coil, interleaved stepping 방식의 unipolar, bipolar stepper 모터를 사용할 수 있습니다. DC모터와 스텝모터는 5-12VDC 이여야 합니다. (3V 모터는 동작하지 않습니다!!)
Pulldown resistor 가 내장되어 전원 인가할 때 모터를 보호해줍니다.
Size:6.8cm x 5.5cm x 2cm – 2.68inch x 2.17inch x 0.79inch.

모터 쉴드는 UNO, Duemilanove, Diecimila, Leonardo, Mega/ADK R3 와  호환됩니다. 아두이노와는 SDA, SCL 핀을 이용해서 I2C 통신을 합니다. (아두이노 A4, A5 핀)

특이하게 이 모터 쉴드는 같은 쉴드를 추가로 위에 적재하여 동작 가능한 모터의 수를 늘릴 수 있습니다. 다만 서보모터 핀은 아두이노의 9번 10번 핀에 연결만 되어 있으므로 추가로 쉴드를 적재 하더라도 2개만 제어가 가능합니다.

L293D 스텝모터 - L293D seutebmoteo

자세한 정보는 여기서:  http://wiki.vctec.co.kr/opensource/arduino/adu-ino-swildeu-mich-gwanlyeon-jepum/adamotorshieldv2

2. 연결방법

쉴드 연결 방법이 조금 복잡합니다. 아래 링크에서 자세한 내용 확인하세요.

http://wiki.vctec.co.kr/opensource/arduino/adu-ino-swildeu-mich-gwanlyeon-jepum/adamotorshieldv2

3. 소스코드

아래 라이브러리를 설치해서 사용해야 합니다. 두 개의 라이브러리를 비교해보시고 필요한 걸 사용하세요. 라이브러리 폴더는 [아두이노 설치 폴더 / libraries /] 아래에 복사하면 됩니다.

일반 모터 제어용 : library from the Github repository 혹은 Download latest Adafruit Motor Shield V2 Library.

Adafruit 라이브러리와는 별도로 존재하는 유사한 라이브러리도 있네요. 아래 링크에서 다운로드 받으세요.

[wpdm_file id=22]

Step 모터 동시 제어용(백그라운드 태스크) : check out AccelStepper library.

Adafruit 사 외의 라이브러리는 아래 링크에서 다운로드 받으세요.

[wpdm_file id=23]

Share This Story!

Page load link