Voltage monitor for car battery


Closed Thread
Results 1 to 40 of 51

Hybrid View

  1. #1
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Smile Excellent idea

    Excellent divide by three idea (10k 10k 10k) given by Dave (mackrackit).
    How about this....? So far...
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1900&stc=1&d=118606737 9" />
    Attached Images Attached Images  

  2. #2
    Join Date
    Apr 2007
    Posts
    53


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Pic_User View Post
    Excellent divide by three idea (10k 10k 10k) given by Dave (mackrackit).
    How about this....? So far...
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1900&stc=1&d=118606737 9" />
    The automotive environment can be very nasty, as someone has already said. Here is how I go about it:

    First of all, put a diode in series with the 7805 regulator for reverse polarity protection. The one you have now will burn out the 10ohm resistor if you connect it up backwards.

    It is always a good idea to use a Transorb (instead of the zener) - they are much better at catching nasty spikes. On a 12v system, an 18v Transorb should be ok.

    I would also add some inductance before the 7805 - somewhere around 1mH works for me.

    For maximum reliability, I always try and isolate or buffer the micro from the "real world" signals as much as possible. Try to make it and "island", if you like. For digital inputs, this means using opto-isolators. For analog inputs I buffer the signals with RRIO op-amps powered from the +5v rail. Doing this greatly reduces the chances of nasty spikes reaching your micro. Outputs are usually buffered anyway through drivers, transistors, fets, relays etc. Adding 1nF ceramic decoupling capacitors to every i/o on your pcb can also be worthwhile.

    The other important point is to take care when joining the ground connections together on your pcb. Keep analog and digital grounds separate. Try to use a "star" type connection where all the grounds join at one place - usually at the filter capacitor/regulator. This point should have the lowest impedance path for noise/spikes.

    There are many more "tricks" to combat the nasties found in the automotive environment. A a quick google using "automotive interference suppression" or similar will probably produce some worthwhile results.

    Hope I was of some help.

    Regards,

    Andy

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Wink

    I guess it all comes down to how much protection should be used on a $10.00 device. As Bob pointed out the alternator burned other electronics in the vehicle.

    Now to build a device so the vehicle can go up in flames but we can still read the voltage.

    The polarity protection diode is a good idea.

    I am talking from many years of building control systems for spray rigs mounted on tractors with 12 and 24 volt systems. Pressure transducers, automatic valves, etc. So far the problems mentioned have not been a problem.

    The 7805 is good for 35 volts, I think. The resistor network could be 4 to 1 instead of 3 to 1 for protection at the ADC if you are worried.

    Add the polarity diode to the schematic by Pic_User and call it done.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Smile a circuit designed by a committee

    I feel like this is a circuit designed by a committee.

    The idea of the 10 Ohm resistor was to put a “bungee cord” protection for the Zener. Something to absorb a small surge for a short time to soften the blow on the Zener.

    I was hoping Melanie would come to my defense about the reverse polarity diode. The idea is to burn out the 10 Ohm “fuse”, if someone installs the instrument with the polarity revered. It works okay on equipment that gets installed once and stays hooked up. Not a good idea on a portable tester that has to be hooked up a lot.

    If the series diode is put inline in front of the measurement “tap-off”, it affects the accuracy by the forward voltage drop. Even though this “band-gap” voltage is considered to be steady for many purposes, it does change by temperature and current flow. This is the reason the reverse polarity diode (dead short) is sometimes used.

    I put Alain’s “low leakage”, good idea in too. Diodes to shunt the over voltage to plus (Vdd) and the reverse voltage is shunted to (Vss) ground (“wraparound diodes”).

    What else do we need? As Dave said it is a “cost spent to cost protected” ratio fine line. But fun to discuss!
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1905&stc=1&d=118609804 3">
    -Adam-
    Attached Images Attached Images  

  5. #5
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I was hoping Melanie would come to my defense about the reverse polarity diode.
    You don't need me to defend you Adam *smiles* just asbestos underpants...

    Your original circuit was good - as long as it's a fuseable Resistor (only problem they're expensive). Most amateurs wouldn't know what one of them was so they'd be fitting normal Resistors... then you've got a potential flame-out in a vehicle... mounted next to the flexible plastic piece of gasoline hose they've just fitted whilst parked at the filling station...

    Geee... I think I missed my calling - should be writing disaster movie scripts in Hollywood...

    For cheap and effective protection I willingly sacrifice a bit of accuracy (or compensate in software). The resistor divider values can be reduced and a better choice of zenner to minimise the effect.
    It's not a 'bit' of accuracy, it's a shed-load of it. There's no way of calculating other than manually calibrating your product. Zeners aren't consistent. 5.6v Zener is probably +/- 5% (or even 10%) - well you do the math. To protect the PICs ADC input you need a 5.6v Zener max. That could start conducting at about 3v... therefore your useable ADC input on a PIC is between 0 and 3v tops! Above 3v it's going to be inaccurate because of that Zener. Better to have a larger Resistor Ratio, plan for things going wrong... plan for some twerp putting your device across a 24v truck battery and calculate your Resistor chain accordingly.

    For those that are wondering what I'm talking about, and have been taught at college that Zeners conduct at their rated voltage, put your DVM set to mA in series with one and wind a PSU up slowly (via a current limiting Resistor). You will discover they start conducting long before you actually expect them to. Believe nothing - trust no-one (especially college lecturers!)... whatever happened to Mulder & Scully?...

  6. #6
    Join Date
    May 2007
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    Hi Everyone

    Thank you all for the excellent advice!!

  7. #7
    Join Date
    Apr 2007
    Posts
    53


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Pic_User View Post
    I feel like this is a circuit designed by a committee.

    The idea of the 10 Ohm resistor was to put a “bungee cord” protection for the Zener. Something to absorb a small surge for a short time to soften the blow on the Zener.

    I was hoping Melanie would come to my defense about the reverse polarity diode. The idea is to burn out the 10 Ohm “fuse”, if someone installs the instrument with the polarity revered. It works okay on equipment that gets installed once and stays hooked up. Not a good idea on a portable tester that has to be hooked up a lot.

    If the series diode is put inline in front of the measurement “tap-off”, it affects the accuracy by the forward voltage drop. Even though this “band-gap” voltage is considered to be steady for many purposes, it does change by temperature and current flow. This is the reason the reverse polarity diode (dead short) is sometimes used.

    I put Alain’s “low leakage”, good idea in too. Diodes to shunt the over voltage to plus (Vdd) and the reverse voltage is shunted to (Vss) ground (“wraparound diodes”).

    What else do we need? As Dave said it is a “cost spent to cost protected” ratio fine line. But fun to discuss!
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1905&stc=1&d=118609804 3">
    -Adam-

    Just one more thing to be aware of - check the datasheet of your intended PIC for the ADC source impedance. Most PIC's have a maximum recommended analog source impedance of somewhere in the range 2k to 10k. To stay within these specs you will obviously have to decrease the value of the voltage divider resistances or buffer the divided voltage with an op-amp.

    Regards,

    Andy

  8. #8
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Default asbestos protection

    Quote Originally Posted by Melanie View Post
    You don't need me to defend you Adam *smiles* just asbestos underpants...
    ... then you've got a potential flame-out in a vehicle... mounted next to the flexible plastic piece of gasoline hose they've just fitted whilst parked at the filling station...

    Geee... I think I missed my calling - should be writing disaster movie scripts in Hollywood...
    > flame-out in a vehicle... mounted next to the flexible plastic piece of gasoline hose!

    Now THAT is a second good reason to keep wearing asbestos underpants!
    Does asbestos protect one from whip lashes?
    -Adam-
    Ohm it's not just a good idea... it's the LAW !

  9. #9
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Impedance of a DC voltage divider.

    If I remember right

    R or (Z) = (R1*R2) / (R1+R2)

    Using the 3 to 1 example with 10K resistors - Z = 6.6K
    Using the 4 to 1 example with 10K resistors - Z = 7.5K

    No problem here, Besides that, I use the 3 to 1 example, It does work.

    Asbestos <> RoHS Compliance
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Battery pack cell reader
    By steiner in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 9th March 2008, 06:41
  2. Expanded Scale Voltmeter
    By Pic_User in forum Schematics
    Replies: 6
    Last Post: - 8th February 2008, 20:32
  3. Help with final project
    By OvERKiLL in forum General
    Replies: 4
    Last Post: - 15th December 2006, 20:35
  4. Measuring Battery voltage
    By BobP in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd December 2006, 23:07
  5. Help with setting adcon1 for 16f877
    By jessey in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 16th August 2005, 11:13

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts