« Close

Datasheets and User Guides

App Notes

Software & Driver

 

13.4 SBUS

SBUS is a serial protocol used with SHT1X and SHT7x sensors from Sensirion.  It is similar to I2C, but not the same.  The EI-1050 uses the SHT11 sensor.  Other available sensors are the SHT10, SHT15, SHT71, and SHT75.

 Register Listing

SBUS Registers
Name Start Address Type Access
SBUS#(0:22)_TEMP 30100 FLOAT32 R
SBUS#(0:22)_RH 30150 FLOAT32 R
SBUS#(0:22)_DATA_DIONUM 30200 UINT16 R/W
SBUS#(0:22)_CLOCK_DIONUM 30225 UINT16 R/W
SBUS_ALL_DATA_DIONUM 30275 UINT16 R/W
SBUS_ALL_CLOCK_DIONUM 30276 UINT16 R/W
SBUS_ALL_POWER_DIONUM 30277 UINT16 R/W
SBUS_ALL_CLOCK_SPEED 30278 UINT16 R/W
SBUS#(0:22)_TEMP
- Starting Address: 30100
Reads temperature in degrees Kelvin from an SBUS sensor (EI-1050/SHT1x/SHT7x). SBUS# is the DIO line for the EI-1050 enable. If SBUS# is the same as the value specified for data or clock line, there will be no control of an enable line.
  • Data type: FLOAT32  (type index = 3)
  • Read-only
  • Minimum firmware version: 1.0056
Expanded Names Addresses
SBUS0_TEMP, SBUS1_TEMP, SBUS2_TEMP, SBUS3_TEMP, SBUS4_TEMP, SBUS5_TEMP, SBUS6_TEMP, SBUS7_TEMP, SBUS8_TEMP, SBUS9_TEMP, SBUS10_TEMP, SBUS11_TEMP, SBUS12_TEMP, SBUS13_TEMP, SBUS14_TEMP, SBUS15_TEMP, SBUS16_TEMP, SBUS17_TEMP, SBUS18_TEMP, SBUS19_TEMP, SBUS20_TEMP, SBUS21_TEMP, SBUS22_TEMP Show All 30100, 30102, 30104, 30106, 30108, 30110, 30112, 30114, 30116, 30118, 30120, 30122, 30124, 30126, 30128, 30130, 30132, 30134, 30136, 30138, 30140, 30142, 30144 Show All
SBUS#(0:22)_RH
- Starting Address: 30150
Reads humidity in % from an external SBUS sensor (EI-1050/SHT1x/SHT7x). # is the DIO line for the EI-1050 enable. If # is the same as the value specified for data or clock line, there will be no control of an enable line.
  • Data type: FLOAT32  (type index = 3)
  • Read-only
  • Minimum firmware version: 1.0056
Expanded Names Addresses
SBUS0_RH, SBUS1_RH, SBUS2_RH, SBUS3_RH, SBUS4_RH, SBUS5_RH, SBUS6_RH, SBUS7_RH, SBUS8_RH, SBUS9_RH, SBUS10_RH, SBUS11_RH, SBUS12_RH, SBUS13_RH, SBUS14_RH, SBUS15_RH, SBUS16_RH, SBUS17_RH, SBUS18_RH, SBUS19_RH, SBUS20_RH, SBUS21_RH, SBUS22_RH Show All 30150, 30152, 30154, 30156, 30158, 30160, 30162, 30164, 30166, 30168, 30170, 30172, 30174, 30176, 30178, 30180, 30182, 30184, 30186, 30188, 30190, 30192, 30194 Show All
SBUS#(0:22)_DATA_DIONUM
- Starting Address: 30200
This is the DIO# that the external sensor's data line is connected to. Default = FIO0
  • Data type: UINT16  (type index = 0)
  • Readable and writable
  • Default value: 0
  • Minimum firmware version: 1.0056
Expanded Names Addresses
SBUS0_DATA_DIONUM, SBUS1_DATA_DIONUM, SBUS2_DATA_DIONUM, SBUS3_DATA_DIONUM, SBUS4_DATA_DIONUM, SBUS5_DATA_DIONUM, SBUS6_DATA_DIONUM, SBUS7_DATA_DIONUM, SBUS8_DATA_DIONUM, SBUS9_DATA_DIONUM, SBUS10_DATA_DIONUM, SBUS11_DATA_DIONUM, SBUS12_DATA_DIONUM, SBUS13_DATA_DIONUM, SBUS14_DATA_DIONUM, SBUS15_DATA_DIONUM, SBUS16_DATA_DIONUM, SBUS17_DATA_DIONUM, SBUS18_DATA_DIONUM, SBUS19_DATA_DIONUM, SBUS20_DATA_DIONUM, SBUS21_DATA_DIONUM, SBUS22_DATA_DIONUM Show All 30200, 30201, 30202, 30203, 30204, 30205, 30206, 30207, 30208, 30209, 30210, 30211, 30212, 30213, 30214, 30215, 30216, 30217, 30218, 30219, 30220, 30221, 30222 Show All
SBUS#(0:22)_CLOCK_DIONUM
- Starting Address: 30225
This is the DIO# that the external sensor's clock line is connected to. Default = FIO1
  • Data type: UINT16  (type index = 0)
  • Readable and writable
  • Default value: 1
  • Minimum firmware version: 1.0056
Expanded Names Addresses
SBUS0_CLOCK_DIONUM, SBUS1_CLOCK_DIONUM, SBUS2_CLOCK_DIONUM, SBUS3_CLOCK_DIONUM, SBUS4_CLOCK_DIONUM, SBUS5_CLOCK_DIONUM, SBUS6_CLOCK_DIONUM, SBUS7_CLOCK_DIONUM, SBUS8_CLOCK_DIONUM, SBUS9_CLOCK_DIONUM, SBUS10_CLOCK_DIONUM, SBUS11_CLOCK_DIONUM, SBUS12_CLOCK_DIONUM, SBUS13_CLOCK_DIONUM, SBUS14_CLOCK_DIONUM, SBUS15_CLOCK_DIONUM, SBUS16_CLOCK_DIONUM, SBUS17_CLOCK_DIONUM, SBUS18_CLOCK_DIONUM, SBUS19_CLOCK_DIONUM, SBUS20_CLOCK_DIONUM, SBUS21_CLOCK_DIONUM, SBUS22_CLOCK_DIONUM Show All 30225, 30226, 30227, 30228, 30229, 30230, 30231, 30232, 30233, 30234, 30235, 30236, 30237, 30238, 30239, 30240, 30241, 30242, 30243, 30244, 30245, 30246, 30247 Show All
SBUS_ALL_DATA_DIONUM
- Address: 30275
A write to this global parameter sets all SBUS data line registers to the same value. A read will return the correct setting if all channels are set the same, but otherwise will return 0xFF.
  • Data type: UINT16  (type index = 0)
  • Readable and writable
  • Default value: 0
  • Minimum firmware version: 1.0056
SBUS_ALL_CLOCK_DIONUM
- Address: 30276
A write to this global parameter sets all SBUS clock line registers to the same value. A read will return the correct setting if all channels are set the same, but otherwise will return 0xFF.
  • Data type: UINT16  (type index = 0)
  • Readable and writable
  • Default value: 1
  • Minimum firmware version: 1.0056
SBUS_ALL_POWER_DIONUM
- Address: 30277
Sets the power line. This DIO is set to output-high upon any read of SBUS#_TEMP or SBUS#_RH. Default = FIO2. An FIO line can power up to 4 sensors while an EIO/CIO/MIO line or DAC line can power up to 20 sensors. Set to 9999 to disable. To use multiple power lines, use a DAC line for power, or otherwise control power yourself, set this to 9999 and then control power using writes to normal registers such as FIO5, EIO0, or DAC0.
  • Data type: UINT16  (type index = 0)
  • Readable and writable
  • Default value: 2
  • Minimum firmware version: 1.0056
SBUS_ALL_CLOCK_SPEED
- Address: 30278
Sets the clock speed. The clock is software generated so the resulting frequency is not exact. Larger values are faster. 0 is the fastest option and is equivalent to 65536. A value of 0 is ~200 kHz. A value of 65000 is ~9.1 kHz.
  • Data type: UINT16  (type index = 0)
  • Readable and writable
  • Default value: 65000
  • Minimum firmware version: 1.0142

 

Examples:

 

EI-1050 probes using default configuration:

The EI-1050 has an enable line that allows multiple probes to use the same pair of data/clock lines.  In this example we connect the 4 basic wires from each probe to the lines specified by the default config:

GND    Ground (black)
FIO0    Data (green)
FIO1    Clock (white)
FIO2    Power (red)

Since power is provided by FIO2, and FIO lines can only power 4 EI-1050 probes, that is the limitation on number of probes using the default config.  We can now connect the enable line from each probe to any DIO we want.  Lets use:

FIO3               Enable ProbeA (brown)
EIO0/DIO8       Enable ProbeB (brown)
EIO1/DIO9       Enable ProbeC (brown)
EIO2/DIO10     Enable ProbeD (brown)

You can now read from SBUS#_TEMP and SBUS#_RH for each probe without writing any config values.  In LJLogM, for example, just put the desired register name in any row.  A read from SBUS3_TEMP will return the temperature from ProbeA.  A read from SBUS9_RH will return the humidity from ProbeC.

Note that when using multiple probes this way, you might need to read one value from each probe before they will work.  By default digital I/O are set to input, which has a 100k pull-up, so all 4 probes in this example will be enabled at the same time, which will likely result in a read error.  At the end of a read the enable line is set to output-low, so once you do an initial read from each, they will all be disabled and on further reads only one will be enabled at a time.

 

EI-1050 probes using enable with custom configuration:

Say you connect 2 probes as follows:

GND                Ground (black)
EIO0/DIO8       Data (green)
EIO1/DIO9       Clock (white)
EIO2/DIO10     Power (red)

EIO3/DIO11     Enable ProbeA (brown)
EIO4/DIO12     Enable ProbeB (brown)

Write the following registers to configure and disable the probes:

SBUS_ALL_DATA_DIONUM = 8
SBUS_ALL_CLOCK_DIONUM = 9
SBUS_ALL_POWER_DIONUM = 10
EIO3 = 0
EIO4 = 0

You can now read from SBUS11_TEMP/SBUS11_RH for ProbeA values or SBUS12_TEMP/SBUS12_RH for ProbeB values.

 

SHT1x or SHT7x sensor using default configuration:

In this example we connect the 4 connections from the raw Sensirion sensor to the lines specified by the default config:

GND    Ground (black)
FIO0    Data (green)
FIO1    Clock (white)
FIO2    Power (red)

Note that the SHT7x datasheet shows an added 10k pull-up resistor from Data to Power.  The LabJack has an internal 100k pull-up that usually works, but some applications might need the stronger 10k pull-up (FIO0 to FIO2) and perhaps even a capacitor from Clock to GND.  The filter cap should be near the sensor pins, not the LabJack terminals.  Suggested value is equal to or less than 1 / (2 * pi * f * R), where f is the clock frequency and R is the source impedance which is dominated in this case by the DIO (use 550 ohms for FIO and 180 ohms for EIO).  1nF or 10nF should be good for any DIO at the default SBUS clock frequency of 9100 Hz.

You can now read from SBUS0_TEMP & SBUS0_RH without writing any config values.  In LJLogM, for example, just put the desired register name in any row.  The SHT71 does not have an enable, so we set "#" equal to the data line (0) or clock line (1) which is a signal to the T7 to not control an enable line.

Since the raw SHT sensors do not have an enable, each sensor must have its own Data and Clock lines.

If an SHT sensor is not working at this point, an oscilloscope or logic analyzer will likely be required to troubleshoot.

 

EI-1050, SHT1x, or SHT7x, using individual data/clock lines and DAC0 for power:

Say you connect an EI-1050 and SHT71 as follows:

GND      Ground (black)
DAC0    Power (red)

FIO0     Data for EI-1050 (green)
FIO1     Clock for EI-1050 (white)
DAC0    Enable EI-1050 (brown)
FIO2     Data for SHT71
FIO3     Clock for SHT71

Since the EI-1050 is tied to power, it will always be enabled.  We can do that because we have assigned it dedicated DIO for data and clock.  The SHT71 does not have an enable.  Note that the SHT7x datasheet shows an added 10k pull-up resistor from Data to Power.  The LabJack has an internal 100k pull-up that usually works, but some applications might need the stronger 10k pull-up and perhaps even a capacitor from Clock to GND near the sensor pins.

Write the following registers to configure and power the probes:

SBUS0_DATA_DIONUM = 0
SBUS0_CLOCK_DIONUM = 1
SBUS3_DATA_DIONUM = 2
SBUS3_CLOCK_DIONUM = 3
SBUS_ALL_POWER_DIONUM = 9999
DAC0 = 3.3

You can now read from SBUS0_TEMP/SBUS0_RH for the EI-1050 values or SBUS3_TEMP/SBUS3_RH for the SHT71 values.

Note that the "#" in the register names above can be about anything you want.  Say for the SHT71 you instead did:

SBUS7_DATA_DIONUM = 2
SBUS7_CLOCK_DIONUM = 3

Now if you read SBUS7_TEMP/SBUS7_RH, the LabJack will use FIO2/3 to talk to the sensor.  A possible problem, though, is that the LabJack will also control FIO7 as an enable.  It will set FIO7 to output-high, talk to the sensor, and then set FIO7 to output-low.  The way to prevent control of an enable line is to use a "#" that is the same as the data or clock line.