How to sense when MintyBoost is in use?

Ideas and questions about MintyBoost kits

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
rweaver
 
Posts: 13
Joined: Thu Mar 03, 2011 3:23 pm

How to sense when MintyBoost is in use?

Post by rweaver »

I want to add an LED to my MintyBoost (v3) that blinks when a device is plugged in and charging.

My current solution:
  • Measure the voltage drop from the LT1302 boost converter's switch pin (pin 7) to ground, which is about 1.6v when charging and 3.8v when not charging. I chose this because it seems to be the biggest difference in charging / not-charging voltage.
    Read this voltage drop via analogRead(). (I'm using a Gemma. I know a microcontroller is kind of overkill, but it also lets me blink my LED in fun colors and patterns.)
    Make the LED blink or not depending on whether the reading is above or below a threshold.
On the whole this works really well, but:
  • (1) While the *average* voltage on pin 7 of the boost converter when charging is 1.6v, it seems to vary a lot. So to correctly infer whether the MB Is in use, I use a moving average of the last 4 readings. This works fine, but is there a different measurement I could take that would more reliably distinguish charging vs not? Maybe the Schottky diode?
    (2) The only real downside is that the LED continues to blink when charging is complete. Is there a way to sense device-plugged-in-and-charging vs. device-plugged-in-and-fully-charged?
Thanks!

Illum3415
 
Posts: 6
Joined: Sun May 11, 2014 12:09 pm

Re: How to sense when MintyBoost is in use?

Post by Illum3415 »

One method I can think of is to use a high side [or load side] current sense in the circuit. The voltage at sw will fluctuate as the forward voltage from the battery fluctuates. This is caused by the error amplifier in the LT1302 trying to compensate for battery discharge. Naturally, the batteries will experience a rebound when the load is removed, so your test point isn't really the most ideal reference to use.

Usually I'd recommend something like a TI INA200, where theres less than 1% error with a 50mV sense resistor and has a Comparator with Reference built into the chip to drive the LED, but if we want to keep this thru-hole, try this.

Image

The discovercircuits solution is simple and it enables a lower voltage across the shunt, by lowering the switch threshold voltage by biassing the input closer to the 0.6 volts sensed by the transistor. However, it will be subject to temperature drift, but here you're not concerned about an accurate measurement.

Since we are going to be running 5V across it, with a load less than 1A, we will need a few changes in the components.

The LT1302 supplies up to 600mA to the load, resistor configuration for apple devices limit load to source only 500mA, so we have some headroom here to run the indicator off the converter.

We want the LED to light up when its charging, so R1 = 0.1/A, A = .5, R1 will be 0.2ohms, and will dissipate 50mW.

R5 needs to be changed from 4.7K. R5 was 4.7k with 11.4 (12-0.6) volts across it, so with 4.4 (5-0.6) volts across it now, you need 4.7x4.4/11.4= 1.8k.

R2 will need to be adjusted. Assuming we are using a red LED with a Vf = 2.1V. R2 can be determined by ohms law. R = (Vsupply - VCE - Vled)/(Iled), or R = (5-0.6-2.1)/0.015, or about 150 ohms.

R4 and R3 are a bit of a pickle to solve, they will need to be adjusted so that the base of the 2N3906 will read about 4.5V.
According to paper calculations, R3 at 10K and R2 at 2K should work. I have not tested the circuit in its modified configuration, but this might give you ideas.

User avatar
nsayer
 
Posts: 59
Joined: Thu Aug 08, 2013 10:45 am

Re: How to sense when MintyBoost is in use?

Post by nsayer »

I would put the current sense before the boost converter. That way the output voltage will be completely unaffected. You'll need to calibrate the sensor for the source current rather than load current, but since you're just after an "on off" light, that shouldn't be too fiddly.

Locked
Please be positive and constructive with your questions and comments.

Return to “MintyBoost”