Hi everyone. I know this is a bit long but please bare with me and try to help
I am working on a project in which I have to control the steering mechanism of a car so that it is driven without a human driver and is controlled remotely. I have installed a geared DC motor at the steering shaft and when I connect the motor directly to the battery, it easily rotates the steering in both directions. Then I built an H-bridge circuit so that the motion of the motor can be controlled through a PIC 16F877. I used TC4427 MOSFET Drivers as well and everything was working fine. The thing is I was always switching either phase of the H-bridge fully (100% duty cycle) and the motor always rotated fine. I got feedback of the steering position through a linear sliding potentiometer that moves with the rack of the steering mechanism and so I had on/off (or bang-bang) control (if there is an error in position, rotate the motor at full speed until it gets to the desired position). I am now attempting to improve the controlling technique (make it more professional!) by trying to program a PID controller instead of on/off control. This means that I have to obtain a mathematical model of the system as a whole and then find a suitable controller for it by designing it with MATLAB. Since there are many unknown parameters in this system (like friction, inertia,....), I wanted to devise an experiment in which I would give the system a step input and then capture the output and apply these input/output relationships to the the system identification toolbox in MATLAB. So I adjusted the program on my PIC so that I can choose to give 3 values of duty cycles (100%, 75%, and 50%) to represent three different step inputs of voltages to the motor and in each case I would note the response. I tested the system with LEDs instead of the motor first and everythign was fine (the brightness of the LED changes with the duty cycle) and then I connected the motor for the real thing! At 100% duty cycle, everything was fine as before. But whenever I switch to either 75% or 50% duty cycle, the motor struggles to move the steering (as if it is trying real hard) and it is very slow and then all of a sudden, my H-bridge MOSFETs get cooked! (there is smoke and sometimes even light!). I can't understand why this is happening. At a lower duty cycle, the motor should have a lower voltage and hence lower current, so I understand that it will be weaker and slower. But why do the MOSFETs get damaged? Is it trying to draw too much current? But the voltage is lower than before now (by 75% and 50%). And some other weird thing happens. When I connect the motor to the H-bridge, I also keep the LEDs as another load so that I know in which direction the motor is turning depending on which LED is on. But when the motor tries to move at 75% or 50 % duty cycle, both LEDs appear to be on at the same time and then there is smoke out of the circuit!
Please help! I know my system was fine the way it was (on/off control) but I would really like to design a propper position controller for it. Even if the motor cannot move the load at less than the full voltage, then I wouldn't mind staying with the old controller but I would really really love to know what is going on here! Please note that the motor is rated at 11 amps. The MOSFETs I'm using are the IRF640N (N-channel) and the IRF9540N (P-channel). Thank you very much. I appreciate your help.
Nichola Victor Abdo
I am working on a project in which I have to control the steering mechanism of a car so that it is driven without a human driver and is controlled remotely. I have installed a geared DC motor at the steering shaft and when I connect the motor directly to the battery, it easily rotates the steering in both directions. Then I built an H-bridge circuit so that the motion of the motor can be controlled through a PIC 16F877. I used TC4427 MOSFET Drivers as well and everything was working fine. The thing is I was always switching either phase of the H-bridge fully (100% duty cycle) and the motor always rotated fine. I got feedback of the steering position through a linear sliding potentiometer that moves with the rack of the steering mechanism and so I had on/off (or bang-bang) control (if there is an error in position, rotate the motor at full speed until it gets to the desired position). I am now attempting to improve the controlling technique (make it more professional!) by trying to program a PID controller instead of on/off control. This means that I have to obtain a mathematical model of the system as a whole and then find a suitable controller for it by designing it with MATLAB. Since there are many unknown parameters in this system (like friction, inertia,....), I wanted to devise an experiment in which I would give the system a step input and then capture the output and apply these input/output relationships to the the system identification toolbox in MATLAB. So I adjusted the program on my PIC so that I can choose to give 3 values of duty cycles (100%, 75%, and 50%) to represent three different step inputs of voltages to the motor and in each case I would note the response. I tested the system with LEDs instead of the motor first and everythign was fine (the brightness of the LED changes with the duty cycle) and then I connected the motor for the real thing! At 100% duty cycle, everything was fine as before. But whenever I switch to either 75% or 50% duty cycle, the motor struggles to move the steering (as if it is trying real hard) and it is very slow and then all of a sudden, my H-bridge MOSFETs get cooked! (there is smoke and sometimes even light!). I can't understand why this is happening. At a lower duty cycle, the motor should have a lower voltage and hence lower current, so I understand that it will be weaker and slower. But why do the MOSFETs get damaged? Is it trying to draw too much current? But the voltage is lower than before now (by 75% and 50%). And some other weird thing happens. When I connect the motor to the H-bridge, I also keep the LEDs as another load so that I know in which direction the motor is turning depending on which LED is on. But when the motor tries to move at 75% or 50 % duty cycle, both LEDs appear to be on at the same time and then there is smoke out of the circuit!
Please help! I know my system was fine the way it was (on/off control) but I would really like to design a propper position controller for it. Even if the motor cannot move the load at less than the full voltage, then I wouldn't mind staying with the old controller but I would really really love to know what is going on here! Please note that the motor is rated at 11 amps. The MOSFETs I'm using are the IRF640N (N-channel) and the IRF9540N (P-channel). Thank you very much. I appreciate your help.
Nichola Victor Abdo