Transistors - What's Wrong With This BJT ESC - Electrical Engineering Stack Exchange

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

19.06.23, 12:23 transistors - What's wrong with this BJT ESC?

- Electrical Engineering Stack Exchange

The 2023 Developer Survey results are live!

What's wrong with this BJT ESC?


Asked 1 year, 4 months ago Modified 1 year, 4 months ago Viewed 538 times

I'm trying to drive a small BLDC motor, and I've come up with a design, built it, simulated it,
but it doesn't seem to be working, either in the sim or on the protoboard. Usually I see P-type
0 transistors in BLDC drives, but I'm short one, and I have a ton of NPNs.

The three inductors are the BLDC motor windings, each .7 mH and the winding resistance is
4.2 Ohms. I've seen both types, and from what I understand, the PNP is just to reduce pin
count.

https://electronics.stackexchange.com/questions/605553/whats-wrong-with-this-bjt-esc 1/7
19.06.23, 12:23 transistors - What's wrong with this BJT ESC? - Electrical Engineering Stack Exchange

Are there any mistakes I'm making or principles I need to understand to make this work? I'm
driving the BJT with 5v (arduino power), 9V for motor. The motor itself jerks to position fine
when I touch the 9V battery to some leads Edit: I have a cheap oscilloscope, a bench supply
and a multimeter. So far, the Arduino is functional.

My design

simulate this circuit – Schematic created using CircuitLab

https://electronics.stackexchange.com/questions/605553/whats-wrong-with-this-bjt-esc 2/7
19.06.23, 12:23 transistors - What's wrong with this BJT ESC? - Electrical Engineering Stack Exchange

Edit: Add photos of physical (bad soldering) IGNORE LOOSE WIRE (fell off while taking pic)

https://electronics.stackexchange.com/questions/605553/whats-wrong-with-this-bjt-esc 3/7
19.06.23, 12:23 transistors - What's wrong with this BJT ESC? - Electrical Engineering Stack Exchange

Edit: Arduino Code below:

https://electronics.stackexchange.com/questions/605553/whats-wrong-with-this-bjt-esc 4/7
19.06.23, 12:23 transistors - What's wrong with this BJT ESC? - Electrical Engineering Stack Exchange

# define PIN_U_P 3
# define PIN_V_P 5
# define PIN_W_P 6

# define PIN_U_N 9
# define PIN_V_N 10
# define PIN_W_N 11

void setup() {
// put your setup code here, to run once:
pinMode (PIN_U_P, OUTPUT);
pinMode (PIN_U_N, OUTPUT);
pinMode (PIN_V_P, OUTPUT);
pinMode (PIN_V_N, OUTPUT);
pinMode (PIN_W_P, OUTPUT);
pinMode (PIN_W_N, OUTPUT);
pinMode (LED_BUILTIN, OUTPUT);
}

static int d = 20 ;
static int on = 1000 ;
void loop() {
// put your main code here, to run repeatedly:
digitalWrite (LED_BUILTIN, HIGH);
digitalWrite (PIN_U_P, HIGH);
digitalWrite (PIN_V_N, HIGH);
delay (on);
digitalWrite (PIN_U_P, LOW);
digitalWrite (PIN_V_N, LOW);
digitalWrite (LED_BUILTIN, LOW);
delay (d);
digitalWrite (LED_BUILTIN, HIGH);
digitalWrite (PIN_V_P, HIGH);
digitalWrite (PIN_W_N, HIGH);
delay (on);
digitalWrite (PIN_V_P, LOW);
digitalWrite (PIN_W_N, LOW);
digitalWrite (LED_BUILTIN, LOW);
delay (d);
digitalWrite (LED_BUILTIN, HIGH);
digitalWrite (PIN_W_P, HIGH);
digitalWrite (PIN_U_N, HIGH);
delay (on);
digitalWrite (PIN_W_P, LOW);
digitalWrite (PIN_U_N, LOW);
digitalWrite (LED_BUILTIN, LOW);
delay (d);
}

transistors circuit-design brushless-dc-motor motor-controller

Share Cite Follow edited Jan 23, 2022 at 22:08 asked Jan 23, 2022 at 20:09
question asker.
27 7

1 The BJT is not controlled by the base. It's controlled by the base AND emitter, together. Your high-
side BJT drive fail to account for that. You're applying voltages to the base relative to ground as if
https://electronics.stackexchange.com/questions/605553/whats-wrong-with-this-bjt-esc 5/7
19.06.23, 12:23 transistors - What's wrong with this BJT ESC? - Electrical Engineering Stack Exchange
the BJT knows or cares what GND is. But how can it? It has zero pins connected to GND. It cannot
even see GND. – DKNguyen Jan 23, 2022 at 20:24

then what do Q1, Q3 and Q5 do? I thought that, once I switched them on, then the positive-side has
a reference voltage. (May be flawed, as it may need positive voltage to turn on first?)
–  question asker. Jan 23, 2022 at 20:30

1 @questionasker. Once you switch them off, that reference disappears. And you definitely don't want
to switch them both on at once! – Hearth Jan 23, 2022 at 20:31

@Hearth <-What they said. – DKNguyen Jan 23, 2022 at 20:32

So, will a large resistance do to establish the reference? –  question asker. Jan 23, 2022 at 20:33

Sorted by:
2 Answers
Highest score (default)

To drive a motor with half-bridge topology (three of them in this case,) it is possible to use
BJTsin a similar way it to how would be done with N-channel MOSFETs. Using BJTs will require
0 a lot more current to drive the base than the current needed to drive the gate. That current
would impose a much larger bootstrap solution.

Therefore, N-channel MOSFETs provide a better solution over BJTs. To drive the N-channel,
you'll need to create a bootstrap supply for the high side, one diode and one capacitor, and
use a level shifter of opto-coupler to drive the gate. Looks like you'll need some changes to
achieve success.

Share Cite Follow edited Jan 25, 2022 at 13:52 answered Jan 25, 2022 at 13:26
JRE Louis
66.9k 8 102 176 114 6

Well, one thing that's wrong with it is that you're using BJTs.

But less facetiously, the bigger problem is that you're trying to use NPN transistors for high-
4
side switching, without having a drive voltage higher than Vcc. So your high side drive is
incapable of being saturated, and in fact you can't output a voltage any higher than 0.6~0.7
volts below your microcontroller's output voltage.

Share Cite Follow answered Jan 23, 2022 at 20:22


Hearth
26.5k 2 51 112

So, if I use 3V or 4V for the motor driver, will it suddenly not be broken? –  question asker. Jan 23,
2022 at 20:25

@questionasker. It might heat up the transistors less, but I doubt your motor can run at such a low
voltage. You need some way to pull the base of the high-side transistors above 9 volts, which is
complicated, which is why you see motor drives with P-channel FETs and PNP BJTs. N-channel FETs
are used in big industrial stuff because they have better characteristics, but that's always in
conjunction with a power supply that can drive them above Vcc. – Hearth Jan 23, 2022 at 20:30

https://electronics.stackexchange.com/questions/605553/whats-wrong-with-this-bjt-esc 6/7
19.06.23, 12:23 transistors - What's wrong with this BJT ESC? - Electrical Engineering Stack Exchange

I'm using a salvaged HDD spindle motor, and it moves at 3.3V, although a bit weakly
–  question asker. Jan 23, 2022 at 20:32

1 In that case, it might work. But it should also work with a 9 volt supply as well if it does; I think you
may have other problems. How much current does your motor need to spin? You may not be able to
provide it enough with just a 2N3904. Are you sure your transistors are all functional, and remain
functional? Because there's a lot of power being dissipated in the high-side transistors when you're
driving them like this (can't give you the actual numbers without knowing the motor's stall current),
and I wouldn't be surprised if it killed them. – Hearth Jan 23, 2022 at 20:37

Winding resistance is 4.2 Ohms, just less than 250 mA/V, so about 800 mA –  question asker. Jan 23,
2022 at 20:39

https://electronics.stackexchange.com/questions/605553/whats-wrong-with-this-bjt-esc 7/7

You might also like