Reaction mechanism and optimal conditions for preparation of high-quality vanadium oxide films by organic sol–gel for optoelectronic applications