Smart manufacturing of photovoltaic cells