Skip to main content
WBurb.1
Associate
March 4, 2023
Question

PWM input and potentiometer don't look to work with B-G431B-ESC1 on X-CUBE-MCSDK-6 (Motor Workbench 6)

  • March 4, 2023
  • 5 replies
  • 5502 views

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

This topic has been closed for replies.

5 replies

adoug.11
Associate II
March 5, 2023

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.

adoug.11
Associate II
March 5, 2023

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.

WBurb.1
WBurb.1Author
Associate
March 5, 2023

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!

adoug.11
Associate II
March 5, 2023

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.

ST Employee
March 6, 2023

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.

0693W00000Y9oRLQAZ.png 

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

WBurb.1
WBurb.1Author
Associate
March 6, 2023

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

Associate II
December 14, 2023

Hello everyone,

I am also using the B-G431B-ESC1. I've encountered an issue where the potentiometer appears grayed out in the configurator. Has anyone found a solution?

Additionally, would it be advisable to open a separate thread to seek a solution for this specific issue?

Thank you for your assistance.

Gael A
ST Employee
December 14, 2023

Hello giova_,

Indeed, it would be better to open a new post for this issue. If your issue is related to an older thread, feel free to make a reference to it in your new thread. This will prevent the author from being pinged even though his issue has long been resolved. This also allows for a healthier reference for future customers seeking the same information.

But since we are here anyway, and that the original post does include your question, I'll be glad to answer you :
The Potentiometer feature is not supported for the ESC-G4 on any MCSDK version prior to MCSDK v.6.2.1. You can download the latest version of our MCSDK right here.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.Hope this will help,Gaël A.
Associate II
December 14, 2023

Hi Gael,

thanks for your reply and your advice. I confirm that I have been able to run the ESC-G4 with the MCSDK v.6.2.1

Thanks,

Giova