Hi!
I am having problems with a BLDC motor and I wanted to test if my driver is working properly.
I’m using a SimpleFOC Power Shield with an Arduino UNO with ATMEGA 328P.
I am using the code from the driver standalone example (you can find it attached at the end of the post).
The problem is that the output BTN2 and BTN3 is stuck, respectively, at 0V and 1,37V; no matter which value I input in the code.
I did some check and this is what I found:
It is strange that BTN2 and BTN3 has INH = 0V, while BTN1 is 5V. Do you know if it is normal?
Do you have any advice?
Thank you in advance!
// BLDC driver standalone example
#include <SimpleFOC.h>
// BLDC driver instance
BLDCDriver3PWM driver = BLDCDriver3PWM(9, 5, 6, 8); //BTN1 BTN3 BTN2
void setup() {
// pwm frequency to be used [Hz]
// for atmega328 fixed to 32kHz
// esp32/stm32/teensy configurable
driver.pwm_frequency = 32000;
// power supply voltage [V]
driver.voltage_power_supply = 24;
// Max DC voltage allowed - default voltage_power_supply
driver.voltage_limit = 25;
// driver init
driver.init();
// enable driver
driver.enable();
_delay(1000);
}
void loop() {
// setting pwm
// phase A: 3V
// phase B: 6V
// phase C: 5V
driver.setPwm(12,13,15);
}