MCP6001 op-amp unable to drive LED when configured as inverting buffer?

I built this circuit on breadboard and came across a problem:

I'm using the MCP6001 op-amp with a single supply, configured as an inverting buffer. That's why I connected the non-inverting input to a virtual ground made between R3 and R4. The pot R5 is used to change the input voltage. The LED should get brighter as the input voltage goes down.

It does work in principle, but the LED is less bright than when I connect it to 5V directly. When measuring the voltage at out, it is 0V when the input from R5 is high (5V). But when it's low (0V), the voltage at out will be something like 3.2V. When I disconnect the LED, removing the load from the op-amp output, all is fine and an input of 0V will result in a 5V output.

Does this mean the MCP6001 is unable to properly drive a single LED? I read the datasheet but wasn't able to make sense in such a way that I could determine the maximum output current in my configuration.

simulate this circuit – Schematic created using CircuitLab

• Data sheet shows short circuit current rising from 15 to 20mA, If your LEd is 2V, the load is 30mA and Vcm cannot be within 0.3V of either rail. So avoid those Vcm input exclusion ranges Commented Oct 14, 2020 at 17:18
• You mean I should keep the input voltage (at R6) between 0.3V and 4.7V? Using voltage dividers, or maybe Schottky diodes? Commented Oct 14, 2020 at 17:25
• Well I would change your design to sense current and use pot scaled down to make the reference voltage but bias both inputs above 0.3 , your design changes gain and threshold at the same time,NG Commented Oct 14, 2020 at 17:27
• Thanks. You mean it changes gain when adjusting R5? Why is that and can you point me to a design that doesn't? Commented Oct 14, 2020 at 17:30
• yes Av=Rf/Rin and pot is part of Rin.. if you swap LED and 100R then use a diff. Amp with 4 R’s then use pot to scale Vref for 20mA*100R to compare 2V max to 20mA max then you have a linear 0 to 20mA and Vcm will be away from 0V Commented Oct 14, 2020 at 17:44