The simultaneous determination of NH4+ and K+ in solution has been attempted using a potentiometric sensor array and multivariate calibration. The sensors used are rather non-specific and of all-solid-state type, employing polymeric (PVC) membranes. The subsequent data processing is based on the use of a multilayer artificial neural network (ANN). This approach is given the name "electronic tongue" because it mimics the sense of taste in animals. The sensors incorporate, as recognition elements, neutral carriers belonging to the family of the ionophoric antibiotics. In this work the ANN type is optimized by studying its topology, the training algorithm, and the transfer functions. Also, different pretreatments of the starting data are evaluated. The chosen ANN is formed by 8 input neurons, 20 neurons in the hidden layer and 2 neurons in the output layer. The transfer function selected for the hidden layer was sigmoidal and linear for the output layer. It is also recommended to scale the starting data before training. A correct fit for the test data set is obtained when it is trained with the Bayesian regularization algorithm. The viability for the determination of ammonium and potassium ions in synthetic samples was evaluated; cumulative prediction errors of approximately 1% (relative values) were obtained. These results were comparable with those obtained with a generalized regression ANN as a reference algorithm. In a final application, results close to the expected values were obtained for the two considered ions, with concentrations between 0 and 40 mmol L−1.