I found this article on internet but I need to understand few things , first of all i dont know how the following calculations work , author is referring to some value "X" but what is X?
Assuming X=4.7 and output range should be 0.5v
5.7 x .414 = 2.36x2=4.72 total swing voltage
Vaout = 5v = Vin + Voffset - offset range acid side
Vbout =0v = 2.64 > Voffset >0 -(-) 2.36 = 2.36 Lets pick 2.5v for our offset