DC Motor control using C++
 DC motor control using VC++
 Stepper motor control using VC++
 Industrial DC Motor Control panel
 industrial stepper motor control panel
 remote control for AC Drive
 Traffic control system
 Wireless DC Motor controller
 Wireless Stepper motor controller

~: Industrial control panel for Unipolar Stepper Motor :~

Abstract:- Here given project is the real control panel for any unipolar stepper motor which is designed to run motor at lower RPM (as much as upto 10 RPM) to take greater load and provide extra heavy torque. This project is for specialize stepper motor which has technical specifications like

voltage ratings :- from 5 to 30 V DC or more then that

torque:- 1.5 Kg/cm minimum.

current :- 500 mA to 2 Amp

RPM:- 30 rpm max.

step angle:- 1.8 deg/pulse (200 pulses for 1 revolutions) 

The motor is used in textile industries or in CNC machines for various operations/applications like viving bobbin of string, cutting axes of diamond etc. 

                                                                _______________________________________________

This is a complete industrial stepper motor driver in which the program gradually increases the stepper motor speed to its maximum level when you start it. One can easily change the speed of motor in between the operation also he can change direction (from clockwise to anticlockwise). 

The program starts the motor from minimum speed that is 10 RPM and gradually increase it to its maximum value in step of 5 (10, 15, 20... likewise).   

The most interesting part is one can also program the motor to automatically reverse after predetermined time (set by user). Means for some time it will rotate in clockwise direction and automatically after some time it will change the direction and start rotating anticlockwise again after some time (entered by user) it will change direction. 

Again the program is divided in to two parts. One is hardware part second is software part.

Hardware part includes switching circuit and driver circuit which actually rotates the motor. Software part is controlling part which controls all the parameters of motor. Lets starts with hardware part first.

Hardware part: -

Complete circuit is quite big so it is divided in two sections. One section includes opto-couplers (datasheet), ULN2003A (datasheet) chip and relays. Second section includes multivibrator, and stepper motor driver. Figure given below shows first section of circuit.

 

Connections: - As shown in figure five opto-couplers are used to drive relays through ULN chip using LPT port of PC. The anodes and collectors of every opto-couplers are tied with Vcc. The cathode of each opto-coupler is connected with data pins D0(2) - D4(6). Emitters of each opto-coupler are connected to inputs of ULN chip through current limiting resistors. Outputs of ULN drive relay coils.

 

Second section of circuit is as shown in above figure. It includes IC555(datasheet) as astable multivibrator, decade counter chip 4017(datasheet), and ULN2003A. Output frequency of IC555 can be changed by changing the resistor R2 to R6. This output is given as clock input to counter IC. Its four outputs are given as input to ULN chip. Q0 and Q2 outputs are given directly while Q2 & Q4 outputs are given through 2 C/O relay as shown. Outputs of ULN chip is connected with stepper motor coil. 

Operation: - 

  • Sending low logic on any data pin of LPT will turn on that opto-coupler.
  • It will send high op to input of ULN chip. That will switch on the relay.
  • When relay is switched on one of the resistor from R2 - R6 get connected to IC555 and it will start generating pulses.
  • Depending upon the resistor connected the op pulse frequency will be
  • Sr. No.

    Transistor

    Resistor

    Frequency

    RPM

    1

    Q1

    R2 = 6.8 K

    100 Hz

    30

    2

    Q2

    R3 = 9.1 K

    75 Hz

    25

    3

    Q3

    R4 = 10 K

    70 Hz

    20

    4

    Q4

    R5 = 15 K

    50 Hz

    15

    5

    Q5

    R6 = 20 K

    35 Hz

    10

  • Above table also shows the RPM of motor when one particular resistor is connected.
  • When 4017 receives this pulse input it will produce the output on Q0 - Q3 (1, 2, 3, 4) in this manner
  • Outputs

    1

    2

    3

    4

    1

    0

    0

    0

    0

    1

    0

    0

    0

    0

    1

    0

    0

    0

    0

    1

 

 

 

 

 

  • This sequence will rotate motor in one direction. To change the direction switch on 2 C/O relay. It will change the sequence
  • Outputs

    1

    2

    3

    4

    1

    0

    0

    0

    0

    0

    0

    1

    0

    0

    1

    0

    0

    1

    0

    0

 

 

 

 

 

  • So motor will start rotating in another direction.
  • Thus by switching relays K1 - K5 will change the RPM of motor and by switching 2 C/O relay will change the direction.

Software Section:-  

The figure given below shows application design.

 

There are total 6 buttons, 2 radio buttons, 3 group boxes, 3 static texts and 1 edit box. To set their properties please refer the table.

 

Sr. No.

Item

Property

Setting

1

Button

ID

Caption

IDC_STRT

Start Rotating

2

Button

ID

Caption

IDC_STP

Start Rotating

3

Button

ID

Caption

IDC_INC

Increase

4

Button

ID

Caption

IDC_DEC

Decrease

5

Button

ID

Caption

IDC_STR

Start

6

Button

ID

Caption

IDC_STOP

Stop

7

 Radio Button

ID

Caption

IDC_CLK

Clockwise

8

 Radio Button

ID

Caption

IDC_ACLK

Anticlockwise

8

Group Box

caption

Direction

9

Group Box

caption

Speed

10

Group Box

caption

Automatic reversible mode

11

Static Text

caption

RPM

12

Static Text

caption

Enter time in sec. :-

13

static Text

ID

caption

IDC_CNT

0

14

Edit Box

ID

IDC_TIME

 

After completing the design now we have to attach two variables with IDC_CNT and IDC_TIME. So open class wizard and open member variables. Click on particular ID and attach variables m_scnt of type CSring with IDC_CNT and m_itime of type int with IDC_TIME. Attach one more variable to dialog class of int type with name m_c.

 

Now for timer event we need to add one more ID to handle timer functions. For this open resource view and right click on resources and select resources symbols from popup menu. Click new and give IDC_CLK_TMR as name and 1 as value.

 

Now we have to attach function with each button as well as radio button. For this just double click on each button and leave the name of the function as it is just click OK. Then open class wizard select dialog ID and then select WM_TIMER event. Click on add function button.

 

Click here for coding part

All the projects are designed and developed by sight owner and they are thoroughly tested by him. ©Copyrights Ashutosh Bhatt 2008-09. All rights reserved.