![]() |
|---|
| Gas Sensor AFE |
External ESPHome component for the Soldered Gas Sensor AFE - an analog front-end board (LMP91000 + ADS1115, or an ATtiny404 bridge on newer revisions) for SGX electrochemical gas sensors, connected over easyC/Qwiic I2C.
- components/ - the ESPHome external component (Python config + C++ implementation)
- examples/ - example YAML configs showing how to use the component
Reference this repo directly from your own ESPHome YAML (no need to clone it locally):
external_components:
- source: github://SolderedElectronics/Soldered-Gas-Sensor-AFE-ESPHome-Component
components: [soldered_gas_sensor_afe]
i2c:
sda: 8
scl: 9
sensor:
- platform: soldered_gas_sensor_afe
# Legacy direct-wired boards: the ADS1115's address (0x48-0x4B).
# ATtiny404 bridge boards: the easyC jumper address (0x30-0x37).
# The transport is auto-detected from which range this falls into.
address: 0x30
# One of: co, no2, so2, o3, no, h2s, nh3, cl2 - selects a preset tuned for
# that SGX sensor. Quote "no" (nitric oxide) so YAML doesn't parse it as a
# boolean. Omit gas_type to configure every register field manually instead
# (nanoamps_per_ppm and tia_gain are then required).
gas_type: o3
# Optional per-unit offset - measure in clean air and adjust so ppm reads zero.
zero_calibration_voltage: -0.0053
update_interval: 60s
ppm:
name: "O3 Concentration"
ppb:
name: "O3 Concentration (ppb)"See examples/basic.yaml for a full working example.
- address (Required, int): I2C address of the ADS1115 (legacy boards) or the bridge (newer boards).
- gas_type (Optional):
co,no2,so2,o3,no,h2s,nh3, orcl2. Loads a preset AFE configuration for that SGX sensor. Any of the fields below can be set alongside it to override a single value from the preset. - nanoamps_per_ppm (Optional, float): Sensor sensitivity from its datasheet, in nA/ppm. Negative for oxidizing gases (NO2, O3). Required if
gas_typeisn't set. - zero_calibration_voltage (Optional, float): Extra PPM-zero offset in volts, for per-unit calibration.
- tia_gain (Optional):
external,2.75kohm,3.5kohm,7kohm,14kohm,35kohm,120kohm,350kohm. Required ifgas_typeisn't set. - custom_tia_gain_ohm (Optional, float): TIA feedback resistance actually in effect, in Ohms. Required when
tia_gain: external. - rload (Optional):
10ohm,33ohm,50ohm,100ohm. - ref_source (Optional):
internal,external. - internal_zero (Optional):
20%,50%,67%. - bias_sign (Optional):
negative,positive. - bias (Optional, int):
0,1,2,4,6,8,10,12,14,16,18,20,22, or24(percent). - fet_short (Optional):
disabled,enabled. - op_mode (Optional):
deep_sleep,2lead_ground_cell,standby,3lead_amp_cell,temperature_tia_off,temperature_tia_on. - ads_gain (Optional):
6.144V,4.096V,2.048V,1.024V,0.512V,0.256V. - num_samples (Optional, int): Number of ADC readings to average per update. Defaults to
1. - sample_interval (Optional, time): Delay between averaged readings. Defaults to
50ms. - ppm (Optional): Sensor for the gas concentration, in ppm. At least one of
ppm/ppbis required. - ppb (Optional): Sensor for the gas concentration, in ppb.
- All other options from Sensor and Polling Component.
Refer to the LMP91000 datasheet, chapter 7.6, for how the low-level register fields above relate to a sensor's datasheet values.
You can find hardware design for this board in the Soldered Gas Sensor AFE hardware repository.
Access library documentation here.
At Soldered, we design and manufacture a wide selection of electronic products to help you turn your ideas into acts and bring you one step closer to your final project. Our products are intented for makers and crafted in-house by our experienced team in Osijek, Croatia. We believe that sharing is a crucial element for improvement and innovation, and we work hard to stay connected with all our makers regardless of their skill or experience level. Therefore, all our products are open-source. Finally, we always have your back. If you face any problem concerning either your shopping experience or your electronics project, our team will help you deal with it, offering efficient customer service and cost-free technical support anytime. Some of those might be useful for you:
Soldered invests vast amounts of time into hardware & software for these products, which are all open-source. Please support future development by buying one of our products.
Check license details in the LICENSE file. Long story short, use these open-source files for any purpose you want to, as long as you apply the same open-source licence to it and disclose the original source. No warranty - all designs in this repository are distributed in the hope that they will be useful, but without any warranty. They are provided "AS IS", therefore without warranty of any kind, either expressed or implied. The entire quality and performance of what you do with the contents of this repository are your responsibility. In no event, Soldered (TAVU) will be liable for your damages, losses, including any general, special, incidental or consequential damage arising out of the use or inability to use the contents of this repository.
And thank you from your fellow makers at Soldered Electronics.

