1
\$\begingroup\$

I want to control an EC motor, but I have some difficulties with the motor's control input. According to my measurements it has a ~50kOhm input impedance, and probably also has an (unknown) RC low-pass filter.

My first attempt was a simple 2N2222 NPN BJT to amplify the PWM signal from the ESP chip from 0-3.3V to 0-10V.

enter image description here

Vout looks OK (measured with a DMM), until I connect the EC motor control input: then it pulls up the Vout to high voltages. (Eg.: in case of a 50% duty cycle, the Vout goes up to ~8V).

My assumption is: that the problem is with the RC low pass filter in the motor control electronics, which has a capacitor. As my circuits capable to sink much more current then source, the capacitor is not able to get rid of the charge it collected. If I increase the PWM frequency it gets worse. When I decrease R2, it gets better.

My current solution is that I replaced R1 with a 0-100k variable resistor, so I can dial down the charge current by limiting the base current on the BJT.

Now the circuit is working fine, but I have to fine tune the system every time if I want to - for example - attach an other/different EC motor control input.

Currently I am using PWM frequency 10kHz, because under 1kHz the motor behaved weird. (It was changing speed all the time, I guess after the internal RC filter there was still a huge ripple on the signal.)

So basically I want to create a DAC circuit, which provide a stable, regulated analog voltage output, even if there are RC filters or relatively high input impedance attached to it.

Can you recommend something? Maybe introducing an op amp, or is there any cheap DAC board that I can control with the ESP8266 chip?

Thank you in advance

\$\endgroup\$
8
  • 1
    \$\begingroup\$ According to my measurements it has a ~50kOhm input impedance I have yet to see a motor with a 50 kohm impedance. Maybe you mean that the control input has a 50 k ohm input impedance. Maybe it is a fan? Include a link to the datasheet of that fan for completeness. Also you dive into implementations and issues and even propose using a DAC. Take a step back, explain the complete situation and what you want to achieve. Controlling a fan from a microcontroller has been done many times before, how is your setup different from those? Is it? Does it need to be? \$\endgroup\$ Apr 16, 2019 at 11:24
  • \$\begingroup\$ Yes, it is the control input. I corrected the question. Also here is the specification I found, but it probably won't help as there is not much about the motor itself: lueftung-shop.de/WebRoot/Store10/Shops/62067764/56CC/6152/599D/… It is a Cosmo Eco heat recovery ventilation system, where I want to change the control electronics. \$\endgroup\$
    – gOldie_E36
    Apr 16, 2019 at 12:08
  • \$\begingroup\$ "Controlling a fan from a microcontroller has been done many times before, how is your setup different from those? " --> it is an EC fan/motor, not a regular one. To be able to control it, I need a regulated, analog 0-10V output. I want to do this with a micro controller which only has a PWM output. \$\endgroup\$
    – gOldie_E36
    Apr 16, 2019 at 12:11
  • \$\begingroup\$ it is an EC fan/motor, not a regular one So what makes it different from a "regular one" then. Let me do the research for you: motioncontroltips.com/… so an EC motor is basically the type of motor that is used in every PC fan. Only (some of) these fans have a PWM control input, your fan has a linear voltage input. Maybe it will work in the same way if the PWM frequency is high enough and the impedance of the control signal is low enough. \$\endgroup\$ Apr 16, 2019 at 12:17
  • 1
    \$\begingroup\$ I'm drawing the circuit, see my answer! \$\endgroup\$ Apr 16, 2019 at 12:31

1 Answer 1

4
\$\begingroup\$

Your 3.3 V to 10 V circuit has some limitations.

I propose to try this circuit:

schematic

R1, R2 and Q1 are a 3.3 V to 12 V levelshifter for the PWM signal.

R3 and C1 filter (average) that PWM signal so we get a (more or less) constant DC voltage.

The opamp buffers that voltage. I used a TLC271 because it can operate rail-to-rail and can handle a 12 V supply. Maybe a TL071 (or TL081 which is similar) will also be good enough but these are not rail-to-rail opamps.

The output voltage isn't actually limited to 10 V, it can become 12 V but I'm assuming that the fan can handle that. The opamp cannot deliver much current anyway so there's almost no chance that anything will break if the opamp outputs 12 V.

\$\endgroup\$
4
  • \$\begingroup\$ That was my idea also with the op amp, I just have to buy some. Thanks for the recommendation on the resistor values and op amp types. Can I also use LM358 or TL082 op amps? \$\endgroup\$
    – gOldie_E36
    Apr 16, 2019 at 12:36
  • \$\begingroup\$ And yes, the motor control input can handle 12V I tried. It is a 12V motor anyway, so I am already using 12V for the PWM in my current circuit as it is already there. \$\endgroup\$
    – gOldie_E36
    Apr 16, 2019 at 12:41
  • 1
    \$\begingroup\$ LM358 will work, TL082 will not. Put a 5K resistor across Q1 (C to E) to limit the output to 10V. Note the PWM duty cycle is reversed (0% duty cycle or open input= full on) so you might want to consider adding an inverter up front. \$\endgroup\$ Apr 16, 2019 at 12:59
  • \$\begingroup\$ I am trying to reduce the hw components, so I invert the signal in the microcontroller code. \$\endgroup\$
    – gOldie_E36
    Apr 16, 2019 at 13:11

Your Answer

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

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