ESR meter with Arduino

Wow, what timing! You posted while I was composing. Please read my update.
I think your simulation is too simplified. I would be interested in your opinions if you would try mine.