Circuit for 3 stage lead acid battery charger controlled by microcontroller advice
The transistor operated by GPIO7 is wired wrong. The Emitter should go to ground and the 20k resistor should go from the Collector to the LM317 ADJ pin. You will also need a current limiting resistor from the Base to GPIO7.
LED3 in series with the optocoupler input will reduce LED and optocoupler input current to ~0.5 mA (assuming it is a red LED with voltage drop of ~1.7 V), which may not be enough to turn the relay control transistor fully on. You might be able to fix this by powering the optocoupler with 5 V instead of 3.3 V.
The NE555 voltage to 'pulse position' converters are not very linear or accurate, and will have to be calibrated individually. You might consider using an SPI or I2C ADC (eg. ADS1115) instead.
If the MCU supply voltage is 3.3 V then GPIO14 and GPIO15 will have to be 5 V tolerant. If not then you should put resistor dividers on the 555 outputs to drop the voltage down to 3.3 V.
Apart from those issues the circuit looks like it should work, though it might be possible to use fewer and/or cheaper parts. For example if you are able to put the current sensor resistor on the negative side of the battery then you could replace the INA240 with an op amp, and a single LM317 could be used for both voltage and current regulation (eliminating the relay etc.).