Is it possible to use the analog output pin with some circuit to generate a 0 to 15V analog output?

  • Yes, if you use an amplifier. Feb 2 '17 at 3:25

The Arduino cannot directly produce anything more than 5V.

You can use PWM and a Low-Pass Filter to produce an analog waveform between 0 and 5V, which you can then amplify using a suitable non-inverting buffer with 3x gain (op-amp), which will boost the voltage to 15V. Whether that is suitable for your needs, though, since the current will generally be quite low (most op-amps have a high output impedance) is unknown.

If you want a cleaner waveform you can attach or create a DAC which produces discrete output voltages (again between 0 and 5V) which you then amplify similarly.


simulate this circuit – Schematic created using CircuitLab

R3 and C1 form the low-pass filter and should be sized according to the frequency ranges you want to filter and keep. Note that many op-amps that can cope with the higher voltages you need aren't rail-to-rail which means you will have to use a higher power supply voltage than you want to output to leave some headroom. Similarly the 0V will be clipped and will never go below a certain voltage. If you want to get right down to 0V you will need a negative power supply to feed the V- supply of the op-amp (which is currently connected to ground in this schematic). That would allow the output to drop right down to 0V.

  • Thank you very much. Your explanation is really helpful. I don't need a high current output. What op-amp do you suggest me to use? What is the triangle at the bottom of the figure? Is that the ground?
    – Wilson Lau
    Jan 24 '17 at 13:05
  • Yes, that is ground. I suggest a parametric search on your favourite electronics supplier. You are looking for one that works at a high enough voltage and, if you don't want a negative supply, then one that works on a single supply rail.
    – Majenko
    Jan 24 '17 at 14:02
  • The supplier in my region is quite hard to work with. Do you mind suggest a model no. for me? I think the minimum voltage output I need is 0.3V. Do I need a negative supply?
    – Wilson Lau
    Jan 24 '17 at 14:34
  • You could try the TL072, though I can't see in the datasheet how well it works with a single supply.
    – Majenko
    Jan 24 '17 at 14:41
  • finally, I have tried the circuit, but I found that the voltage output is 5-17V.
    – Wilson Lau
    Mar 20 '17 at 11:49

The Arduino does not have any "analog output pin". There are analog inputs, and you can generate a variable output with PWM pins.

Whether the latter meets your needs depends on your (unstated) requirements.

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.