2023-03-04 12:34 PM
Hi all!
I hope you are well.
I am currently doing a project which needed a configurable ESC for a brushless motor, with the B-G431B-ESC1 along with the MC Workbench looking perfect for this, and works well when connected to the PC using the MC-Pilot software. It doesn't look to work with a PWM input, even when enabling it within the GUI, with only a very minor reference in the B-G431B-ESC1 of using an external PWM Input. Reading online, I have seen others having similar issues, but with limited success in finding a solution. Along with this, there is a potentiometer built onto the ESC, but the setting to use a potentiometer as input is greyed out due to "not being supported on the hardware", which looks like it could need fixing! Don't mind a script-based rather than GUI solution if needed!
Would love to hear any thoughts, as I would certainly like to use this combination in the project, with a great balance of cost-effectiveness against flexibility and performance.
Many thanks,
WB
2023-03-05 05:07 AM
I came here right now to post something similar.
I was able to program a B-G431B-ESC1 board with the default example firmware, configured with good settings for my motor (a gimbal motor).
It took several working days with all kinds of errors, but I eventually got there.
Now I can follow the instructions in the manual exactly. It doesn't work.
I programmed a RBPI pico to produce the PWM signal. I checked with an oscilloscope and the signal is good. Correct frequency and duty cycle.
The board seems to recognize that it is getting a pwm input, because when I don't connect the PWM signal at all, it sits there beeping (as escs often do, it uses the motor to cause the beeping sound).
However it makes no effort to move the motor or give any kind of useful indication re what is going on.
I am also investigating SimpleFOC, but I don't think it can give rpm above about 500 rpm with this board, according to others on the forums.
Also don't forget the board is not a commodity module you can buy and use in a product. It's cost of production substantially exceeds the retail price, so you aren't going to be able to buy very many. ST only offers them as a dev board.
In my opinion someone should actually make actual good, configurable, driver boards and sell them. There seem to be a lot of people that just need a driver board, not a pile of parts that may or may not be possible, with a month of time and great deal of investment in prototyping and testing and design, to design a board which may or may not be possible to produce.
2023-03-05 11:24 AM
I looked closely at the schematics and motor configuration, and apparently you have to press the button on the ST-link board to start the motor. So it's an error in the documentation, that this is omitted.
The whole thing still doesn't work though, just makes a little noise and gives up. I've been working on trying to get this working for three days now.
2023-03-05 01:44 PM
Yep, it's a shame to hear I'm not the only one having issues, hopefully, this post gets a bit of traction/ notice, as the software looks to have all the features for it to work, but with a bit of a lacking documentation and possible bugs. If they do get fixed, it will make the board very helpful.
Have you used the ST MotorPilot software? As I know that allows you to control it from PC, and from testing, starting at too low of a speed, at least for my motor, will cause one of the stop features to kick in. Whether this is happening with yours, it could be worth playing around in that software, finding what speed it works with, and if other issues such as voltage protection (which has seen to kick in if the speed changes too suddenly). As it's the case that the motor works through that, which I believe uses UART for communication, but not from a microcontroller PWM signal, which I need it to. Hope that helps!
2023-03-05 02:36 PM
There is someone who reverse engineered some of the UART communications that are being used to control the board, maybe you could use that:https://community.st.com/s/question/0D53W000010tKueSAE/documentation-of-aspep-protocol
The motor profiler is able to spin up my motor and measure it's characteristics, and run it apparently with little difficulty, however the motor pilot is not able to repeat the stunt, nor is the board with the right firmware. There seems to be a major problem with the motor startup code. It does not draw significant current while trying to start the motor. Maybe there is something wrong with the current sensing or regulation. Must be a firmware issue as again the profiler works to spin up the motor.
There is no fault thrown. No useful diagnostic information, nothing. Just a dead end. Again. Endless problems. I tried basically every combination of acceleration and so on.
2023-03-06 12:52 AM
Hello @WBurb.1 ,
I managed a few days ago to make my motor run using the PWM signal and the ESC mode activated on the Motor Workbench.
The electronic speed control (ESC) feature allows to control the motor speed with a PWM signal in input, for example on the B-G431B-ESC1 boards it is possible to use this feature to control the motors of a drone sending a PWM signal with a different duty cycle to switch the motor to armed, armed with a minimum speed, armed with a maximum speed and unarmed state.
You can find more details on this example on this link : click here
on the chapter "Connection and first execution of the electronic speed controller (ESC) program".
Can you verify your configuration, And if possible share with me some information about your motor and a picture of your connection?
Thank you
2023-03-06 01:14 PM
Hi Zied,
Many thanks for your message.
I have finally managed to get things up and running today, apologies for the error, there was a slight script error on my behalf which slowed down making progress. It is working now with the newest MC Workshop Software, I just have a bit of work to profile the motor under load, to get more representative motor characteristic values in the firmware. Many thanks for sending this though, it made me double check things over!
Could I ask why the onboard Potentiometer can't be activated, out of interest? Its not necessary for my application, but could be handy for quick testing.
Looking forward to developing my solution further!
Many thanks,
WB
2023-03-06 01:17 PM
Hi!
I managed to get things working today, I had that happen when the motor needing reprofiling, using the profile software, as I had initially profiled without a load, so with a load present it would cut out, due to not expecting this, would it be worth reusing the profiler with the intended load, then playing around with the motor pilot software to find what speeds its happy to start at. The PWM at full duty cycle will go up to the intended speed (a name like this) within drive settings, rather than the application speed, which also caught me out, as the default speed was not sufficient to start my particular motor. Hope that helps!
WB
2023-04-05 03:48 AM
Hi Zied,
I hope you are well!
I have mostly got things working, but I need to now try and use the ESC with a different PWM input, from an RC Controller. The Datasheet only mentions the specific timings you mentioned above- 800us, 1060us and 1860us, is there a way of changing this, as well as the expected PWM rate, from the 490Hz rate mentioned?
From what I know, the software allows the internal PWM generation to be changed, but I haven't seen a setting to alter what external PWM input it expects. Once this is sorted, the system should all be done!
Many thanks,
WB
2023-04-05 04:01 AM
You will find these values in the "parameters_conversion_g4xx.h" file, as you can see in the image. Do not hesitate to confirm with me if everything is working correctly.