Mystery Power Board from eBay - Current Sense Gain?

Hey folks,

Has anyone used this board before: FOC Drive Board Brushless Motor High-power Drive Board SimpleFoc Development | eBay

I was planning to use it to control a large hoverboard motor, and would like to use the built in low-side current sense resistors. The schematic (here) shows the current sense op amps using a gain of 24, so with the 0.005 ohm resistors, that should be be 24*(0.005 ohms) = 120 mV/A gain, right?

Thanks in advance!

Not sure where and how you derived your formula to get those numbers.

The mosfets are 30A. At 5mO current sense resistor, the voltage drop is 0.15V (150mV/30A) at maximum current. That doesn’t really change, so you get 5mV/A voltage drop.

To max out the amplifier, for gain of 24, you will have 0.1375V/A to get 3.3V, or 0.209V/A to get 5V assuming 3.3V or 5V logic.

Therefore you have 137.5mV/A for 3.3V logic or 209mV/A for 5V logic.

Did I get this right? Please correct me if I’m wrong.

Cheers,
Valentine

Hey Valentine, thanks for replying!

I’m not an EE, so maybe i mis-understand how the op amp would work in this case. It is supplied by 5V from the schematic. Here’s my logic:

  • 0.005 ohm shunt will generate 0.005V per amp flowing through it
  • The op-amp will multiply that by 24, as long as that value is below the op amp supply voltage minus whatever offset it has (if it’s not rail to rail)
  • 0.005V/A times 24 = 0.120V/A, or 120 mV/A

I think i don’t understand how the op amp supply voltage influences it’s gain in this case.

You are correct. I rhought you dont like the resistor so i gave you the opposite. Ignore what I said.

Cheers,
Valentine

1 Like

350W 6.5 inch hoverboards usually have mosfets rated double the battery voltage around 100 amps. Generally it is 70V 100+A. Using FOC algorithm, you will reduce the power consumption and the mosfet requirement, and depending on what and how you are driving, you might not need as much power as a hoverboard (carrying a weight of a person), but I have a feeling the 30-35A mosfets will be a bottleneck for you.

@Aleksandar_Markovic Thanks for the feedback! In my case the motor is not being used to drive a hoverboard, but rather as a variable torque device. I should be able to stay below 20-25A Iq current in steady state.

Hi @wrcman555 ,

I am also using this driver to drive a few larger motors as well. I have implemented closed loop velocity and position control with this driver but have not yet done current control.

As per the documentation, I am switching to a stm32 bluepill board so it can handle the low side current sensing from this board. How far have you gotten with the hover board motor? Are you using a similar microcontroller?

Thanks,
S

Hi @slayerizer ,

I’ve been successful in controlling my motor with both an esp and ST micros. I am using a DRV8302 board from AliExpress. I have been able to control velocity, position, and torque using the lowside current sensors present on my board, no issues. My application primarily relies on accurate torque generation across a wide speed range, so I must have current control for torque as opposed to voltage control.

Glad to help further if you need. So far, I’ve been able to hit 15A Iq at with a 36V power supply…

Hi @wrcman555,

Glad to hear you have been able to control your motor with the DRV8302! I have been contemplating switching over to that board, but I have purchased a few of the drivers from your original post and really want to give it a chance before I switch. I do really appreciate the offer as well as I have been having some trouble with my STM micros.

My first issue is that my PWM is stuck at a low frequency and making a loud buzzing noise. After doing some research, I found that I can modify the configurations for the timer on the board. I have seemingly doubled my PWM frequency by using this command “timer.setPrescaleFactor(1);”. Tonight
I have tried the additional command “timer.setOverflow(255);”, which has subsequently fried my micro, my position sensor, AND my driver (im not sure why at this point). Luckily I have two more drivers and sensors to keep experimenting. The micros were a 5-pack from amazon so i’m good on that front as well. Have you come across this issue? If so, how were you able to overcome it?

Once I can solve this, I will try current control from the driver pins.

Thanks,
S

@slayerizer Could you explain what board you are using? Is it the one I originally linked to? To be clear, I haven’t spent time with it yet, since I have the 8302 boards which work well. When I get some time to try it out, I’ll let you know how it works (or doesnt).

@wrcman555 I am using the driver from the link in your original post: FOC Drive Board Brushless Motor High-power Drive Board SimpleFoc Development | eBay

But my issue is not even the driver it seems. The driver is working as is. It is turning my motor in closed loop, no current sense with my arduino and teensy, but when it comes to my STM32 (STM32F103C8T6), which I have purchased just so I can do current sense, it results in a buzzing noise. I changed the timer configurations on the board with the below code, and now it is no longer buzzing, it is more of a high pitched scream. I switched out the stm32 with another one, but same issue.
timer.pause();
timer.setOverflow(3600);
timer.refresh();
timer.resume();

@wrcman555 or @Valentine any ideas what can be causing this or how to resolve this?

Thank you!

Hey guys, after much toil, I’ve gotten my motor and driver to work with current sense. Currently having no problems with it!

In terms of the driver board, I have ordered 5 of them from the link mention by OP, but only 4 were functioning. Those that work are perfectly fine, so I guess if you’re looking at a cost analysis for this board, I’d throw in a +25% multiplier for the dud boards.

The gain I’ve used is 24 and have seen no issues.

S

Hi,

How were you manage to control the low side current sensing? I remember simple FOC supports inline sense.

Thanks