View Full Version : Discussion Help needed - nicad or nimh?
evernon
Mar 21, 2007, 09:39 AM
The TX battery pack in my Hitec Flash 5 has quit working probably due to age and my neglect. I would prefer to fabricate a new pack as apposed to paying $30 for a new one. Does anyone have a suggestion for good AA cells? The original pack had nicads but are there better options that will still work with the stock charger that came with this radio? The stock battery pack never seemed to hold a charge very long. Also, flying is seasonal in Montana and all my batteries sit around for 4 - 6 months with no use. Should I be cycling my batteries periodically during this time?
Thanks for your advice
Daniel7866
Mar 21, 2007, 11:05 AM
You can buy one from another brand and place the original connector on it. Example from tower if dimensions fit: http://lnk.nu/www2.towerhobbies.com/dzs . However if you use the same wall charger the charging time will be increased by a factor: "new capacity" divided by "previous capacity".
Daniel
rmteo
Mar 21, 2007, 11:12 AM
This is a great source of pre-made transmitter battery packs (and other battery needs). Their 2200maH packs with connectors are just $13 each.
http://www.batteryspace.com/index.asp?PageAction=VIEWPROD&ProdID=776
Disclaimer: Not connected in any way with them - just a happy customer.
Dan Baldwin
Mar 21, 2007, 11:19 AM
You can use high capacity nimh consumer cells (2300 mah-2700 mah) in an 8 cell battery holder as suggested in this thread;
http://www.rcgroups.com/forums/showthread.php?t=350745
The consumer cells have too high of an internal resistance to power motors, but the flash 5 only draws about 180 ma, so they will work fine with it.
Dan
jeffs555
Mar 21, 2007, 11:21 AM
Don't know about the Flash 5, but I have several other Hitec's. The packs that came with the radios were nicads with a connector on wires that plugged into a two prong connector on the radio. However, all my Hitec's also have spring brass contacts in the battery compartment that will mate up with this this battery holder from Radio Shack. http://www.radioshack.com/product/index.jsp?productId=2062251&cp=2032058.2032230.2032264
I have a couple of these holders, and use NIMH AA cells mostly, but have even used Alkaline AA cells on occasion. The stock charger will charge the NIMH, but it takes longer than the Nicads because they are higher capacity. I think you can get NIMH AA cells up to 3000mah. Don't know what brand is best.
evernon
Mar 21, 2007, 12:23 PM
Thanks for the advice!
The battery holder from Radio Shack seems like a great option. My radio does have the contacts inside to use this.
If my charger says 50ma/hr and I purchase 2000 ma/hr cells, do I leave it on the charger for 40 hours? (I am not sure how much my charger actually puts out)
Thanks
Dan Baldwin
Mar 21, 2007, 12:32 PM
Thanks for the advice!
The battery holder from Radio Shack seems like a great option. My radio does have the contacts inside to use this.
If my charger says 50ma/hr and I purchase 2000 ma/hr cells, do I leave it on the charger for 40 hours? (I am not sure how much my charger actually puts out)
Thanks
Charging of NiMh batteries is not 100% efficient, so you would have to leave the batteries on the charger considerably longer than 40 hours if you use the original TX charger. The first charge should probably be about 3 days. If you want to charge faster, you can pull the batteries out of the transmitter, and use a faster charger.
Dan
Acetronics
Mar 21, 2007, 12:51 PM
Hi,
I've done recent measurements upon SANYO HR3U 2100mah ...
internal résistance ( 20 cm connector included ) :
: 0.706 Ohm ( after 3 unuse weeks - charged before stored)
Jo 20h16 after Réflex charge : 0.223 Ohm
J+1 17h47 ...without any load.... : 0.257 Ohm
J+2 09h57 : 0.280 Ohm
19h23 : 0.291 Ohm
J+3 07h54 : 0.312 Ohm
19h25 : 0.340 Ohm
J+4 09h58 : 0.367 Ohm
18h43 : 0.393 Ohm
J+5 09h14 : 0.430 Ohm
17h40 : 0.444 Ohm
The TOTAL measurements draw was 0.014 A.h ...
The 4 cells, freshly charged have an internal resistance of 0.167 Ohms ... far from the DATASHEET !!!
Using Mr CAM's µMETROS ... verified thrustworthy with an industrial meter.
Won't leave NiCads aboard planes for a moment ...
Alain
xtal
Mar 21, 2007, 04:52 PM
Radio shack also has RC car 9.6 pack from 9$ to 14$
Also for larger batts you can get 18volt batt pack [15 cells] from
harbor freight for 9.99 [Drill master]
attached is a nicd battery charger I been playing with for
for multi cell batterys ... uses walwart 12f683 and lm317...
I got tired of the crappy chargers trashing my tool batterys....
Schematic is embedded in mikrobasic source code...
this is still a work in progress , but I believe its is functioning properly
zip contains all files for mikro basic or just use the following code
program chargeV84x
' MIKROBASIC 5.0.2 DEMO VERSION PROGRAM BY MIKE WARDLOW[XTAL]
'-------------------------------------------------------------------------------
' POWER TOOL BATTERY CHARGER 9.6* 14.4 18*
'
' B+ ---|----------------------o-----[LM317]-------------------------R
' R 100 |+ | 1ohm R Rc
' | +5V === | 1K R
' [7805] ---o---o-----| | |----------RRRR-------------|
' | | | R xxxx | Diode
' | | === R470 | |-----------| +
' xxxxxxxxx | | R | R |
' | xxxx | + |/ 10K R |
' o---------o-o-- |------| -----| 2n2222a R -------
' | | | R + D L | |\ | --- |
' R 1K R R R E E R v |--------o -------
' R 510 R R R L D + R 1k | | | ---
' R R R |470 | R | | R |Battery
' | | | | |--o-----| xxxxx | R |
' |------| L L xxxx | | 2.2K R |
' O | E E | | | | |
' | SW | D D |--->|1 | 8|<-- +5V | xxxxxxxxxxxxxxxxxxxxxxx
' O | | |---gp5-->|2 | 7|<-- GP0 ----O-< ADC
' | | |-----gp4-->|3 | 6|<-- GP1 --< Temp nu
' XXXX |--------gp3-->|4 |---5|<-- GP2 --> 0=charge 1=not
' 12F683
'
'-------------------------------------------------------------------------------
symbol BATT = gpio.0 ' battery input
symbol TEMP = gpio.1 = 1 ' Temperature Input
symbol SWITCH_IN = GPIO.3 ' for switch input
symbol CHARGER_ON = gpio.2 = 0 ' charger output
symbol CHARGER_OFF = gpio.2 = 1
symbol Code = eeprom_write
'-------------------------------------------------------------------------------
' GP4 GP5
' off - off POWER OFF
' both on - both off repeat flashing = charger error
' FLASH - FLASH slow alternate flashing wait for battery
' Connect battery -- if not sensed [ voltage to low] press switch
' FLASH - FLASH faster alternate flashing checking battery
' FLash/on - FLASH/FLASH GP4=on GP5=Flash count = # of cells
' Pressing switch when GP4 off and Releasing after on.. cells = cells+1
' OFF - ON Slow Charge
' ON - OFF Normal Charge
' ON - ON Fast CHARGE
'
' ON - FLASH
' TERMINATION COUNTS
' Rcode = 0 1 - Flash's = -deltaV
' 1 2 - Flash's = 2 hours elapsed time out
' 2 3 - Flash's = 10 minute timeout normal charge
' 3 4 - Flash's = 10 minute timeout fast charge
' 4 5 - Flash's = Maximun Temperature reachrd
'-------------------------------------------------------------------------------
symbol LED4_ON = gpio.4 = 1 ' Status Led
symbol LED4_OFF = gpio.4 = 0
symbol LED5_ON = gpio.5 = 1 ' Charge Led
symbol LED5_OFF = gpio.5 = 0
'-------------------------------------------------------------------------------
DIM np1,maxvolts,minvolts,max2 AS WORD
DIM cells,Rcode AS BYTE '
dim Temperature,BatteryVolts as word
dim B1v1,B1v2,B1v3,B1v4,B1v5,cnt,cntA as word ' voltage readings
dim x,y as byte
dim VFC,VRC as byte
dim ctime as integer
'-------------------------------------------------------------------------------
' using 10k/2.2k ADC = volts*2200/61
' max CHARGE volt = 1.7/cell
' max discharged = .7 / cell
'-------------------------------------------------------------------------------
''const v12L as word = 1*7*220/61 ' 1 * .7 *2200 / 61
''const v12L as word = 1*17*220/61 ' 1 * 1.7 *2200 / 61
const v48L as word = 101 '0x65 ' 4 * .7 = 2.8 * 2200 / 61
const v48H as word = 245 '0xf5 ' 4 * 1.7 = 6.8
const v72L as word = 151 ' 6 * .7 = 4.2 * 2200 / 61
const v72H as word = 368 ' 6 * 1.7 = 10.2 * 2200 / 61
const v96L as word = 202 ' 8 * .7 = 5.6 volts
const v96H as word = 490 ' 8 * 1.7 = 13.6 volts
const v144L as word = 303 ' 12 * .7 = 8.4 * 2200 / 61
const v144H as word = 736 ' 12 * 1.7 = 20.4 * 2200 / 61
const v18L as word = 379 ' 15 * .7 = 10.5 volts
const v18H as word = 920 ' 15 * 1.7 = 25.5 volts
const MaxTime as integer = 2400 ' 4hr = 14400 sec / 6 = 2400
'================================================= ==============================
' sub procedure interrupt
' if INTCON.T0IF =1 THEN ' TMR0 INTERRUPT
''pstat.X=1 'leave int0 dis
''''INTCON.T0IE = 0 ' DISABLE TRM0 INTS
''''Setbit(ADCON0,GO) ' START ADC CONVERSION
' ClearBit(INTCON, T0IF) ' ClearBit as an inline function,
' END IF '
'--------------------------------------------------------------------
' IF PIR1.TMR1IF = 1 THEN ' TMR1 INTERRUPT
' PIR1.TMR1IF = 0 ' CLEAR T1 INT/OVERFLOW BIT
' END IF
'--------------------------------------------------------------------
' IF Testbit(PIR1, TMR2IF) = 1 THEN ' PWM - TMR2 INTERRUPT
'pstat.2=1 'leave int0 dis
' Clearbit(PIR1, TMR2IF) '
' T2CON = 0X01 ' STOP T2
' END IF '
'--------------------------------------------------------------------
' IF PIR1.ADIF = 1 THEN ' ADC INTERRUPT
' Setbit(PSTAT,X) ' SET PID_RUN
' NP = ADRESH * 256 + ADRESL '
' Clearbit(PIR1, ADIF) '
' END IF '
'end sub '
'================================================= ============================
' THIS FUNCTION READ THE SAME ANALOG INPUT 4 TIMES and averages
'--------------------------------------------------------------------
SUB FUNCTION PROCESS(dim chnl as byte) AS WORD
ADCON0 = (0x81 or chnl << 2) ' RIGHT JUSTIFY VDD REF CHANNELX
DELAY_US(100) ' WAIT 100US AFTER ADON / CHNL CHANGE
ADCON0.GO = 1 ' START CONVERSION
WHILE ADCON0.GO WEND
'' NP1 = ADRESH << 8 + ADRESL
NP1 = ADRESH * 256 + ADRESL
'' NP1 = ADC_READ(CH) ' STEPS * 3 = APPROX DESIRED US
'-----------------------------------------------------------------
'' DELAY_US(75) ' WAIT 100 US
' ADCON0.GO = 1 ' START CONVERSION
' WHILE ADCON0.GO WEND
' NP2 = (ADRESH * 256 + ADRESL)
' NP2 = NP + ADC_READ(CH)' 334*3=1002 512*3=1536 667*3=2001
'-----------------------------------------------------------------
'' DELAY_US(75) ' WAIT 100 US
' ADCON0.GO = 1 ' START CONVERSION
' WHILE ADCON0.GO WEND
' NP3 = (ADRESH * 256 + ADRESL)
' NP3 = NP + ADC_READ(CH)'
'-----------------------------------------------------------------
'' DELAY_US(75) ' WAIT 100 US
' ADCON0.GO = 1 ' START CONVERSION
' WHILE ADCON0.GO WEND
' NP3 = (ADRESH * 256 + ADRESL)
' NP4 = NP + ADC_READ(CH)'
'------------------------------------------------------------------
RESULT = np1 ''(NP1+NP2+NP3+NP4) << 2 ' current average battery voltage
''''''result = 500
END SUB
'================================================= ==============================
sub procedure DLY250
delay_MS(250)
end sub
'---------------------------
sub procedure DLY50
delay_MS(50)
end sub
'---------------------------
sub procedure DLY20
delay_ms(20)
end sub
'----------------------------
sub procedure DLY10
delay_ms(10)
end sub
'---------------------------
sub procedure DLY100
delay_ms(100)
end sub
'---------------------------
sub procedure DLY700
delay_ms(700)
end sub
'-----------------------------
sub procedure DLY300
delay_ms(300)
end sub
'------------------------------
sub procedure DLY900
delay_ms(900)
end sub
'---------------------------
sub procedure Flash4
DLY100 delay_ms(200) '' MAX TIME EXPIRED
DLY50
LED4_ON
DLY100 ''''delay_ms(200) '' this additional delay
DLY50
LED4_OFF '' decreases %
end sub
'---------------------------
sub procedure Flash5
DLY100 delay_ms(200) '' MAX TIME EXPIRED
DLY50
LED5_ON
DLY100 ''''delay_ms(200) '' this additional delay
DLY50
LED5_OFF '' decreases %
end sub
'-------------------------------------
sub procedure MemUp
B1v5 = B1v4 ' v4 --> v5
B1v4 = B1v3 ' v3 --> v4
B1v3 = B1v2 ' v2 --> v3
B1v2 = B1v1 ' v1 ==> v2
B1v1 = BatteryVolts ' v0 --> v1
end sub
'================================================= ==============================
'================================================= ==============================
sub procedure SaveVolt(dim zz as word)
eeprom_write(zz,hi(BatteryVolts))
DLY20 ''delay_ms(20)
eeprom_write(zz+1,lo(BatteryVolts))
DLY20 ''delay_ms(20)
end sub
'-------------------------------------------------------------------------------
sub procedure DispCellCnt(dim xx as byte)
for y = 1 to xx
DLY250 ''delay_ms(250)
led5_on
DLY250 ''delay_ms(250)
led5_off
next y
DLY250 ''delay_ms(500)
DLY250 ''
end sub
'-------------------------------------------------------------------------------
sub procedure Toggle ( dim GPpin as byte)
if gpio.GPpin = 1 then
gpio.GPpin=0
else
gpio.GPpin = 1
end if
end sub
'================================================= ==============================
sub procedure VCHECK
if BatteryVolts = B1v5 then ' set Rcode 5
Rcode = 5
VFC = 3
VRC = 3 ' Rcode 3 VSAME
goto VCend
end if
if BatteryVolts < B1v5 then ' set Rcode 7 or 0
VRC = 3
if VFC = 0 then
SaveVolt(0x38)
Rcode = 0
else
VFC = VFC - 1
SaveVolt(0x38 + VFC + vfc)
Rcode = 7
end if ' Rcode 7 VFALL
else
Rcode = 6 ' Rcode 6 VRISE
VFC = 3
if VRC > 0 then VRC = VRC - 1 end if
end if
VCend:
if PROCESS(1) > 0x3ff then Rcode = 4 end if ' Rcode 4 Max Temp Term
if ctime <= 0 then Rcode = 1 end if ' Rcode 1 Max Timeout
end sub
'================================================= ==============================
' Check the three state inputs
'-------------------------------------------------------------------------------
'SUB FUNCTION PINSTATE(DIM PINX AS BYTE) AS WORD ' PORT A/B 5/6
' TRISB.PINX = 0 ' SET AS OUTPUT
' PORTB.PINX = 0 ' SET PIN LO
' TRISB.PINX = 1 ' SET PIN AS INPUT
' IF PORTB.PINX = 1 THEN ' STRAPPED HI ?
' RESULT = 2000
' ELSE
' TRISB.PINX = 0 ' SET AS OUTPUT
' PORTB.PINX = 1 ' SET PIN HI
' TRISB.PINX = 1 ' SET AS INPUT
' IF PORTB.PINX = 0 THEN ' STRAPPED LO
' RESULT = 1000
' ELSE
' RESULT = 1500
' END IF
' END IF
'END SUB
'================================================= ==============================
MAIN: OSCCON = 0X70 ' 8 MHZ INTERNAL .75% PER STEP
OSCTUNE = 0 '0X1D ' 0X0F MAX FREQ
' 0E 0D 0C 0B 0A 09 08 07 06 05 04 03 02 01
' 0X00 CENTER FREQ
' 0X1F MIN 1E 1D 1C 1B 1A 19 18 17 16 15 14 13 12 11
' 0X10 MIN FREQ
' SLOW 8US/300US = 2.6% = 3.5 STEPS TRY 0X03
' FAST 6US/300US = 2.0% = 2.6 STEPS TRY 0X12
CCP1CON = 0
'CMCON = 7
'PORTA = 0
'PORTB = 0
'TRISA = %00100001
'TRISB = %11111111
trisio = %00001011 ' gp0=adc GP1 = ADC gp3=in
'================================================= ===================
' STOP THE TIMERS USING 8MHZ BASE FREQ OSC/4 = 2MHZ .5US/CYC
'--------------------------------------------------------------------
'OPTION_REG = 1 ' PRESCALE 1:4 2US RESOLUTION 12F683/16F88
INTCON.T0IE = 0 ' BLOCK TMR0 INTERRUPT
T1CON = 0X10 ' 1:2=1US RESOLUTION & STOPPED 0X01=RUN
' B7=0= 2 8-BIT WRITES HI/LO
T2CON = 0X05 ' 1:4=2US RESOLUTION & STOPPED 0X04=RUN
'================================================= ==================
' ENABLE INTS '
' setbit(pie1,adie) ' ENABLE ADC CONVERSION INTERRUPT
' setbit(pie1,tmr2ie) ' ENABLE TIMER 2 INTERRUPT
' setbit(pie1,tmr1ie) ' ENABLE TIMER 1 INTERRUPT
' setbit(intcon,T0IE) ' ENABLE TIMER 0 INTERRUPT
' setbit(intcon,peie) ' ENABLE PERIPHERAL INTERRUPTS
'''' setbit(intcon,gpie) ' ENABLE PINCHANGE INTERRUPTS
' PIR1.TMR1IF = 0 ' CLEAR ANY PEND T1 INT
' setbit(intcon,gie) ' ENABLE ALL INTERRUPTS
'================================================= ==============================
MAIN1: '''ANSEL = 0X7F ' FOSC/16[8MHZ CLOCK] chn 0,1,2,3
ANSEL = 0x53 ' fosc/16[8mhz] chan 0,1
ADCON0 = 0X01 ' C C C GO ON
cells = 15
' ADCON1 = %01111110 '0X00 1 ANALOG INPUTS AN0
' ADCON2 = %10101101 ' RJ TAD16 FOSC/16
CHARGER_OFF
'-------------------------------------------------------------------------------
PIR1.TMR1IF = 0 ' CLEAR ANY PEND T1 INT
'-------------------------------------------------------------------------------
' Test Leds / Outputs
'-------------------------------------------------------------------------------
LED5_ON ' turn charge led on
LED4_ON ' turn status led on
for x = 0 to 63
code(x,0xff)
DLY20 ' delay_ms(20)
next x
LED5_OFF ' turn charge led off
LED4_OFF ' turn status led off
for x = 64 to 127
code(x,0xff)
DLY20 ' delay_ms(20)
next x
'-------------------------------------------------------------------------------
' Test charger
CHARGER_OFF ' expect 0 Volt
DLY10 ' delay_ms(10)
BatteryVolts = process(0) ' get analog channel 0 0-1024
SaveVolt(0) ' loc 0,1 no batt c-off volts
IF BatteryVolts < 72 then ' 72==> 2volt 0 --> .5 volt is good
CHARGER_ON
DLY10 ' delay_ms(10)
BatteryVolts = PROCESS(0) ' expect hi volts now
SaveVolt(2) ' loc 2,3 no batt c-on volts
If BatteryVolts > 361 then ' 361==> 10 volts
goto CHARGER_OK
ELSE
goto CHARGER_ERR
END IF ' this may need adjusting !!!!!!!!
ELSE ' 27 volts *2200/61 = 974
If BatteryVolts < 972 then ' a battery may be installed
goto WAIT4BATTERY
end if
'================================================= ==============================
CHARGER_ERR: ' A battery may be connected
CHARGER_OFF ' hang here force manual power
SaveVolt(6) ' loc 6,7 charger error volts
GPIO = GPIO or %00110000 ' cycle and remove battery
charger_err1:
DLY250 ' delay_ms(250) else we be broken
GPIO = GPIO xor %00110000 ' flash Gp4/5 off then on... repeat
goto CHARGER_ERR1
if switch_in = 0 then goto Main1 end if
END IF
'------------------------------------------------------------------------------
CHARGER_OK:
BatteryVolts = 0
b1v1 = 0
b1v2 = 0
b1v3 = 0
b1v4 = 0
b1v5 = 0
CHARGER_OFF
'------------------------------------------------------------------
' GP4/GP5 LED's alternate flashing = Waiting for Battery
'------------------------------------------------------------------
WAIT4BATTERY: ' battery sense junction 10k/2.2k
Led4_on
Led5_off
W4B: BatteryVolts = PROCESS(0) ' VOLTS * 2200 / 61 = ADC value '
if (BatteryVolts > 75) or (Switch_in = 0) then goto PRECHARG end if
DLY100 ''delay_ms(150)
DLY50
Toggle(5)
Toggle(4)
goto W4B
'-------------------------------------------------------------------
' After detecting a battery connected wait 15 sec for battery
' terminals and readings to stabilize....YOU CAN MANUALLY CHANGE
' CELL COUNT NOW [Press and Switch - observe count] 4 - 15 cells.......
'-------------------------------------------------------------------
PRECHARG: LED5_OFF ' led off
LED4_ON
SaveVolt(8) ' initial battery sense volts
for x = 1 to 100 ' 10 second stabilize
DLY100 ' delay_ms(100)
Toggle(5)
Toggle(4)
next x
BatteryVolts = PROCESS(0) ' get voltage again
SaveVolt(0xA) ' delayed battery sense volts
cells = BatteryVolts*61/2750 ' adc*61/(2200*1.25) '2640-1.2
if cells>15 then cells=15 end if
Code(0x17,cells) ' store cell count
wait35A: DLY250 ' delay_ms(500)
DLY250
for x = 1 to 5 ' preset approx 5 seconds
wait35B: LED4_OFF
DLY250 ' delay_ms(250)
LED4_ON
DLY250 ' delay_ms(250)
DispCellCnt(cells) ' 1 flash per cell
if Switch_in = 0 then ' pressed = 0
cells = cells+1
if cells >= 16 then cells = 1 end if
goto wait35A
end if
NX: DLY250 ' delay_ms(500)
DLY250
next x
'---------------------------------------------------------------------
code(0x1f,cells) ' final cell count debug
minvolts = cells*7*220/61
maxvolts = cells*17*220/61
max2 = maxvolts > 1 ' 1/2 max volts
BatteryVolts = minvolts ' save value for debuging
SaveVolt(0x30)
BatteryVolts = maxvolts
SaveVolt(0x32)
ctime = 2*60*60 ' set 2 hour timer = 7200 sec
'-------------------------------------------------------------------
' now slow charge 4 minutes base [1s cycle 350ms chg == 35% charge]
' CHARGE does 6 1 second cycles
' [ approx 350 dc 650 period ]
' Charge take batt reading every 1 sec update mem every 30 sec
' check if voltage same/rise/fall
'-------------------------------------------------------------------
Charge1: LED4_OFF ' SLOW CHARGE 35%
LED5_ON ' gp5 on gp4 off = slow
code(0x10,0xc1)
SaveVolt(0x15)
for cnt = 1 to 8 ' 4 minutes
for cntA = 1 to 30 ' 30 1 second cycles
'' Charge(350) 'Charge(350) 350/[1000] = 35% 30 seccycle
memup
charger_on
dly300
BatteryVolts = PROCESS(0)
charger_off
dly700
ctime = ctime -1 ' Rcode 0 -delta term
next cntA ' 1 max timeout
Vcheck ' 2 c2 10 min tout
code(0x11,Rcode) ' ' 3 c3 10 min tout
code(0x12,vfc) ' 4 max temperature
code(0x13,vrc)
if Rcode < 5 then goto Charge_Fin end if
next cnt
'-------------------------------------------------------------------------------
Charge2A: LED4_ON ' NORMAL Charge 70%
LED5_OFF
code(0x18,0xc2)
SaveVolt(0x1d)
Charge2: for cnt = 1 to 40 ' 20- minutes
for cntA = 1 to 30 ' 30 1 second cycles
''''''Charge(700) ' Charge(700)
memup
charger_on
dly700
BatteryVolts = PROCESS(0)
charger_off
dly300
ctime = ctime -1
next cntA
if BatteryVolts > maxvolts + 48 then goto charger_err end if
Vcheck
code(0x19,Rcode) '
code(0x1a,vfc)
code(0x1b,vrc)
if Rcode < 5 then goto Charge_Fin end if ' Rcode = 0,1,4
if Rcode = 6 then
if VRC <= 0 then ' Rising count
goto Charge3A ' start FAST charging
else
goto Charge2 ' normal charge
end if
end if
next cnt ' VS/VF Rcode 5/7
Rcode = 2 ' c2 10 minute timeout
goto Charge_Fin
'------------------------------------------------------------------------------
Charge3A: LED4_ON
LED5_ON
code(0x20,0xc3)
SaveVolt(0x25)
Charge3: for cnt = 1 to 40 ' 20 minutes
for cntA = 1 to 30 ' 30 seconds of battery readings
memup
charger_on
DLY900 'Charge(900)
BatteryVolts = PROCESS(0)
charger_off
DLY100
ctime = ctime -1
next cntA ' FAST Charge 90%
if BatteryVolts > maxvolts + 48 then goto Charger_err end if
Vcheck
code(0x21,Rcode) '
code(0x22,vfc)
code(0x23,vrc)
if Rcode < 5 then goto Charge_Fin end if ' Rcode = 0,1,4
if Rcode = 6 then goto Charge3 end if ' Vrising reset 10 min
next cnt ' VS/VF 5/7
Rcode = 3
goto Charge_Fin
'================================================= ==============================
' Rcode 0 -deltaV termination
' 1 2 hour time out
' 2 10 minute timeout charge2
' 3 10 minute timeout charge3Vfall
' 4 Max Temperature
' 5 Vsame
' 6 Vrise
' 7 Vfall
'-------------------------------------------------------------------
''''''' adjust trickle / cell count ?????
CHARGE_Fin: code(0x28,Rcode) '' write how finished
SaveVolt(0x2a) '' save last volt
BatteryVolts = word(ctime)
SaveVolt(0x2c) '' save ctime
CHARGER_ON
DLY10 '''DELAY_MS(10)
BatteryVolts = PROCESS(0) '' max volts while charge
CHARGER_OFF
LED5_ON
TRICKLE: if BatteryVolts < maxvolts then
for cntA = 1 to 6 '' 5% CHARGE 6 sec delay [6x]
'''Charge(50)
memup
charger_on
DLY50
BatteryVolts = PROCESS(0)
charger_off
select case Rcode
case 0
Flash4 dly700 ' -deltaV
case 1
Flash4 Flash4 DLY250 ' max time
case 2
Flash4 Flash4 Flash4 dly50 ' 20 min to
case 3
Flash4 Flash4 Flash4 dly50 ' 20 min to
case 4
Flash4 Flash4 Flash4 Flash4 ' max temp
case else
end select
ctime = ctime -1
next cntA
end if
if BatteryVolts > maxvolts+36 then goto Main1 end if
F5: Flash4
'' while Rcode > 0 Flash4 Rcode=Rcode-1 wend ' flash led 4
if Switch_in = 0 then goto Main1 end if ' batt removed
goto TRICKLE
END.
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.