Stepper motor driver circuit using pic




















Unipolar is easier to operate, control and also easier to get. We are using 28BYJ stepper motor for this project which is cheap and easily available. It is 5V DC unipolar stepper motor. Inside the motor there are two center tapped coils available. Red wire is the common for both which will be connected at VCC or 5V. Other 4 wires pink, red, yellow and blue will control the rotation depending on the electrical signal. Also, depending on the movement, this motor can be controlled using 3 steps. Full drive mode , Half Drive mode and Wave drive mode.

Full Drive: If two stator electromagnets are energized at a time, the motor will run at full torque referred as full-drive sequence mode. Half-Drive: When alternatively one and two phases are energized, the motor will run in half drive mode. Drawback is less torque produced in this movement. Wave Drive: In this mode, one stator electromagnet is turned on. Pc controlled stepper motor system using pic microcontroller is a system in which stepper motor position or angle is controlled through desk top computer or any laptop.

Currently, stepper motor has been used in several applications such as in antennas, telescope, hard disk drives, toys and in robotic industry.

If we see its applications then its driver circuit is also so much important for its precise movement. Lot of companies or peoples have been working on its driver circuit, some have offered the driver circuit but their driver circuit cost is so much high as well as not so much reliable and efficient. Here we have offered a system that is called a pc controlled stepper motor system.

This pc controlled stepper motor system is more reliable, compact, efficient, less costly and tells the motor speed more precisely as compared to other stepper motor driver circuits. This system is powered up with V ac and no need of any extra power supply or power adapter and could be used in different applications which are defined above. The block diagram of this system is shown in figure 1 with all their respective components.

The most used stepper motors have 7. We can think of a generic stepper motor as if it looks something like the figure below just an approximation for demonstration purposes only. The magnetic core gets attracted to whatever coil if it gets energized. The magnetic core will follow the stator rotating field in the same direction. At the first time instance, only coil-1 is activated and the rest are OFF. This will obviously result in a clockwise rotation for the stepper motor. The transition from a coil to another is called Full-Step.

In fact, there is a much smaller stepping mode for operating the same motor. A Unipolar stepper motor typically has one winding with a center tap per phase.

Each half of the winding is activated energized in each direction of the magnetic field. Activating each winding is a relatively simple process as the arrangement itself has a magnetic pole which can be reversed without polarity inversion switching the direction of the current flow. A typical timing diagram for a stepper motor coil activation sequence will look like the one shown below. A Bipolar stepper motor typically has only one winding per stator phase.

A two-phase bipolar stepper motor will obviously have 4 leads. There is no common lead for bipolar stepper motors, unlike the unipolar ones. However, each of these arrangements has its own advantages and drawbacks.

This is obviously due to the fact that the current passes through only half of the winding coil at a time. The bipolar stepper motors, on the other hand, are much harder to control and interface. You have to construct a polarity reversing driver circuitry e. H-Bridge which is a bit more complex to build. Motors, actuators, and other loads cannot be directly hooked to whatever microcontroller at any cost. If you still remember from tutorial4, that the maximum current that could be sourced or sunk by any IO pins is capped at 25mA.

It should also be connected to the power source required for driving the motor. Download Unipolar Stepper Motor Datasheet. The connection diagram for this chip is shown down below. If you have some issues doing so, you can always refer to the previous tutorial using the link below. And if you also find troubles creating this file, you can always refer to the previous tutorial using the link below. Now, open the main. Our task is to output the bit-pattern shown previously in order to make the stepper motor rotate a complete rotation in CW direction, then reverse the output bit-pattern in order to achieve a CCW rotation, and keep repeating this behavior.

Well, this could be done in a much simpler way. Only 2 LOC will do the hack. This ensures a glitch-free output line which is substantial for sensitive systems in particular. CW Rotation. Each consecutive 2-Steps are separated with a time delay called StepDelay. The following code will show you how we can implement these concepts in C. Which will result in the activation of each coil at a time exactly in the same order shown previously in this diagram. CCW Rotation. As shown below. The decimal value that corresponds to this bit-pattern is 8 which will be right-shifted to get the following patterns , and Now, plug this code in your main.

Cross your fingers! Hit the compile button! The schematic for this LAB is shown below.



0コメント

  • 1000 / 1000