Hi friends, Please help me as i am trying to make one motor driver through which 6v motor runs clock and anticlock wise.... I am using lcd, keypad, 89s52 and 2 irf9540n and 2 irf630n mosfETS. IRF9540N SOURCE PIN IS CONNECTED TO +5V AND DRAIN PIN TO MOTOR. IRF630N SOURCE PIN IS CONNECTED TO MOTOR AND DRAIN PIN TO GND.
sbit dc3=P3^3; //IRF630N sbit dc4=P3^4; //IRF630N sbit dc5=P3^5; //IRF9540N sbit dc6=P3^6; //IRF9540N
At initial stage the motor will be in stop position,
dc3=0;dc5=1; dc6=1;dc4=0;
As the button 1 is pressed from the keypad the motor runs clockwise for a specific time.
dc3=1;dc5=0; { msdelay(700); dc3=0;dc5=1; }
Now as the button 2 is presses from the keypad the motor runs anticlockwise for a specific time.
dc6=0;dc4=1; { msdelay(700); dc6=1;dc4=0; }
But the problem is output voltage is very low. i checked with the multimeter, i am getting near about 0.85v. due to which the motor is not able to run either clock or anticlock wise. it runs but at very very low speed. but when no load is connected its shows proper voltage of 5.10v. Is there any problem with my circuit and code. Please help me.
Interesting - the code you posted looks a lot like 8051 code for the C51 compiler. But you did select non-specific for the MCU architecture. Any good reason why you didn't want any reader to know if you are using the C51 compiler?
Next thing - you get too low voltage. For a well-working motor, you would expect the voltage drop to happen over the motor coils. When you now only see 0.85V, the logical next step would be to figure out why. Is it the supply that doesn't give out 6V? Or is there one - or both - of the transistors that should be "on" that shows a very significant voltage drop? And did you measure all four transistors to verify that all four of them are in the expected state? Did you also measure the gate voltage of all four transistors? And what does the datasheet say about how the transistors are expected to behave with that specific combination of source and gate voltages?
So, after having made the above measurements - what is your conclusions? In what way does your circuit deviate from how you planned it to behave? What would be a likely reason for that? What would be suitable changes to solve the problem?
Sorry... for not mentioning that i am using c51 compiler..... Actually dont know what thw problem is because when i disconnect my motor the voltage reading is 4.89v. but as i connect my motor the voltage drops down at 0.86v. thinking motor being damage.... i tried using n no's of motor... but the problem is tge same.
I see your progress hasn't been good - you still haven't managed to measure all the voltages I mentioned.
You think the police would ever manage to solve any crimes if they didn't focus on collecting evidence?
There are only two reasons possible for the low voltage - too high load on the power supply, or a large voltage drop over one or more transistors. And you haven't yet figured out how to get the voltmeter of yours to tell you which of the two alternatives it is. But you have had time to try a number of motors...
Haven't you yet considered that: 1) Your design uses four pins to control four transistors - which also means that your program may short-circuit the power supply if you open the two transistors that connects from plus to ground? A proper H-drive of a motor should not have an input combination that represents a full short-circuit of the power supply.
2) If your design doesn't supply the proper gate voltage, then the transistors will not open fully? And if they don't open fully, then they will have a high inner resistance and so give a very large voltage drop.