This paper presents a complete model for thermoelectric modules (TEMs) in order to be used in circuit simulations in MATLAB/Simulink software. The purpose of this study is to develop a single block like other circuit elements in the Simulink library by combining both thermoelectric generator (TEG) and thermoelectric cooler (TEC) module parameters and their operations. Since TEG and TEC are both thermoelectric devices, mostly whose main material, such as Bi 2 Te 3 , is the same for similar temperature ranges, a TEG can be operated as TEC and vice versa a TEC can be operated as TEG. In some systems, such as PV-thermoelectric (TE), fuel cell-TE, and battery temperature management of electric vehicles, the modules can be used in both modes. Also, in some cases of these systems, sometimes the TEM may need to be operated as a generator, and sometimes as a cooler. The bidirectional operation of the TEM is a costsaving approach since the 2 types of TEMs are not needed to be installed together. This paper proposes a novel model whereas the studies up to date in the literature have not been fully compatible with the bidirectional usage of the modules. The proposed model deals with the polarities of both the thermal and the electrical ports of the TEM in order to decide the mode of operation, that is TEG or TEC. Maximum parameters and performance parameters for both TEG and TEC operations are included in the module block so as to observe and control the device for desired operating conditions. It is seen that the simulations with the temperature-dependent parameters have given very close results to the graphics of the datasheet. However, simulations in which the Thomson heat isn"t ignored have more deviations compared to the datasheet. Moreover, the simulations with the constant material properties have given better results than the Thomson heat included ones in the cases of the higher ∆T levels. While ∆T is 10 °K, COP max without the Thomson heat has been found as 3.399 which is the same as the datasheet. Meanwhile, COP max with the Thomson heat has been found as 3.7147, and COP max with the constant properties has been found as 3.8057. However; while ∆T is 50 °K, COP max is 0.247 without the Thomson heat which is the same as the datasheet, but COP max is 0.341 with the Thomson heat, and COP max is 0.268 with constant material properties. In addition, it is shown that, under variable polarities of thermal and electrical ports, bidirectional operation of the TEM is successfully achieved and the TEM is operated as both TEG and TEC in the same simulation.