Stepper Motor Controller

AVR Project 조회 수 142313 추천 수 1262 2004.12.07 13:36:36 새 페이지 2


Stepper Motor Controller
Connection Diagrams

The wires from the Logic PCB connector to the stepper motor in a TM100 Disk Drive are as follows

 Motor Connector

This means that, to use the stepping sequences as is, the Green and Brown wires are the wrong way round. There is no need to alter the wires at the connector, of course - it can be done in the cable from the PC parallel port or microcontroller.

If you have a stepper motor with different wiring, look here.


 Four-Wire Connection

The ULN2003 / MC1413 is a 7-bit 50V 500mA TTL-input NPN darlington driver. This is more than adequate to control a four phase unipolar stepper motor such as the KP4M4-001.

4-wire connection diagram GIF

It is recommended to connect a 12v zener diode between the power supply and VDD (Pin 9) on the chip, to absorb reverse (or "back") EMF from the magnetic field collapsing when motor coils are switched off. (See Douglas W. Jones' rather more sophisticated example)


Here's one I made earlier

I recycled the power and motor lead connectors from the TM100 Logic PCB. A convenient source of 12v and 5v is an old IBM-PC power supply unit. The 9-way D-type connector is appropriate for the number of (parallel) control lines needed in the cable.

Here's some example software for this setup


 Data Sheets

Allegro MicroSystems has a PDF datasheet for its 2003 thru 2024 high-voltage high-current Darlington arrays.

Texas Instruments supplies the SN75468, which is a higher-voltage version of the ULN2003A.

The ULN2803 is an 8-bit 50V 500mA TTL-input NPN darlington driver. The extra Darlington pair means that two stepper motors can be controlled by this method with the single chip.

Motorola has PDF datasheets for its MC1413 and ULN2803 chips


 Two-Wire Connection

With the addition of a few resistors, you can control this kind of motor with only two data lines (compared with the Four-Wire Connection, above). This uses the fact that, with Two-Coil Excitation, at any time two of the coils have the inverse excitation (on/off) of the other two.

2-wire connection diagram GIF

(based on Parallax BASIC Stamp Application Note 6)


You only need to supply the on/off signals for coils 3 and 2, according to the Two-Coil Excitation sequence. The corresponding inverted signals for coils 1 and 4 are supplied by the circuit itself.

Turtle Circuitboard

I used this circuit (times two) for the StoneAge DiskDrive Logo Turtles and the Pan-and-Tilt Mount for a camera.

The same technique is used by the (discontinued) UDN2544B (PDF) Quad Darlington Power Driver chip from Allegro MicroSystems

A disadvantage of this method is that you cannot half-step the motor.

Allegro's UCN5804B Stepper-Motor Translator/Driver chip supports all three excitation modes.


 Allegro 5804B 

This translator/driver chip provides complete control and drive for a four-phase unipolar stepper motor.

from the data sheet (PDF)

The logic section provides the sequencing logic, DIRECTION and OUTPUT ENABLE control, and a power-on reset function. Three stepper-motor drive formats, wave-drive (one-phase), two-phase, and halfstep are externally selectable.


Drive Format Pin 9 Pin 10
Two-Phase L L
One-Phase H L
Half-Step L H
Step-Inhibit H H

I used the following circuit (times two) for a third (different) controller board for my students.

With Pin 15 OUTPUT ENABLE tied to Ground (always enabled), four data lines are required to interface the chip, for all three drive formats to be selectable in software.

From the Data Port of the PC Parallel Port, I used:


Bit Function
0 Step Input
1 Direction CW/CCW
2 One-Phase/Two-Phase
3 Half-Step/Full-Step

Bits 1-3 need to be set to 1 or 0 to reflect the desired direction of rotation and drive format. Bit 0 must be set to 1 initially. To step the motor, Bit 0 must be reset to zero for a minimum 3 µsec then set back to 1.

Note: If the controller board is powered up but not connected to the PC and under software control, the motor(s) will free run as Pin 11 STEP INPUT floats low. This behaviour can be prevented by connecting a 10K pullup resistor between pin 11 and +5v.


 Other Sources of Information 
  Stepper Motors Index  

List of Articles
번호 제목 글쓴이 날짜 조회 수

H/W 아이폰 충전 회로 file

  • eastsky
  • 2010-10-29
  • 조회 수 28614

iPhone Connector Info (Pin 27) USB Data (+) Pins 25 and 27 may be used in different manner. To force the iPod 5G to charge in any case, when USB Power 5 VDC (pin 23) is fed, 25 must ...

AVR Project UHF FSK PLL RF Module (NR-FPCX) file

  • eastsky
  • 2010-10-20
  • 조회 수 41742

UHF FSK PLL방식 무선 데이터 송/수신 모듈을 이용한 AVR 회로도 및 HEX 파일입니다. 기본적으로 CodeVision 에서 컴파일 한 HEX 이며, 2세트간에 10~20 Byte 이내에 데이터 송수신을 위한 회로 입니다. RF-Module ...

AVR Project Keypad & Encoder file

  • eastsky
  • 2010-10-15
  • 조회 수 32903

74HC138 을 이용한 10 * 8 Keypad 회로 입니다.. Encoder 을 사용할 때 시계방향과 반시계방향을 체크하는 방법입니다.. 여러가지가 있겠지만, 일정 시간 샘플링을 통한 방법이 가장 쉬우면서도 유효하다고 봅니다.

AVR Project JTAGICE mkII 상세 설명서 file [3]

안녕하세요 ⚑ 제가 JTAGICE mkII 상세 설명서를 얻었는데요 이 자료를 함동호님과 회원님들에게 드리려고해요. ★ 앞으로 많은 협조를 ★

H/W 스텝모터회로 - 테스트용 file

전에 스텝모터 테스트용으로 만든 회로 입니다.. 실제로 테스트 해보니 잘 돌기는 하는데... 좀 그러네요 ^^; 학교에서 테스트용으로 사용하면 좋을 듯 합니다.. 덤으로 196 모터 회로... 추가

AVR Project ATtiny26L의 AD 변환과 PWM 출력제어 file출처 : 손잡이를 돌리면 모타의 회전이 바뀐다. 커다란 가변권선 저항을 직렬로 넣어 콘트롤하는 일이 있습니다. Tiny26L은 AD변환과 PWM기능이 있으므로, 가변저항으로...

AVR 강좌 AVR 관련 자료 file압축을 푸시면 아래의 자료가 있습니다.. 1. Atmega128 비트설정.pdf 2. ATMEGA 시리즈 클럭 Securit bits 설정방법.pdf 3. 코드비젼_한글메뉴얼.PDF

AVR Project Atmega16을 이용 74HC595 사용 file이츠임베디드Atmega16을 이용 74HC595(8bit serial-in, serial or parallel-out shift register with output latches; 3-state) 사용기 입니다.. 이 자료는 이츠임베디드에...

AVR Project KLM-162CAN 을 이용한 전광판 file 다른님이 만드신 전광판인데, 오래되어서 자료링크가 안되네요 ^^:   전광판 Electronic Signboard   많은 분들께서 전광판에 관심을 보여주고 계셔서 게시판을 만들었습니다. 많이 이용해...

AVR Project LED 전광판 file 개발자 사이트 : 관련 사이트 : 74H595 Shift Register App : http://www.kronosr...

AVR Project Stepper Motor Controller file 새 페이지 2   Stepper Motor Controller Connection Diagrams The wires from the Logic PCB connector to the stepper motor in a TM100 Di...

AVR Project Christmas Tree file Christmas Tree Here is a fun project to put on your Christmas Tree or in your front window to impress the neighbours. Multi-Coloured Christmas...

AVR Project Mega8 Door Bell file 초인종 -줄거리 초인종은 간단해 보이나 그렇지 않다! 펄스폭변조로 정현파를 발생시키는 것은 매우 까다롭다, ATMega8의 발진으로 부터 OC1A를 출력하고 정현파 참조표로 부터 펄스폭이 정의된다. 1.8khz의...

AVR 강좌 Codevision C언어 Manual file

코드비젼 c언어 메뉴얼입니다

AVR 강좌 스텝모터 구동 및 구동회로도 file

전자부품연구원(KETI)에서 만든 기술 자료입니다 .

AVR Tool AVR OrCad9.1 Capture library file라이브러리 파일을 다운로드 받아서 압축을 푼후 capture\library\atmel 폴더에 넣으세요. 그리고 회로를 그릴때 add library해서 그리시면 됩니다. 라이브러리에 포함된 cpu리스트입니다. ATTINY12 ATTI...

AVR Project 12C508 IR Proximity Detector file 적외선 LED와 적외선 리모콘용 수신센서를 이용한 근접센서 프로젝트입니다. 포토센서를 사용하는 방법보다 비교적 먼거리의 물체를 한개의 IR수신 IC로 감지합니다. 첨부된 ...

AVR 강좌 일반, 모터,센스, 전원회로 링크 file

** 예전 땜쟁이가 사는 곳의 링크 입니다 ** 일반회로 모터회로 센스회로 전원회로

AVR Project Led Sign with MMC Memory file     Led Sign with MMC Memory Card   History At the beginning this project was to buy a led sign to interface with my home automatisation network. This automatisation network ...

AVR Project MP3 Player file     MP3 Player History I decided to do this project for several reasons: first I like music, second I have a ton of MP3 and third I wanted to be able to listen those ...