Custom Controller for Planetary type BLDC Motor doesn't work

Hello everyone, i'm a student working on a project on creating a custom controller to my Ebike Planetary BLDC Motor 36V 350W. i've created the Inverter using IRF540N MOSFET to my BLDC and also created the Driver using IR2101 IC that will be driven through Arduino UNO, both of them are references i found on the Internet. Before i created all of them i make sure my circuit running well so i simulated it in Proteus (i'll attach the picture), also inside proteus i program my Arduino UNO and it worked fine, i also learned the 6 commutation steps to become the base of my Arduino program. here's my program:

const int HallApin = 7;
const int HallBpin = 6;
const int HallCpin = 5;

const int potPin = A0;

int HallAState = 0;
int HallBState = 0;
int HallCState = 0;

const int D2pin = 2;
const int D3pin = 3;
const int D4pin = 4;
const int D9pin = 9;
const int D10pin = 10;
const int D11pin = 11;

int Kecepatan;

void setup() {
  pinMode (HallApin, INPUT);
  pinMode (HallBpin, INPUT);
  pinMode (HallCpin, INPUT);

  pinMode (potPin, INPUT);

  pinMode (D2pin, OUTPUT);
  pinMode (D3pin, OUTPUT);
  pinMode (D4pin, OUTPUT);
  pinMode (D9pin, OUTPUT);//pwm
  pinMode (D10pin, OUTPUT);//pwm
  pinMode (D11pin, OUTPUT);//pwm
  Serial.begin(115200);

}

void loop() {
  Kecepatan = analogRead(potPin);
  Kecepatan = map(Kecepatan, 0, 1023, 0, 255);
  HallAState = digitalRead(HallApin);
  HallBState = digitalRead(HallBpin);
  HallCState = digitalRead(HallCpin);
  if (HallAState == HIGH && HallBState == LOW && HallCState == HIGH) {
    digitalWrite(D2pin, LOW);
    digitalWrite(D3pin, HIGH);
    digitalWrite(D4pin, LOW);
    analogWrite(D9pin, Kecepatan);
    digitalWrite(D10pin, LOW);
    digitalWrite(D11pin, LOW);
  }
  else if (HallAState == HIGH && HallBState == LOW && HallCState == LOW) {
    digitalWrite(D2pin, LOW);
    digitalWrite(D3pin, LOW);
    digitalWrite(D4pin, HIGH);
    analogWrite(D9pin, Kecepatan);
    digitalWrite(D10pin, LOW);
    digitalWrite(D11pin, LOW);
  }
   else if (HallAState == HIGH && HallBState == HIGH && HallCState == LOW) {
    digitalWrite(D2pin, LOW);
    digitalWrite(D3pin, LOW);
    digitalWrite(D4pin, HIGH);
    digitalWrite(D9pin, LOW);
    analogWrite(D10pin, Kecepatan);
    digitalWrite(D11pin, LOW);
  }
   else if (HallAState == LOW && HallBState == HIGH && HallCState == LOW) {
    digitalWrite(D2pin, HIGH);
    digitalWrite(D3pin, LOW);
    digitalWrite(D4pin, LOW);
    digitalWrite(D9pin, LOW);
    analogWrite(D10pin, Kecepatan);
    digitalWrite(D11pin, LOW);
  }
  else if (HallAState == LOW && HallBState == HIGH && HallCState == HIGH) {
    digitalWrite(D2pin, HIGH);
    digitalWrite(D3pin, LOW);
    digitalWrite(D4pin, LOW);
    digitalWrite(D9pin, LOW);
    digitalWrite(D10pin, LOW);
    analogWrite(D11pin, Kecepatan);
  }
  else if (HallAState == LOW && HallBState == LOW && HallCState == HIGH) {
    digitalWrite(D2pin, LOW);
    digitalWrite(D3pin, HIGH);
    digitalWrite(D4pin, LOW);
    digitalWrite(D9pin, LOW);
    digitalWrite(D10pin, LOW);
    analogWrite(D11pin, Kecepatan);
  }

};

note that "Kecepatan" is "Speed" i'm using that as a variable to my potentiometer. there's no error when i compiled it and uploaded it to my Arduino UNO. But i don't know why when i wired all of them into one piece my BLDC won't move. Also in reality my wiring is kind of different from the simulation in proteus, i'm using a 36V 10Ah Battery and i paralleled it to supply 1 Inverter IRF540N, 1 step down regulator 12V to supply driver IR2101, and 1 step down regulator 5V to supply BLDC Hall Sensor, Potentiometer and Arduino UNO. My step to turn it on is i added switch before inverter so when i connect my battery it will supply the 12V and 5V first and then i turn on the Inverter. After i've done all that, nothing happened, the arduino is on and i tried to give a little spin on potentiometer, nothing happened. Is there something i missed? thank you very much for the help.

Reconsider your selection of 100K for gate series resistors.

The gate drivers appear to be wired incorrectly. Study the data sheet carefully.

1 Like

Did You copy the driver schematics from a running design or did You make it up Yourself?

Q2, Q4 and Q6 will surely do fine but I wonder about the gate voltage for Q1, Q3 and Q5. The IC feeding the gates is powered by only 12 volt. Is that enough?

1 Like

thanks for the reply, is it too big or too small? should i just use 10k resistor as well for every 100k resistor?
sorry but which pin is incorrect? i've read the datasheet of IR2101 and the driver schematic is a reference from the internet...

thanks for your reply, yeah i copied it from the internet, most of the inverter for bldc motor is like that, for the resistor added each pin i read about protecting mosfet, that's how the schematic ended up like that.
what's the ideal supply for IR2101 then? i can increase it to my battery voltage. Does the supply to Q1, Q3 and Q5 have to be different from the Q2, Q4 and Q6?

Several orders of magnitude too large. You really should try to learn something about how MOSFETs work.

1 Like

...... Everything found on the Internet is not made by knowing people. There is crap also.

For R2, R4, R6 I'm using some 180 Ohm and for R7, R8 and R9 I would use 10 kOhm.

I'm not confident with using that N channel MOSFET for Q1, Q3 and Q5 as their gates are fed by only 12 volt. I might be wrong as I've not been doing such designs.

1 Like

okay my bad, i will read more..
thank you very much..

yeah i'm aware of that, i've been surfing on the internet to gain references a lot of times and i didn't succeed maybe because my lack of knowledge, that's why i tried to ask here...
thanks for the suggestion, i will reconsider the use of N channel MOSFET then, does the inverter design can be used by a mix of P channel and N channel MOSFET? like high channel using P and low channel using N..

Look around for application notes. Google found this: IR2110 Mosfet Driver Pinout, Examples, Applications and How to use (microcontrollerslab.com)

1 Like

thank you very much! i will learn it first!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.