B-G431B-ESC1: Beginner guide + I2C guide

Hi ! I have the same problem … Have you found any solution ?
Thank you

No, I have not. I am currently using the arduino ide to upload code.

It is not working for me neither … It is said that PHASE_UL and all the other 5 phases are not declared in this scope. I don’t know if somebody already had this problem … (I don’t have this error on PlatformIo as I said just before, just like @Thijs_Lenssen describe earlier).

Ah ok, try putting ‘A_’ in front of the phases. Like A_PHASE_UL.

I’ve tried it also (this writing is what I saw it has already be defined in platformio) but it is giving me the same error message.

Hi, the board is meanwhile available in platformIO. Hence I would assume the manual editing of the files is no longer needed. I get however some error messages referring to “This board does not support USB High Speed!” …
I don’t intend to use I2C, I just try to run the example on youtube with hall sensors.

Could anyone explain the hardware setup (connections) for the example above?
(video https://www.youtube.com/watch?v=ufMs83Y3sXg)
I can’t figure out about PWM signal - do I have to connect it to J3 pins, to run the motor as in this video?
Thank you

I did a analog write on one phase and on another phase i set it to ground via arduino. My board got smoke, the current was 2a and the board wasn’t even hot. My suggestion is that there was a high induction voltage because of the analog frequency of 50Hz and the chip got smoke. Could this be true?

I did even set phase1 to high and on phase2 to low and the esc got hot. I dont know why this is happening with a R(DS) of 0.5 mOhm. Volage was 10V, current was around 2A, phase resistance is 5 Ohm

Hi @Lukas_Pfitscher ,

I’m not sure what you’re exactly doing, but be careful!

How thick are your wires? Was it the board that was smoking? Could you have a short-circuit somewhere?

1 Like

You literally short circuited your mosfets through the arduino board, if I understand correctly what you did. It’s really difficult to understand or debug without some schematics or a picture of the setup.

Please don’t get hurt and use eye protection and gloves. The chips when over-stressed will explode and the hot ceramic epoxy will get into your eyes. Bad way to lose an eye.

Cheers,
Valentine

1 Like

I used thick 16AWG wires, they don’t get hot. My setup is a simple: power supply, ESC, motor (300kv big drone motor)

If i directly short the motor with my power supply it will pull 10A and the voltage will drop to 2V. Motor can handle it for some time (20s before getting hot). But i somehow figured it out: I measured the phase resistance wrong (its 2V/10A = 0.2Ohm). So somehow the ESC would not let me pull more than 2A, or it has some under voltage protection… i don’t know really…

But one problem still remains open why my ESC burned with analog write 50 to pin PC13, and PA12 set to High and motor connected. And it was the chip itself. the mosfets were not warm. It took just a sec

Man, that’s a bummer! We’d have to check bu aren’t those pins both low-side ones? Did you set the state of all the other pins for the driver?

1 Like

From looking at the schematics, I can’t see how this could kill anything but the MOS FETs. The gate driver chip should even prevent you from enabling high and low side FETs simultanously and the CPU should be completely decoupled from that. Killing the MOS FETs is easy however, I noticed that already…

1 Like

Did today again some testing, connected 2 phases to a power resistor (8 Ohm). Supply voltage is 20 V, sou current could not exceed 2,5 Amps. But again when i open the MOSFET the board gets instantaneously really hot (the resistor not even a bit). My code is below. I also tested the circuit with a single MOSFET (IRF3205) and the MOSFET stayed cool and the resistor got hot how it should be.

The board consumes about 1.2 watts and gets a bit warm on standby. I think its around the voltage regulator so maybe its normal.

#include <Arduino.h>
void setup() {
pinMode(PC13,OUTPUT);digitalWrite(PC13, LOW);
pinMode( PA8,OUTPUT);digitalWrite( PA8, LOW);
pinMode(PA12,OUTPUT);digitalWrite(PA12, LOW);
pinMode( PA9,OUTPUT);digitalWrite( PA9, LOW);
pinMode(PB15,OUTPUT);digitalWrite(PB15, LOW);
pinMode(PA10,OUTPUT);digitalWrite(PB10, LOW);

digitalWrite( PA8, HIGH); //1PhaseH
digitalWrite(PA12, HIGH); //2PhaseL
delay(1000);
digitalWrite( PA8, LOW); //1PhaseH
digitalWrite(PA12, LOW); //2PhaseL
}
void loop() {}

So keep in mind this is supposed to be a drone ESC, so in tis intended use-case it is always subject to forced air cooling just by the drone’s flight and propeller wind… When using it a “stationary” scenario, you should really put a heat-sink on it…

performance RC-Car ESCs typically have heat-sinks and little fans for cooling.

2 Likes

First of all, thanks a lot for the tremendous help offered in this forum, it got me started really fast!

Since my experience with power electronics is close to zero and my application is stressing the board pretty much as far as the heat dissipation goes, I have some questions to the experienced experts here. I use the B-G431 board together with a ACT-BLF01 motor, planning to go for a stronger motor (BLF03) pretty soon. The current motor has 2 Ohms, is rated at 24V and 5.7A max. In most cases, heat is not an issue and the current actually used is pretty low (overall power consumption is <10W). There are cases however, when I need to issue a much higher torque for a few seconds, in which case the MOS FETS heat up quickly. I use the onboard NTC to detect overheating and switch of the drivers if it gets too hot. I already attached tiny heatsinks to the MOS FETS and a small 35mm fan is already ordered.

Now the questions:

  1. Since the NTC is sitting next to the MOS FETS and not measuring the junction temperature, at which measured temperatur would you switch off? I want to be on the safe side, the board is cheap, but getting harder to order…

  2. The motor is rated at 24V, but I used it at 12V only so far. How would going up to 24V affect the heat dissipation?

  3. Up to which continous current would you trust the board equipped with the tiny heatsinks and a small fan?

Thanks a lot for any help!

  • Chris

I am trying to run the B-G431-ESC1 board with Arduino IDE 1.8.10. But the project is not going. Gives errors. What could be the problem?

C:\Users\Alexey\OneDrive\���������\Arduino\libraries\Simple_FOC\src\drivers\hardware_specific\stm32_mcu.cpp: In function 'int findIndexOfFirstPinMapEntry(int)':
C:\Users\Alexey\OneDrive\���������\Arduino\libraries\Simple_FOC\src\drivers\hardware_specific\stm32_mcu.cpp:409:10: error: 'PinMap_TIM' was not declared in this scope; did you mean 'PinMap_PWM'?
  409 |   while (PinMap_TIM[i].pin!=NC) {
      |          ^~~~~~~~~~
      |          PinMap_PWM
C:\Users\Alexey\OneDrive\���������\Arduino\libraries\Simple_FOC\src\drivers\hardware_specific\stm32_mcu.cpp: In function 'int findIndexOfLastPinMapEntry(int)':
C:\Users\Alexey\OneDrive\���������\Arduino\libraries\Simple_FOC\src\drivers\hardware_specific\stm32_mcu.cpp:421:10: error: 'PinMap_TIM' was not declared in this scope; did you mean 'PinMap_PWM'?
  421 |   while (PinMap_TIM[i].pin!=NC) {
      |          ^~~~~~~~~~
      |          PinMap_PWM
C:\Users\Alexey\OneDrive\���������\Arduino\libraries\Simple_FOC\src\drivers\hardware_specific\stm32_mcu.cpp:422:45: error: 'ALTX_MASK' was not declared in this scope
  422 |     if (   pinName == (PinMap_TIM[i].pin & ~ALTX_MASK)
      |                                             ^~~~~~~~~
C:\Users\Alexey\OneDrive\���������\Arduino\libraries\Simple_FOC\src\drivers\hardware_specific\stm32_mcu.cpp: In function 'int findBestTimerCombination(int, int, int*, PinMap**)':
C:\Users\Alexey\OneDrive\���������\Arduino\libraries\Simple_FOC\src\drivers\hardware_specific\stm32_mcu.cpp:449:36: error: 'PinMap_TIM' was not declared in this scope; did you mean 'PinMap_PWM'?
  449 |     searchArray[index] = (PinMap*)&PinMap_TIM[i];
      |                                    ^~~~~~~~~~
      |                                    PinMap_PWM

Are you using the arduinostm32 framework?

These includes are defined in framework-arduinostm32/cores/arduino/stm32/PinNames.h. There must be something wrong with your IDE setup.

1 Like

Thanks for the answer. The problem was indeed in the Arduino IDE. I removed the IDE, as well as installed libraries and boards, reinstalled and everything worked.

Work in progress, but what do you mean “no SPI support”? :wink:

1 Like