Unity Follower Circuit for Voltage Range 0-2.5 V
Your circuit can be as easy as a resistor and a zener diode:







simulate this circuit &ndash; Schematic created using CircuitLab

DZ1 should be a zener diode with a \$V_z=2.5V\$.

Let's analyze the circuit together. When \$-V_\gamma&lt;V_{in}&lt;2.5V\$ the diode is reverse biased and acts like an open circuit, thus assuming no current is drawn at the output \$V_{out}=V_{in}\$ holds. When \$V_{in}=V_z=2.5V\$ the zener start carrying some current, holding \$V_{out}^+\$ at \$V_z\$, so \$V_{out}=V_z=2.5V\$ holds.

That's exactly what you want.

Please note that the given value of R1, i.e. \$1k\Omega\$, is indicative. R1 must be properly sized depending on the zener characteristics and on what is connected to \$V_out\$. The zener model, i.e. its wattage mainly, must be decided knowing what you want to connect to \$V_{out}\$. If you add some more informations we can help you design the full circuit and have it working in the blink of an eye.

As pointed out in the comments you can also use a programmable shunt reference such as the TL431. Refer to fig. 17 in the datasheet (page 21). Since \$V_{ref}=2.495V\$ you can just omit R1 and R2 and tie the ref pin directly to \$V_o\$, keeping the low part count.