BLDC control

Hi everyone,

I have got a CORE2-ROS with ASUS tinker board and want to control some BLDCs. Is there any possibly that I can drive them using existing H-Bridges or should I go with external controller?

Thanks in advance

Mert

Hi Mert,

external controllers are needed for driving BLDC motors. I suggest you to use ESC (Electronic Speed Controller) module, like this one:

https://www.robotshop.com/en/m20a-20a-multicopter-esc.html

The ESC modules, commonly used in drones or RC cars, are usually driven by PWM signal. It’s the same signal that is used for controlling the popular RC servos. That means you can simply use output from servo controller, integrated in CORE2, to drive the ESC input. In that way, you are able to drive up to 6 BLDC motors when you use 6 ESC modules.

Here is an example how to use hServo outputs to generate PWM signal:

#include "hFramework.h"

void hMain()
{
	hServoModule.enablePower();
	hServoModule.setVoltage5V();
	
	while(1) {
		hServoModule.servo1.setWidth(1000); //1000 us pulse width
		sys.delay(2000);
		hServoModule.servo1.setWidth(2000); //2000 us pulse width
		sys.delay(2000);
	}
}

Most RC modules (ESC or servos) work in the range of 500…2500us. The ESC modules usually need calibration - you have to check the user manual of the particular module.

If you need a little more support - please ask :slight_smile:

1 Like

Hi Radoslaw,

Thanks for your response. The motor that I am willing to drive is a hall sensored hub motor. ESCs are not capable of reading from halls. What would be your suggestion in that case?

Thanks

Hi,
I have a simple solution for you. Use mosfets to increase the drive capability of the Ros-core2 hbridge.

Hi Mert,

some of BLDC motors can be driven without closing the feedback loop (reading from Hall sensors). I don’t know very much about your hub motor. I guess it can be the motor that should work with the hardware controller dedicated for such motors, especially if the motor power is high.

The example of such driver:
https://ican-tech.en.alibaba.com/product/60488164460-803338321/BLD120_BLD750_dc_motor_driver_24v_48v_cnc_original_manufacture_brushless_dc_motor_driver.html

To use the similar driver module, you need to control its input using PWM signal from CORE2, for example from hServo output. To use the full power you need to change 0-3.3V level (from CORE2) to 0-5V logic level (needed for controller).

It is only the example solution - don’t buy the controller if you are not sure what you are doing :slight_smile: as we don’t know your motor model, that is the only solution that we can suggest for now.

Jerry,
your solution could be possible but you would need to deal with internal timers and their registers. And force them to work together with 3-phase PWM signal. CORE2 internal motor drivers are dedicated for DC motors with encoders and it would not be so simple to change that :slight_smile:

Hi Radoslaw,

Thanks for your responses. I have already got the driver that you suggested me and the motor is working fine with that. I was intended to run it purely trough CORE-2 but it seems to be quite challenging.

Jerry;

Thanks for your suggestion. It does not sound and an easy solution but if you have already done it I appreciates if you share me the details.

thanks
Mert