- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
I'm trying to run a 12 V, 0.6 A unipolar stepper motor from PSoC4 using 4 MOSFETs. The problem is that the motor doesn't rotate, it seems that nothing happens.
It is 6 wires stepper motor and I determined the middle wires for the each coil and connected them to 12 V. Other 4 wires are connected to 4 N-channel MOSFETs. I use four 100 ohm gate resistors and four 2.2 k resistors as pull down resistors, as shown on the schematic. I wasn't sure how to calculate values for the gate and pull down resistors, maybe I use too big resistors? Is there any formula how to calculate these values?
I use IRF630 MOSFETs and I'm not sure can I drive them from PSoC4?
Code is quite simple:
#include "project.h"
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
int currentState = 0;
for(;;)
{
/* Place your application code here. */
switch (currentState){
case 0:
Pin_1_Write (1);
Pin_2_Write (0);
Pin_3_Write (0);
Pin_4_Write (0);
break;
case 1:
Pin_1_Write (0);
Pin_2_Write (1);
Pin_3_Write (0);
Pin_4_Write (0);
break;
case 2:
Pin_1_Write (0);
Pin_2_Write (0);
Pin_3_Write (1);
Pin_4_Write (0);
break;
case 3:
Pin_1_Write (0);
Pin_2_Write (0);
Pin_3_Write (0);
Pin_4_Write (1);
break;
}
if (currentState < 4)
{
currentState++;
}
else
{
currentState = 0;
}
CyDelay (100);
}
}
/* [] END OF FILE */
- Tags:
- mosfet
- stepper-motor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
It seems like the the resistor to the source is large. I think the stepper motor is specified for 600mA, with this resistor the maximum current which can pass through the stepper is less than 5mA.
Please refer the stepper motor reference design.
Thanks
Jobin GT