Hardware Development - Motor
It has been a month since I’m working on the motor but the outcome is not as expected. I decided to get some help from my Supervisor. In the beginning, we tried to alter the program by inversing the input bit (motor sequence) and varying the delay of the sequence. Then we interface the PIC to LEDs to check the motor sequence but still it did not work. We measured the output but the value seems very weird. For example, we send logic 0 but the output voltage is 4.85V which is a high. After a few attempts and troubleshooting, finally the LEDs start to blink and producing sequence of motor. Syukur Alhamdulillah, finally it works! We find out that the major problem is the GROUND connection on SK40C is not connected. As a result, the output from PIC is floating. The LED did not work because the polarity is wrong. The output from PIC is active low, so the +5V should be connected to the cathode of the LED.
Since the program works on the LEDs, I decided to test it with motor. However, this time I’m using a ULN2003A (High-Voltage High-Current Transistor Array) as the motor driver. ULN2003A is a very simple driver. It doesn’t need any external components and the connection is very straightforward. The motor spins very well at the first attempt.
Motor driver circuit using ULN2003A |
The above video shows the rotation of stepper motor. The speed of the processor is too fast therefore after a while the LED cannot capture the instruction and it did not blink. You can see the blinking of the LEDs in the video below. The LEDs represent the sequence of motor rotation.
ULN2003A rated output current is 500 mA per driver and can withstand peak current of 600 mA while the Sanyo Denki stepper motor requires current 1A per phase. Therefore, to increase the output current, the output can be connected in parallel (refer to datasheet ULN2003A). Theoretically, if the circuit is connected in parallel, the total current will be the sum of current in each branch. In this case, the current from output 1 which is 500 mA plus with the current from output 2 of 500 mA will produce an output current of 1A. Each motor needs 4 inputs and 4 outputs thus, to make a parallel connection I need 8 inputs and 8 outputs. However, ULN2003A only has 7 inputs and 7 outputs. Therefore, 2 units of ULN2003A are needed for each motor.
Motor driver circuit using 2 units of ULN2003A |
No comments:
Post a Comment