29 Jul 2010 @ 4:23 PM 

In the power module (that i deleted by accident, get from us puter!) the “charge” connection is connected to the positive battery terminal via a P channel mosfet. When I fully charged the battery pack (2 at a time) using my sony battery charger the overall voltage of the pack was 8.08v, so thats 8.08v/ 6 = ~1.35v per cell. I gauge that the charger is putting out about 1.435v per cell to charge them.

So the plan is this, turn on charger for about a sec, turn off charger, check battery voltage. If the battery voltage is less than it was in the previous check stop, or if its like 8v or something. This is using the negative delta V property of nimh batteries.   I’m worried that since we are doing them all in series they may kinda compensate for the negative delta V but, the only way to know for sure is to just do it and record the output.

I’m watching it now and the code looks something like this

void chargeBattery(){
   set_adc_channel(13);       // vdivider hooked to battery (39/(47+39))*vin
   // reset vars, if not it will hold the last value
   battVolts = 0;
   chgVolts = 0;
 
   // turn off charge input and read battery
   output_high(CHGPIN);
   delay_ms( 1000 );
   battVolts = read_adc();
   printf("battVolts = %2x\n\r", battVolts);
 
   // turn on charge input and read charge voltage
   output_low(CHGPIN);
   delay_ms( 1000 );
   chgVolts = read_adc();
   printf("chgVolts = %2x\n\r", chgVolts);
}

I’m doing it this way to read the output and see what happens. On the input line that the pic is reading i have a voltage divider of (39k/(39k+47k))=.453, and we are using 8 bit ADC so the max value (vref = 5v) is 255 and zero is zero :) So to see the real voltage the calculation would look something like this

[(value/255)*5] / .453  and yes a quick check with the Multimeter and some calculations show this calculation and the pics ADC to be spot on to two decimal points.  I’m changing the code to reflect the actual voltage so its easier to read, later we will just read the value and pass it as a byte in the packet.

Summary
8.08v is (8.08*.453/5*255)= 186 or 0xBA in hex

After some testing it seems as if they charged, the pack was at 8.09v and a random cell was at 1.35v. I made some code to detect the negative v condition if no negative V just turn off in a hour, we will see how that works out. If it is charging there is no way its charging faster than 1A per hour because of the limitations of the lm317 and because the batteries arent getting hot at all !

This is my code for now I’ll see how it works. I need to test the amps coming through and see if the batteries actually hold the charge for a while. I know the seconds wont be “exact” but close enough.

// for battery charging and maintenece
#define CHGPIN PIN_A4
 
// global variables for this .h
int8 battVolts = 0;
int8 chgVolts = 0;
int16 ChgSec = 0;
 
void chargeBattery(){
   set_adc_channel(13);       // vdivider hooked to battery (39/(47+39))*vin
   // reset vars, if not it will hold the last value
   battVolts = 0;
   chgVolts = 0;
 
   // turn off charge input and read battery
   output_high(CHGPIN);
   delay_ms( 900 );
   // if negative delta v or one hour stop charging and go to idle state
   if(battVolts < read_adc() || ChgSec > 3600){
      printf("Battery Charged!, NDV detected in %u Seconds", ChgSec);
      state = '0';                        // return to idle state
   }else{                                 // continue charging
   battVolts = read_adc();                // latest battery voltage
   // turn on charge input and read charge voltage
   output_low(CHGPIN);
   delay_ms(50);
   chgVolts = read_adc();
   printf("\f -Charging Chg: %u Batt: %u time:%u ",chgVolts,battVolts,ChgSec);
   }
}

Hooking up a 10k resistor through the high output line from the charger to the power module i get 10.88v on the charger side and 10.77 on the jinx side, that means .11v voltage drop. So v=i*r , .11=i*10k then i must be .011uA ?

Update . .
Looks like the logic is sound and the program is working great, but i’m sure the circuit is wrong. I have the drain side of the mosfet on the positive terminal of the battery to be charged and the source side on the charger. I dont know if the mosfet is hooked up backwards (to do what i want it to do) or some other underlying problem but i calculate the current flowing into the battery when charging to be like 20mA and the power consumption of the mcu and transmitter is more like 50mA, either way something is wrong. I need to go back and evaluate the mosfet and how it is working then repair the power circuit.

Also I got a old version of the power circuit 2 i should check to see that everything is right on it.

… just reading on other sites ..

If you charge several cells in series, you need 1.5 V times the number of cells plus 3 V. For four cells, this means a supply  voltage of 9 V.
- so thats 6*1.5+3 = 12v, no need for the lm317 because i have 12v, we can use the lm317 to limit the current though

The well-known LM317 three-lead regulator is  designed to adjust its internal resistance between the IN and OUT leads to maintain a constant voltage of 1.25 V between  the OUT and ADJ leads. If we chose a value of (1.25 ÷ 0.180) = 6.94 Ω for R1, then exactly 180 mA will flow.
- for us if we have 1.25/.5 = 2.5Ω, that will allow about 500mA to flow through the battery to ground using the following schematic.

Posted By: admin
Last Edit: 01 Aug 2010 @ 11:00 AM

EmailPermalink
Tags


 

Responses to this post » (None)

 
Post a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Change Theme...
  • Users » 5
  • Posts/Pages » 71
  • Comments » 62
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

Contact Me



    No Child Pages.

Front



    No Child Pages.