Connect H-Bridge with 6 MOSFETs to Arduino

Hello,

I am currently trying to convert a RC car (Himoto Rock Crawler) to a autonomous vehicle. Originally, the DC motor is connected to a ESC, which gets power from a 7.2V battery and signals from a two-channel receiver.

After unsuccessfully trying to decipher the receivers signals, I now aim to reverse-engineer the ESCs H-brigde. It consists of 6 MOSFETs IRL3803 (data sheets: http://www.irf.com/product-info/datasheets/data/irl3803.pdf), thus two of the switches are doubled.

Since I am a non-expert in electronics, a few questions come up:

  • What sense makes the use of doubled MOSFETs (Q1, Q2, Q5, Q6)? Is it for breaking the vehicle or due to thermal considerations (assuming the vehicle runs normally in one direction)?
  • At the moment, I don't know the power consumption of the DC motor (will check that until tomorrow), but for a 1/10 scale RC car, these MOSFETs seem quite over-sized (refer to data sheet).
  • Have these MOSFETs kick-back protection?
  • May I simply fed the gates of the MOSFETs with a PWM signal from the Arduino (which shall be separately powered)? Do I need to connect the Arduino ground with the MOSFETs sources?
  • In order to build a motor controller with a similar H-bridge, is a normal solder-less breadboard capable of taking the high amperages of the circuit?

Many thanks in advance, I will try to measure the power consumption of the motor and maybe take a picture of the ESC.

Christoph

  • The mosfets are doubled in forward, because you use more current then.
  • 140 amps * 2 seems to be a standard size. Yes, a 1:10 car can use a lot of current! 750W at 7.4 is more than 100A! And thats not unusual in 1:10.
  • Because of the above, DONT use the breadboard for the power! Short cables of a good size!

If you still have the Esc, you can use the Arduinos servo lib and connect the signal directly.

Thanks for your reply. So the doubled MOSFETs in forward enable the motor to drive more fast/with more torque in forward mode?

Are there any examples around for controlling the ESC with the Servo Lib?

Greetings
Christoph

No! I meant:
Because you use more power when forward, you need doubled mosfets to avoid the smoke.
Speed is a function of voltage to the motor. Torque is function of current. Generally speaking. Of course both is a function of the motor.

This is a good start: Arduino Playground - GeneralCodeLibrary

Servospecific: try the buitin servoexamples first.

  • What sense makes the use of doubled MOSFETs (Q1, Q2, Q5, Q6)? Is it for breaking the vehicle or due to thermal considerations (assuming the vehicle runs normally in one direction)?

I would assume the pulse widths for reverse are much shorter for slower motor speed, and as such the total power requirements for reverse are lower, which can be handled by one set of MOSFETs

  • Have these MOSFETs kick-back protection?

Per the datasheet, the MOSFETs appear to have an internal diode for kickback protection.

  • May I simply fed the gates of the MOSFETs with a PWM signal from the Arduino (which shall be separately powered)? Do I need to connect the Arduino ground with the MOSFETs sources?

You probably can, as the datasheet shows test circuits being driven at logic level voltages. You will need the common ground if you make a direct connection between the two. An optical isolator setup could make them electrically seperated.

I have a question: did you find the h-bridge schematic in information on the car, or did you make it for discussion purposes? I find it interesting in that it uses NPN MOSFETs on the high side with a minimum of circuitry. I too would like to make an h-bridge like this.

Sorry for the late reply. The schema is actually my first Fritzing drawing and the result of analyzing the ESC board.

Meanwhile, I managed to controll the motor with the Arduino via the original ESC. It really is as simple as controlling a servo:

Byte myMotorPin = 9;
Servo myMotor;

void setup()
{
// Tell the Servo object the respective PWM pin
myMotor.attach(myMotorPin);

// Power the motor in forward direction
myMotor.writeMicroseconds(2000);

// Let it go for 2 seconds
delay(2000);

// Cut power to the motor (no brake!)
myMotor.writeMicroseconds(1500);

delay(2000);

// Power the motor in backward direction 
myMotor.writeMicroseconds(1000);

delay(2000);

// Cut power to the motor (no brake!)
myMotor.writeMicroseconds(1500);

delay(2000);
};

The drawback is that switching from forward (> 1500ms) directly to backward (< 1500ms) makes the ESC going to break mode, so for reversing direction, one has to give the following commands (each followed with at least 100ms of delay):

  1. forward, pulse width 2000ms
  2. idle, pulse width 1500ms
  3. backward, pulse width 1000ms

In order to break first, and then reversing:

  1. forward, pulse width 2000ms
  2. backward, pulse width 1000ms
  3. idle, pulse width 1500ms
  4. backward, pulse width 1000ms

Turning from reverse to forward does not imply a break. If want to break first, you have to give the following commands:

  1. backward, pulse width 1000ms
  2. forward, pulse width 2000ms
  3. backward, pulse width 1000ms
  4. forward, pulse width 2000ms

The drawback is that switching from forward (> 1500ms) directly to backward (< 1500ms) makes the ESC going to break mode,

Yes it is called flywheel breaking and is where the motor is acting as a generator producing voltage in to opposite direction to that which made it turn. It is a function of all motors and is nothing to do with your bridge circuit.

I think it has something to do with the motor controller since it does not engage the break when switching directly from backward to forward.

it does not engage the break when switching directly from backward to forward.

Yes it does, it's physics. How are you switching?

It might be physics, but it does not brake in the manner it does when switching from forward to backward. With "switching" I mean changing PWM from > 1500ms to < 1500ms and vice versa.

From forward to backward, the motor really brakes (standstill within a quarter of a second or so). From backward to forward, the motor decelerates to idle (standstill within two or three seconds).

Fast motor stop and free running motor stop are usually a function of how the h-bridge controls are designed. I think in a free running motor stop all MOSFETs are off, where as in a fast motor stop two of the opposite direction mosfets are still on. Sketches of the actions are available via google.

That is my understanding too. So the different behavior when switching direction comes from the microcontroller of the ESC!?

What ever is controlling the MOSFETs on/off states.

ccll1, its exactly as you noticed.
Almost every esc has that annoying function builtin, to protect itself. When racing rc cars we often disable reverse, just to avoid the delay.
How programable is the esc? Some modern esc are fairly configurable.

I wouldn't expect the ESC being programable, at least not in a way that is more easy than implementing a custom-built ESC. But maybe I will buy a more professional (and programmable and documented) ESC in order to configure it for my needs. By the way, I intend to switch to a brushless motor.

Brushless is the way to go. Longlife, less heat, more efficient and lower cost/watt.
Just check how the esc handles the brake/pause function. Many esc made for rc-flying is not good for this use.