Giter VIP home page Giter VIP logo

ltc4150_coulomb_counter_bob's Introduction

SparkFun Coulomb Counter Breakout - LTC4150

SparkFun Coulomb Counter Breakout - LTC4150

SparkFun Coulomb Counter Breakout - LTC4150 [ BOB-12052 ]

Breakout board for the Linear Tech LTC4150 Coulomb Counter (bidirectional current sensor / battery gauge)

The LTC4150 Coulomb Counter monitors current passing through it (from the IN header or JST connector to the OUT header). Each time 0.1707 mAh passes through the device, the INT pin will pulse low. Or to put it another way, the INT pin will pulse low 5859 times for each Ah that passes through it.

There is also a POL pin that you can check each time INT goes low. POL will be L for current going from IN to OUT, and H for current going from OUT to IN (battery charging).

If you count these pulses and add or subtract from a total depending on the POL signal, you can keep accurate track of the state of a battery connected to the board.

The Coulomb Counter can accommodate power supplies up to 8.5V and up to 1A.

Quickstart (Arduino)

  • Configure the jumpers:

    If you're connecting the Coulomb Counter to a 5V system, leave solder jumpers SJ2 and SJ3 (on the bottom of the board) open (the default).

    If you're connecting the Coulomb Counter to a 3.3V system, close both SJ2 and SJ3.

  • Hook up the I/O lines:

    Connect VIO to your system's VCC (3.3V or 5V) line.

    Connect GND to your system's ground line.

    Connect INT to your system's interrupt input (D3)

    Connect POL to an I/O pin (D4)

  • Connect the IN header or the JST connector to your power source (up to 8.5V)

  • Connect the OUT header to your system's power input

  • Upload and run the Coulomb_Interrupt example code from this repository, and open a Serial Monitor set to 9600 bps. It should display a hello message and begin giving you periodic updates about the battery state. (See the comments for instructions on customizing it for your exact battery.)

See the Hookup Guide for much more information.

Have fun! -Your friends at SparkFun

Repository Contents

  • /Documentation - Data sheets, additional product information
  • /Hardware - Eagle design files (.brd, .sch)
  • /Production - Production panel files (.brd)
  • /Software - Arduino example code

Documentation

License Information

This product is open source!

Please review the LICENSE.md file for license information.

If you have any questions or concerns on licensing, please contact technical support on our SparkFun forums.

Distributed as-is; no warranty is given.

  • Your friends at SparkFun.

ltc4150_coulomb_counter_bob's People

Contributors

bboyho avatar robert-hunke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ltc4150_coulomb_counter_bob's Issues

Three Coulomb counters with all different values

Hi,

I tested three LTC4150's that all print different values.

The first value will be incorrect, because we have no previous start time to compare the delay between interrupts with. The INT pin will pulse low every time 0.614 coulombs passes through the device. So you can say that all coulomb counters with the same setup must print very similar values.

With two AA batteries connected to the IN port of the Coulomb counter I get around the following values:

Coulomb counter 1: prints "1.30 mA"
Coulomb counter 2: prints "2.15 mA"
Coulomb counter 3: prints "1.80 mA"

Are they not calibrated right?

Invalid library found

Adding the zip to Ardunino 1.6.11 failed.

Adding library manually showed error "invalid library found"

Interrupt example code doesn't work on Pro Micro

The issue is that the interrupt example takes a long time to show an interrupt message and gives me incorrect values of mA:
Normal with polling example:
mAh: 1998.98 soc: 99.95% time: 367.73s mA: 1.67
mAh: 1998.81 soc: 99.94% time: 374.93s mA: 1.64
mAh: 1998.63 soc: 99.93% time: 363.59s mA: 1.69

With interrupt example (with same external microcontroller and external battery connected):
mAh: 1998.98 soc: 99.95% time: 1267.73s mA: 0.30 (something like this, dont have the log)
mAh: 1998.81 soc: 99.94% time: 1274.93s mA: 0.30 (something like this, dont have the log)

Polling example uses: if(interruptPin(INT==0){do something}

Interrupt uses attachInterrupt with an ISR on the INT pin. This is very similar to polling, so should give the same values.

Do you have any idea About this ?

Also, I don't get or see an interrupt message if I don't connect an external micro-controller to the "out" port of the LTC1450... Which I do get with the polling example.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.