Why do you want to snap of daughterboard? I could understand this for a drone where weight might be important. But i find it convenient for programming and serial debug.
If you snap off the daughterboard then you’ll have to use some small solder pads (swd) and an external stlink to program (instead of the usb and stlink on daughterboard). As well as swd there are 3 other groups of pads.
Gnd, 5v, rx/tx, pwm (5 pads). Pwm can be used with/without daughterboard. Rx/tx for serial debug without daughterboard. Note rx pad only works if daughterboard is removed.
Encoder/hall pins +gnd and 5v (but others have used this for i2c)
I suspect you can use this in the way you want. It is smaller than i expected, hard to solder and has heat issues (when not being cooled by drone rotor blades) but is quite versatile.
If you plan to use SimpleFOC on it, you will have to write some code attaching the PWM input to set the target speed. If you write that code to support forward/reverse, then it will work as you want.
There is some example code for PWM input controlling stepper motors. I think it can be easily adapted to your needs.
The presence of the daughter-card has no connection to this question, I think. But I would definately leave it on until your design is finalised and tested, it will be hard to program and debug the board otherwise.
Others will perhaps disagree, but 40A out of these boards seems unlikely to me (i know the datasheet says it’s possible but mosfets were getting super hot at 50W with no cooling). You’d have to really do something special with cooling. I’d suggest the vesc 4.12 or similar (e.g flipsky clone) which have a big heatsink. They are 3x the price though .
Thank you. Please let me know I got it right. To summarize:
Simple FOC is guaranteed to work on the B-G431B-ESC1.
Simple FOC does not currently support PWM forward/reverse feature on the board PWM pin.
Need to write code to interpret PWM input (talking RC servo mode not digital PWM) and use the Simple FOC calls on top to drive the BLDC as there is no call to directly bind the rot-speed/torque/angle to PWM.
As far as cooling that’s tangential, as I will connect liquid cooler/peristaltic.
The end idea is to drive the BLDC as an off-shelf digital servo.
Hi, yes, excellent summary, although I’d say #3 isn’t as hard as it may sound, since I know other people have done it and there is example code kicking around the forum/github somewhere.
RC-Servos signals really are just PWM, traditionally with a 20ms period and the position encoded in the duty cycle, which is typically varied in the range around 1ms-2ms. How you interpret that is up to you, e.g. quads use the full scale for one direction, while RC-car ESCs have a “0 position” somewhere in the middle, and use the lower duty cycles for reverse and the higher ones for forward.
If attaching standard RC components I would pay careful attention to the signal out of the receiver to be sure it is ok for the PWM pin of the B-G431B-ESC1; although it does say it is 5V tolerant…
I already ordered a few boards in case they fry while work, and will post code if I get it to work.
I’ll be using Arduino, if I post my code can someone take it and incorporate it into the core Simple FOC library? I’m terrible at git. Also, since I use only this board, will this be generic enough for the other boards?
These kind of ratings for drivers usually mean peak current and not continuous current. Most likely this board can handle 40A peaks without much issue and big continuous currents that will depend on the heat-sinking and cooling of the user.
@Valentine - do you have experience with stm32 chips? Do you know what a ‘board variant’ is and how stm32duino fits into the arduino ecosystem? The reason I ask is that this board has still not been merged into stm32duino which means that the board variant files need to be manually copied into the correct locations for arduino to find it. I think about 6 people on this forum have managed this process and there are descriptions of how this is done on other threads. @Wittecactus wrote up an excellent intro to this here:
You’ll of course need an stlink and an ftdi usb/serial converter after you snap that daughterboard off.