2S LiPo discharge hook-up, would this work?

Hi,

I would like to make a LiPo discharger that powers itself. Here's what I came up with:

Pin 1 will read Cell 1 voltage, and control PWM Pin 10 to discharge fast when possible, and slow the discharge near target voltage.

Pin 2 will read the whole pack voltage devided by two to get below 5V. Knowing this voltage and the voltage of Cell 1 at Pin 1, we know Cell 2 voltage. Then we can control PWM Pin 11 to handle the discharging of Cell 2.

Besides this, there will be a double relay powered by an Arduino port disconnecting the cells as the port switches off. Starting will be with a push button parallel to this relay. I will also fit fuses to avoid overload.

I do not know a lot about electronics, please let me know what you think. I have never used optocouplers before and I am not sure about how I drew them in. I have found other projects, but I don't want to copy and paste anymore like I did on previous projects, I want to scratch build / programm, to learn.

All input is welcome,
Cheers,

Hugo

I can't comment on the physical circuit, but LiPos have a very flat discharge curve, I doubt you will have time to sense a change in voltage to "slow" the discharge, check the curves for your batteries.

Additionally reading your description and looking at the drawing I think you will have an issue with discharging one battery in a series connected string (or discharging each cell at a separate rate).
What power source are you planning on using for the Arduino?

How will you recharge them?
Have you considered the risk of getting the batteries out of "balance"?