0
\$\begingroup\$

I'm trying to build an ESC (electronic speed controller) for three phase brushless motor. I found some intresting circuits but I am trying to build something very easy to do, with mosfet and pc817 and an Arduino.

I am using the DAC of the mcu to sense the voltage of the motor in each coil. So far I had used a resistor divider and worked, but motors vary a lot in voltage range (some are of 11.1V, others even of 22V and more,) so using a resistor divider limitsit to a certain family of motors.

I want to know if it is posible to divide whatever the voltage enter to the DAC pin (40v max) to 0 (or -5v) and 5v without losing the sine wave form.

\$\endgroup\$
  • 1
    \$\begingroup\$ DAC is a digital to analog converter. You mean ADC? An analog-to-digital converter? If so, yes you can scale down the voltage using a resistive divider so that the ADC can read the voltage. \$\endgroup\$ – DKNguyen Apr 20 at 20:01
  • 2
    \$\begingroup\$ You're going to have to limit the voltage range of your ESC anyway, because of the FETs that you pick. If the ADC has sufficient resolution, a resistive divider suitable for the highest design voltage of your ESC should work over at least a 4:1 range of battery voltages. \$\endgroup\$ – TimWescott Apr 20 at 20:19
  • 1
    \$\begingroup\$ -1 for very poor writing, missing capitalisation and punctuation. See Write to the best of your ability in the site rules \$\endgroup\$ – Transistor Apr 20 at 20:36
  • \$\begingroup\$ learn how to control accelertion and velocity with feedback before trying to design an ESC. \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Apr 21 at 2:07
0
\$\begingroup\$

Calculate the resistor divider for the highest voltage possible. If your ADC has, let's say 12 bits, you'll be only missing 1 bit if the voltage is half the max case or 2 bits if the voltage is a quarter of the max case. Hopefully the remaining bits will be enough to do what you want.

\$\endgroup\$
  • \$\begingroup\$ mmm maybe you are right adc of mcu's had a lot of definition this days so a tiny loss its not the big deal, anyway puting something in between can be a good idea becouse voltage peaks can occur and fry the adc \$\endgroup\$ – jorgeneo560 Apr 22 at 3:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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