#REM Li-Ion Battery Management System Watchdog Module by Peter Perkins. Picaxe 08M - PIC12F683 - 290708 - www.150mpg.co.uk - V0.04 Beta. **************************** General Information ****************************** The BMS modules carry no warranty or guarantee of any kind! They are used at your own risk, and I make no claims as to their suitability for a particular function. Prospective users must evaluate the system before using it, and no liability will be entertained by myself in any shape or form whatsoever. The modules and software have been produced at low cost for the benefit of the EV & electronic community. The software is available free via the internet. Users may modify or adapt the system as they see fit. If you are not fully competent to work on potentially lethal battery systems and high voltages, then do not experiment with or use this system. Be aware that vehicle modifications can lead to invalidated insurance and warranty issues. You the end user remain fully liable for any modifications made to your vehicle. *********************** Watchdog Picaxe 08M Pinouts *************************** Top _____ (+ Supply) +Ve -1| ^ |8- -Ve (- Supply) (Program In) Rxd -2| 0 |7- Txd (Program Out) (Watchdog Led Out) Output 4 -3| 8 |6- Output 1 (Audible Alarm Out) (Pulse Count In) Input 3 -4| M |5- Output 2 (Master Reset Out) ----- ********************** Watchdog Module Specification ************************** Supply Voltage 5.00V DC same as Master Average Supply Current at 5.00v <100ua CPU Speed 4mhz with internal resonator ******************************************************************************* ******************************** Clock Speeds ********************************* ********** Reducing Speed Should Save Power (Untested at present) ************ %00000000 = 31 kHz 19bps %00010000 = 125 kHz 75bps %00100000 = 250 kHz 150bps %00110000 = 500 kHz 300bps %01000000 = 1 MHz 600bps %01010000 = 2 MHz 1200bps %01100000 = 4 MHz 2400bps %01110000 = 8 MHz 4800bps Example = poke $8F,%01100000 'Set clock to 4 MHz ******************************************************************************* *********************** Program Size 24 out of 256 Bytes ********************** ******************************************************************************* #ENDREM `Variables Constants and I/O definitions `Variables 16bit symbol Pulses = w0 ;w0 = Number of WatchDog pulses received in 1 min `Constants symbol Time = 60000 ;Timer set to 1 minute approx symbol MinPulses = 1 ;Minimum number of pulses allowed `Pins used for I/O and designations `*** Digital high/low Outputs *** symbol Alarm = 1 ;Audible Alarm Warning on Output 1 symbol MasterReset = 2 ;Master Reset on Output 2 symbol Led = 4 ;Warning Led on Output 4 `*** Digital high/low Inputs *** symbol WatchDog = 3 ;Watchdog pulses input on Input 3 `******************************************************************************* `******************************************************************************* Start: high MasterReset ;Deactivate Master Reset Output [Pull High] (Note pcb jumper setting) count WatchDog, Time, Pulses ;Count Watchdog pulses recieved in 60 seconds if Pulses > MinPulses then Start ;If Pulses received > MinPulses then goto program start high Alarm ;Activate Audible alarm high Led ;Activate WatchDog alarm dashboard Led low MasterReset ;Activate Master Reset Output [Pull Low] (Note pcb jumper setting) pause 1000 ;Pause for 1 second to allow Master Reset goto Start ;Goto program start