1
\$\begingroup\$

I built a circuit based on ESP8266, MCP41100 digital potentiometer and LM358 op-amp. Its purpose is to use it as 0-5V DAC, but I have the following problem:

I use LM358 as non-invering amplifier. It's connected to 5V from VIN ESP8266 pin, non-inv. input is connected to output of voltage divider made from digital potentiometer, inverting thorough 12k and 22k resistor to output and ground.

For some reason I cannot go above 3.7V on output. Could you tell me how to debug it? Everything except part with amplifier works as it should.

\$\endgroup\$
0

1 Answer 1

1
\$\begingroup\$

The LM358 is not a rail-to-rail output op-amp, and as such cannot be expected to drive near the rails. The output voltage high (Voh) is specified as 26V with a supply of 30V and a load of 2k (so, 4V below the rail). Therefore you should not expect it to drive anywhere near 5V with a 5V supply.

The easiest solution is to choose a RRIO (rail-to-rail input output) op-amp which is fully specified at 5V (there are many to choose from).

\$\endgroup\$
5
  • \$\begingroup\$ That's answer I needed! Do you know any of these with same pinout as LM358 in DIP-8 package? \$\endgroup\$
    – b6mba
    Commented Feb 13, 2018 at 2:19
  • \$\begingroup\$ Sure, pick your favorite manufacturer's parametric tables (or Digikey). Because I like Linear, I pulled up the LT1638, which should out-perform the LM358 in most respects and is available in DIP-8. It's Voh at 5V, no-load, is 4.9V. \$\endgroup\$
    – uint128_t
    Commented Feb 13, 2018 at 2:22
  • \$\begingroup\$ @PiotrBomba Oh, also, keep in mind that if all you want is a 5V DAC, there are chips that do this by themselves, almost all of which will probably outperform your digipot + op-amp solution. For example, MCP4801. Better performance, cheaper, etc. \$\endgroup\$
    – uint128_t
    Commented Feb 13, 2018 at 2:23
  • \$\begingroup\$ @unt128_t Will this MCP4801 work with 3.3v I/O of ESP8266? Maybe, I'll switch to that next time, and now I'll use this LT1638. I don't want to make any big changes to the board I have. \$\endgroup\$
    – b6mba
    Commented Feb 13, 2018 at 2:45
  • \$\begingroup\$ @PiotrBomba No, but there are plenty of parts that will. You will likely want a part which uses an external reference that can be greater than the digital supply voltage. Or use a level shifter in between. \$\endgroup\$
    – uint128_t
    Commented Feb 13, 2018 at 3:35

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.