This application note first briefly discusses the basic operation theory of a thermoelectric cooler (TEC) and its application in optical modules. Then it presents a digital approach to TEC control based on the DS4830A optical microcontroller. Mathematical analysis, algorithm implementation, firmware flowcharts, coding tips as well as an example code are included to make this article a step-by-step guide for TEC control using the DS4830A. Accuracy of ±0.1°C is readily achievable with TEC devices used in typical optical modules. Read full article.