; CHARGER.CONF V0.00 ; This configuration file acts both as a basic setup of ; the BatMods and the documentation for itself ; comments start with ';' PWM_SEED=5 ; sets the value the PWM will start out at ; when charging enables MY_NET_ADDR=1 ; sets the network address of this charger LAST_ERROR=0 ; resets the last error storage byte LAST_MESSAGE_SIZE=0 ; resets the last message size debug counter NUM_SAMPLES=10 ; sets the number of samples to take on a poll() event ; beware - too high a number here and the charger ; will be too busy polling to do anything useful, NUM_VF=10 ; sets the number of voltage-to-frequecy (hv) samples ; see warning on NUM_SAMPLES DLY_VF=4 ; sets the number of ticks to count() for when ; sampling the voltage to frequency converter ; beware, this number affects hv calibration ; if you change it, you must rerun calibrate_hv DIV_VF=1 ; sets the number the output of count() is divided by ; beware: setting it to zero may make bad things happen ; see also the warnings on DLY_VF DL_LOCK=0 ; I don't know what it's for either ; it's defined in the code and then never used ; but I'm too lazy to go remove it ; maybe we'll use it later? ; for the bootloader or something? PWM_FREQ=5000 ; sets the frequency the PWM outputs to throttle the BatMod ; please use a little common sense here PWM_OFFSET=100 ; sets the turn-on threshhold of the PWM ; increase this number (and ajust PWM_SEED accordingly) ; if your BatMod won't make enough volts AVG_NUM=10 ; controls the number of samples to keep in the running avg ; note that if this is the same or less than NUM_SAMPLES ; the effect is that the only sensor results that ; are reflected are the most recent ones ; ; contrawise, if this number is too big ; it will take a long time for the charger ; to react to anything CONFIG_LOCKED=69; the software lock ; this has the following magic values: ; 55 = allow writing a block to eeprom for uploading bootloader ; 121 = allow executing a bootloader ; 42 = allow manual commanding of PWM levels ; 69 = normal operation ; ; any value besides 69 will result in some of the config ; options being reset to default levels ; whenever the board reboots LAST_ERRNO.0=0 LAST_ERRNO.1=0 ; this array contains the last two reported errors MAX_WATTS=200 ; this sets the most watts the charger will ever make MAX_VOLTS=17.00 ; this sets the most volts teh charger will ever make MAX_AMPS=15.00 ; this sets the most amps the charger will ever make MAX_CHG_TEMP=50 ; this number is backwards ; meaning whenever the charger sensor falls below this level ; charging will be terminated MAX_BATT_TEMP=120 PHASES_ENABLED=5 ; this number is a mask ;so ; 1 = phase 1 enabled ; 2 = phase 2 enabled ; 4 = phase 3 enabled ; 8 = phase 4 enabled ; 16 = phase 5 enabled ; 32 = phase 6 enabled ; 64 = phase 7 enabled ; 128 = phase 8 enabled ; add 'em togeather to get the mask you want SCALE_BACK_CHG_TEMP=51 ; see MAX_CHG_TEMP - when the sensor reports below this ; number (but above MAX_CHG_TEMP) the charger will ; throttle back CHARGE_INHIBIT_ERRNO_MASK=4 ; this value is a mask ; the following errors are defined ; 1 = charger too hot ; 2 = charger too cold (or sensor failed) ; 4 = uncommanded charging ; 8 = battery over voltage (MAX_VOLTS) ; 16 = battery under voltage (MIN_VOLTS) ; 32 = battery over temp (MAX_TEMP) ; 64 = battery under temp (MIN_TEMP) ; 128 = VESTA board has crashed and rebooted TIMEOUT_MINUTES=1 ; when the VESTA board has been idle for this ; many minutes, it will go to sleep ; note that a sleeping board ; can not process a network event immediately ; or report undervolts and the like SLEEP_SECONDS=60 ; when a VESTA board has been idle for TIMEOUT_MINUTES ; it will go to sleep PHASE_CHARGE_VOLTS.0=13.00 PHASE_CHARGE_VOLTS.1=14.00 PHASE_CHARGE_VOLTS.2=0 ; for each phase, sets a constant voltage limit PHASE_CHARGE_AMPS.0=0 PHASE_CHARGE_AMPS.1=0 PHASE_CHARGE_AMPS.2=2 ; for each phase, sets a constant current limit PHASE_CHARGE_TIME_LO.0=15 ; low order byte, seconds (this is half a hour) PHASE_CHARGE_TIME_LO.1=16 ; low order byte, seconds PHASE_CHARGE_TIME_LO.2=15 ; low order byte, seconds PHASE_CHARGE_TIME_HI.0=7 ; high order byte, seconds (this is half a hour)) PHASE_CHARGE_TIME_HI.1=15 ; high order byte, seconds (this is a hour)) PHASE_CHARGE_TIME_HI.2=7 ; high order byte, seconds (this is half a hour)) ; get lee to explain this too you ; basically, TIME_LO is 255 second intervals ; and TIME_HI is seconds * 256 PHASE_CHARGE_FLAGS.0 = 0 PHASE_CHARGE_FLAGS.1 = 0 PHASE_CHARGE_FLAGS.2 = 13 ; these flags are again a mask (add 'em togeather) ; and they are as follows ; 1 = chg_flag_shutdown, stop charging at the end of this phase ; 2 = chg_flag_temp_comp, use temp compensation ; (see the file temp_comp_explained) ; 4 = chg_flag_didt - if didt starts going up instead of down ; end this phase ; ; 8 = chg_flag_charged - at the end of this phase, set ; the charged system bit ; ; this means the charger will not resume charging until ; the voltage reaches CLEAR_CHARGED_THRESH (going down) ; PHASE_CHARGE_VOLTS_LIMIT_LO.0=0 PHASE_CHARGE_VOLTS_LIMIT_LO.1=0 PHASE_CHARGE_VOLTS_LIMIT_LO.2=0 ; skip to the next phase if voltage falls below the limit ; set here PHASE_CHARGE_VOLTS_LIMIT_HI.0=12.9 PHASE_CHARGE_VOLTS_LIMIT_HI.1=13.9 PHASE_CHARGE_VOLTS_LIMIT_HI.2=15 ; skip to the next phase if voltage falls below the limit ; set here PHASE_CHARGE_AMPS_LIMIT_LO.0=0 PHASE_CHARGE_AMPS_LIMIT_LO.1=0 PHASE_CHARGE_AMPS_LIMIT_LO.2=0 ; skip to the next phase if amperage falls below the limit ; set here PHASE_CHARGE_AMPS_LIMIT_HI.0=0 PHASE_CHARGE_AMPS_LIMIT_HI.1=0 PHASE_CHARGE_AMPS_LIMIT_HI.2=0 ; skip to the next phase if amperage goes above the limit ; set here PHASE_CHARGE_TEMP_LIMIT_LO.0=0 PHASE_CHARGE_TEMP_LIMIT_LO.1=0 PHASE_CHARGE_TEMP_LIMIT_LO.2=0 ; skip to the next phase if temp goes below the limit set here ; note that '0' is reserved to mean 'no limit' ; try setting it to 1 if you want to stop ; 31 degrees below where water freezes ; (et cetera) PHASE_CHARGE_TEMP_LIMIT_HI.0=0 PHASE_CHARGE_TEMP_LIMIT_HI.1=0 PHASE_CHARGE_TEMP_LIMIT_HI.2=0 ; skip to the next phase if temp goes above te limit set here ; see notes on LIMIT_LO ;VOLTS_M=0 ;VOLTS_C=0 ;VOLTS_B=0 ;AMPS_M=0 ;AMPS_C=0 ;AMPS_B=0 ;VOLTS_HV_M=0 ;VOLTS_HV_C=0 ;VOLTS_HV_B=0 ; these are all special calibration values ; noramlly you will set them with the calibration routines ; calibrate_volts ; calibrate_amps ; calibrate_hv ; ; this is just included in case you need a fast way to rough cal a board ;TEMP_LOOKUP.(0-255)=(temp) - this is how you map ; temp sensor A/D values into real world temps ; ;TEMP_COMP.(0-255)=(volts) ; this is how you apply corrections for voltage ; based on temp comp (if the right CHARGE_PHASE_FLAG is set) ; ; note that the value here is thousandths of a volt ; and that it is ADDED to the REPORTED VOLTAGE OF THE OPTIMA ; ; this means to make it so at ten degrees F, the charger would switch ; off a tenth of a volt later, you would use a NEGATIVE number ; ; i.e. ; TEMP_COMP.10=-100 ; note also that the subscript is binary ; so -40 degrees = 0, 0 degrees = 40, 40 degrees = 80, etc TURN_ON_BALANCE_HV=310 ; this is the HV voltage at which we go to the phase below TURN_ON_BALANCE_PHASE=1 TURN_ON_CHARGE_HV=380 ; this is the HV voltage at which we go to the phase below TURN_ON_CHARGE_PHASE=2 TURN_OFF_CHARGE_HV=335 ; this is the voltage at which we will turn off the charger ; if it is set ; note that if this is below the balance voltage ; the charger will immediately hop to balance mode BALANCE_NUM_BATTERIES_PHASE=0 ; ask lee. it was his idea BALANCE_NUM_BATTERIES=25 ; ask lee. it was his idea CLEAR_CHARGED_THRESH=12.8 ; at this voltage, we will clear ; the charged bit, causing the charger ; to resume automatic charging DIDT_WINDOW=100 ; ignore didt for this many seconds ; (gives the charger a chance to stablize) DIDT_UP_LIMIT=5 ; allow the DIDT to raise this many times ; (or stay raised for this many minutes) DIDT_CLIMB=1 BEEP_ON_NET_TIMEOUT=1 ; debugging feature ; THESE THREE STATEMENTS MUST STAY IN THIS ORDER! BAUD_LOCKED=69 ; if this is not 69 ; all reboots will return BAUD to 9600 BAUD=9600 ; set the baud rate the charger will respond to ; requires a reboot to take effect MIN_VOLTS=6.0 ; voltage below which a undervolt ; error will be recorded MIN_BATT_TEMP=0 ; batt temp below hwich ; a error will be recorded ; (see the notes about batt temps elsewhere) MIN_CHG_TEMP=100 ; sensor value above which a ; fault will be recorded