jean-michel-gonet / pic18f-bldc-controller.X

A BLDC ESC made with a pic18f micro-controller,
GNU General Public License v3.0
2 stars 1 forks source link

Technical requirements

Why not higher number of LiPo cells?

RC Car races are regulated by the ROARR, which states that electric RC cars should use 2S only. Therefore 4S is already out of norm, which means that most model car engines wont't hold more than 4S.

Why 100A?

Because it is the golden dream of any RC car owner. To be honest, don't really believe that this small circuit will hold that amount of current. Something is going to break or melt before. But still, let it be a idealistic objective.

Why 128kHz?

According to [AN885], page 8, «As a rule of thumb, the PWM frequency should be at least 10 times that of the maximum frequency of the motor».

A very high KV constant for standard ROAR-compliant Brushless RC car motor is around 6100KV for 2S, which means:

A brushless motor

Just to be on the safe side, let's multiply it by two: 90 kHz. To reach this frequency, the PIC18 has to be clocked at 64MHZ, so the highest reasonable PWM frequency it can generate is 128kHZ, which keeps a very safe margin with the value calculated above.

Selection of components

Power N-MOSFET transistor

As size is very limited, I've chosen a dual MOSFET package. As I want as much power as I can, and I'm not yet trying to squeeze out the pennies, I've chosen a rather big component.

Relevant characteristics are:

Capacitors

To minimise the number of different components (still not trying to squeeze out the pennies, but it makes the hand assembly easier when you've got less different pieces), I'm choosing KEMET's X7R series, which are not very expensive, and are appropriate for bypass and decoupling applications.

Also, I'm soldering by hand, so I don't want to use a package smaller than C0402.

Diodes

Because I'm familiar with it, its high availability, and acceptable forward voltage drop, I'm choosing the BAT48ZFILM:

High / Low side MOSFET driver

I'm quite familiar with the IR2301SPBF‎, which is commonly available, not too expensive, available as DIP and SMD and, most importantly, it supports small Vcc:

Circuit design

I've detailed here some of the calculation I did to estimate the values of certain components.

Breakpoint protection

The module is aimed at being something open to tinkering. This means that it will often run in debug mode. In this mode, the micro-controller can be stopped at any point by a breakpoint, freezing the PWM signal in high status. When this happen, the current through the motor will raise exponentially until something burns or the battery explodes.

To prevent this, a high pass filter guards the high side input of the driver:

If the PWM is frozen high, the capacitor will charge, the current in the resistor will drop to zero, and so the HIN entry.

Let's size the RC circuit so its time constant is 5 times the period of the PWM signal:

Let's chose arbitrarily a capacitor of 10nF. The frequency of the PWM signal is 128kHz.

To be

Bootstrap capacitor

To calculate the value of the bootstrap capacitor, one must understand how the high side / low side driver works.

Hi side / low side driver bootstrap capacitor

For the high side transistor to be on, the gate has to be on a higher potential than the source:

While the low side is in conduction, Vs is at ground. The capacitor Cboot is charged at Vcc through the diode Dboot (minus its forward voltage):

When the low side stops conducting, what happens to the potential at point A depends on what the other bridges and the rest of the circuit do. What is certain is, because the Cboot cannot discharge itself due to the Dboot diode, Vbwill follow it on top of the capacitor:

The potential in Vb feeds the internal circuitry that produces the Ho output. When the moment comes, Ho can make the high side to enter in conduction provided that:

This condition has to hold as long as the high side is on. At a frequency of 128kHz, considering an unrealistic duty cycle of 100%, the maximum time the high side needs to keep conducting is:

During this period, the only source of power is the charge stored in Cboot, and it has to provide for:

The charge lost by Cboot by the end of the thon period is the sum of all of the above:

By comparing at the different leakage currents, the only significant one is the quiescent Vbs supply current, 100µA, which is 20 times greater than the next in significance, which is the diode reverse leaking current, 5µA. So we can say:

When replacing actual values, we see again that none of that counts but the transistor's gate charge:

Because of the Qboot charge lost during the high on time, by the end of the high on period, the voltage in Cboot will be:

And this has to be enough to keep the high side transistor on:

Replacing the values to have the complete expression, gives us:

Operating we can come up with:

And thus:

Taking in count the tolerance of 10%, plus some margin, we can safely use 0.1µF capacitors for the bootstrap circuit.

Bibliography

References

Additional bibliography

Bibliography I consulted to design the circuit.