Sei sulla pagina 1di 23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

HOME

NETDUINO

PIC TUTORIALS

CHIPKIT

PRODUCTS

ARDUINO PROJECTS

STM32

TIPS AND TRICKS

THEORY

PIC PROJECTS

CONTACT US

Embedded Lab

An online teaching laboratory for Microcontrollers and Embedded Systems

Embedded Projects

Car Battery 12

Voltage Regulator

VOLTAGE MONITOR FOR CARS BATTERY AND


ITS CHARGING SYSTEM
Posted on July 11, 2011

by R-B

77 comments |

Like

Battery Monitor

Search...

80

DSP and FPGA AMC cards


Wireless and general purpose embedded signal processing for OEMs

My 2010 Equinox has got every feature that a modern automobile


should have. However, one thing that I personally find missing is
the real-time monitoring of voltage across the cars battery
terminals. This may not seem to be that important but one of the
most common reasons for a car battery failure is the faulty charging

Follow

system. If the charging system is not working properly, the battery


will not get the proper charging voltage (about 13.8 V for 12V

Embedded Lab
Like

battery) across its terminals and it could go flat. This project is


about making a simple electronic voltage monitor system for cars
battery and its charging system. It plugs into the cars cigarette

7,796 people like Embedded Lab.

lighter receptacle and displays the instantaneous output voltage


across the battery terminals on a 4-digit seven segment LED
display. This helps you to get early warnings for possible battery
and its charging system problems. Microchips PIC16F1827 is the
main controller in this project, which uses the built-in Fixed
Reference Voltage (FVR) module to achieve a very precise and
accurate A/D conversion of the battery voltage.

Facebook social plugin

Read Our Privacy Policy!

SUBSCRIBE
http://embedded-lab.com/blog/?p=3096

1/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

Subscribe through email

Sign Up

Car's battery and charging system voltage monitoring device

12V Car Battery Charger


Charging a Car Battery
Battery Circuit Board

The ory
As I said this project is simply about making a precise digital

EASY PULSE SENSOR

voltmeter that plugs in to the cars cigarette lighter receptacle and


displays the instantaneous voltage across the battery terminals.
When the engine is turned off, the voltage measured by this device
is the actual output voltage from the battery. However, if the engine
is on or the car is running, it actually measures the charging voltage
across the battery that is coming from the cars charging system
(alternator + rectifier). The functional block diagram of this project
is shown below.

Easy Pulse Sensor is


designed for hobby and
educational applications
to illustrate the principle
of finger
photoplethysmography
(PPG) as a non-invasive
technique for detecting
cardio-vascular pulse
wave. Re ad More ...

Functional block diagram of car battery monitor system

The +5V power supply for the PIC16F1827 microcontroller circuit is


derived from the cars battery output voltage (usually +12V) using a
regulator IC (such as LM7805). The battery terminal voltage is
measured through an ADC channel of PIC16F1827. The FVR module

U S c us tom e rs buy
he re
Inte rnati onal
c us tom e rs buy he re

inside PIC16F1827 is chosen to derive a stable positive reference


voltage of 4.096 V for precise A/D conversion. Before feeding to the
http://embedded-lab.com/blog/?p=3096

2/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

ADC channel, the battery output voltage is scaled down to below


the reference voltage by using a voltage divider network. The

SERIAL 7-SEGMENT LED


DISPLAYS

measured instantaneous battery voltage is shown on a 4-digit


seven segment LED display.
Read my previous article, U s i ng Fi xe d Vol tage Re fe re nc e (FVR)
for A /D c onv e rs i on i n e nhanc e d m i d- range PIC

7-segment LED displays


are fun way of displaying
numeric sensor readings
in Arduino or any other

m i c roc ontrol l e r, to find more information on the FVR module of

microcontroller-based

PIC16F1827.

projects. The downside is

Ci rc ui t di agram

they are resource hungry

The circuit diagram of this project is shown below. The PIC16F1827

and requires lots of I/O


pins and CPU time for

microcontroller uses the AN4 ADC channel for measuring the

continuously displaying

voltage across the cars battery terminals. The R1 and R2 resistors


at the ADC input channel creates a simple voltage divider network
to scale down the incoming voltage from the batterys positive
terminal. The maximum measurable input voltage at AN4 is 4.096 V
(limited by using the internal 4.096 V reference voltage for A/D
conversion). Therefore, the maximum input voltage (VBattery) that
could be measured without A/D saturation can be obtained from

the readings. We have


designed varieties of 7segment displays that
support SPI interface and
allows you an easy
control of every LED
segments using only 3
I/O pins of your MCU.

the following equation,


4.096 V = R2*VBattery/(R1 + R2)
Or, VBattery = 16.93 V.
The range of input voltage can be increased simply by lowering the
value of R2. The 5.1 V Zener diode is placed in parallel with R2 to
prevent the voltage at the microcontrollers ADC channel from

Vi s i t our Ti ndi e s tore

going above 5.1 V. Otherwise, any accidental high input voltage


could damage the microcontroller port permanently.
CATEGORIES

555 Timer (9)


Analog (15)
Arduino (101)
AVR Projects (48)
AVR Tutorials (5)
chipKIT (16)
Display (1)
dsPIC (1)
Embedded Lab Projects
(61)
Embedded Labs (25)
Embedded Lessons
(39)
Circuit diagram for car battery voltage monitoring device

http://embedded-lab.com/blog/?p=3096

Internet of Things (1)


MCU develeopment
tools (12)
3/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

The measured voltage is shown on a 4-digit seven segment LED


display (common cathode). The seven segments (a-g) and the
decimal point (DP) are driven through PORTB of PIC16F1827. The
microcontroller runs at 500 KHz using the internal clock source.
The ULN2003 darlington array provides current sink to each of the
common cathodes of the seven segment LED module.

Microcontroller
Programmers (6)
MSP430 Launchpad (3)
Netduino (9)
Open-source (1)
PIC Projects (87)
PIC Tutorials (45)
PIC18F (10)
Power Supply (13)
Processing (3)
Product Review (16)
Products (34)
Raspberry Pi (8)
Robotics (8)

he
Pin diagram of PIC16F1827

The regulated +5 V supply can be derived from the cars cigarette


lighter receptacle (12 V output) using LM7805 regulator IC.

STM32 (6)
Tech News (107)
Texas Instruments (4)
Tips and Tricks (83)
Uncategorized (2)
XMega (4)

However, I preferred to use my spare USB car charger to serve this


purpose. The USB port has 4 pins (+5 V, D+, D-, and Gnd). In the car
charger, the D+ and D- pins are kind of useless. So I opened my
USB car charger, disconnected the output D+ pin from rest of the
circuit, and re-wired it to the input +12 V from the battery. Now, we
have +5 V, Gnd, battery terminal voltage, and D- (useless) in the

Power Battery
Battery to Battery Cable
Battery Socket

USB port pins of the car charger. Then I used an USB-A Male to B
Male Adapter to connect these signal lines to the microcontroller
circuit board.

Connecting the battery terminal voltage at one of the USB port data pins

http://embedded-lab.com/blog/?p=3096

4/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

Re-wired USB car charger and the USB-A Male to B Male Adapter

Circuit is powered from a USB car charger

Car battery voltage monitor circuit assembled to USB car charger

http://embedded-lab.com/blog/?p=3096

5/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

4-digit seven segment LED display at the front

Software
The firmware for this project was developed in mikroC Pro for PIC
compiler. The equations to derive the input voltage from the 10-bit
ADC output (Digital Number, DN) are described below.
VBattery = VADC, IN * (R1 + R2/R2) = 4.13 * VADC, IN
Resolution of ADC = 4.096/1024 = 4 mV/DN
VADC, IN = DN * 4 (mV)
=> VBattery = 4.13 * 4* DN (mV) = 0.0165*DN (V)
The use of internal reference voltage for A/D conversion requires
configuration of FVRCON and ADCON1 registers. The mikroC Pro for
PIC compiler provides a library for A/D conversion, but that uses
the supply voltage, VDD , by default as the positive reference for the
conversion. So the built-in ADC library of mikroC Pro for PIC is not
useful for our case and we need to write our own ADC subroutine.
The complete source code for this project can be downloaded from
the link provided below.
D ownl oad the s ourc e c ode and HEX fi l e
O utput
Plug in the device into the cars cigarette lighter receptacle and turn
in the car key to on position (dont start the engine). This will
display the car battery terminal voltage (about 12 V). Once the
engine is turned on, the battery starts receiving the charging
voltage from the alternator. This voltage should be higher (about
13.8 V) than the actual voltage produced by the battery itself.

http://embedded-lab.com/blog/?p=3096

6/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

Battery voltage (engine off)

Output voltage from the charging system (engine on)

Re c om m e ndati on
An additional LED or a buzzer can also be added to the circuit to
alarm under (say < 11.8) or over (say >14.0 V) voltage conditions.
268
11K

54
Like

88

80

Related posts:
1. Programmable digital timer switch using a PIC
Microcontroller
2. How to make a contact-less digital tachometer using IR-light
reflection technique
3. Experimenters board for enhanced mid-range PIC
microcontrollers (PIC16F1827 and PIC16F1847)
http://embedded-lab.com/blog/?p=3096

7/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

4. Breadboard module for 18-pin PIC16F microcontrollers (PCB


version)

Voltage
Regulator - Meba
Reliable Brand Voltage
Regulator, Large Capacity,
High Efficiency.

tagged with car battery monitor, PIC Projects, PIC16F1827


Embedded Lab Projects

PIC Projects

77 COMMENTS
Tahir

December 5, 2013 11:28 pm

Thanks You Guys..:)


Reply
Marc

November 7, 2013 9:36 am

Hi Raj!
How do you find the resistor value, do you try these with error and
try?
thank you!
marC:)
Reply
Marc

October 31, 2013 4:22 pm

Hi Raj! Why did you select 4.096?


Is that different from the others VRef?
thank you very much!
marC:)
Reply
http://embedded-lab.com/blog/?p=3096

8/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

R-B

October 31, 2013 8:54 pm

Hi Marc,
Using Vref = 4.096 or 2.048V makes ADC computations easier
and accurate because they may be expressed as 2^n. For
example, 4.096V = 4096 mV = 2^12. So for 10-bit ADC, the
resolution becomes exactly 4mV.
Reply
Rana Hammad

May 21, 2013 12:05 pm

Can you do the hex file for another pic instead of 16f1827. a
pic16f88 perhaps. Thanks that would be great help!
Reply
Pingback: ????? ????? ??????? ??????? ??? ??????? - ???? ?????? NileMotors.net
Pingback: ????? ????? ??????? ??????? ??? ??????? - ???? ?????? NileMotors.net
Marc P.

October 4, 2012 10:27 pm

Thanks Mr Raj!
Reply
Marc P.

October 4, 2012 6:50 pm

Hey Raj!
I have bought the same type of adapter like you Raj, input voltage
12VDc, output 5vDC @ 1000mA, how do i wire them in the circuit.
Mr. Raj! i really need your help i know for you its easy!! but think
about the beginner like me, you have to give me some details
about my questions, thank you very much Raj!
I expected from you soon!
have a great evening!
thank you!
marC:)
Reply
Marc P.

September 30, 2012 9:13 pm

My output of car lighter adapter is already 5 v what i have to do in


that case?
I think with a voltage regulator, it will heat up.. isnt dangerous for
the car battery system?
http://embedded-lab.com/blog/?p=3096

9/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

can you add up the circuit diagram from the car battery voltage
regulator and place then in the ADC channel?
thank you!
marC:)
thank you!
marC:)
Reply
Marc P.

September 28, 2012 3:46 pm

How can i have 12 v and 5 v ?? can you draw something for me to


understand?? thank you!
marC:)
Reply
R-B

September 28, 2012 3:31 pm

Marc,
You need two wires coming from cars battery (+12V) and a 5V
regulator to generate power supply for the microcontroller circuit.
The +12V battery voltage wire goes directly to the voltage divider
input (Vbattery in the circuit diagram). I cant tell anything from the
color of the wires. You have to find out by yourself.
Reply
Marc

September 26, 2012 3:07 pm

Hi Raj!
I dont quite understand, theres a 5V and 12V?.. i dont understand,
sorry i would like to do this project so much for my mother
thank you!
marC:)
Reply
Marc

September 26, 2012 3:02 pm

Raj! I have only 2 prungs, white wire and white wire, so what can i
do with your schematic with it?
thank you!
marC:)
Reply
hamid ladan

September 21, 2012 7:20 am

pls reply me
http://embedded-lab.com/blog/?p=3096

10/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

Reply
Hamid Ladan
Share

September 17, 2012 12:21 pm

Tnx nw iunderstand. I want to interface ir module with pic wat pin


shld I use tockin or adc . Nd pls guide me
Reply
R-B

September 15, 2012 5:28 pm

@hamid,
The multiplication factor depends on the voltage divider resistor
values and ADC reference voltage. So, you cant tell without
knowing what resistor values is he using.
Reply
hamid ladan

September 15, 2012 7:18 am

hy mr.Rb . In wasanthas code i saw adc value * 2 y would u


multiply ur voltage by 2?
Reply
Marc

September 12, 2012 11:29 am

i cannot program this pic using pickit2


thanks!
marC:)
Reply
Dada Taiwo

September 8, 2012 9:37 am

Mr R-B, nice work. do you have the flow chart for the voltage
monitor for car battery and its charging system. should you have it,
can you send it to my email. Thanks in advance.
Reply
kostas

September 5, 2012 12:55 pm

how i can measure max voltage 30v


Reply
stopedby

June 27, 2012 2:18 am

Good day,
I happen to visit your blog and really enjoyed reading it. Is there
any place where I can buy the monitor?
http://embedded-lab.com/blog/?p=3096

11/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

Hope to hear from you


Reply
R-B

June 27, 2012 11:45 am

I dont have a commercial board for sale, but will consider it for
future.
Reply
WASANTHA

June 26, 2012 11:13 am

Dear Sir.
I modify this code to measure two input voltages, using pins RA0,
RA1 (16 X 2 lCD), but same voltage is shown on both outputs on the
LCD display. can you please be kind enough to correct the code for
me sa i have very little knowledge in pic programming.
thankswasantha , Email shwasantha@gmail.com
// LCD module connections
sbit LCD_RS at RB1_bit;
sbit LCD_EN at RB2_bit;
sbit LCD_D4 at Rb4_bit;
sbit LCD_D5 at Rb5_bit;
sbit LCD_D6 at Rb6_bit;
sbit LCD_D7 at Rb7_bit;
sbit LCD_RS_Direction at TRISB1_bit;
sbit LCD_EN_Direction at TRISB2_bit;
sbit LCD_D4_Direction at TRISb4_bit;
sbit LCD_D5_Direction at TRISb5_bit;
sbit LCD_D6_Direction at TRISb6_bit;
sbit LCD_D7_Direction at TRISb7_bit;
// End LCD module connections
char Message1[] = CH1=;
char Message2[] = CH2=;
char Message3[] = VOLT;
char Message4[] = PIC DUAL V METER;
char Message5[] = PIC 16F876 A ;
unsigned int ADC_Value, DisplayVolt;
char *volt1= 00.00;
char *volt2= 00.00;
void main() {
ADCON1=0b10000010;
TRISA=0XFF;
//CMCON0 = 007 ; // Disbale comparators
TRISB = 0b00000000; // PORTC All Outputs
TRISA = 0b00001111; // PORTA All Outputs, Except RA0,
RA1,RA2,RA3
http://embedded-lab.com/blog/?p=3096

12/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

Lcd_Init(); // Initialize LCD


Lcd_Cmd(_LCD_CLEAR); // CLEAR display
Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
Lcd_Out(1,1,Message4); // DISPLAY OPENING MESSAGE
Lcd_Out(2,1,Message5); // DISPLAY OPENING MESSAGE
delay_ms(2000);
Lcd_Cmd(_LCD_CLEAR); // CLEAR display
Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
Lcd_Out(1,2,Message1);
Lcd_Out(2,2,Message2);
Lcd_Out(1,13,Message3);
Lcd_Out(2,13,Message3);
do {
ADC_Value = ADC_Read(1); // INPUT 1 (RA0)
DisplayVolt = ADC_Value * 2;
volt1[0] = DisplayVolt/1000 + 48;
volt1[1] = (DisplayVolt/100)%10 + 48;
volt1[3] = (DisplayVolt/10)%10 + 48;
Lcd_Out(1,7,volt1);
delay_ms(1000);
ADC_Value = ADC_Read(2); // INPUT 2 (RA1)
DisplayVolt = ADC_Value * 2;
volt2[0] = DisplayVolt/1000 + 48;
volt2[1] = (DisplayVolt/100)%10 + 48;
volt2[3] = (DisplayVolt/10)%10 + 48;
Lcd_Out(2,7,volt2);
delay_ms(1000);
} while(1);
}
Reply
R-B

June 27, 2012 11:53 am

Why are you using ADC_Read(1) and ADC_Read(2), when you are
using AN0 and AN1 channels. You should use ADC_Read(0) and
ADC_Read(1) in your main program.
Reply
meguitarist

May 16, 2012 2:21 am

sorry my mistake
its running at 16MHz.
Reply

http://embedded-lab.com/blog/?p=3096

13/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

meguitarist

May 16, 2012 2:16 am

Hello RB,
OSCCON = 0b01110000; // oscillator running @ 8MHz rite?
Still flicker a bit. Im setting oscillator running at 32MHz solved the
problem.
OSCCON = 0b01111000; // oscillator running @ 32MHz
Reply
Meguitarist

May 15, 2012 10:14 pm

Dear RB,
Delete the 5ms in DO loop doesnt help.
Reply
R-B

May 15, 2012 10:24 pm

Explain a little bit what are you experiencing. Meanwhile, try


running the PIC at higher speed. Add OSSCON = 0b01110000; at
the beginning of main function, like this:
void main() {
OSCCON = 0b01110000;
ANSELA = 0b00010000; // RA4 analog input
TRISA = 0b00110000; // RA4, RA5 inputs
ANSELB = 000; // PORTB all digital outputs
.
Reply
R-B

May 15, 2012 10:35 pm

Meguitarist,
I have updated the program. Download the new program and try
it. That should solve your issue. Let me know how it goes.
Reply
Meguitarist

May 15, 2012 7:42 pm

Hello RB,
Thanks for yr reply.
Does yr build blink too?
How to average the results say take 10 results & divided by 10 &
output it?
Reply

http://embedded-lab.com/blog/?p=3096

14/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

Meguitarist

May 15, 2012 2:10 am

Also, I need to measure higher input. Here are my maths :


Assume R1=8200, R2=1200
Vmax :
= 4.096 x (8200+1200/1200)
= 4.096 x 9400/1200
= 4.096 x 7.833
= 32.08
Pls correct me if Im wrong.
Thanks!
Reply
R-B

May 15, 2012 9:11 am

Seems correct.
Reply
meguitarist

May 15, 2012 12:36 am

Hi RB,
Its my mistake, segment F&G was switched. Now everything
running smooth except flickering display which blinking every
second. Was this normal? How can I smooth out the display?
Thanks!
Reply
R-B

May 15, 2012 9:09 am

meguitarist,
Try by deleting the Delay_ms(5) statement inside the DO loop in
the main program.
Reply
meguitarist

May 14, 2012 11:21 pm

Hello RB,
The chip was programed on the zip socket board that I built. The
socket board have 2 LEDs on pin 17 & 18. After programs I turn on
the PICkit2 5V the LEDs doesnt lit. Was this normal???
I removed the chip from the zip socket & insert to my board. The
display blink every 1sec with weird digit instead of 00.00 if no
input on AN4. I have to re-check my board, connection from PIC to
ULN2003 & LED display is ok. Dont know where I done wrong.
http://embedded-lab.com/blog/?p=3096

15/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

Thanks!
Reply
Meguitarist

May 14, 2012 8:47 am

Hello RB,
I try to build this project but my pickit2 cant detect pic16f1827.
After some searching on the net I found an update from microchip
& do the update now pickit2 recognised the pic I successful
program the chip. The problem now is the 47 segment showing
weird digit.
After checking rb6 is not outputing anything.
Ill try to recompileyr code & test again.
Maybe pickit2 is not program correctly?
Regards,
Meguitarist
Reply
R-B

May 14, 2012 8:58 am

After programming the chip, did you disconnect the PICKIT from
the circuit? RB6 and RB7 are used for programming, so the
PICKIT2 should be disconnected after programming being done.
Reply
Michael

March 24, 2012 9:31 am

Nice project, Raj. May I ask where you sourced the display with
colon LEDs for this project, please? Thanks
Reply
R-B

March 26, 2012 2:30 pm

Michael,
Check on taydaelectronics.com.
Reply

Pingback: Voltage monitor for cars battery and its charging system /
Cooking Hacks Blog
Em314

October 25, 2011 11:25 am

Hi, I have to make a project of battery charger with a display which


shows how much battery power is left in the battery to be charged,
http://embedded-lab.com/blog/?p=3096

16/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

how much is my designed charger charging it with and an automatic


ending after it is completely charged. However, my disadvantage is,
I have to make the entire thing using simple electronics and digital
electronic basis with combinational/sequential circuits, and no use
of microprocessors or microcontrollers, can anyone guide me?
Reply
LB

October 24, 2011 11:54 am

Ive emailed the code developed in MPLAB and compiled using Hi


tech C compiler. Thank u for taking time n interest to look in the
code.
Reply
leon

September 30, 2014 4:18 pm

hi. can you please send me the code you developed in MPLAB
using C compiler.
Reply
LB

October 24, 2011 2:48 am

Hi R.B. I used 16F877A PIC to read battery voltage displayed


through four seven segment displays using multiplexing. Im having
a problem on the output voltage fluctuating very much even if it is
not (using DMM to check it). The output fluctuates from around 4.07
to 5.0 Volts although my DMM measures 4.88 volts. So, i averaged
about 10 readings and displayed it. It narrowed the range but the
same problem remains i.e, the output fluctuates. It is not good, as
the battery voltage varies in a narrow range.
Ive used Vdd as Vref. There is no internal voltage reference
available in this PIC to work with. But, there is an external Vref pin
available.
Can u suggest me to provide stable reference voltage?(preferably
with a description about generating stable Vref). May be that is
creating the problem. I look forward for your reply!!
Reply
R-B

October 24, 2011 10:31 am

LB,
Can you email me your code at admin (at) embedded-lab.com?
Reply
i. vlaviano

October 11, 2011 5:54 am

Hi MR. R.B. ! I found this project very usefull and want to use it for
http://embedded-lab.com/blog/?p=3096

17/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

replace an old car analogue voltage indicator . Only Im at begining


with PICs . I didnt find yet a programmer for PIC16F1827 . What
programmer and soft should I use to upload the hex file to this PIC
?
Thank you in advance !
All the best !
Reply
R-B

October 12, 2011 11:08 am

I used PICkit2 and the standalone programming software with it.


Reply
mark

August 25, 2011 10:26 pm

Yikes! Sorry too rush you R-B, had no idea you were in that area.
Thanks for the update, Ill check out the available LED display units.
Hope you guys make it out safely.
Reply
mark

August 25, 2011 8:57 pm

@R-B
Still there? If it means you have to build all over, dont worry about
it. I was just hoping you had it on hand.
Reply
R-B

August 25, 2011 9:32 pm

Hey Mark,
Sorry I was little busy preparing for the Hurricane Irene. I just
checked the current consumption, and it draws about 48 mA of
current while displaying the voltage on seven segment LEDs.
The major current consuming part is the display unit, so it may
differ with different seven segment LED modules.
Reply
shivendra kumar sahu

August 24, 2011 12:04 pm

HI MR. R.B.
pl think something about my question.
Reply
R-B

August 25, 2011 9:37 pm

@shivendra,
Yes you can add an LED or buzzer to either RA6 or RA7 pin and
http://embedded-lab.com/blog/?p=3096

18/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

modify the program to turn the LED or buzzer alarm on based on


battery voltage level. Please dont ask me to redesign the
project for you.
Reply
mark

August 22, 2011 6:47 pm

@R-B, thats correct. Total current draw from car battery (including
voltage regulator, display, chips, etc).
Reply
mark

August 22, 2011 2:26 pm

Hey R-B, great job on the voltage monitor/write up. Is there any
chance you remember the current draw for this project (car in
standby/running)? I found this comparator based one, built it only
to find out it uses ~50mA!
Reply
R-B

August 22, 2011 2:33 pm

@mark,
Do you mean how much current the circuit draws from the
battery?
Reply
shivendra kumar sahu

August 18, 2011 1:06 pm

HI MR. R.B.
additional LED or a buzzer can also be added to the circuit to alarm
under (say 14.2 V to 10.5 v) voltage conditions.
when u explan it ?
Reply
shivendra kumar sahu

August 17, 2011 4:34 pm

can u explan !!!


i = 0; i<=50; i++
meaning or function or what ever
Reply
R-B

August 18, 2011 12:03 pm

@shivendra
In order to display all 4 digits, each seven-segment display is
activated sequentially using an appropriate refresh frequency so
that it will appear that all the them are turned on at the same
http://embedded-lab.com/blog/?p=3096

19/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

time. The for loop and the code within it does this and display
the result for an approx. 1 sec before taking another sample of
the battery voltage.
Reply
Car Battery World

August 12, 2011 11:18 am

Brilliant idea now that cars depend so much on electronic items


such as sat navs, phone chargers etc. Its just a shame that most
cars dont have good battery monitoring systems built in.
Reply
shivendra kumar sahu

August 11, 2011 12:07 pm

HI MR. R.B.
pl reply me ..
Reply
Shivendra

August 6, 2011 2:32 am

hi mr.rb. How can add hi/lo volt indication for relay drive ?
Reply
fazli

August 4, 2011 4:25 pm

please give the automotive voltage monitor ic s micro c


programme
Reply
R-B

August 4, 2011 4:29 pm

@fazli,
The link for the source code is provided in the Software section
of the project.
Reply
shivendra kumar sahu

July 31, 2011 6:06 am

AS Recommendation
An additional LED or a buzzer can also be added to the circuit to
alarm under (say 14.0 V) voltage conditions.
PL GIVE EXAMPLE.
also give example when we use
/A
POARTC.0= A /
http://embedded-lab.com/blog/?p=3096

20/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

POARTC.1= B / F| G | B
POARTC.2= C /
POARTC.3= D / E| |C
POARTC.4= E /
POARTC.5= F / D
POARTA.4= G /
Reply
shivendra kumar sahu

July 29, 2011 2:55 pm

modified more , found only 1 error , those are as.


Invalid declarator expected( or identifier {locat line as unsigned
int ADC_Value;}
pl pl pl guide me more..
Reply
shivendra kumar sahu

July 29, 2011 12:59 pm

hi Mr R.B.
I was change it with PIC 16F676 . but found , lot of error pl guide
me..
Reply
shivendra kumar sahu

July 23, 2011 5:31 pm

i want use it 50 volt AC\DC .need adc cal calculation ..


can u help me ?
Reply
kubing

July 19, 2011 5:08 am

great dude
Reply
wwint

July 14, 2011 5:32 am

@harry
what i think your saying is that with the output going to full range
speakers with more than one driver per cabinet aka 2way or 3 way
speakers, youre getting good sound. but when you wire to a single
4 or 8 ohm driver it sounds bad?
if thats the case no tone control will hep you, better speakers =
better sound.
if you are referring to sending your circuits output into a stereo
system with a seperate amp in it, sounding good and then not
sounding good on speakers without this second amp inline
http://embedded-lab.com/blog/?p=3096

21/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

well then youve discovered that the lm386 is a very low power
(less than 1 watt) amp chip designed for headphone amplification or
small speakers without needing heatsinks, and doesnt sound
particularly good.
pick a better amp chip to drive 4 ohm speakers by themselves.
if none of these then i cant figure out what youre talking about as
your description of your problem is beyond vague
Reply
Pingback: Blog Archive Automotive battery voltage monitor .::
Arindam's Blog ::.
Pingback: Automotive battery voltage monitor | You've been
blogged!
Pingback: Automotive battery voltage monitor - Hack a Day
error404

July 13, 2011 2:19 am

Shouldnt really put 12V on a standard connector where 3V3 is


expected and 5V is maximum. Some poor passenger or borrower of
your vehicle could easily destroy their expensive gadget.
Id have modified the charger to not use a standard USB connector
anymore.
Otherwise nice work!
Reply
R-B

July 13, 2011 9:58 am

@error404,
I agree with what you are saying, but the re-wired USB charger is
the part of the monitoring device and should go with it. It
shouldnt be used as a normal USB charger. I wanted to avoid
any long cables from the cigarette lighter receptacle to the
circuit board to make it compact and portable. Thanks for the
comment though, the readers will be now aware of this issue.
Reply

Pingback: Electronics-Lab.com Blog Blog Archive Voltage


monitor for cars battery and its charging system
Harry

July 12, 2011 6:15 am

U guys are greati need help though: am a fast learning beginer and
am making an amlifier based on lm386D with no preamp and it
sound ok on stereo speaker but very poor on 4 or 8 ohm CD
speakers..i need a circuit diagram with tone controll to modifie
http://embedded-lab.com/blog/?p=3096

22/23

11/6/2014

Voltage monitor for cars battery and its charging system | Embedded Lab

this to run great on 4,8 ohm spks..plzzzzzz


Reply

LEAVE A REPLY
Your email address will not be published. Required fields are
marked *
Name *

Email *

Website

Comment

Post Comment

2014 Embedded-Lab. All Rights Reserved.


Go to Top| Contact Us | Privacy Policy | Log In

http://embedded-lab.com/blog/?p=3096

zeeDynamic Theme

23/23

Potrebbero piacerti anche