1

I'm trying to build a full bridge DC motor driver on two IR2401 using an Arduino Motor Driver Shield as a reference. Arduino DC motor driver schematic It is recommended (if i understand right) to drive this kind of circuit as follows: put a HIGH at [!SD] to enable the circuit and PWM at [IN], where PWM duty cycle will set the duty cycle of upper or lower FET in a half-bridge.

Now when I try to combine it to form a full bridge - here comes trouble. If I understand right, there will be a moment in circuit's operation, when the opposite direction FETs will be toggled, so my motor will basically be braking a certain percentage of time. The bridge is powered by booster circuit, so FETs don't need bootstrapping. For example, if I want to turn the engine ON to 20% of power I will send a 20% PWM to the upper IR2104 and 80% PWM to the lower, this way it will open corresponding FETs (Q6 and Q7), but at the other PWM's half-period there will be Q5 and Q8 opened, effectively setting the motor to a counter-rotation mode. Is there any logic in this opearation mode for this circuit or I'm misleaded in some way?

Pic 1: Normal operation, simple logic LOW on the "B" side, PWM to control power on the "A" side.

EDIT: Added an explanation of my concern, added a note about the booster circuit

Normal operation

Pic 2: Motor winding short circuit when PWM goes to negative half-period. Motor winding short-circuit

Roustikov
  • 25
  • 1
  • 5
  • If you do ground the right hand side of the bridge, why should the left side switching between ground and VM at PWM frequencies pose the motor a problem? Current will continue to flow through the motor because of its self inductance and within several microseconds you will be pulling the left side of the motor high again. I think you are thinking too hard over this. – Andy aka Feb 08 '18 at 13:24

4 Answers4

1

If you operate the H bridge as you describe then yes, your motor will be reversing. The sensible approach is to use one half of the H bridge for PWM and the other half with logic levels that switch either the top or bottom MOSFET on for the duration of rotation in the direction you wish to go.

In my innocence on this subject of PWM switching I raised this question (a few years ago) that you may find useful to read. If you still want to have full PWM on both halves, you have to consider that the 50% PWM scenario is the "motor-stopped" situation.

Andy aka
  • 434,556
  • 28
  • 351
  • 777
  • Thanks for your answer! I've omitted a booster circuit at the upper FET side. The problem is: when the second driver is set, for example, to ground the right side of a bridge, the negative PWM half-periods of the left side will trigger windings short-circuit on the motor. – Roustikov Feb 08 '18 at 13:08
  • Then 50% duty is your motor-stopped PWM setting and if you want half speed then it's going to be at 75% PWM. – Andy aka Feb 08 '18 at 13:12
  • Another question; if you do ground the right hand side of the bridge, why should the left side switching between ground and VM at PWM frequencies pose the motor a problem? – Andy aka Feb 08 '18 at 13:18
  • For my understanding it's more like power efficiency problem, why would i short circuit the motor leads effectively turning the motor to a electrodynamic brake if i want to just spin it a half-speed? I've added some explaining pics to the topic, maybe i'm missing something. – Roustikov Feb 08 '18 at 13:24
  • The motor inductance will cause current to flow for quite a long period compared to your PWM switching frequency so I don't see this as a real problem. In other words the motor won't decellerate during this short period. Why not use a simulator and model the motor as a 10 uH inductor. Sure if PWM period is long you will get mechancial "effects". – Andy aka Feb 08 '18 at 13:26
  • How about SR freewheeling by phase shifting? – winny Feb 08 '18 at 14:42
  • @winny now ya got me. I don't know what that is. – Andy aka Feb 08 '18 at 16:03
  • 1
    Synchronous rectification. Run each leg at 50-50 and vary the phase angle between the legs to run the motor. – winny Feb 08 '18 at 16:35
  • Well, i have tested that 50/50 PWM duty cycle yesterday and my motor is just twitching in place. When PWM is "offset" some way - the motor is running much hotter than on DC. So i think this PWM reverse action is a problem here... Could someone please provide and explain the simulation results of motor equivalent circuit? – Roustikov Feb 09 '18 at 07:13
  • 1
    @Roustikov Show waveforms! – winny Feb 09 '18 at 07:54
  • @winny unfortunately I don't have any means to record the waveform... Simulations that I've made in some tools like CircuitLab doesn't look informative to me, could you please show me an example? – Roustikov Feb 09 '18 at 08:56
1

OK, I think there are different things to consider in this question. I try to cover them one by one.


Common switching of both legs with the same PWM

This was your first approach, where either Q1&Q4 or Q2&Q3 are conducting (lower images in the question). To be fair this is not 100% correct but can be used as a valid simplification for now.

Your motor (or whatever you put at the output) must have inductive properties to make everything work. This will allow the current to rise during one phase and shrink during the other phase. Your H bridge can reach all 4 quadrants (voltage and current in both directions). So by this definition, you have to control the current flowing through your motor with a reasonable PWM duty cycle. If your switching frequency is large enough, the current ripple will be small enough to be ignored compared to the average current through your motor.

The drawback of this technique is that as you already saw, your motor gets reversely polarized. But this is not an energy problem in the sense that you waste energy! When you reverse the polarity the current keeps flowing in the same direction as the inductivity does not allow the current to be changed non-continuously. Now your motor is working as a generator and pots energy back into the power supply (typically into some capacitors). This can get problematic if your capacitor is too small. Then the voltage might rise above the desired level and damage other parts.

The benefit on the other side is that the voltages in both the input and the output dictate the needed duty cycle exactly: You need \$\tau =\frac12 + \frac{u_o}{2u_i}\$ with \$u_o\$ the output voltage and \$u_i\$ the input voltage. To get this equation you need to solve the idealized differential equations. I did this for you ;-). So you have one equation to reach the whole output voltage interval \$[-u_i,u_i]\$.

Switching of only one leg

Another approach is to keep one of the legs fixed and play with the other. So you would keep Q4 active and only switch Q1/Q2 alternating with your PWM. This can be seen as if the motor was fixed at 0V on the right side.

Side remark: Now you have a half bridge on the left side switching. This is only a 2 quadrant converter. You can either speed up your motor or use it as a generator. But all this is only possible in a dedicated direction an no longer arbitrary.

If you turn on Q1 the current flows through Q1. If you turn it off, through D2 (or Q2 if activated). Now your duty cycle must be \$\tau = \frac{u_o}{u_i}\$. But the output voltage is now always positive (in my definition). You cannot reverse the voltage of the motor, that is you cannot reverse the motor movement's direction.

To reverse direction you have to keep Q2 active and toggle with Q3 (and potentially Q4). Then the duty cycle must be chosen as \$\tau=-\frac{u_o}{u_i}\$.

So all in all, during the conduction of Q1/Q4 (resp Q2/Q3) power flows from the source to both the motor AND the magnetic field in the inductor. During the second phase (Q2/Q4, Q1/Q3) the power flows from the magnetic field to the motor. The source is not delivering any power during this phase.

The benefit is that the current ripple is smaller as the applied voltage during the phase where Q2&Q4 are conducting, is smaller. This makes the current more stable with a given PWM frequency.

The drawback is that you have to switch the legs when you want to position control your motor. When you want simple movements, this can maybe neglected but if you want to do it right, you have to carefully create an algorithm that handles this switching characteristics. It is doable but you have to spend some minuted thinking there.

Optimizing the dissipated power

You can even optimize the dissipated power distribution in the FETs by doing some fancy stuff. You could start by conducting Q1/Q4. Then Q2/Q4, Q1/Q4, Q1/Q3. Otherwise the FET Q3 will not get any energy and the others more of it.

Hint: If you do not need this, clam the inactive leg to 0V. The high side FET is always worse from the perspective of circuit design as you might have problems with supply of the gate.

Some words on switching

I told you that we are doing some simplifications by only looking at the states Q1/Q4 and Q2/Q3 etc. Consider Q1/Q4 conducting and there is flowing quite some current right now. Now you want to disable Q1/Q4 and enable Q2/Q3. You turn off the FETs Q1/Q4 and turn on Q2/Q3. As the gate drivers have some shoot through protection, they directly inactivate the FETs Q1/Q4 but wait a few ns before the other FETs get activated.

The current must flow somewhere. The only way for the current now goes through D3, the source and D2. Here you see, why the diodes are really of importance! Otherwise the current would cause a voltage spike and break any device connected. As soon as the FETs get activated, the voltage drop on the diodes is reduced and the power dissipation reduced.

The same happens in the single leg case.

0

for normal h-bridge operation, try using shutdown pin. if you need 20% pwm pulse on forward direction, then give 20% pwm pulse to IN1 and in remaining 80% of time shutdown the process ,by doing this we can achieve normal h_bridge operation

-2

Looks like it is easier to use MOSFET gate driver with individual inputs for each output.

A bit more sophisticated PWM generator is going to be needed, such as a microcontroller with required deadtime in the drive sequence.

With individual pins you can use, for example, left upper MOSFET to set speed with 5-95% PWM duty cycle and set right lower MOSFET to logic 1 or 0 to set direction. Well, that is my vision of the problem.

Dave Tweed
  • 168,369
  • 17
  • 228
  • 393
  • I suspect you are attracting down votes because the quality of your answer is poor and that using the comment area to enhance an already weak question is frowned upon. I have not down voted BTW. – Andy aka Feb 08 '18 at 14:04