You are on page 1of 5

STEP BY STEP PROCEDURE FOR STEPPER MOTOR CONTROL

STEP-1
REQUIRED COMPONENTS I) II) III) IV) V) VI) VII) VIII) IX) ATMEGA 16 MICROCONTROLLER ULN2003 MOTOR DRIVER MATRIX 4*4 CONTROL KEYPAD 16*2 ALPHANUMERIC LCD UNIPOLAR STEPPER MOTOR (12V) SPST PUSH BUTTON SWITCH BREAD BOARD SINGLE STRANDED WIRE POWER SUPPLY

STEP-2
INTERFACING OF KEYPAD WITH MICROCONTROLLER

ATMEGA16 PIN DIAGRAM

ALGORITHM FOR INTERFACING KEYPAD WITH MICROCONTROLLER

:I/O port. :-

Select a port of ATMEGA16 microcontroller and declare it as Port PB0-PB3 are used to read the row results and Port

PB4 - PB7 are used to read the column results. :- High nibble for output (columns) and low for input (rows). :these i/ps are enabled. :- One after the other port bits PB6, PB5 and PB4 set low and PB0-PB3 are checked for zero. :that are pressed. :to the register R0. :Use the stored value from the register. The key code is read from the table in the flash memory Register pair Z (ZH-ZL) points to table with key codes Pull-up resistors to lower four port pins (PB0-PB3) on

STEP-3
INTERFACING OF LCD WITH MICROCONTROLLER

ALGORITHM TO INTERFACE LCD WITH MICROCONTROLLER

1) 2) register (RS=0 or RS=1).

Initialize the LCD. Select the command or instruction

3) Set RW low (to write to LCD) 4) Send a high to low pulse on the EN pin. 5) step, it eliminates the delay use) 6) function. 7) Repeat above steps. Move to instruction or command Check if the LCD is busy (Optional

STEP- 4

INTERFACING OF STEPPER MOTOR WITH MICROCONTROLLER

ALGORITHM TO INTERFACE STEPPER MOTOR WITH MICROCONTROLLER

1) The first four input pins (1B-4B) of the motor driver ULN2003 is connected with the PORTD of MCU (PD0-PD3). 2) 3) 4) 5) The Stepper motor is connected with the ULN2003 output pins (1C-3C). 12V power supply is given to the driver. Initialize the motor driver. The motor driver takes the input from the microcontroller PORTD.

6) The driver runs the motor according to the requirement either in clockwise or in anti clockwise.

STEP- 5
FULL CIRCUIT DIAGRAM

( Proteus Schematic)

You might also like