For those of you interested in the driver, an update. Got some time over the weekend, here is the result.
Setup:
Software:
Windows Server 2019 Host.
VMWare Workstation Pro 16
Windows Server 2019 Guest.
USB Pass-trough from host to guest
Arduino clean install on guest
Simple FOC clean git pull
Wittecactus instructions for board deployment on Arduino
Hardware:
B-G431B-ESC1 Board
12 V Power Source
100 MHz Oscilloscope
Connect and turn blue potentiometer on DB. This is the expected result. You will see the control wave between any of the three pole wires on the oscilloscope. With the potentiometer, you control the speed of the motor. Oscilloscope waveform will change.
You must modify the sample code below to scale the speed else gruesome injuries may occur if you decide to connect a live motor! Also must fix motor to solid testbed unless you want to decapitate yourself.
The board reverse voltage protection works fine, I connected for 30sec reverse polarity to test, it just got really hot and nearly de-soldered. The Transil on the board prevents damage in case of reverse polarity at the input side for a low time. Not sure how low is low time, but it drew 4 Amps and in 30 sec noticeably overheated. YMMV. If you have good liquid cooling it may survive for a while.
The board is a dev board. The layout is rather poor. The board is dense and really hard to solder, I needed a microscope. If you need high current you will need copper solder boots and liquid cooling. I mean dunk it in dielectric coolant (fluorinert, novec, etc). Even idle the board draws 0.1A which will overheat it really fast. Whoever designed the board didnāt allow for proper heat-sinks and screw boots, only solder. But for $18, I canāt complain, this is a terrific deal.
Apologies for the literal test bed on the pic, covid forced me to work from home and I canāt get to my nice lab at work.
If I have time I will post the coolant solution.
Iāll try to check the others solutions I saw someone did a current control, will try.
Itās a great board and a great price point.
Sample absolute minimal code for velocity control via daughter-board potentiometer:
#include <SimpleFOC.h>
// NUMBER OF POLE PAIRS, NOT POLES
BLDCMotor motor = BLDCMotor(7);
// MUST USE 6PWM FOR B-G431 DRIVER
BLDCDriver6PWM driver = BLDCDriver6PWM(PHASE_UH, PHASE_UL, PHASE_VH, PHASE_VL, PHASE_WH, PHASE_WL);
void setup() {
// driver config
// power supply voltage [V]
driver.voltage_power_supply = 12;
driver.init();
// link the motor and the driver
motor.linkDriver(&driver);
// limiting motor movements
motor.voltage_limit = 3; // [V]
motor.velocity_limit = 1024; // [rad/s]
// open loop control config
motor.controller = MotionControlType::velocity_openloop;
// init motor hardware
motor.init();
}
void loop() {
motor.move(analogRead(POTENTIOMETER));
}