Piezoresistive Pressure Sensor + ADS1115 ADC + Qualcomm SoC + Yocto BSP
This repository provides a complete implementation for integrating a piezoresistive pressure sensor with a Qualcomm-based development board using Yocto Project Build System.
It includes a custom Yocto meta-layer, device-tree overlay, kernel fragment, systemd service, and a Python daemon for real-time pressure monitoring.
This project reads analog pressure from a piezoresistive pressure sensor (PDF included in docs/) using an ADS1115 ADC and exposes the data via IIO subsystem on Qualcomm hardware.
- Qualcomm Snapdragon boards (C8750, APQ8096, APQ8098, RB3/RB5, etc.)
- Any Yocto-based BSP with available I²C interface
- Yocto Layer:
meta-pressure/ - Kernel Config Fragment
- Device Tree Overlay for ADS1115
- Python Pressure Daemon
- Systemd service
- Wiring instructions
- Original sensor technical PDF
pressure-qualcomm-project/
│
├── README.md → Project overview & instructions
├── LICENSE → MIT License
│
├── meta-pressure/ → Yocto layer (recipes, DT, daemon)
│ ├── recipes-kernel/
│ ├── recipes-bsp/
│ └── recipes-support/
│
├── dts/
│ └── myboard-ads1115.dts → Device tree overlay for Qualcomm board
│
├── kernel/
│ └── ads1115.cfg → Kernel fragment enabling IIO + ADS1115
│
├── software/
│ ├── pressure_daemon.py → Python daemon (reads IIO sysfs)
│ └── pressure.service → systemd unit
│
├── wiring/
│ └── WIRING.md → ADS1115 + Sensor + Qualcomm wiring
│
└── docs/
└── Fachbeitrag_Piezo_e.pdf → Technical PDF about the sensor
(Analog bridge output — described in included PDF)
- Texas Instruments ADS1115 (I2C, 16-bit, differential)
Examples:
- TurboX C8750 (Snapdragon)
- RB3 / RB5
- APQ8096 / APQ8098
- 3.3V supply for ADS1115
- Common GND
- SDA + SCL connected to Qualcomm board I²C
See full wiring in wiring/WIRING.md
| Sensor | ADS1115 | Qualcomm Board |
|---|---|---|
| OUT+ | AIN0 | — |
| OUT− | AIN1 | — |
| VEX | VCC | 3.3V |
| GND | GND | GND |
| SDA | SDA | I2C SDA |
| SCL | SCL | I2C SCL |
| ADDR | GND | — |
Edit bblayers.conf:
BBLAYERS += " \
/path/to/meta-pressure \
"
The file kernel/ads1115.cfg enables:
- IIO subsystem
- I2C
- ADS1015/ADS1115 driver support
Included automatically through:
meta-pressure/recipes-kernel/linux/linux-yocto-ads1115.bbappend
Located at:
dts/myboard-ads1115.dts
Edit the I²C node to match your Qualcomm DTS:
Example:
/soc/i2c@78b6000 {
status = "okay";
ads1115@48 {
compatible = "ti,ads1115";
reg = <0x48>;
#io-channel-cells = <1>;
};
};
The Yocto recipe compiles it into a .dtbo.
After flashing the Yocto build:
i2cdetect -y 0
→ Should show 0x48
ls /sys/bus/iio/devices/
cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw
Located at:
software/pressure_daemon.py
- Reads raw ADC data from IIO
- Converts to voltage
- Applies calibration (a, b values via JSON)
- Logs pressure readings
- Triggers warnings when above threshold
Run manually:
python3 /usr/bin/pressure_daemon.py
Enable service:
systemctl enable pressure.service
systemctl start pressure.service
Check status:
systemctl status pressure.service
Logs:
journalctl -u pressure.service -f
bitbake core-image-minimal
Or your custom image:
bitbake my-image
Flash to board → daemon starts automatically → pressure logged.
The original technical PDF explaining piezoresistive sensors is included:
docs/Fachbeitrag_Piezo_e.pdf
MIT License — free for commercial and personal use.
If you want, I can generate:
✔ A full flowchart ✔ System block diagram ✔ Professional architecture diagrams ✔ Advanced DTS for your exact Qualcomm board ✔ MQTT / Cloud upload support ✔ A GUI for real-time graphing