1
\$\begingroup\$

I have a BLDC motor driver that's powered at 24v DC. The control for this driver is via a line that modulates speed based on the voltage applied (between 0 and 24v) so a voltage divider using a pot seems like the simplest solution that works flawlessly for testing.

Now to actually implement this, what would be the best way to do this with a microcontroller? Using a DAC or a digital pot seems like a simple solution but options are limited at those voltage levels. Current requirements for the control line are low (10ma or less).

\$\endgroup\$
4
  • \$\begingroup\$ are you certain that the driver does not have digital control input? \$\endgroup\$
    – jsotola
    May 20, 2020 at 1:45
  • \$\begingroup\$ Yep, 4 wire driver, pwr, gnd, control and tacho \$\endgroup\$
    – rjds
    May 20, 2020 at 12:25
  • \$\begingroup\$ 0 to 24 seems odd... You have a spec sheet that says that? Most things analog are 0-10V, 0 to 5V, or 4-20mA current signals... \$\endgroup\$
    – MadHatter
    May 20, 2020 at 20:07
  • \$\begingroup\$ Surprisingly enough, it is. I tested it out under multiple conditions too. It takes full range input of 0 to Vss. In my case, the motor is rated for 24v hence the 0-24 range. \$\endgroup\$
    – rjds
    May 26, 2020 at 21:24

3 Answers 3

4
\$\begingroup\$

If your microcontroller does not have a DAC, you can generate high-frequency pwm, run it through a low pass filter and it is effectively an analog voltage.

Unfortunately if you're trying to get up to a higher rail voltage than your microcontroller pin output, then you could either first pwm a transistor in front of the filter with a pull down from a higher voltage rail, or use an op-amp after your filter.

A pull up to drive a filter on 24V will eat a lot of power, you might be better off using an op-amp amplifier out of a DAC or 0-5V PWM run through a low pass filter... Below is a schematic to give an idea, although you will notice if you simulate it is more like 0-22V due to the 4.7k pullup resistor not driving the filter well.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
2
\$\begingroup\$

Use a DAC followed by a non-inverting op-amp based amplifier.

\$\endgroup\$
0
1
\$\begingroup\$

I'd go with controlling the motor with a transistor driven by a PWM signal

\$\endgroup\$
2
  • \$\begingroup\$ It's a brushless motor and OP already has a driver \$\endgroup\$
    – DKNguyen
    May 20, 2020 at 0:56
  • 1
    \$\begingroup\$ I think MadHatter and Scott are suggesting using filtered PWM in lieu of a DAC. \$\endgroup\$
    – TimWescott
    May 20, 2020 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.