Skip to main content
Simulate solar panel characteristics for testing solar-powered devices. A solar net drives an EA PSB bidirectional supply in its photovoltaic simulation mode. A script can drive a solar net in two ways. Net.get() returns a net object whose reads return numbers. The module functions take the net name and print their results.

Net Object

Each read returns a float, or None when the instrument gives no number. set_to_solar_mode() and stop_solar_mode() are other names for enable() and disable(). An irradiance outside 0-1500 or a resistance that is not positive raises ValueError before the box sends a command. The calls use the same box driver as lager solar.

Import

The same functions are in lager.power, where resistance, temperature and voc are named solar_resistance, solar_temperature and solar_voc.

Functions

Each function prints its result to the script’s output and returns None. A script cannot read a value from the return value. Each function raises SolarBackendError when the instrument refuses a value or does not answer.

Function Reference

set_to_solar_mode(netname)

Connect to the instrument and start photovoltaic simulation mode. The function tries three times, because an EA supply needs time to settle after a stop.

stop_solar_mode(netname)

Stop the simulation and disconnect from the instrument.

irradiance(netname, value=None)

Set the irradiance level, or print it when value is None.
A value below 0 or above 1500 raises SolarBackendError.

voc(netname)

Print the open-circuit voltage.

mpp_voltage(netname)

Print the maximum power point voltage.

mpp_current(netname)

Print the maximum power point current.

resistance(netname, value=None)

Set the dynamic panel resistance, or print it when value is None.

temperature(netname)

Print the simulated cell temperature.

Examples

Basic Solar Simulation

Test Multiple Irradiance Levels

Measure the DUT Against a Fixed Irradiance

Supported Hardware

Only EA PSB models are accepted. Another instrument on a solar net raises SolarBackendError.

Notes

  • Solar simulation requires a bidirectional (two-quadrant) power supply
  • Standard Test Conditions (STC): 1000 W/m², 25°C, AM1.5
  • The I-V curve is automatically generated based on irradiance
  • Call set_to_solar_mode() before the other functions
  • Always call stop_solar_mode() when finished, for example in a finally block
  • The functions print and return None. The printed text includes terminal color codes
  • The CLI equivalent is lager solar