Has anyone used the sparkful LiPO fuel gauge with the Teensy 3.0?

Status
Not open for further replies.

Russ

Active member
Has anyone used the sparkfun LiPO fuel gauge with the Teensy 3.0?

Hi again all ;p Before antything else, yes, I know that this is not the sparkfun forum. I decided to ask this here because you guys are nicer and because it is Teensy related.

I had decided that I would try to integrate a fuel gauge into my hoop. I went ahead and got a couple of the LIPO fuel gauges from sparkfun (https://www.sparkfun.com/products/10617).

The fuel gauge got here a couple of days ago and I went back to read the comments on sparkfun to make sure I did not screw anything up. I noticed in the comments that apparently on the board the battery is hooked to the vcc.

from the sparkfun comments said:
From the datasheet and schematic I see a possible issue for 3.3V systems. They connected all the pullup resistors and the chips VDD to the battery voltage (labeled VCC), however Figure 7 in the datasheet shows the connections should be tied to the 3.3V of the microcontroller and isolated from the battery’s voltage, which could fluctuate from 2.6V to 4.2V. I think this could mean up to 4.2V signal levels on the 3.3V chip, but I’m not sure if this would actually cause a problem. Maybe try this out with a 5V Arduino? Looking at the signals with a logic probe or oscope might help. If I get I2C working on the datalogger (which runs at 3.3V) I’ll give this a try. Hopefully it’s just a code issue.

In the same comment thread I saw that someone cut the track connecting the vcc to the battery as a solution.

sparkfun comments said:
I cut the track that joins the Cell positive to the Chip VCC and pull up resistors. The track is easy to find, when looking at the back of the board, with the “Fuel Gauge” text at the top, the track to cut is the one that runs around (from 12 oclock to 3 oclock) the CELL -ve pad in the center of the board and attaches to the VCC pad on the right side.
Once this track is cut, the VCC needs to be connected to a 3.3V (2.5V to 4.5V) supply, but you will have nicely isolated the LiPo voltage from the other supplies you have. This is for version V11

Since cutting the track is a very permanent solution I was wondering if a 1N4001 diode in line between the Teensy 3.0 3.3v and the vcc on the fuel gauge might work just as well.

I have hooked a battery to the fuel gauge and then read the voltage at the vcc and the voltage does just pass right through which seems wrong to me, but I know very little about what I am reading and trying to understand.

Thanks in advance for any insight to this.
 
Last edited:
You probably won't damage the Teensy by putting 4.2 V via 4.7 k on a 3.3 V I/O pin, but it's not good practice. Cutting that 'VDD' line and connecting it to the Teensy 3.0's 3.3V supply would probably be a better solution.

I don't understand your comments about a diode -- VCC on the fuel gauge needs to be the battery + terminal; feeding the T3 from the 4.2 V via a diode would (slightly) exceed its specs (3.6 V), and also lead to a permanent leakage drain on the battery.
 
Thanx for the reply.

I was thinking of a diode from the teensy 3.3 v to the fuel gauge. Do I have the current flow wrong somewhere? The way I understood the issue they were discussing was that the power coming back to the microprocessor could fry it. So, my diode was simply to make sure there was no flow back into the teensy.

In my mind the 3.3v from the teensy would power the chip on the fuel gauge. So a diode allowing power to flow from the teensy to the gauge to power it but not back in the other direction was what I was saying. I am apparently not understanding something, which means I am also not understanfding what cutting the track would do. The track being cut connects the battery and the vcc. If I cut that then the battery will be disconnected from the vcc which (if I am reading you right) you are saying need to be connected.

edited in: I am confused also by the use in discussion of VDD and VCC, I thought they were basically the same thing, the positive supply voltage for the chip.
 
Last edited:
VDD and VCC are both commonly used for positive supplies. If you look at the Sparkfun schematic, you see VCC is the Li cell; it is connected to VDD of the IC via 180 ohm. If you don't make some PCB adjustment, then a diode 'from' the T3 won't actually have any effect & you will still have VCC (4.2 V) on the I2C lines.

Bottom line -- for a robust solution, I would slightly modify the PCB. For a trial, it's probably OK as is - you won't fry the T3.
 
Thank you again. I do appreciate you putting up with my ignorance.

Ok, I think I understand why the diode would not work. I had already looked at the schematic and was confused (and still am) by what I am looking at. But, neither here nor there.

I'm putting up a pic of part of the back of the Fuel gauge board. On this, the battery is marked with the + and - and then there is the vcc pin on the right hand side. From what I read in the discussions I quoted, they are talking about cutting the trace that runs between the vcc pin and the + terminal pin of the battery, so like at the position of the minus (-) sign. So, I would just cut the trace right there? Just take an exacto to the back of the board and cut it?


fuelgauge.jpg




Again, thanx for all the help.
 
Last edited:
It looks like all you need to do is separate the battery input from Vcc, and then connect Vcc to the teensy3's 3.3v output.

They're powering the chip from the battery apparently, when in your situation, it doesn't need to be. You need to power the gauge with the teensy3 instead of the battery, so you can keep the 4.2v isolated from the teensy3. As far as what trace to cut on the board. that LOOKS like where you need to slice the trace.. but it's 1am.. and sparkfun has apparently liked to flip their boards around when taking pictures.. so.. best get a second opinion. heh.
 
It looks like all you need to do is separate the battery input from Vcc, and then connect Vcc to the teensy3's 3.3v output.

They're powering the chip from the battery apparently, when in your situation, it doesn't need to be. You need to power the gauge with the teensy3 instead of the battery, so you can keep the 4.2v isolated from the teensy3. As far as what trace to cut on the board. that LOOKS like where you need to slice the trace.. but it's 1am.. and sparkfun has apparently liked to flip their boards around when taking pictures.. so.. best get a second opinion. heh.

Thank you.
 
I went ahead and cut the trace today. Now I have to make sense of the libraries I found for this thing.

baby steps.
 
It has been a while, but I was wondering, how did you (or others) succeed?!

I know this is an OLD thread but it was the only one that came up when I was searching for others using the Sparkfun Fuel Gauge with the Teensy 3.x (especially in light of the suggestion of a modification needed for use with 3.3v systems) so I thought I'd update it just for the record.

I had originally intended to build my own "fuel gauge" board using the MAX17043 but I couldn't find any in stock so I figured I could use the Sparkfun board as a stand-in until I found something better.

Today I received one of the Sparkfun boards in the mail. I cut the VCC trace as suggested in a previous post and wired everything up. So far, so good. No magic smoke and the data appears reasonable.

I do now realize that I should have wired the STAT pin from the MCP73831 to one of the pins on the Teensy instead of an LED (and, of course, wired the LED to a 2nd Teensy digital I/O pin) so I could tell programmatically when the battery was charging (and still light an LED). Oh well I do have a few other changes in mind for Revision "C" of the PCB anyways...

So I wanted to confirm that cutting the indicated trace wasn't fatal and seems to work fine.

FWIW,

Brad
KF7FER
 
Status
Not open for further replies.
Back
Top