failing mosfets, diodes, and caps while attempting brush dc motor speed control

Hi everyone, I've been building a quad rotor drone using an Arduino Uno and 4 brushed DC motors. Logic level N-channel MOSFETs provide the speed control.

Problem is my mosfets keep shorting out and sending full power to the motors (which is kinda terrifying when it happens and results in having to replace the mosfet). Also my capacitors and freewheel diodes soldered onto the motor terminals keep exploding. Looks like I could use some help setting up my speed control circuit to the motors, and the back EMF protection circuit. And I would like to rule out the possibility that my programming is causing these meltdowns. I will describe my setup in as much detail as possible below.

Arduino Uno interprets signal from RC reciever, uses signal to output 4 independent PWM signals.

The PWM outputs range from 0 to 255 and trigger 4 mosfets (IRLB8743). There are no resistors between the arduino output and the mosfet gate. Each mosfet has a 10k ohm resistor between the gate and source.

The motors are brushed DC salvaged from airsoft guns, have been seen drawing > 10amps each, and 2 of the 4 are wired to reverse polarity so they spin in the required directions. There was a (IN4004) diode soldered across each of the motor terminals with the marked stripe facing the positive side of the power to the motor. A capacitor (H414) 100uf, 50v, was also soldered to each of the motor terminals, to the correct polarity (+ on cap to +input power to motor).

The battery pack is 14.8v @ 9ah (Li-Ion). Battery voltage drops to approx 11v while powering all 4 motors on high, voltage returns to approx 16v when load is removed.

The entire system worked great and consistently during months of testing. Then I changed 2 things and stuff began to melt down and explode.

1) I added a large variety of functions to the arduino's sketch (arguments for steering and tilt and whatnot). However I believe the arduino is still outputting PWMs of 4.4v on a 0-255 duty cycle to the mosfets at all times.

2) I added larger propellers to the motors, causing them to draw more amperage.

My mosfets generate a lot of heat even when I'm only applying a small duty cycle to them, they short out after a certain point too. Ive tried heavier freewheel diodes which seem to be holding now. Various sizes and types of capacitors keep exploding, some just melt the leads off. Note the mosfets seem to run cooler with larger capacitors on the motors.

So...any ideas on how to stop this circuit from melting would be much appreciated, thanks in advance :)

You are trying to use the capacitors as snubbers? Good idea but a snubber needs a resistor too. The plain capacitor on its own will draw too much current. Increase the voltage rating of the cap - I think they are seeing spikes of more than 50V.

Are the failures more common on the two reversed motors? Many DC motors have the brushes set up to prefer rotation in one direction and reversing them will damage the brushes.

At these kinds of power levels, I would expect to see more attention paid to driving the MOSFET gates properly. A MOSFET driver is not expensive and usually very easy to wire up by following the datasheet. That will control the switch-on and switch-off characteristics of the MOSFET much better than just the power that the Arduino pin can deliver. This will help them run cooler at lower power settings.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Also a picture of your project so we can see your component layout?

With such high currents is your power supply wiring as direct to the battery as possible?
It is very important.

Have you written some simple code to just drive one motor with a potentiometer control so you can do some circuit voltage checking?

Do you have fuses in the power leads to your MOSFETs, your LIpo can, as you have found, supply more current than your load should be consuming.

Tom… :slight_smile:

Twist3dBiscuit: Hi everyone, I've been building a quad rotor drone using an Arduino Uno and 4 brushed DC motors. Logic level N-channel MOSFETs provide the speed control.

Problem is my mosfets keep shorting out and sending full power to the motors (which is kinda terrifying when it happens and results in having to replace the mosfet). Also my capacitors and freewheel diodes soldered onto the motor terminals keep exploding. Looks like I could use some help setting up my speed control circuit to the motors, and the back EMF protection circuit. And I would like to rule out the possibility that my programming is causing these meltdowns. I will describe my setup in as much detail as possible below.

The caps across the motors should be 10 to 100nF at most and must be ceramic.

Arduino Uno interprets signal from RC reciever, uses signal to output 4 independent PWM signals.

The PWM outputs range from 0 to 255 and trigger 4 mosfets (IRLB8743). There are no resistors between the arduino output and the mosfet gate. Each mosfet has a 10k ohm resistor between the gate and source.

The motors are brushed DC salvaged from airsoft guns, have been seen drawing > 10amps each, and 2 of the 4 are wired to reverse polarity so they spin in the required directions. There was a (IN4004) diode soldered across each of the motor terminals with the marked stripe facing the positive side of the power to the motor. A capacitor (H414) 100uf, 50v, was also soldered to each of the motor terminals, to the correct polarity (+ on cap to +input power to motor).

100uF is completely insane. Yes, they will blow up the MOSFETs and themselves as the surge currents will be absolutely huge. Large capacitance like that needs to decouple the supply rail only.

Also 1N4004 isn't really up to the current levels of those motors. Get a 10A diode. The diode should really be between the MOSFET drain and the +ve supply rail where the decoupling capacitors are, not across the motor terminals.

The battery pack is 14.8v @ 9ah (Li-Ion). Battery voltage drops to approx 11v while powering all 4 motors on high, voltage returns to approx 16v when load is removed.

You are severely overloading the battery pack if the voltage drop is 30%

The entire system worked great and consistently during months of testing. Then I changed 2 things and stuff began to melt down and explode.

1) I added a large variety of functions to the arduino's sketch (arguments for steering and tilt and whatnot). However I believe the arduino is still outputting PWMs of 4.4v on a 0-255 duty cycle to the mosfets at all times.

2) I added larger propellers to the motors, causing them to draw more amperage.

My mosfets generate a lot of heat even when I'm only applying a small duty cycle to them, they short out after a certain point too. Ive tried heavier freewheel diodes which seem to be holding now. Various sizes and types of capacitors keep exploding, some just melt the leads off. Note the mosfets seem to run cooler with larger capacitors on the motors.

Those devices are 3 milliohm, with 10A load they should not get hot at all. I suspect the peak currents are a lot higher than 10A. You must not put large capacitors across the motor terminals, its completely the wrong thing to do. What PWM frequency are you using? Perhaps you have a high frequency of PWM in which case you will not get away with driving the MOSFETs direct from a puny Arduino pin, but must use a MOSFET driver chip with decent output current levels.

So...any ideas on how to stop this circuit from melting would be much appreciated, thanks in advance :)

MorganS: You are trying to use the capacitors as snubbers? Good idea but a snubber needs a resistor too. The plain capacitor on its own will draw too much current. Increase the voltage rating of the cap - I think they are seeing spikes of more than 50V.

Yes they are directly off the terminals, but how would the capacitor see a voltage spike if it only has access to the power supplied to it by the mosfet...which is a regulated duty cycle of my battery power? (Ill be posting my wiring diagram shortly)

MorganS: Are the failures more common on the two reversed motors? Many DC motors have the brushes set up to prefer rotation in one direction and reversing them will damage the brushes.

Yes, the 2 reversed motors failed first, Ill test the correct polarity ones and confirm they still operate correctly. The brushes have a slight curve where they contact the commutator but this curve appears to be symmetrical. Is there a chance there could be diodes or other circuitry inside this motor making the polarity more relevant?

MorganS: At these kinds of power levels, I would expect to see more attention paid to driving the MOSFET gates properly. A MOSFET driver is not expensive and usually very easy to wire up by following the datasheet. That will control the switch-on and switch-off characteristics of the MOSFET much better than just the power that the Arduino pin can deliver. This will help them run cooler at lower power settings.

Never heard of a mosfet driver ill look into that. I did notice that the arduino is putting out 4.4v from the output pins, and the gate threshold voltage for this mosfet is 1.35vmin and 2.35vmax, so would 4.4v to the gate damage the mosfet? Or am I looking at the wrong stat for that info. (Sorry I researched mosfet datasheets and how to interpret them...didnt understand it very well).

TomGeorge:
Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

//SIGNAL INPUT CHANNELS
const int sig_in_thro=2;
const int signal_in_ch1=3;
const int signal_in_ch2=4;
const int signal_in_ch3=11;

//DECLARE CONTROL OUTPUT CHANNELS, SPEED VARIABLES FOR EACH, AND TRIM VALUES FOR EACH
const int FR_ctrl=5;
int FR_speed=0;
int FR_trim=0;
const int RR_ctrl=6;
int RR_speed=0;
int RR_trim=0;
const int RL_ctrl=9;
int RL_speed=0;
int RL_trim=0;
const int FL_ctrl=10;
int FL_speed=0;
int FL_trim=0;

//DECLARE THE SIZE OF DUTY CYCLES, 255 IS STANDARD UNLESS MODIFIED FOR HIGH SPEED PW
int min_duty=-255;
int max_duty=255;

//DECLARE RANGE OF PW SIGNAL COMING IN FROM RECIEVER
int max_pw=1900;
int min_pw=1050;

//DECLARE THROTTLE, TILT, ROTATION, AND STRAFF INITIAL VALUES, SETUP INITIAL VALUES FOR AVERAGING ARRAYS
int thro_speed=0;
int min_thro=-225;
int max_thro=225;
int initial_thro_speed=0;
int ch0;
int ch0_speed=0;

int rot_speed=0;
int i_rot_speed=0;
int min_rot=-25;
int max_rot=25;
int ch1;
int ch1_speed=0;

int tilt_speed=0;
int i_tilt_speed=0;
int min_tilt=-25;
int max_tilt=25;
int ch2;
int ch2_speed=0;

int straff_speed=0;
int i_straff_speed=0;
int min_straff=-25;
int max_straff=25;
int ch3;
int ch3_speed=0;

//BUFFER SETTING DISTANCE BETWEEN MINIMUM AND MAXIMUM VALUES
int speedBuff = 10;
int speedBuff2 = 4;

//DECLARE VALUES FOR STANDBY PERIOD BEFORE EXECUTION
int stand_by = 0;              //set stand by time to beginning
int stand_by_time = 20;        //number of steps to stand by before outputting control signals
int d_time = 1;                //delay time after one complete step

//DECLARATION OF SIGNAL AVERAGING SYSTEM VARIABLES, 1 NUMBER SET PER AVERAGE
const int numReadings = 2;       //number of signals averaged together, affects all number sets
int readIndex = 0;               //starts array at 0...naturally
int readings0[numReadings];      // the readings from the input
int total0 = 0;                  // the running total
int average0 = 0;                // the average
int curr_pulse0=0;

const int numReadings1 = 2;       //number of signals averaged together, affects all number sets
int readIndex1 = 0;               //starts array at 0...naturally
int readings1[numReadings1];      // the readings from the input
int total1 = 0;                  // the running total
int average1 = 0;                // the average
int curr_pulse1=0;

const int numReadings2 = 2;       //number of signals averaged together, affects all number sets
int readIndex2 = 0;               //starts array at 0...naturally
int readings2[numReadings2];      // the readings from the input
int total2 = 0;                  // the running total
int average2 = 0;                // the average
int curr_pulse2=0;

const int numReadings3 = 4;       //number of signals averaged together, affects all number sets
int readIndex3 = 0;               //starts array at 0...naturally
int readings3[numReadings3];      // the readings from the input
int total3 = 0;                  // the running total
int average3 = 0;                // the average
int curr_pulse3=0;

//SETUP PROCESS, PIN I/O VALUES AND SUCH
void setup()
{
//DECLARE INPUT AND OUTPUT PINS
pinMode(sig_in_thro,INPUT);
pinMode(signal_in_ch1,INPUT);
pinMode(signal_in_ch2,INPUT);
pinMode(signal_in_ch3,INPUT);
pinMode(FR_ctrl,OUTPUT);
pinMode(RR_ctrl,OUTPUT);
pinMode(RL_ctrl,OUTPUT);
pinMode(FL_ctrl,OUTPUT);

//BEGIN SERIAL COMMUNICATION
Serial.begin(9600);

//CREATE AN ARRAY FOR EACH AVERAGING NUMBERSET
for (int thisReading0 = 0; thisReading0 < numReadings; thisReading0++) {readings0[thisReading0] = 0;}
}
//BEGIN THE LOOP SCRIPT AFTER SETUP
void loop()
{
//AVERAGE CHANNEL 0, DEFINE  VALUE FOR ch0
curr_pulse0=pulseIn(sig_in_thro,HIGH,40000);
total0 = total0 - readings0[readIndex];
readings0[readIndex] = curr_pulse0;
total0 = total0 + readings0[readIndex];
average0 = total0 / numReadings;
ch0=average0;

//AVERAGE CHANNEL 1, DEFINE  VALUE FOR ch1
curr_pulse1=pulseIn(signal_in_ch1,HIGH,40000);
total1 = total1 - readings1[readIndex1];
readings1[readIndex1] = curr_pulse1;
total1 = total1 + readings1[readIndex1];
average1 = total1 / numReadings1;
ch1=average1;

//AVERAGE CHANNEL 2, DEFINE  VALUE FOR ch2
curr_pulse2=pulseIn(signal_in_ch2,HIGH,40000);
total2 = total2 - readings2[readIndex2];
readings2[readIndex2] = curr_pulse2;
total2 = total2 + readings2[readIndex2];
average2 = total2 / numReadings2;
ch2=average2;

//AVERAGE CHANNEL 3, DEFINE  VALUE FOR ch3
curr_pulse3=pulseIn(signal_in_ch3,HIGH,40000);
total3 = total3 - readings3[readIndex3];
readings3[readIndex3] = curr_pulse3;
total3 = total3 + readings3[readIndex3];
average3 = total3 / numReadings3;
ch3=average3;

//CYCLE THE ARRAY INDEXES FOR AVERAGING
readIndex = readIndex + 1;
if (readIndex >= numReadings) {readIndex = 0;}

readIndex1 = readIndex1 + 1;
if (readIndex1 >= numReadings1) {readIndex1 = 0;}

readIndex2 = readIndex2 + 1;
if (readIndex2 >= numReadings2) {readIndex2 = 0;}

readIndex3 = readIndex3 + 1;
if (readIndex3 >= numReadings3) {readIndex3 = 0;}


//ASSIGN FUNCTION VALUE BASED ON AVERAGE
//if (ch0 <= max_pw and ch0 >= min_pw)
{
thro_speed=map(ch0,min_pw,max_pw,min_thro,max_thro);
initial_thro_speed=thro_speed;
if (thro_speed >= (max_thro-speedBuff)) {thro_speed = max_thro;}
if (thro_speed <= (min_thro+speedBuff)) {thro_speed = min_thro;}
if (abs(thro_speed) <= (speedBuff*1.5)) {thro_speed = 0;}
}
//else
//{thro_speed = 0;}

//if (ch1 <= max_pw and ch1 >= min_pw)
{
rot_speed=map(ch1,min_pw,max_pw,min_rot,max_rot);
i_rot_speed=rot_speed;
if (rot_speed >= (max_rot-speedBuff2)) {rot_speed = max_rot;}
if (rot_speed <= (min_rot+speedBuff2)) {rot_speed = min_rot;}
if (abs(rot_speed) <= speedBuff2) {rot_speed = 0;}
}
//else
//{rot_speed = 0;}

//if (ch2 <= max_pw and ch2 >= min_pw)
{
tilt_speed=map(ch2,min_pw,max_pw,min_tilt,max_tilt);
i_tilt_speed=tilt_speed;
if (tilt_speed >= (max_tilt-speedBuff2)) {tilt_speed = max_tilt;}
if (tilt_speed <= (min_tilt+speedBuff2)) {tilt_speed = min_tilt;}
if (abs(tilt_speed) <= speedBuff2) {tilt_speed = 0;}
}
//else
//{tilt_speed = 0;}

//if (ch3 <= max_pw and ch3 >= min_pw)
{
straff_speed=map(ch3,min_pw,max_pw,min_straff,max_straff);
i_straff_speed=straff_speed;
if (straff_speed >= (max_straff-speedBuff2)) {straff_speed = max_straff;}
if (straff_speed <= (min_straff+speedBuff2)) {straff_speed = min_straff;}
if (abs(straff_speed) <= speedBuff2) {straff_speed = 0;}
}
//else
//{straff_speed = 0;}


//ADJUST OUTPUT VALUES TO MOTORS BASED ON VARIOUS FUNCTION VALUES AND TRIMS
FR_speed=(thro_speed+FR_trim-tilt_speed+straff_speed-rot_speed);
if (FR_speed <=0) {FR_speed=0;}
if (FR_speed >=max_duty) {FR_speed=max_duty;}
RR_speed=(thro_speed+RR_trim+tilt_speed+straff_speed+rot_speed);
if (RR_speed <=0) {RR_speed=0;}
if (RR_speed >=max_duty) {RR_speed=max_duty;}
RL_speed=(thro_speed+RL_trim+tilt_speed-straff_speed-rot_speed);
if (RL_speed <=0) {RL_speed=0;}
if (RL_speed >=max_duty) {RL_speed=max_duty;}
FL_speed=(thro_speed+FL_trim-tilt_speed-straff_speed+rot_speed);
if (FL_speed <=0) {FL_speed=0;}
if (FL_speed >=max_duty) {FL_speed=max_duty;}


//BEGIN PRINTING VALUES TO SERIAL COM
Serial.print("  PW_0:");
Serial.print(curr_pulse0);
Serial.print(" APW_0:");
Serial.print(ch0);
Serial.print(" I_TH_SP:");
Serial.print(initial_thro_speed);
Serial.print(" A_TH_SP:");
Serial.print(thro_speed);

Serial.print("  PW_1:");
Serial.print(curr_pulse1);
Serial.print(" APW_1:");
Serial.print(ch1);
Serial.print(" I_RT_SP:");
Serial.print(i_rot_speed);
Serial.print(" A_RT_SP:");
Serial.print(rot_speed);

Serial.print("  PW_2:");
Serial.print(curr_pulse2);
Serial.print(" APW_2:");
Serial.print(ch2);
Serial.print(" I_TL_SP:");
Serial.print(i_tilt_speed);
Serial.print(" A_TL_SP:");
Serial.print(tilt_speed);

Serial.print("  PW_3:");
Serial.print(curr_pulse3);
Serial.print(" APW_3:");
Serial.print(ch3);
Serial.print(" I_ST_SP:");
Serial.print(i_straff_speed);
Serial.print(" A_ST_SP:");
Serial.print(straff_speed);


//BREAK LINE AFTER PRINTING VALUES
Serial.println();

//IF STAND BY TIME HAS SURPASSED BEGIN WRITING OUTPUT VALUES, ELSEWISE PROGRESS STANDBY PERIOD
if (stand_by>=stand_by_time)
{
//if (FR_speed >= 0){analogWrite(FR_ctrl, FR_speed);} else {analogWrite(FR_ctrl, 0);}
//if (RR_speed >= 0){analogWrite(RR_ctrl, RR_speed);} else {analogWrite(RR_ctrl, 0);}
//if (RL_speed >= 0){analogWrite(RL_ctrl, RL_speed);} else {analogWrite(RL_ctrl, 0);}
if (FL_speed >= 0){analogWrite(FL_ctrl, FL_speed);} else {analogWrite(FL_ctrl, 0);}
}
else
{stand_by+=1;}

//DELAY FOR DISIGNATED TIME BETWEEN STEPS
delay(d_time);
}

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Also a picture of your project so we can see your component layout?

I will draw a wiring diagram and post some pictures when I finish responding to all of yall's counter questions, you guys are so helpful...this is awesome xD

With such high currents is your power supply wiring as direct to the battery as possible? It is very important.

The battery packs are fused as close to the battery as possible. Wiring is fairly straightforward, battery leads all meet at a bolt where they are parallelled together via ring terminals and a nut. Ring terminals apply a source ground to the mosfets straight from that location. The connections are pretty solid.

Have you written some simple code to just drive one motor with a potentiometer control so you can do some circuit voltage checking?

Originally my code was simpler and everything ran smoothly, so no, I have always used the arduino board during testing. At this point simplifying the test procedure is probably a good idea though. Should I do that or is my code up to par? I observe only values between 0 and 255 posted to my serial monitor while I'm running it. PWM settings for arduino board are whatever default is and using pins 5,6,9,10 for output to mosfets.

Do you have fuses in the power leads to your MOSFETs, your LIpo can, as you have found, supply more current than your load should be consuming.

Where exactly would I put the fuse? Between the ground lead from battery and source pin on the mosfet? Will thatl help save the mosfet if something goes wrong elsewhere in the circuit?

Here are pictures of the drone and its wiring. A hand drawn wiring diagram is attached to the post below.

Wiring diagram here. Sorry for all the posts, trying to provide as much info as possible. Thanks for all the interest everyone lets make this drone fly!

MarkT: The caps across the motors should be 10 to 100nF at most and must be ceramic.100uF is completely insane. Yes, they will blow up the MOSFETs and themselves as the surge currents will be absolutely huge. Large capacitance like that needs to decouple the supply rail only.

I agree, I will switch to a ceramic capacitor of 10uf. The ceramic seem more stable than the metal ones .

Also 1N4004 isn't really up to the current levels of those motors. Get a 10A diode. The diode should really be between the MOSFET drain and the +ve supply rail where the decoupling capacitors are, not across the motor terminals.You are severely overloading the battery pack if the voltage drop is 30%Those devices are 3 milliohm, with 10A load they should not get hot at all. I suspect the peak currents are a lot higher than 10A. You must not put large capacitors across the motor terminals, its completely the wrong thing to do.

I have no decoupling capacitors across my supply rail (the main connection terminals direct off the battery packs). I had them simply across the motor terminals which put them between the Drain on the mosfet and the + side of the supply rail. I have a diagram posted above. If something is incorrect on the diagram then it is likely the problem. I agree 30% is a huge drop for system voltage, theres a very good chance something is wired wrong.

What PWM frequency are you using? Perhaps you have a high frequency of PWM in which case you will not get away with driving the MOSFETs direct from a puny Arduino pin, but must use a MOSFET driver chip with decent output current levels.

I'm using the default arduino pwm settings with an output range between 0 and 255.

MarkT already mentioned the 1N4004. Totally wrong for this current and for PWM. Use a 10Amp schottky diode.

I think you should avoid PWM pin5 and pin6 with these mosfets. Leo..

Twist3dBiscuit: I did notice that the arduino is putting out 4.4v from the output pins, and the gate threshold voltage for this mosfet is 1.35vmin and 2.35vmax, so would 4.4v to the gate damage the mosfet? Or am I looking at the wrong stat for that info. (Sorry I researched mosfet datasheets and how to interpret them...didnt understand it very well).

The "Threshold voltage" is the voltage at which the MOSFET is just barely starting to begin to turn on. It's an important parameter for the manufacturer to measure but it has no meaning to you, the circuit designer. What's most important to you is "Figure 1" on the data sheet. It's usually on page 4. This is the current-versus-voltage chart for various gate voltages. Pick your gate voltage (4.4V) and then use the chart to see how many volts are dropped across the MOSFET at the design current. Use Ohm's Law to get an equivalent resistance for this condition. It should be in the range of milliohms. Calculate the power dissipated in the MOSFET in this condition. Use the thermal resistance in the datasheet to calculate the temperature rise.

HI,
Thanks for the images.

I agree, I will switch to a ceramic capacitor of 10uf. The ceramic seem more stable than the metal ones .

0.1uF will be fine, even 10uF could be too high.

The reason is that because you are using PWM, you have a high frequency rising and falling voltage across your motor and capacitor.

This is charging and discharging the capacitor, the impedance of the capacitor is inversely proportional to the frequency of the applied voltage and the capacitance of the capacitor.

100uF or even 10uF will be to low an impedance at the PWM frequencies that the Adruino uses.

So a significant amount of charging and discharging current flows through the capacitor.
This heats the capacitor, hence failure.
Also more than calculated current is drawn through the MOSFET, especially when the capacitor fails as it shorts out.

0.1uF is small enough to suppress any brush noise and not draw a significant current.


Tom.... :slight_smile:

Hi,
OPs project.

Tom.. :slight_smile:

Wawa: MarkT already mentioned the 1N4004. Totally wrong for this current and for PWM. Use a 10Amp schottky diode.

I think you should avoid PWM pin5 and pin6 with these mosfets. Leo..

Hmm so if this diode is entirely wrong then between pulses a reverse charge could be generated in the motors induction coils? Furthermore this energy could be discharging through the mosfet rather than cycling through the freewheel diode until dissipated through losses in the wire? Or does that reverse charge generated by the motor only appear when the mosfet is returned to a fully off state with no pulsing?

Hi, When I said.

Have you written some simple code to just drive one motor with a potentiometer control so you can do some circuit voltage checking?

I meant you use a potentiometer connected to an analog input of the Arduino and write some simple code to use it to control the PWM of the Arduino output. This way you can run up a motor without all the extra software and analyse what is happening to your motor driver circuit.

Tom.. :)

Twist3dBiscuit: Hmm so if this diode is entirely wrong then between pulses a reverse charge could be generated in the motors induction coils? Furthermore this energy could be discharging through the mosfet rather than cycling through the freewheel diode until dissipated through losses in the wire? Or does that reverse charge generated by the motor only appear when the mosfet is returned to a fully off state with no pulsing?

Hi, The issure with 1N400X series and Schotky diodes is what is called Fast Recovery. This should help explain. www.learningaboutelectronics.com/Articles/Fast-recovery-diode.php Tom.. :)

TomGeorge: HI, Thanks for the images.0.1uF will be fine, even 10uF could be too high.

The reason is that because you are using PWM, you have a high frequency rising and falling voltage across your motor and capacitor.

This is charging and discharging the capacitor, the impedance of the capacitor is inversely proportional to the frequency of the applied voltage and the capacitance of the capacitor.

100uF or even 10uF will be to low an impedance at the PWM frequencies that the Adruino uses.

So a significant amount of charging and discharging current flows through the capacitor. This heats the capacitor, hence failure. Also more than calculated current is drawn through the MOSFET, especially when the capacitor fails as it shorts out.

0.1uF is small enough to suppress any brush noise and not draw a significant current.

Copy that, so if I switch to a 0.1uf ceramic capacitor, and 10amp Schottky diodes how close does that get us to a correct circuit? Are the locations/connection points for the capacitors and diodes in the correct places? I was being told that a capacitor and diode wired across the motor terminals is incorrect the way I have it in the diagram...

Twist3dBiscuit: Hmm so if this diode is entirely wrong then...

Wrong TYPE of diode for PWM. A common diode is too slow (to turn off). Leo..