Look carefully at how you have your output voltmeter connected.I have taken your advice and help into consideration and i now how the following circuit that i attached. It seems to be working decently but i still am unable to achieve 5V exactly and a method to change the duty cycle is evading me since the voltage output of that opamp is not changing with time and hence not affecting pin 5 and the duty cycle doesnt change. Any idea on what could be the issue here?
Part of your problem is that the input to your opamp exceeds it's common mode voltage. Look that up and it's effect on opamp functioning. As a suggestion, try scrapping all the various batteries and power everything from the input source. That's how it would be done in reality and avoids problems with things running out of range.



