PIC Based Car Battery Monitoring System
by WELLPCB in Circuits > Electronics
3000 Views, 22 Favorites, 0 Comments
PIC Based Car Battery Monitoring System
In this project we tend to square measure reaching to create a PIC primarily based automobile battery observation system on PCB.
This automobile battery observation Circuit is employed to observe the ability of automobile battery by simply plugging it into the ability outlet on the dashboard of a automotive. The PCB conjointly has the choice to use it as Voltage measuring tool or meter while not exploitation USB automotive charger. We've hooked up a terminal block here to live the voltage of alternative power sources, simply by connecting 2 wires in it from the ability supply.
Component List Required for the Project
· PIC Microcontroller PIC18F2520 -1
· Fabricated PCB board (wellpcb)
· USB Connector
· Two pin terminal connector
· Common anode seven segment display
· BC557 Transistor
· 1k resistor -6
· 2k resistor -4
· 100R resistor -8
· 1000uF Capacitor
· 10uF capacitor
· 28 pin IC base
· Female burgsticks
· 7805 Voltage regulator
· Car USB charger
· LED
· Zener Diode 5.1v
· USB Cable (B type or Arduino Uno Compaitble)
· 20 MHz Crystal
· 33pF capacitor
Description Generally it's not necessary to live the lead-acid accumulator power when, however we regularly have to be compelled to realize battery voltage throughout charging, to envision whether or not it’s charging or not. By this, we will defend battery failure owing to the faulty charging system. The voltage of a 12v lead-acid accumulator throughout charging is concerning 13.7v. Thus we will determine whether or not our battery is charging well or not and might investigate the causes of battery failure. During this project, we tend to square measure attending to implement a Voltage Meter for lead-acid accumulator by employing a PIC microcontroller. Automobile light or automobile USB charger is employed for obtaining the battery voltage to the ADC pin of the microcontroller with the assistance of potential divider Circuit. Then a four digit seven section show is employed to indicate the voltage price of battery. This circuit will live the voltage up to 15v.
When a lead-acid accumulator is charging, then the voltage across the battery terminals is truly coming back from the alternator/rectifier, that’s why system reads thirteen.7 volts. However once the battery isn't charging or car’s engine isn't ON, then the voltage across battery terminal is actual battery voltage around 12v.
Circuit Diagram
We can conjointly use identical circuit for measure the voltage of alternative power sources up to 15v. For this purpose we've soldered the Terminal Block (green color plastic block) in PCB wherever you'll be able to connect 2 wires from power supply and may monitor the voltage.
Circuit Diagram and Working Explanation In this Battery Voltage observation Circuit, we've browse lead-acid accumulator voltage by victimization associate built-in analog pin of PIC microcontroller and here we've selected pin AN0 (28) pin of microcontroller through a resistance circuit. A zener diode of five.1v is additionally used for cover.
4 in one seven phase show is employed for displaying the fast worth of lead-acid accumulator voltage that's connected at PORTB and PORTC of the microcontroller. A 5v transformer specifically LM7805 is employed to powering the entire circuit together with seven phase Displays. A twenty rate quartz oscillator is employed to clock the microcontroller. Circuit is steam-powered by the USB automobile charger itself by employing a LM7805. We've other a USB port within the PCB, therefore we are able to directly connect automobile USB charger to the circuit.
Car USB Charger or Cigarette Lighter
It provides 5v regulated provide from the 12v power outlet of the automotive, however we'd like to live the particular voltage of automobile battery therefore we've tweaked the automotive charger. you would like to open the automotive USB charger so notice the 5v (output) and 12v (input) terminals so take away 5v affiliation by rubbing it with sand paper or with some laborious issue and short the USB output terminal to 12v directly. 1st open the 5v affiliation from the USB port within the automotive USB charger so connect 12v to the USB port wherever 5v was connected. As shown in below figure, we've cut the red circled affiliation, it should disagree in your automotive charger.
Car USB Charger or Cigarette Lighter
It provides 5v regulated provide from the 12v power outlet of the automotive, however we'd like to live the particular voltage of automobile battery therefore we've tweaked the automotive charger. you would like to open the automotive USB charger so notice the 5v (output) and 12v (input) terminals so take away 5v affiliation by rubbing it with sand paper or with some laborious issue and short the USB output terminal to 12v directly. 1st open the 5v affiliation from the USB port within the automotive USB charger so connect 12v to the USB port wherever 5v was connected. As shown in below figure, we've cut the red circled affiliation, it should disagree in your automotive charger.
Resistor Factor Calculation
To configure ADC here we've hand-picked analog pin AN0 with an enclosed reference voltage of 5v and f/32 clock for ADC conversion.
To calculate automobile battery voltage from the ADC price we've used given formula: Voltage= (ADC price / resistance factor) * reference Voltage Where: ADC value= output of potential divider (converted into digital by microcontroller)
Resistor issue = 1023.0 / (R2/R1+R2) // 1023 is scoop ADC price (10-bit)
Reference Voltage= five volts // internal 5v reference hand-picked
Resistor Factor Calculation
In this project we tend to are reading lead-acid accumulator voltage that's (generally) around 12v-14v. Thus we've got done this project presumptuous maximum 15v suggests that this method are often browse maximum up to 15v.
So within the circuit we've got used R1 and R2 electrical device in resistance half and values are:
R1= 2K
R2=1K
PCB of Car Battery Monitoring System
Resistor factor= 1023.0 * (1000/2000+1000)
Resistor factor=1023.0 * (1/3)
Resistor factor= 341.0 for up to fifteen volts
So Final Formula for voltage calculation are as follow, that we've got used the Code, given at the tip of this Article:
Voltage= (value of ADC / 341.0) * 5.0
the PCB which is showing below: