A miniaturized potentiostat for electrochemical impedance spectroscopy