In this work, we present an optimal control formulation for the bidomain model in order to estimate maximal conductances parameters in the physiological ionic model. We consider a general Hodgkin-Huxley formalism to describe the ionic exchanges at the microcopic level. We consider the parameters as control variables to minimize the mismatch between the measured and the computed potentials under the constraint of the bidomain system. The solution of the optimization problem is based on a gradient descent method, where the gradient is obtained by solving an adjoint problem. We show through some numerical examples the capability of this approach to estimate the values of sodium, calcium and potassium ion channels conductances in the Luo Rudy phase I model.