I have a confusing one. I dont have any diagrams to show atm, but basicly;
I have 4 MOSFET's being controlled from 4 digital pins from an arduino UNO, which ground the connected wire from a 6 wire stepper motor.
The problem i'm having is when i run my code, which sets one of the pins HIGH and the other 3 LOW then has a delay of about 100ms, then repeats with the next pin HIGH and others LOW, only 3 out of the 4 mosfets seem to switch on.
I have tried changing arduinos, changing output pins, mosfets, stepper motors which no luck.
I know i have not put any diagrams or any specs but i dont have any atm but any pearls of wisdom would be apperciated
Here is my code. I have swapped out the 4 mosfets with a darlington array chip that has no trouble working but isnt rated to the stepper motors current, hence the reason for using mosfets.
int motorPin1 = 10; //Brown
int motorPin2 = 11; //Orange
int motorPin3 = 12; //Red
int motorPin4 = 13; //White
int delayTime = 500;
void setup() {
No, those MOSFETs have a Vgs max/min of +/-30V if you look at the abs-max-ratings.
They have a gate threshold voltage of between 3 and 5V - if you look carefully thats the gate voltage at which 250uA can flow between source and drain. Typically a MOSFETisn't "on" till the Vgs is several volts above threshold - in fact the threshold tells you the off-point not the on-point.
If you look at the Rds(on) rating its given for Vgs=10V - this is the clear indication that its not logic-level. Logic-level MOSFETs always have the Rds(on) given for Vgs=4.5V (sometimes lower). Data sheets usually say "logic level" if its logic level as well - particularly for TO220 packages since its not the normal case.
Ok, should have looked more closely at the datasheet. I have had them switching on and working from these MOSFETS using the 5v outputs though, its just odd that it will work for 3 of the pins/mosfets but not the 4th on (but the pin/mosfet that doesnt work has changed to another for no reason that i can see?)
rarts:
Ok, should have looked more closely at the datasheet. I have had them switching on and working from these MOSFETS using the 5v outputs though, its just odd that it will work for 3 of the pins/mosfets but not the 4th on (but the pin/mosfet that doesnt work has changed to another for no reason that i can see?)
Yes, you need to use logic level mosfets. Look over this data sheet and see the difference is gate voltage specs compared to what you are trying to use:
In general if you don't know where the problem lies then provide all the detail you can (datasheets/schematic/board/code/power supply details)... The threshold thing with FETs is a common issue with newcomers to circuitry, but datasheet authors are writing for people who've understand the basic principle of operation of things like transistors...