lawmate / bq4050 Goto Github PK
View Code? Open in Web Editor NEWLibrary for basic interfacing with BQ4050 battery fuel gauge from TI
License: Other
Library for basic interfacing with BQ4050 battery fuel gauge from TI
License: Other
Hi
Thanks for writing the library. I am trying to use this library to connect with BQ4050 with arduino but I am getting error " Multiple definitions of registers ". I tried correcting it but my skills are not good enough.
There was also errors for Wire.receive and Wire.send function which has to renamed to Wire.read and Wire.write. I was able to rename and go forward on that one though.
Hi,
I'm trying to use library and it works fine if I'm not using i2C for any other device reading. If I do anything with other I2C device, readings from BQ4050 are all with value zero after that.
Scenario 1: (works fine)
Scenario 2: (all values from BQ4050 are zero)
Hello,
Does this library assume that you do the initial config using BQstudio from TI or will it work without it?
Using a DOIT ESP32 DEVKIT V1
I can get values from cell 1-2-3-4, pack value, state of charge.
the current reading on the other hand does not work past -99mA something weird happens and it bugs up and reads -1mA
I tried this with a BQ40Z50. Cell voltages are shown with the read example, but when i call the built-in get-functions, i get no results. Any ideas?
Thanks and Cheers
Hi there,
I am trying to modify your library so that it run on an Arduino Nano because its simply to big.
Since I only need to read the BQ4050, I deleted all register-write functions that I don't need.
The second I have done: Comment all lines in the get-functions to save memory.
Third: comment declaration of several structs that I don't need like
struct AtRateTimeToEmptyt{ uint16_t val = 0; uint8_t addr = 0x06; };// atRateTimeToEmpty;
So the definition of the structure is still there, but no variable of that structure...
I got the code to work, but it seems to stuck. The readings of the battery pack voltage, the cell volate and especially the temperature (register 0x09) don't want to change until
a) resetting the arduino
b) heating up the battery pack slowly, then the values are changing and the temperature rises.
But then again... while cooling down the temperature is again not chaning... after a reset!
My sketch looks like your example but slightly modified to get other data.
Can you tell my what for is the CalculateTable_CRC8(); function in the constructor? Do I need this initial call to it if I only want to read registers ?
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.