I need help with my 48v Brushless Motor Controller Circuit

Hello,

I have just finished soldering my brushless motor controller circuit and I have a few questions on how to use it. I found a schematic and I attached an image of it. I used six STP80NF70 N-channel mosfets, instead of the STP40NF20 mosfets used in the schematic. I have also added hall sensor inputs for the arduino. I did not use the 630uf capacitor, will that be a problem? I have 470uf capacitors and 1000uf capacitors but not 630uf. Would the 470uf capacitor be better than the 1000uf for this circuit? Also I tried testing the circuit using a 12v battery and a arduino uno, I was mainly seeing whether or not I could get a voltage reading with my multimeter from 2 of the motor phase wires but when I turned ‘M1’(show in schematic) High and ‘M4’ High some sparks shot out but I quickly turned off the mosfet and did not damage it. So my question is, were there sparks because ‘M4’ is switching the negative wire on but the 5v high input of the gate came in contact with the negative? How else would I switch the negative wire on?

I am aware that the brushless motors need a PWM phase current sequence in order to rotate, right now I’m just performing tests to make sure my circuit can make each Phase wire turn positive, turn negative, and neutral. I have successfully made each phase wire turn positive voltage on and off, I used the battery ground and the positive of the phase wire for my multimeter. But Switching phase wires to negative has been unsuccessful.

I know that many brushless motor h bridge circuits use PNP and NPN transitors but I have seen it done only using n channel power mosfets which is what Im trying to do.

Any suggestions or ideas will be greatly appreciated.

Specs:
48v 1000watt Dc hub motor with hall sensors attached
48v 10ah lithium Ion Battery
Arduino UNO

In case you can't get yours working:

http://kellycontroller.com/kbs48051x25a24-48v-mini-brushless-dc-controller-p-503.html

Don't take this the wrong way but I think you are playing Russian Roulette with your controller. I brushless motor controller requires a 3-phase PWM (or sinewave) input signal and will not operate without it. Connecting power to your controller with no input signal suggests you have no electronics background and have no idea what you are doing. Measuring the resistance with a meter is ok but connecting any sort of power to it without an input signal is not a good idea. What are you planning to use for an input signal ?

I might have not made my question clear enough for you, and I’ve been building circuits for years, I’m just new to the H-Bridge concept.
I did not buy a brushless motor controller, I am designing a brushless motor controller from scratch. The reason I am building a controller instead of buying one is for these reasons:
I haven’t been able to find a cheap 48v brushless that will work for the self balancing scooter that I am almost done building.
I have tried ordering Chinese brushless motor controllers but there’s always issues like: the reverse function only works if the motors are completely stopped, which is a huge issue because self-balancing scooters need to be able to reverse instantaneously.
Most of the Chinese controllers are programmed specifically for ebikes. There are American brushless motor controllers that I have found but they are 100-300$ each which is unreasonable.

As I stated in my first post “I am aware that the brushless motors need a PWM phase current sequence in order to rotate, right now I’m just performing tests to make sure my circuit can make each Phase wire turn positive, turn negative, and neutral.”

My main question is how do you switch on and off a negative voltage with a n-channel Power Mosfet, because if you look at the schematic in the first post, you will see the mosfet labeled ‘M4’ whenever I applied 5 volts from the arduino to the the gate it turned negative on but sparked. I believe this is because it came in contact with the 5 volts. What is another way to turn negative on and off?

And once I figure out how to turn the negative on and off for each motor phase wire I will then write the PWM current Sequence that will function of the readings of the Hall sensors.

In case you or anyone else are wondering what sequence I will be using I attached a photo of it.
I also reattached the schematic.

phase sequence.png

1 Like

Where are your MOSFET drivers? You need MOSFET drivers.

And once I figure out how to turn the negative on and off for each motor phase wire I will then write the PWM current Sequence that will function of the readings of the Hall sensors.

The fact that you are asking this question implies you are not aware that the phase sequence table was written for a bi-polar supply motor controller (+Vcc/-Vee, not uncommon) and that the single supply equivilent of the DC- are the L1, L2, L3 control lines.since they would normally be connected to -Vee instead of ground on a bipolar supply system (and still could if you want to convert this unipolar supply design to bipolar supply design.

but when I turned 'M1'(show in schematic) High and 'M4' High

I assume you had the motor connected to phase A , B & C, and you mean you applied a HIGH to H1, and L3 which should pass current through M1, Phase A =>motor=> phase C => M4 => GND.

but I quickly turned off the mosfet and did not damage it.

And you know this how ? How do (did) you test the mosfets M1 & M4 ? (after seeing sparks fly)

"I assume you had the motor connected to phase A , B & C, and you mean you applied a HIGH to H1, and L3 which should pass current through M1, Phase A =>motor=> phase C => M4 => GND."

Correct, that is what I did, but why did sparks fly from M4?

The fact that you are asking this question implies you are not aware that the phase sequence table was written for a bi-polar supply motor controller (+Vcc/-Vee, not uncommon) and that the single supply equivilent of the DC- are the L1, L2, L3 control lines.since they would normally be connected to -Vee instead of ground on a bipolar supply system (and still could if you want to convert this unipolar supply design to bipolar supply design.

How could I can I convert this unipolar supply design to a bipolar supply design?

I’m not saying your wrong, but isn’t the circuit I’m using already bipolar? I was doing some research and came across the circuit (I attached a picture). I know it is for stepper motors but its sort of the same concept and it is labeled as bipolar.

My main question is how do you switch on and off a negative voltage with a n-channel Power Mosfet, because if you look at the schematic in the first post, you will see the mosfet labeled ‘M4’ whenever I applied 5 volts from the arduino to the the gate it turned negative on but sparked. I believe this is because it came in contact with the 5 volts. What is another way to turn negative on and off?

In case you or anyone else are wondering what sequence I will be using I attached a photo of it.
I also reattached the schematic.

So, for anyone following this, you replaced the 200V ,0.038 ohm, 40A N-channel Mosfets in the schematic , with 68V, 0.0082 ohm, 98A N-channel Mosfets. Which, just for the record, has no impact on the fact that you want to control it with an arduino since you may have gone from a 200V VDS to a 68V VDS , the VGS is the same +/-20V.

What we need to concern ourselves with FIRST , BEFORE even getting into the whole UNIPOLAR , BIPOLAR Power Supply issue,
is that NEITHER of the these two types of mosfets are Logic Level mosfets, which means you need voltage converter circuit for each and every one of them that converts 0V to -5V so that the device will be OFF when the arduino output is LOW (0v).
Can this be done ? Yes. Is it necessary ? I don’t know. Your opening remark about just finishing soldering your circuit suggests that these devices are not in a breadboard but a PCB and cannot be removed (easily). Do you have any spares ? (we don’t know).
Why would I ask that ? Because before you attempt to drive your motor with these devices you need to do some preliminary
lab tests on these devices to ascertain what impact using a logic level (TTL) signal to drive non-Logic Level Mosfets will have.
How much current (if any) will conduct through the load with 0V on the gate ? If you look at Fig-13 through 17 on page 3 of the datasheet there are some test circuits. some of them use 100 ohm gate resistor. I don’t know why that is. (because I am not an Electrical Engineer, I am an Electronics Engineering Tech)

Perhaps this post might shed some light on the Logic Level vs Normal Mosfet subject:
[ http://www.electro-tech-online.com/threads/logic-level-vs-normal-mosfets.91756/ ](http:// http://www.electro-tech-online.com/threads/logic-level-vs-normal-mosfets.91756/)

I should point out that all the specs in the mosfet datasheets are referenced to VSource, so converting the single supply
motor driver schematic to dual-rail (bi-polar) design involves more than just replacing the source connections with a negative supply. The gate drive signals would have to be converted from 0V/5V to +/- 10 to 15 V (max = +/- 20V)

Questions to be answered:
1-What are the consequences of driving “normal” mosfets (as opposed to “Logic Level” Mosfets) with a logic level signal ?
2-How do you convert the single ended drive signals to dual-ended (bi-polar) gate drive signals ?
3-What do you gain by converting the given single ended design to a dual-rail design ?

For the record, I did spend at least an hour searching online for a plug & play TTL to bipolar mosfet gate driver ic that has three
power pins, GND, +Vcc, & -Vee, that accepts TTL input signal and output a +/- V gate drive signal . I had no luck finding one but
I am almost certain they exist.

If we forget the whole single-ended to dual-rail conversion idea altogether and focus on how to use your schematic as is with
the drive sequence table as given, I don’t see why it should not work as is for a single ended circuit. The drive sequence should remain the same with respect to the hall sensor inputs.

The only question I have, is how were you planning on writing code to drive this ? Do you know how to do that ?
Check out this post:
Part-1: Theory:
http://elabz.com/brushless-dc-motor-with-arduino/
Part-2: Circuit and Software
http://elabz.com/bldc-motor-with-arduino-circuit-and-software/ .

Unfortunately, that was all I was able to find.
You could try that but I seriously recommend testing the circuit and software with a variable voltage, adjustable current bench lab power supply and a small RC 3-phase brushless motor before attempting to drive the 48V motor, due to the risk of damaging something before you have tested the circuit and software. You should be able to drive a small RC brushless motor from 12V with the current limit set to a maximum of 1A using the same circuit you posted.

That’s how I would approach it. I would forget the idea of converting the circuit to bipolar for now and just focus on getting the software to work. Obviously if you repeat your previous hardware test approach of just touching two wires together then you are headed for disaster. For the sake of your project, don’t do that again. It is a reckless way to perform circuit/motor testing.
I would strongly discourage any further such actions. Get your circuit and software working before you touch that motor again unless you can get a 3-phase brushless motor controller that can handle the current rating of your motor, which , according to my calculations is about 21A @ 48V.
1000W can do a lot of damage if something goes wrong. If you used current limiting power resistors that allow enough current to pass to get the motor spinning but not enough to drive a load then you could safely test your circuit and your software with the 48V motor.

I'm not saying your wrong, but isn't the circuit I'm using already bipolar? I was doing some research and came across the circuit (I attached a picture). I know it is for stepper motors but its sort of the same concept and it is labeled as bipolar.

Ha , ha , ha, now we're really in trouble ..... XD

Sorry to have to tell you this but you are confusing the use of the word "bipolar". The word "bipolar" when used in reference to power supplies or circuits, means "having plus and minus voltage, like +/-12V for an op amp or +/- 150V for an audio amplifier.

The term "bipolar", when used in reference to STEPPER motors, means

Bipolar motor[edit] Bipolar motors have a single winding per phase. The current in a winding needs to be reversed in order to reverse a magnetic pole, so the driving circuit must be more complicated, typically with an H-bridge arrangement (however there are several off-the-shelf driver chips available to make this a simple affair). There are two leads per phase, none are common. Static friction effects using an H-bridge have been observed with certain drive topologies.[2] Dithering the stepper signal at a higher frequency than the motor can respond to will reduce this "static friction" effect. Because windings are better utilized, they are more powerful than a unipolar motor of the same weight. This is due to the physical space occupied by the windings. A unipolar motor has twice the amount of wire in the same space, but only half used at any point in time, hence is 50% efficient (or approximately 70% of the torque output available). Though a bipolar stepper motor is more complicated to drive, the abundance of driver chips means this is much less difficult to achieve.

The current in a winding needs to be reversed in order to reverse a magnetic pole,

(hence the name "bipolar")

http://en.wikipedia.org/wiki/Stepper_motor

Thanks for the detailed response raschemmel. So I’m restarting the design process from the beginning and I would like to know if this circuit I attached Is a starting point. I will be ordering mosfet driver chips that accept low level logic signals. Does this circuit look like it will work? If not what should be added or removed.
The driver chip used in the ciruit is HIP4086 and the circuit is on its datasheet.

I don’t know where you got that circuit you just posted but it is not on the HIP4086 datacheet. (see attached)

However, I am familiar with the ics in that circuit and it appears to be a circuit that uses an analog voltage (at TP9) control speed and generates the PWM input signals for the 4086.

See page 2 of attached Application Note an9642 and pages 1 & 12 of the HIP4086 datasheet.

In the circuit you posted, the ICM7555 is a clock genertor (astable multivibrator) and the CA3260 are CMOS op amps. The 4049s are
CD4049Bs (see attached datasheet) , TTL /CMOS level converter-inverting buffers. (convert TTL-CMOS or CMOS -TTL)…
The reference voltage at TP9 (a simple voltage divider which in the schematic appears to be set at midpoint between Vdd and GND,
which could be 6V in a 12V circuit or 2.5V in a 5V circuit. What puzzles me is I don’t see any phase shift between the 3-phases which should be shifted by 120 degrees from each other . The schematic on pages 1 & 12 of the HIP4086 datasheet shows a different circuit that accepts two analog voltages to set speed and brake and uses a “controller” (unknown) to generate the PWM signals.
Take a look at this file: (see an1829 attached):
(not available anywhere, not even ebay)
http://www.digikey.com/product-detail/en/HIP4086DEMO1Z/HIP4086DEMO1Z-ND/4031628
http://www.intersil.com/content/dam/Intersil/documents/an18/an1829.pdf

Check out the BLDC controllers here:
http://www.ti.com/lit/sl/slyb165f/slyb165f.pdf

hip4086-a.pdf (470 KB)

cd4049ub.pdf (1.69 MB)

an9642.pdf (299 KB)

Sorry not on the datasheet its on this configurations and applications pdf.

http://www.intersil.com/content/dam/Intersil/documents/an96/an9642.pdf

Using the HIP-4086 driver gets you out of the woods pretty quickly as it takes all the messy level-shifting needed for the H-bridges and does them in the chip. Be careful though, the App Note shows you how to build a 3-phase DC converter and includes NOTHING to spin your motor. The 4086 has logic level inputs so I’m not sure what the 4049’s are doing and don’t want to. But that’s what we have Arduinos for. You will need one that has at a minimum 3 outputs you can PWM and 3 more you can turn on solid. Remember this concept: The Controller (your whole project) must look like a 3-phase sine wave signal and it needs a way to control the current in each phase. So at low speeds, you will need small on-times for your PWM. As you increase the speed, there will be a point where the FET will turn on solid and rely on motor inductance to limit the current. In practice you will need to generate three square waves and their complement displaced in phase by 120 degrees.

Do you have any parameters such as motor inductance and design RPM? If you are trying to do this at 20,000 RPM you will not do it with an Arduino. It simply isn’t fast enough. That’s DSP terrritory.

Do you have any parameters such as motor inductance and design RPM? If you are trying to do this at 20,000 RPM you will not do it with an Arduino. It simply isn’t fast enough. That’s DSP terrritory.

This controller I’m designing Is going to be used for a self balancing scooter so It will not have to go that fast.

I spent a many hours today designing the circuit for the controller. I made a schematic with Design Spark PCB and I have attached it. I used other schematics as references. I would like to know if I should add, remove, or change anything. I read exactly what each pin on the HIP4086A is for and I believe I have wired it accordingly but please correct me if it’s not.

These quotes below are from http://www.intersil.com/content/dam/Intersil/documents/hip4/hip4086.pdf

The delay timers are
enabled if the voltage on the RDEL pin is greater than 100mV.
The voltage on RDEL will be greater than 100mV for any value of
programming resistor in the specified range.

Is the 2.2K resistor In my schematic an appropriate value or would It be better to use a lower value?

When practical, minimize impedances in low level signal
circuits. The noise, magnetically induced on a 10k? resistor, is
10x larger than the noise on a 1k? resistor.

This Is why I mainly use 1k resistors in my circuit, please let me know if any resistor value should be change.

Motor controller.bmp (3.93 MB)

I have tried to calculate the boot capacitor value using the equation on the PDF (I posted an attachment of the page),
but it does not state how to plug in each unit to the equation.
For example using the values in the table and equations that is shown:
note: All the letters are the units except for “Qc” and “Cboot”.
Qc= 64nc+1ms(100ua+9.4v/100kohm+100na)
Qc=13006.11
Cboot=13006.11/(5% * 10v)
Cboot = 260.12ua
but on the document Cboot=0.52ua
So what Units need to be changed the make the equation work so that I can enter in my own values to find the right Boot capacitor value.
Temporarily I put these capacitors as 0.5uf in my schematic but I will change the values once I figure out the equation.

This page is on this PDF: http://www.intersil.com/content/dam/Intersil/documents/hip4/hip4086.pdf

Make Cboot (in nF) equal/greater to the total gate charge (in nC)
Make the 12V decoupling capacitor at least 10 times Cboot.

You want the voltage sage from the high-side drivers to be 10% or less
as they switch, so Cboot should be 10x the gate capacitance, however
the gate capacitance isn’t linear, its better to think of total gate charge
divided by gate voltage.

Thus Cboot = 10 x Cgate = 10 x (Qgate / 10V) = Qgate

We divide by 10V rather than 12V to allow for the voltage drooping
and the voltage loss in the bootstrap diode.

Do not add a 10k gate-source resistor to the MOSFETs, this just drains the
Cboot way fast. A 15V zener between gate and source for each MOSFET is
a good precaution to protect gates from over-voltage. Simple, cheap.

Doesn't the charge pump frequency run too fast for the 1N4007's? Shouldn't those be "fast recovery" type? I don't think Schottkys are a fit because they are relying on that 0.7V voltage drop where they have two in series.

Thanks for the responses they helped a lot.

Cboot = 10 x Cgate = 10 x (Qgate / 10V) = Qgate

Just to confirm: The Qgate for my N-Channel Mosfets is 75nc therefore, Cgate = 10 x (75/10v) Cgate = 75 Cboot = 10 x 75 Cboot = 750nc = .75uf 12v Decoupling Capacitor = 10 * Cboot 12v Decoupling Capacitor = 7.5uf

So I will buy three .75uf Ceramic Capacitors, and one 7.5uf Electrolytic Capacitor. Should I also use a Decoupling capacitor for the 48v Battery? If so what value should I choose?(my guess is anywhere between 450uf and 1000uf)

A 15V zener between gate and source for each MOSFET is a good precaution to protect gates from over-voltage.

I will replace the resistors with Zener Diodes like you suggested, I have decided to go with this Zenner Diode: BZX85C15 (15V, 5%, 1W). If there is any reason I shouldn't use this specific Zener diode please let me know.

Doesn't the charge pump frequency run too fast for the 1N4007's? Shouldn't those be "fast recovery" type? I don't think Schottkys are a fit because they are relying on that 0.7V voltage drop where they have two in series.

I think your right I read somewhere that the HIP4086A needs a 1Amp fast recovery type diode for bootstrapping. I did some research and found this diode MUR120 and I think it looks appropriate. MUR120: Super fast switching, 1A Average rectified current, 45pf total Capacitance, 200v Maximum Peak reverse voltage, reverse recovery time 25ns, 0.875V Forward Drop voltage. Will the Forward Drop Voltage be an issue? I plan on replacing all the 1N4007 diodes in my circuit with the MUR120.

At 48V rail voltage there will be schottly diodes available, the ultimate in fast recovery - certainly 60V if not 80V.

Just to confirm: The Qgate for my N-Channel Mosfets is 75nc therefore, Cgate = 10 x (75/10v) Cgate = 75 Cboot = 10 x 75 Cboot = 750nc = .75uf

No, incorrect.

Cgate = 75nC / 10V = 7.5nF Cboot = 10 x Cgate = 10 x 7.5nF = 75nF Use 68nF or 0.1uF.

At the top of my explanation I said:

Make Cboot (in nF) equal/greater to the total gate charge (in nC)

I then explained why.

Mark, I didn't suggest Schottky because in one part of the circuit the manufacturer has two in series, so I think he wants that nominal 0.7V drop. You might upset things if you go with a Schottky's lower Vf. Fast recovery though is a must, I think.