- Notifications
You must be signed in to change notification settings - Fork6
Raspberry Tool for managing I2C modules. EEPROM (24c01-1024), PWM LED/Motor driver (PCA9632), I/O driver (PCA9557), Temp/Humid sensor (HDC1080, HTU21D), Fan controller with a PWM (EMC2301), Pressure sensor(MS5637), Display (SSD1306), Current Voltage Power measurement (INA226, INA260), PMU (AXP209), i2cdetect
License
mamin27/ecomet_i2c_raspberry_tools
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Last modification: 09/07/2025Contributor: Marian Minar
Dont forget to add if you were satisfy with the software!
Twitter:News and statuses
NEW! SourceForge.net:
- Oscilloscope-like applicationeCScope for Raspberry PI 3+ (32bit Raspbian) based on INA260 chips and built with the Ecomet-i2c-sensors Python library.
Project eCScope was created to show progress in development. Insert the #eCScope keyword into the issue section.
PyPi module:ecomet-i2c-sensor
Current release: 0.1.9 !NEW!
New features
- AS3935 driver added (Sciosens)
- SGP40 driver added (Sensirion)
- MCP3221 driver added (Microchip)
- MCP3221 added feature for convert measured number to range or 360 degree, or cardinal points
- Fixes in PCA9632, prepared for multiple chips at I2C bus
- HDC1080 driver mainly code rewritten, different method calls
pip install ecomet-i2c-sensors
Test release: 0.1.9
pip3 install -i https://test.pypi.org/simple/ecomet-i2c-sensors
Wiki Hardware prototypes boards:link
Scope:The Driver for I2C Chip maintenance fromRaspberry PI 1B+ and above andAllWinner CPU. This code tools contains python & free pascal code focused to I2C communication of raspberry pi with IOT modules.
- tested at Raspberry PI 1B+, 3B+, 4B+, 4CM
- tested at AllWinner CPU H616, mangopi MCore-H616, Orange PI Zero2
Current CHIP maintained:
- AMS-ScioSense AS3935
- AMS-OSRAM TSL25911
- EEPROM Chip24c01,24c02,24c04,24c08,24c16,24c32,24c64,24c128,24c256,24c512,24c1024
- Measurement Specialties, TE Connectivity MS5637,HTU21D
- Microchip EMC2301, MCP3221
- NXP SemiconductorPCA9632 (could be modified for PCA9624,PCA9635PW,PCA9685,PCA9955B,PCA9956B)PCA9557
- Panasonic SN-GCJA5
- Renesas ISL28022
- Sensirion SGP40
- Solomon Systech SSD1309
- Texas InstrumentsHDC1080,PCA9557,INA226,INA260
- X-Powers AXP209
List of modules:
- AS3935 ->!NEW! Franklin Lightning Sensor
- AXP209 -> PMU (Power Management Unit) Sensor
- EEPROM module -> EEPROM read/write 24cXXX chips
- EMC2301 module -> Fan controller with a PWM fan driver
- HDC1080 module -> High Accuracy Digital Humidity Sensor with Temperature Sensor
- HTU21D module -> Digital Relative Humidity sensor with Temperature output, calculation of Dew Point
- INA226,INA260 module -> Precision Digital Current and Power Monitor With Low-Drift, Precision Integrated Shunt
- ISL2802x module -> will be added python module description
- MCP3221 module ->!NEW! Low-Power 12-Bit A/D Converter
- MS5637 module -> Ultra-compact micro altimeter. Integrated digital pressure sensor (24 bit ΔΣ ADC), Operating range: 300 to 1200 mbar, -40 to +85 °C
- PCA9557 module -> Remote8-Bit I2C and SMBusLow-PowerI/O ExpanderWith Reset andConfigurationRegisters
- PCA9632 module -> 4-bit Fm+ I2C-bus low power LED driver (could be used for motor control)
- SGP40 module -> Indoor Air Quality Sensor for VOC Measurements
- SN-GCJA5 -> Laser Type PM Sensor
- SSD1306 module -> SSD1306 is a single-chip CMOS OLED/PLED driver with controller for organic / polymer light emittingdiode dot-matrix graphic display system.
- TSL25911 -> Ambient Light Sensor
Software for Chips:
Chip | Python 3 driver | FPC GUI | Hardware Board | Contributor Notes | Planned work | Requestor Interests |
---|---|---|---|---|---|---|
!NEW! AS3935 | yescheck | no | ||||
AXP209 | yescheck | no | A10 Olimex | Only partially implementedpdf,check | ||
EEPROM 24cXXX | yes | no | I01,I02,I03,I04 | currently tested at 24c01,24c04,24c08,24c16,24c32,24c64 | ||
EMC2301 | yes | yes | I02 | add EMC2302-05 chips in design | ||
HDC1080 | yes | yes | I03,I04 | !NEW! python lib not compatible with previous version, see test script | ||
HTU21D | yes | no | I03,I04 | |||
INA226, INA260 | yes | yes | I01 | |||
ISL2802x | in progress | no | ||||
MCP3221 | yescheck | no | ||||
MS5637 | yes | no | I04 | |||
PCA9557 | yes | no | I01 | |||
PCA9632 | yes | yes | I04 | |||
SN-GCJA5 | yescheck | no | ||||
SGP40 | yescheck | no | ||||
SSD1306 | yes | no | I01 | |||
TSL25911 | yescheck | no |
Setting of config file for ecomet-i2c-sensors python library:
Library is looking in directory~/.comet for file config.yaml that contains i2c parameters for custom linux distribution and I2C EEPROM memory setting.Here is a example of config file content:
comet@orangepizero2:~/.comet $ cat config.yaml---# The I2C config filei2c: smb: i2c-3# set bus i2c-1 smb_detect: 0..3# list of monitored smb bus by i2cdetect eeprom: ic:'24c01' slaveaddr: 0x50 writestrobe: 26# hold pin low to write to eeprom sensor: ms5637: pressure: { min: 600, max: 1300 } sn_gcja5: PM1_0: { min: 0, max: 1200 } PM2_5: { min: 0, max: 1200 } PM10: { min: 0, max: 1200 }
parameter | sub-parameter | description | example value |
---|---|---|---|
smb: | name of active i2c in /dev | i2c-1 | |
smb_detect: | list of monitored i2c neworks used by commandi2c_ecomet_detect | 0..1 | |
eeprom: | eeprom section | ||
ic: | 24x00 series of eeprom chip name | '24c01' | |
slaveaddr: | address of eeprom chip in hex | 0x50 | |
writestrobe: | GPIO pin number used as CS (chip select) signal for eeprom IC | 26 | |
sensor: | part for setting particular sensors | ||
ms5637: | preasure min max | { min: 600, max: 1300 } | |
sn_gcja5: | air quality min max |
Note: Currently only one eeprom chip could be added.
Alternative command for I2C chip detection:
Here is alternative command to i2cdetect for detection of active I2C chips at I2C bus:i2c_ecomet_detect.py
pi@raspberrypi:~/ecomet_i2c_raspberry_tools/bin $python3i2c_ecomet_detect.py3.9.9 (main,Jan162022,22:51:22)[GCC11.2.0]ecomet.Board_Platform:INFOStartlogging ...ecomet.Board_Platform:INFOBoardplatform:RASPBERRY_PI4B:1.4ecomet.Board_Platform:INFONumberofI2Cbusesattheboard:2ecomet_i2c_sensors.platform.i2c_platform:INFO>>>Testingatbus:0ecomet_i2c_sensors.platform.i2c_platform:INFONoChipconnectedecomet_i2c_sensors.platform.i2c_platform:INFO>>>Testingatbus:1ecomet_i2c_sensors.platform.i2c_platform:INFODefaultbusnumber:1ecomet_i2c_sensors.platform.i2c_platform:INFOIdentifiedSlavesChips:0xc:0x1a:0x2f:0x40:0x50:0x51:0x52:0x53:0x54:0x55:0x56:0x57:0x62:0x70:0x76
Requestor Interests:If you would like to reqest some new feature or add some new Chip at the development list let me know by adding issue or by email.
About
Raspberry Tool for managing I2C modules. EEPROM (24c01-1024), PWM LED/Motor driver (PCA9632), I/O driver (PCA9557), Temp/Humid sensor (HDC1080, HTU21D), Fan controller with a PWM (EMC2301), Pressure sensor(MS5637), Display (SSD1306), Current Voltage Power measurement (INA226, INA260), PMU (AXP209), i2cdetect
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.