Car Battery Monitor

The circuit is based on PIC16F819 18-pin microcontroller which has an analog-to-digital (A/D) input to monitor the battery voltage and outputs capable of driving LEDs directly, to keep the component count down. There are seven LEDs in all, giving a good range of voltage indication. The topmost LED, LED1, comes on for voltages above 14V which will occur when the battery is fully charged. LED2 indicates for voltages between 13.5V and 14V while LED3 indicates between 13V and 13.5V. Normally, one of these LEDs will be on. LED4 covers 12.5V to 13V while LED5 covers 12V to 12.5V.

LED6 covers from 11.5V to 12V while LED7 comes on for voltages below 11.5V. These two LEDs are backed up by the piezo chime which beeps for voltages between 11.5V and 12V and becomes more insistent for voltages below. That might seem fairly conservative. After all, most cars will start with no troubles, even though the battery voltage might be a touch below 12V, won’t they? Well, no. Some modern cars will happily crank the motor at voltages below 11V but their engine management will not let the motor start unless the voltage is above 11V. A standard 7805 3-terminal regulator is then used to provide a stable 5V to the microcontroller. The battery voltage is sensed via a voltage divider using 33k? and 100k? resistors. This brings the voltage down to within the 0-5V range for the A/D input of the PIC16F819. Port B (RB0 to RB7) of the microcontroller is then used to drive the various LEDs, with current limiting provided via the 330? resistor network. RB7, pin 13, drives a switching transistor for the piezo buzzer.

Software

For the software, the design follows the basic template for a PIC microcontroller. Port A and its ADC (analog-to-digital converter) function are set up while port B functions as the output for the LEDs and buzzer. Once the set-up is complete, a reading will be taken at port RA2, the input for the A/D convertor. This reading is then compared with a series of values to determine the range of the voltage. This is similar to a series of “if” statements in Basic language. the voltage is found to be within a certain range, the relevant port B pin will be turned on. If the voltage is below 12V, the buzzer will be turned on for a brief period, to signal a low battery condition. As the voltage falls below 11.5V, the frequency of the beeps will increase, to signal increased urgency.

Where To Buy The Kit

This project is copyright to Futurlec. It is priced at $12.90 plus $4 for postage and packing. It can only be purchased from:
http://www.futurlec.com/

Source: Siliconchip


Leave a Reply