Posts

Showing posts with the label Stepper

FPGA RC Servo and Stepper motor control in Verilog

Image
For those interested in reproducing this example: The board is called “EP2C5 Mini Board” and has a EP2C5T144C8 Cyclone II FPGA on it I used a standard, 9grams micro RC Servo. I used a 28BYJ-48 stepper motor and it’s driver (you can purchase these as a bundle for very cheap on dealextreme or banggood) I used the free edition of Quartus II from Altera, version 13.0 SP 1 (be careful, later versions do not support Cyclone II FPGAs anymore) I created a simple project, pasted all this code as a single module (it would of course be cleaner to separate the RC Servo and stepper control code into independent modules) made the “Top level entity” in the General configuration page equal to “counter” (the name of my module) used the Pin Planner to assign the inputs/outputs as follows: [ ]

Stepper motor controller

Image
Description. Here is the circuit diagram of a simple stepper motor controller using only elementary parts. The driver circuit uses, four transistor (SL100) to drive the motor windings, two NOT gates and one XOR gate to decode the two bit control logic to drive the four windings of the motor. The diodes D1 to D4 protects the corresponding transistors from transients generated during the switching of motor windings. d0 and d1 are the control logics which determines the direction of rotation as well as speed. Circuit diagram with Parts list. Notes. The control logic for the circuit can be obtained from a 2 bit up/down counter clocked by a 555 astable multivibrator.The direction of count determines the direction of rotation and the frequency of astable multivibrator determines the speed of rotation. As shown in the schematic above, IC1a IC1b belongs to same IC 7404. Pin 14 and pin 7 of both IC1 and IC2 must be connected to +5 V and ground respectively, though it is not shown in circui...