Friday 29 July 2016

Stepper motor interfacing with 8051

Now I can show you "How to Interface Stepper motor with 8051 micro-controller using some logic's Click here to see the logic's. I miss two logic's on that link I will give below.



These two logic's are also used when the driver is used.Lets go the programming shown in given below

#include<reg51.h>
sbit w = P2^0;                        
sbit x = P2^1;                           // Motor pins assigned to port 2
sbit y = P2^2;                        
sbit z = P2^3;                        
sbit H = P1^0;                         // Home switch is connected to port 1, pin-0
sbit R_45 = P1^2;                    // Rotate_45 switch is connected to port 1, pin-2
sbit R_90 = P1^4;                                // Rotate_90 switch is connected to port 1, pin-4
sbit R_135 = P1^6;                              // Rotate_135 switch is connected to port 1, pin-6
sbit R_180 = P1^7;                              // Rotate_180 switch is connected to port 1, pin-7

                                                   
void Home()                                //  Motor "Home" function (Starting stage)
{
 w = 0;
 x = 1;
 y = 0;
 z = 1;
}

void Rotate_45()                          // Motor "Rotate 45 degree" function
{
 w = 0;
 x = 1;
 y = 0;
 z = 0;
}

void Rotate_90()                          // Motor "Rotate 90 deg" function
{
 w = 1;
 x = 1;
 y = 0;
 z = 0;
}

void Rotate_135()                         // Motor "Rotate 135 deg" function
{
 w = 1;
 x = 1;
 y = 1;
 z = 0;
}

void Rotate_180()                          // Motor "Rotate 180 degree" function
{
 w = 1;
 x = 0;
 y = 1;
 z = 0;
}

void main()                                         // Main function
{
  H = 0;                                              // Initialize all switches to zero
  R_45 = 0;
  R_90= 0;
  R_135 = 0;
R_180 = 0;
  while(1)
     {
         if(H==1)
             Home();                                
         else if(R_45==1)
             Rotate_45();
         else if(R_90==1)
             Rotate_90();
         else if(R_135==1)
          Rotate_135();
       else if(R_180==1)
          Rotate_180();
         else
             Home();
     }
}

Copy this program into Keil software and create hex file. Next do the same hardware connections  as shown in below using Proteus software.


 If you want detailed description see the below video. See you soon with future updates.


Wednesday 27 July 2016

Uni-polar stepper motor

This post is only useful to know the basics of uni-polar stepper motor. This is very useful basics of uni-polar stepper motor when it is interfaced with micro-controller. And this post only shows the how to control Uni-polar stepper motor logically. If you want to know about step angle of the stepper motor and formula Click this link.

                      Stepper motor having two types one is uni-polar and second one is bi-polar stepper motor. Here I explain about Uni-polar stepper motor. Below diagram  shows the difference between these two stepper motor.

                                   
As you seen in above diagram Uni-polar stepper motor having five terminals namely A, B(A'), C(B), D(B') and final one is connected to Ground terminals. When your connected to micro-controller these four terminals(A, B, C, D) are controlled logically and you get different Step Angles using different logic's. It seems like this


As you seen above figure A, B, C, D terminals are controlled logically by using Micro-controllers.
If logic-0 or logic-1 is applied to all four terminals then angle made by the stepper motor is 0 (Zero) deg. Similarly some logic's are their as shown in below table.


This different logic's will help to get different step angles, when stepper motor is interfacing with micro-controller this logic's are very helpful to get different step angles. I will show you in next post how to interfacing stepper motor with micro-controller using above logic's. 



  



Friday 8 April 2016

Bipolar-Stepper motor

In this post only for basics of Stepper Motor when you connect with micro-controller. Now quick start the basics of stepper motor with simple diagram, formula and logical operations for micro-controller.

Stepper motor having two types one is uni-polar and second one is bi-polar stepper motor. Here I explain about bi-polar stepper motor. Diagram of bi-polar stepper motor is shown below.


Bi-polar stepper motor means, it works doesn't depends upon input polarities. If you give right polarities motor rotate clock-wise direction otherwise it rotates anti-clock wise direction. 


            Now how to find out the step angle of given motor is very important aspect while driving a stepper motor. So to find the step angle is very easy by using simple formula show below.


This is main formula to find out the step angle by using number of teeth on rotor and stator. And multiply the step angle revolution with RPM and 60 you get Steps/second. Then coming to the logical operations, this operations are very useful when stepper motor is interfacing with micro-controller.


Bi-polar stepper motor having four terminals namely A, B, C, and D. When your connected to micro-controller these four terminals are controlled logically then only you can control the stepper motor with different Step Angles. If logic-0 or logic-1 is applied to all four terminals then angle made by the stepper motor is 0 (Zero) deg. Similarly some logic's are their as shown in below table.





This different logic's will help to get different step angles, when stepper motor is interfacing with micro-controller this logic's are very helpful for different step angles. If you want 180 deg angle with stepper motor use 0010 logic for two times get 180 deg step angle. Like these logic's are helpful.
If you want to know ' How to interface stepper motor with micro-controller ' see my next post. 
Thank you..


Saturday 2 April 2016

How to make PCB at home

PCB plays a vital role for making of Electronic chips, this is very useful to reduce the complexity while connecting the components. So now its time to go for making a PCB (Printed-Circuit Board) at your home by using very less equipment.
         Lets see the equipment required for making PCB at home.
             1. Copper Clad
             2. Ferric Chloride Anhydrous (FeCl3)
             3. Glossy or Photo paper
             4. PCB Cutter
             5. Dry Iron
             6. Hand Drill
             7. Scrubber
Step 1:-
          Clean the Copper Clad using scrubber.
Step 2:-
          Design circuit using some software's such as 'Eagle', 'Proteus' and so on, then print the circuit on glossy paper and it is also called photo paper. Here we use photo paper of 210 gsm (Gram per Square Meter).
Step 3:-
          Take the printed photo paper and placed on the copper clad and then iron it by using Dry-Iron then only the circuit tracks will print on copper clad. Do the ironing for 3 minutes.
Step 4:-
          Now clean the copper clad with some water to removed the photo paper.
Step 5:-
          Prepare FeCl3 solution for removing the unnecessary copper on the clad. For this solution we need FeCl3 power and water. Add a few FeCl3 powder and pour some water to get solution. Now put the copper clad in this solution and spread the solution over the clad.
Step 5:- 
          After complete this process take the PCB and clean with scrubber(if necessary). Then see the PCB their is tracks on it, this process is called 'Etching'
Step 6:-
          Now put the hole using Hand-drill where the components is placed on PCB.
Step 7:-
          After placing all components as per your circuit design and soldering it then check whether the circuit is closed or not. This is how to making a PCB at home.

If your not understand clearly then see the below video, it this video you can clearly understand the step-by-step procedure of making PCB at home.