Semiconductor Laboratory














Espec SH222 Climate Chamber

The Espec SH222 climate chamber can simulate environments within a temperature range from -20 °C up to 150 °C and has a humidity range of 30% - 95% relative humidity (RH).

When working with the chamber there are some things one can do:

  1. Set a new target temperature (setpoint value).
  2. Set a new target humidity (setpoint value).
  3. Read the current temperature of the temperature sensor.
  4. Read the current humidity of the humidity sensor.
  5. Change the mode of the chamber (Off, Standby, Constant Operation)

Manual operation

There is a touch screen on the frontpanel that can be used to operate the climate chamber. There is also a web interface ( that can be used to set the target temperature/humidity and monitor the sensors.

Refer to the Espec SH222 User's Manual for details.

Using Python

The most convenient way to control the climate chamber is using Python. When a new environmental setpoint is given, it takes a while for the temperature/humidity to stabilize and often the temperature/humidity oscillates around the desired temperature. To ensure that the temperature/humidity has stabilized, a Python function was defined to wait until the temperature/humidity stabilizes to within a specified accuracy for a certain time. This function is,

goto_const((temperature, humidity), (temp_accuracy, hum_accuracy), soaking_time)

The program execution is delayed until the temperature & humdity stays between (value - target_accuracy) °C and (value + target_accuracy) °C for at least (soaking_time) seconds. Only then will the program execution continue.

An example script that uses this function is,

List of available Espec SH222 Python library commands

  • chamber.get_const()
  • chamber.get_temperature()
  • chamber.get_humidity()
  • chamber.get_mode()
  • chamber.get_monitor()
  • chamber.set_temp()
  • chamber.set_humidity()
  • chamber.set_const()
  • chamber.set_mode()
  • chamber.goto_const()
  • More details of the Espec SH222 Python library

    The Python library ( uses the pyvisa-package to interface with the the climate chamber and provide accessibility to the basic functions. Make sure that you have installed the pyvisa-package and VISA drivers to be able to connect to the chamber.

    To communicate with the climate chamber you need to have the IP address, you will find this information on the front of the climate chamber. The python code that opens communication to Espec SH222 is,

    Once communication has been established, you can use the following commands to control the climate chamber.

    Read out the current temperature measured by the climate chambers temperature sensor and print the result to the console, you can use:

    If you want to know the mode of the climate chamber (OFF, STANDBY or CONSTANT), you can get that information with this command:

    To enable or disable the climate chamber you can use command chamber.set_mode().

    Now let's assume you want to heat up the chamber to 42.5 °C and 35% relative humidity. After connecting to the climate chamber you therefore need to set the setpoint and enable the climate chamber. The code for such an operation would look like this:

    The climate chamber will instantly begin with the heat-up. The Python process will instantly continue (so it will not wait until the target temperature is reached). If you want your program to wait until a specific temperature is reached, you need to ensure that yourself. This can be done by querying the current temperature/humidity repeatedly in a while loop until the target temperature is reached.

    Keep in mind that (specially on thermal system that are PID controlled) you might have oscillations around the target temperature and it takes some time until the temperature/humidity is stable again. It is good practice to check not only the temperature/humidity but to check if the temperature/humidity stays stable within defined boundaries for a specified time. To make programming easier, there is a function in the espec-library that does exactly that for you. The command chamber.goto_const() will block further Python program execution until the target temperature is reached and stable. Let's have a look at the following code: