Is Simple FOC an alternative to BGMC2 from RoverTec

Hi together,
I would like to create a simple rotary drive with a gimbal motor. The gimbal should rotate very slowly, between 0 and 60rpm and should be very quiet, preferably still run at 5V and be controlled with a rotary controller or PWM module. I have already tried a lot and have come across BGC boards, for example. Unfortunately I can’t use these bimbal controllers because they always need an IMU.
After a long search I found the most interesting solution for me. You can find it on youtube with the search “BGMC2 Precision vs Speed”. Here an ESC controller is connected to a gimbal and controlled via a PWM device. Unfortunately, this solution is no longer available for purchase or I dont find it.
I am looking for a simple solution as shown in the video. Is there anyone here who can help me? Maybe the SimpleFOC variant is a solution, but unfortunately I don’t know enough about it or you know a different solution.

Many thanks for your help!
Thomas

Welcome to the forum.

Forgive my ignorance. What is a rotary drive?

Cheers,
Valentine

Hi Valentine,
I have a IFlight iPower GM2804H-100T with 14 poles. I have already tried such a motor speed controller. That is simple but the motor turns too fast and I think on every PWM signal there is a little bing from the motor that you can hear. Sounds like you knock on the motor with a metal thing.
C

@Thomas

You did not answer my original question, what’s a rotary drive?

Valentine

Hi @Thomas,

The RoverTec boards are unfortunately gone from this world. I can’t find their website or or any way to buy them any more, I searched intensively about 1 month ago… so I think you will have to look elsewhere.

So for this type of motor, 5V voltage and 0-60rpm I think you can get pretty much near-silent operation from SimpleFOC. There will always be a tiny amount of noise, but almost nothing, in my experience.

For these power levels you do not even need complicated current control or things like this, as the motor has 5.5Ω resistance, and 5V means currents will remain <1A.

The secret is to use closed loop control, for example in velocity mode. In closed loop control, the current consumption will be very low (depending on the speed and load) and the commutation will be near optimal, and therefore quite silent. For closed loop control you will need a position sensor.

In open loop control, the currents will be much higher, the commutation sub-optimal, and there will be far more noise.

Another factor is having a good driver, which you can run at a high PWM frequency, lets say 25kHz or more, and get a good closed loop iteration speed, lets say 3kHz or more. Many MCUs can do this with SimpleFOC, but aim for faster models, like STM32, ESP32, SAMD21/51, NRF52 or Raspberry Pico, and not the old 8bit ATMega MCUs…

A challenge for the small motors going so slowly can be to get them to run very smoothly (cogging effects, sensor anisotropy/misalignment), but how smooth you need depends on your application, I guess.

1 Like

Hi Valentine and Runger
maybe I should tell you a little bit about what I’m up to. For me, a rotary drive is a motor. In principle, I want to build a turntable, which you can also buy, even cheaply from China. However, these turntables are very noisy because they have a brush motor and a gearbox. this motor turns relatively quickly, which is where the noise comes from. the turntable is there to put something on and watch it, e.g. a candle or a small object. There are also pyramid motors that work with alternating current. these are very quiet, but i would like to have a battery-powered turntable.

Basically, I mount a small gear on the brushless motor and this then drives the turntable with a larger gear. I get a ratio of about 1:10 with the gears. Alternatively, I mount a belt drive on the motor and get a ratio of about 1:20.

These 5V come from a battery that can be charged with a mobile phone power supply. I also found a circuit board that can make more out of the 5V voltage, for example 6V or 12V. But I would like to save this component if it is possible.

I have added here some fotos, that you can understand better what I mean


Thank you for your help!
BR Thomas

Hey,

I think it will be easily possible. I don’t think you’ll need a gear-down unless what you’re turning is very heavy. I’d use direct drive or I’d misuse a timing belt (which are very small and light and thin) as a drive belt. I think having a good bearing supporting the turn-table’s axis will probably make a lot of difference to the sound levels and smoothness of rotation.

The motor you have pictured is not a BLDC motor though, it is a DC motor with integrated gears. It will be noisy, and you can’t drive it with SimpleFOC.

I’d use this kind of motor:

There are considerably cheaper models on AliExpress/Amazon but that’s the kind of size/shape that will be enough for a little turn-table. It’s nice and flat too.

It has a hollow shaft, making it easy to integrate a magnet for a magnetic sensor, but to be honest I would give a try with open-loop first, despite my earlier comments about it being noisier, and lower the voltage as far as you can while still getting good movement. Then listen to the sound, and see if it isn’t already quiet enough.
If it is still too loud you can then improve it with a position sensor and closed loop.

hi runger,
That sounds really good. you are right, the motor in the picture is not a blgc motor. I have bought the motor you suggested. now the question is, which driver card works for this in the open loop. i saw the b-g431b-esc1 board. this has a direct connection for the motor and also a rotary knob to regulate the speed and apparently also a 5V connection. The small installation space and the price are also an advantage, but the availability of this board is not particularly good. I only saw 2 pieces on ebay. The space and the price are particularly important to me.
whether there are comparable boards or do you know an alternative?

do you think this board is a good choice? could you, let’s say, implement this speed control with a rotary potentiometer on the board?

Best regards
Thomas

The B-G431B-ESC1 is a good board, and easily able to power this little motor. The advantage will be also that you won’t need a heat-sink to drive this motor.

I think you can use the potentiometer to set the target velocity, it should not be hard to do. It is connected to pin PB12 according to the documentation. The potentiometer is on the daughter-board with the ST-Link, so you will have to leave this attached to the ESC board if you want to use the potentiometer.

There is a big shortage of drivers, so I don’t know what else to suggest at the moment…

Hi runger,
I have ordert 2 pcs B-G431B-ESC1 at ebay.
I would like to attach an additional potentiometer that contains a switch.
Like this:

I will probably have to unsolder the existing potentiometer at the daughterboard and solder a new one with cable to it. Unfortunately, I have not found a resistance value in the documentation.

Is there an example with code that fits to my case?
Thank you verry much for your help. Unfortunately I do not have much knowledge in this field.

Hi all,
I have received the board and have installed Arduino including the SimpleFOC library on my pc. To try if the connection to the board works, I found a small LED blink program and played it on the board and it works. in this forum I found a small program, see picture. Unfortunately, an error message comes up that I can’t do anything with. Can someone please help me?

Hi Thomas,

Could you share a screenshot of your Board manager settings? Did you install the current STM32 platform?

Hi Runger,
I found out :slight_smile: You must not install the latest SimpleFoc library. After that, there was no more error message and I could install the code on the board. The 5V power supply doesn’t seem to be enough because the motor doesn’t react. I will get another 5V step up to 12V module.

Huh, interesting, I run the latest SimpleFOC library version on STM32 without problems…

It is the B-G431B-ESC board that isn’t working?

Also, unloaded, the 2804 motor should definitely move when driven by 5V. Its only a little motor. If loaded, then that could be different, but unloaded 5V should be enough if its enough for the driver…

I dont know… I uploaded the code as shown in the picture above. I soldered an usb connector for a powerbank to the board and soldered the brushless motor to the board. Now when I only connect the powerbank to the board nothing happens. I turned the motor by hand and nothing seems to have arrived, it turned manually just as easily as if it was not connected.
Mayby there is something different wrong.
I also connected a 9V block and nothing happend.

Or do I still have to do something, press start somewhere? I thought it was enough to load the code onto the board and connect a power source.

For the open-loop example, that should be pretty much it. What does your target value start at? You might have to set a non-0 target value, but other than that, it should start turning.

Things to watch out for:

  • short circuits and polarity - don’t connect things in reverse, watch those loose cable stands…
  • PSU voltage - 12V with 3V voltage limit is ok. Did you actually use 12V? You should modify the PSU voltage to be close to what you’re actually using
  • Currents - with the 5Ω motor, currents should remain within permissible levels. If testing with a different motor, check its resistance and consider the voltage limits!

I dont know, how to integrate the non-0 target value into the code. I have also set the voltage limit voltage to 2V and the power supply to 5V like the powerbank but nothing happend. I think it is somthing wrong with the code. Maybe “BLDCDriver6PWM driver = BLCDDriver6PWM(PHASE_UH and so on)” is wrong.
I Will check it later.
I dont think, that I have a short circuit and a wrong polarity. The 2 LEDs on the board light green if I have only the powerbank connected. So I have to check different things and I let you know If I have a sollution :slight_smile:

Would you mind sharing your code here, to help see what’s going on?

You can set the target value with the parameter to the move() function.

So putting this in your main loop:

motor.move(2.0);

will set the target to 2 rad/s in open loop mode.

Later you can set the target value depending on other factors, like user input via a potentiometer, etc…
But lets start with simple things until it is working.

Hi runger,
thank you for your help :slight_smile:
I have some good news: the code is not wrong for my combination of board and motor as I suspected above.
I took a second board yesterday to rule out whether the board is broken. Uploading the code worked without any problems (it is the one from above with the adjusted volt number). The 5V power supply seems to be too little for the ipower motor. I tried 9V and it works. Unfortunately I can only control the speed with the potentiometer in a very limited way. At the zero position the motor doesn’t turn, which is good. If I turn the potentiometer slowly, the motor also starts to turn without any noise. However, after about 5° of turning the potentiometer the motor had a speed of about 200rpm at this point I think. After 5° the motor seems to get out of sync and stops turning and then sounds like a small turbine or something. I will try another motor that is smaller and also try the 5V step up to 9V board.
I would like to use the total rotation of the potentiometer to control the motor, say between 0 and 60 rpm (maybe with adjustable parameters that I can try a bit).

Huh, no I think the problem is not the motor but the B-G431B-ESC1… it is rated for 3S to 6S batteries, or 8V to 22V. So that’s why it won’t run on 5V…

My comments about the motor running on 5V were made earlier in the thread, before you had chosen the B-G431 driver… so sorry if this caused any confusion.

I think this motor would turn just fine on 5V for your turntable application, but this particular driver needs at least 8V, and 12V would be preferable.
So your 12V PSU and 3V limit approach is good for open loop mode, I think.