1
\$\begingroup\$

I am designing a circuit that allows me to regulate an Arduino PWM output to a stable voltage reference (PWM to 0-5V ideally) dependent on the duty cycle. So far my approach has been to attach a low pass filter which works ok. However the output voltage, of course, varies depending on load. I've been considering buck converters but I havent found a buck-IC where I can control the output voltage with a PWM signal. Should I design my own buck converter? Or do you know a good component for this purpose?

Summary:

  • Input signal: PWM (0-5V) with different duty cycles
  • Desired output: Analog voltage between 0-5V that I can regulate with duty cycle. As independent on load as possible.
  • PWM frequency ≈500Hz
  • The required output current is 0-10mA.
\$\endgroup\$
8
  • \$\begingroup\$ why not just 1kohm and 100uF cap, forming a low-pass-filter? \$\endgroup\$ Oct 25, 2019 at 7:47
  • 1
    \$\begingroup\$ Well, I am working on devices that consume very little power. A low pass filter in that size would probably give me a stable output signal. The problem is that I am afraid that it would be too inefficient...? @analogsystemsrf \$\endgroup\$ Oct 25, 2019 at 8:02
  • 1
    \$\begingroup\$ What is the exact nature of the load you will be applying? It can make quite a difference. \$\endgroup\$ Oct 25, 2019 at 8:25
  • \$\begingroup\$ It acts as a supercapacitor more or less (therefore it is so important to achieve a stable voltage). @SpehroPefhany \$\endgroup\$ Oct 25, 2019 at 8:38
  • 1
    \$\begingroup\$ @PhilipHolgersson can you be more specific than "more or less"? Driving a capacitive load at unity gain is a non-trivial thing for many opamps, so this really makes a difference. Also, if you're actually driving a large capacitor, why even bother with a low-pass filter? It's a low-pass filter on its own! \$\endgroup\$ Oct 25, 2019 at 8:40

2 Answers 2

0
\$\begingroup\$

Consider the below circuit:

schematic

simulate this circuit – Schematic created using CircuitLab

The optional buffer is a single-gate digital buffer such as SN74LVC1G17 which cleans up the PWM signal from the MCU and is powered by a clean ground (connected to the Arduino ground) and to the reference 5.0V. Add a 1K series resistor on the input if it is possible for the Arduino to be powered without the reference being powered.

The low pass filter is designed to achieve your goal of output ripple performance and response time (outside the scope of this answer and your question).

The output amplifier uses the LM7321 a special high-output current capable rail-to-rail input and output op-amp that is stable with capacitive loads. It can thus be powered and will function properly with the single 5V supply. Similarly, adding a 1K series resistor to the non-inverting input can help avoid issues, for example if the output supply was accidentally shorted with a test probe.

\$\endgroup\$
2
  • \$\begingroup\$ Thank you! Looks promising indeed. A question, why do I need the buffer circuit? Wouldn't it be enough to just connect the LPF to the I/O? \$\endgroup\$ Oct 25, 2019 at 9:42
  • \$\begingroup\$ Maybe, hence “optional”. Powering the buffer from a reference voltage rather than a potentially noisy digital supply and an clean analog ground makes a huge difference at the margins- if you don’t care about a few hundred mV to tens of mV leave it out, \$\endgroup\$ Oct 25, 2019 at 9:47
3
\$\begingroup\$

Put an impedance converter (voltage follower) at the output of the low pass filter. This will have high input impedance and deliver your 10mA at the ouput.

\$\endgroup\$
5
  • 1
    \$\begingroup\$ Thanks, but wouldn't that mean that I would get a constant current output? I am looking for an adjustable constant voltage output... \$\endgroup\$ Oct 25, 2019 at 8:06
  • 1
    \$\begingroup\$ No, you would get constant voltage. The low pass is giving you the mean voltage of the PWM and the voltage follower will amplify the current to keep the voltage at the output constant. \$\endgroup\$
    – jusaca
    Oct 25, 2019 at 8:10
  • 1
    \$\begingroup\$ This sounds like a great approach then, thank you! Do you have any recommended components? \$\endgroup\$ Oct 25, 2019 at 8:15
  • 1
    \$\begingroup\$ @PhilipHolgersson any Opamp that can deliver that output current should do; you might want to make sure it has rail-to-rail output range, and it works with the voltage supply you have. Oh, and you probably want to be able to solder it using the techniques you want. Go to about any distributor website, configure the things you need, and then check the datasheet of the cheapest matching choice whether it actually fulfills all these. Done! The TLV9001 might be the easiest choice. \$\endgroup\$ Oct 25, 2019 at 8:34
  • \$\begingroup\$ Thanks @MarcusMüller! \$\endgroup\$ Oct 25, 2019 at 8:37

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.