A theoretical framework is proposed for accurate comparison of minimum energy coding in coded division multiple access (CDMA) wireless sensor networks (WSNs). Energy consumption and reliability are analyzed for two coding schemes: minimum energy coding (ME), and modified minimum energy coding (MME). A detailed model of consumed energy is described as function of the coding, radio transmit power, the characteristics of the transceivers, and the dynamics of the wireless channel. Since CDMA is strongly limited by multi-access interference, the system model includes all the relevant characteristics of wireless propagation. A distributed and asynchronous algorithm, which minimizes the total energy consumption by controlling the radio power, is developed. Numerical results are presented to validate the theoretical analysis and show under which conditions MME outperforms ME with respect to energy consumption and bit error rate. It is concluded that MME is more energy efficient than ME only for short codewords.