latonita / esphome-ina228 Goto Github PK
View Code? Open in Web Editor NEWEsphome component for digital power monitors INA228, INA229, INA237, INA238, INA239
Esphome component for digital power monitors INA228, INA229, INA237, INA238, INA239
Hello,
Not sure what happens, but code for SPI version fails to compile. Code (shortened):
esphome:
name: solar-battery
friendly_name: Solar Battery
comment: ${device_description}
esp32:
board: esp32dev
framework:
type: esp-idf
external_components:
- source: github://syssi/esphome-jk-bms@main
- source: github://syssi/esphome-jbd-bms@main
- source: github://latonita/esphome-ina228@main
components: [ina2xx_base, ina2xx_i2c]
refresh: 0s
spi:
clk_pin: GPIO27
mosi_pin: GPIO26
miso_pin: GPIO25
i2c:
sda: GPIO18
scl: GPIO19
sensor:
- platform: ina2xx_spi
cs_pin: GPIO33
shunt_resistance: 0.001130 ohm
max_current: 40 A
adc_range: 0
adc_time: 4120 us
adc_averaging: 128
temperature_coefficient: 50
If I change sensor platform to ina2xx_i2c
and add replace cs_pin: GPIO33
with address: 0x40
code compiles
Also, there seems to be missing support for multiple SPI and I2C buses.
First of all thank you so much for building this. I've been working on hardware since last summer and I'm not much of a developer. I was looking to get someone to help me finish the work I had a friend do back then and decided to double check github and here this is. Wonderful work, and I think i'm gonna move from the INA237 to the INA238 in my next prototype.
Anyways, I'm getting great results so far, but the power value doesn't go negative when running in reverse, but shuntV and current do. I've included a screenshot.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.