A SMART WAY TO CONTROL STEPPER MOTOR
In this recent time microcontroller has become so popular that it is used widely to solve almost all kinds of engineering problems. Now this trending of using microcontrollers even in some kind of projects where there is no need for it. increases the cost of that project. So in terms of practical uses, that kind of project loses its importance for its high manufacturing cost and fewer features. Actually, we can easily can less the manufacturing cost for that kind of project by using some traditional methods. In this project, we are going to use one of the methods which most of you are familiar with for so many days.
First of all, here is our goal to control two stepper motor for a project. Now for that, we need some components. As we said earlier it has always been our goal to use the traditional methods to provide some smart solution so here we are not going to use any popular microcontroller. Components we need for our projects:
1. 1x battery 5V Logic Circuit
2. 1x battery Supply Voltage for Stepper Motor
3. 2x Capacitor 0.01 uF
4. 1x IC Quad 2-input XOR 4030
5. 1x IC A3967SLB Stepper Motor Driver
6. 1x IC 555 Timer
7. 1x IC 4-bit Comparator
8. 1x Resistor 3.9k
9. 1x Resistor 3k
10. 1x Resistor 1k
11. 2x 16 detent Rotary Encoder Hex Gray Code
12. Also, we are using a 16 detent encoder, so the driver is set to half –step, using the ms1 and ms2 pin which gives us 22.5 degrees per step, for better control and performance can be used 32 detent encoder.
Now you have to make the circuit connection as shown in the circuit diagram. we are now going to discuss the process through which this circuit works.
1. Here we use two rotary encoder switch, a stepper motor driver, some logic gates and a 555 timer to control the position of the stepper motor
2. At first, we have to set two encoder switches in such a way that one of them will control the rotation of the motor and another one will control the position from where the rotation will start.
CIRCUIT CONNECTION: Now to meet the above conditions you have to connect six XOR gate with the two encoder switch. You have to connect the first three XOR gate with the first encoder switch(S3) and three XOR gate will connect with the second encoder switch(S4). Now you have to connect both the outputs from the first encoder as well as a second encoder to the 4-bit comparator (here we use IC 4063 ). Now to complete the circuit connection you have to connect the outputs of the comparator to the 555 timers as well as with the Driver IC(here we use A3967SLB) followed by the given circuit diagram.
HOW IT WORKS: If encoders are got some rotation they are going to produce some gray code .we We convert this gray code into binary code using the XOR gates used in the circuit, then the comparator (IC 4063) will compare the resulting binary code comes from each of the encoders. After comparing two binary codes from two encoders the comparator will check if they are equal or which of them is greater. If the result is equal then nothing going to happen about the rotation of the motor and if the result is not equal then the comparator will decide which one is greater and according to that the grater one it will indicate the direction of rotation. For better understanding if you look at the circuit you can check this as you can see there in comparator two binary code is indicated as A and B.If A=B then it will not going to act on the rotation of the motor and if A>B then it will going to act on driver IC to make a rotation of the motor and if it is A<B then it also going to act on the driver to make a rotation opposite to the first one. But if we want to make single directional rotation then we have disconnected this output. So by the above three conditions, we are decided that encoder switch S3 is set for or going to responsible for the direction of the rotation of the motor, and the encoder switch S4 is going to responsible for the position from where the rotation will start.
Now if the control encoder is rotated clockwise wise this will give us an increase in our gray number. Now the comparator will detect this and if it is greater than the other encoder then it will set the direction to the rotation of the motor and the motor will rotate until both gray codes become the same.
If we rotate the encoder anti-clockwise this will give us a decrease in our gray number and if this number will inferior to the other encoder then the comparator will set the direction to the rotation, opposite to the previous one. Then the motor will rotate until the number are equal that will deactivate the 555 timer that is the one that indicates the driver to rotate the motor.
First of all, here is our goal to control two stepper motor for a project. Now for that, we need some components. As we said earlier it has always been our goal to use the traditional methods to provide some smart solution so here we are not going to use any popular microcontroller. Components we need for our projects:
1. 1x battery 5V Logic Circuit
2. 1x battery Supply Voltage for Stepper Motor
3. 2x Capacitor 0.01 uF
4. 1x IC Quad 2-input XOR 4030
5. 1x IC A3967SLB Stepper Motor Driver
6. 1x IC 555 Timer
7. 1x IC 4-bit Comparator
8. 1x Resistor 3.9k
9. 1x Resistor 3k
10. 1x Resistor 1k
11. 2x 16 detent Rotary Encoder Hex Gray Code
12. Also, we are using a 16 detent encoder, so the driver is set to half –step, using the ms1 and ms2 pin which gives us 22.5 degrees per step, for better control and performance can be used 32 detent encoder.
Now you have to make the circuit connection as shown in the circuit diagram. we are now going to discuss the process through which this circuit works.
1. Here we use two rotary encoder switch, a stepper motor driver, some logic gates and a 555 timer to control the position of the stepper motor
2. At first, we have to set two encoder switches in such a way that one of them will control the rotation of the motor and another one will control the position from where the rotation will start.
CIRCUIT CONNECTION: Now to meet the above conditions you have to connect six XOR gate with the two encoder switch. You have to connect the first three XOR gate with the first encoder switch(S3) and three XOR gate will connect with the second encoder switch(S4). Now you have to connect both the outputs from the first encoder as well as a second encoder to the 4-bit comparator (here we use IC 4063 ). Now to complete the circuit connection you have to connect the outputs of the comparator to the 555 timers as well as with the Driver IC(here we use A3967SLB) followed by the given circuit diagram.
HOW IT WORKS: If encoders are got some rotation they are going to produce some gray code .we We convert this gray code into binary code using the XOR gates used in the circuit, then the comparator (IC 4063) will compare the resulting binary code comes from each of the encoders. After comparing two binary codes from two encoders the comparator will check if they are equal or which of them is greater. If the result is equal then nothing going to happen about the rotation of the motor and if the result is not equal then the comparator will decide which one is greater and according to that the grater one it will indicate the direction of rotation. For better understanding if you look at the circuit you can check this as you can see there in comparator two binary code is indicated as A and B.If A=B then it will not going to act on the rotation of the motor and if A>B then it will going to act on driver IC to make a rotation of the motor and if it is A<B then it also going to act on the driver to make a rotation opposite to the first one. But if we want to make single directional rotation then we have disconnected this output. So by the above three conditions, we are decided that encoder switch S3 is set for or going to responsible for the direction of the rotation of the motor, and the encoder switch S4 is going to responsible for the position from where the rotation will start.
Now if the control encoder is rotated clockwise wise this will give us an increase in our gray number. Now the comparator will detect this and if it is greater than the other encoder then it will set the direction to the rotation of the motor and the motor will rotate until both gray codes become the same.
If we rotate the encoder anti-clockwise this will give us a decrease in our gray number and if this number will inferior to the other encoder then the comparator will set the direction to the rotation, opposite to the previous one. Then the motor will rotate until the number are equal that will deactivate the 555 timer that is the one that indicates the driver to rotate the motor.

Comments
Post a Comment