Skip to content

Instantly share code, notes, and snippets.

@jeanminet
Last active January 16, 2024 08:18
Show Gist options
  • Save jeanminet/23d23e03324dc84c6c069fe61e73dde1 to your computer and use it in GitHub Desktop.
Save jeanminet/23d23e03324dc84c6c069fe61e73dde1 to your computer and use it in GitHub Desktop.
CTL101 laser temperature vs voltage
import numpy as np
from matplotlib import pyplot as plt
R0 = 10E3 # Ohm
# https://www.thorlabs.com/drawings/781769f975857712-CFFE0B13-BE04-E334-3F539B30BADD4590/TH10K-SpecSheet.pdf
a = 3.3540170E-3
b = 2.5617244E-4
c = 2.1400943E-6
d = -7.2405219E-9
V = np.linspace(0, 4.096, 100) # V
Rth = R0 * (10.0 - V) / (5.0 + V)
T = 1/(a + b * np.log(Rth/R0) + c * (np.log(Rth/R0))**2 + d * (np.log(Rth/R0))**3) - 273.15
fig, ax1 = plt.subplots(figsize=(6.4,4.8))
ax1.plot(V, Rth, 'b', linewidth=2)
ax1.set_xlabel('$V_{TACT} \;\mathrm{(V)}$')
ax1.set_ylabel('$R_{th} \;\mathrm{(\Omega)}$', color='b')
ax1.tick_params('y', colors='b')
ax2 = ax1.twinx()
ax2.plot(V, T, 'r', linewidth=2)
ax2.set_ylabel('$\mathrm{Temperature} \;\mathrm{(^{\circ}C)}$', color='r')
ax2.tick_params('y', colors='r')
fig.tight_layout()
plt.show()
@jeanminet
Copy link
Author

CTL101_laser_temperature_vs_voltage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment