Step motor module project is described as a series of "mini"-project to develop a fully functional step motor module. Steps and requirements employed in each iteration have been selected as a natural evolution of the design, although it is possible to exchange several of the steps without trouble. Each new step contains the first four stages it must be followed when carrying out a project in a VHDL design: Requirements, Design, Implementation and Test. Further VHDL project development incurs in hardware implementation: Pin out selection and Programming. Due to the minimal variation between the different steps used in the Step Motor Module, these later stages are only used during first and last step in the project. Basic Step Motor Module Requirements Implement a module capable to control a step motor clockwise rotation using full-step encoding. Rotation is triggered by edge detection on the control signal. A reset signal (low active) is included to reset the motor encoding to a known position. All designs are meant to be tested using the following hardware: - Altera's DE2 Board : Course FPGA Boards - Step Motor Engine : Engine Datasheet - Buffer Board : Chip Datasheet Design Design is presented in figures 1 to 3. Click on figure to enlarge it. Implementation Test Simulated testbench is provided in figure 1b. Figure 1b: Testbench simulation for Basic step motor module Testbench file is provided:Testbench file v1 Pin out selection Selected pins have been chosen for Altera's DE2 development board. Pins are:
(1) It was used edge detector in design. Programming Due to the transfer relationship between wheels within the step motor engine, it is not advisable to record a video. Eventhough, it is still possible to test its performance. Figure 1c: Picture on downloaded design Please refer to video on last implementation to see it working with a step generator module. Clockwise and Counter-Clockwise Step Motor Module Requirements Enhance previous module with the capability to change rotation direction. Design Design in presented in figure 3. Click on figure to enlarge it. Figure 4: Updated CC1 of Basic step motor module Implementation Test Simulated testbench is provided in figure 4b. Figure 4b: Testbench simulation for enhanced Basic step motor module Testbench file is provided:Testbench file v2 Output Inhibit Step Motor Module Requirements Enhance previous module with the capability to deactivate output signal. This is suitable when it is desired to move the motor without effort, otherwise coils in motor would force a determined position. Design Design is presented in figures 5 and 6. Click on figures to enlarge them. Implementation Test Simulated testbench is provided in figure 5b. Figure 5b: Testbench simulation for enhanced Basic step motor module Testbench file is provided:Testbench file v3 Final Step Motor Module Requirements Finally, a multi-rotation mode is added. Controlled by an external signal, the step motor should be capable to rotate either Full-Step or Half-Step. Bear in mind the next step to take on rotation when mode has been shifted. Design Figure 7 presents the updated CW rotation flow diagram. Similarly, it should be updated Counter Clockwise branch. Once the design is complient, output combinational circuit should accomodate the new output values as shown in figure 8. Implementation Test Simulated testbench is provided in figure 7b. Figure 7b: Testbench simulation for Final step motor module Testbench file is provided:Testbench file v4 Pin out selection Selected pins have been chosen for Altera's DE2 development board. Pins are:
(1) It was used edge detector in design. Programming Following video presents design in action once it has been downloaded to Altera's DE2 development board. Video 1: Demostration on design performance A complete project is provided in a zip file. Bear in mind that the project contains all modules already developed in previous sections as well as several modules/constraints to manage them. Presented video has been taken using the enhanced project. Other developed modules In order to properly test the step motor modules, it has been designed additional modules as well as a wrapper to hold all design presented. The source code for those files is provided: - Edge detector : Edge Detector - Step generator: Step Generator - CSD project: CSD Project It is not intended to provide , as it has already been presented in the videos. The reader might find necessary to study and adapt the code to their needs. Pins assigned for Altera's DE2 development board are provided:
(1) It was used edge detector in design.
|