Protect PIC's input against "high" voltage using AD


Closed Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891

    Default Protect PIC's input against "high" voltage using AD

    Hello,

    I'm making a battery tester. It is meant to measure 2V, 6V and 12V lead-acid batteries and store the values for further processing.

    How can I protect my PIC's input pins against voltages above 12V whithout compromising the AD's accuracy?

    The problem is, if I accidentally put my probes on the wrong measuring points, I could i.e. apply voltages up to 24V or (far) higher to the PIC.

    Currently, I have two voltage-dividers (resistors) when I measure 6V & 12V batts I do select manually to keep highest possible accuracy. Would be nice to make an "automatic" voltage-divider...
    Roger

  2. #2
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947


    Did you find this post helpful? Yes | No

    Default

    Automatic scaling down of input? Sure. Think of a potential divider with R1 fixed. R2 values will be switched in by transistors starting with the lowest (highest measurement range) and progressively going lower till you get the best reading. Think autoranging multimeter and you'll get my drift.

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    and if you use logic and low Rds mosfets (Look at Vishay) then your error will be minimum.

    Ioannis

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Side Note:

    Hi Roger,
    A side note: You may be interested, Dale Wheat did a project similar to this for Circuit Cellar May 2009 issue using AVR AT Tiny and Charlieplexed LEDs to display voltage, he used C but some pointers may be had by looking at it, He also sells kits on his Web Site.
    http://www.dalewheat.com/slameter.html
    ftp://ftp.circuitcellar.com/pub/Circuit_Cellar/2009/226

    How about a crowbar circuit with a fuse inline with your sense line ?
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  5. #5
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default

    Thanks for the automatic scaling ideas. At this time, this feature is a "nice to have" so I will first focus on "protection".

    My current problem is to ensure I'm not going to blowup my PIC if I do a mistake.

    Just see an example of batteries farms I take care of. There are batteries in three different models: 2V 1750Ah, 6V 160Ah and 12V 4,5Ah.

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=3427&stc=1&d=124361125 9">

    If one of my probes falls off my hand and touches any contact somewhere on any other battery while I'm doing the measurements, it can kill my PIC whithin a blink of an eye.

    Basically, I need to find a way to protect my PIC (from voltages over 12V) whithout loosing accuracy during the measurement process.

    The upper voltage limit is 580VDC, but it is almost impossible to be that inattentive and make such a mistake (well, I'm human so everything is possible)!
    Attached Images Attached Images  
    Roger

  6. #6
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Which PIC are you using ?

    Hi,

    I did a battery analyzer once. I would like to know the PIC your are using. BTW I have used zener on the inputs.
    Regards

    Sougata

  7. #7
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post

    How about a crowbar circuit with a fuse inline with your sense line ?
    An inline fuse, an scr across the inputs, a zener to drive the scr gate, voltage goes too high, scr shorts inputs and fuse blows.
    http://www.radio-electronics.com/inf...ge_crowbar.php
    http://www.uoguelph.ca/~antoon/circ/.../SCR-Ovp2.html
    http://www.electronics-radio.com/art...protection.php
    http://www.ibiblio.org/kuphaldt/socr...ut/thyrcir.pdf
    Last edited by Archangel; - 29th May 2009 at 18:28.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  8. #8
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default

    I'll try with a SCR then - good links, thanks Joe.

    I'm using either a 16F88 or a 16F690 (I would prefer to use a 16F690 because it's cheaper than the 16F88 here in Switzerland).
    Roger

  9. #9
    Join Date
    Nov 2005
    Posts
    51


    Did you find this post helpful? Yes | No

    Default

    flotulopex they are some batteries there,
    I did a battery anayliser to test 6V batteries based on the alphabat pro, It works really well, The only real way to test batteries is the discharge method, It uses a pic18f4520,GLCD & SD_CARD for recording the date,time,battery and current draw, This unit works very well.

    If you want accuracy then have a look at the attached file, It's part of a schematic from a fluke meter and it ues a 10bit A/D converter, You could can control the auto ranging through the PIc and if need be you could always use a 12-24Bit A/D chip. If I rmember the max DC voltage is 600V, This is one of my next projects.

    have you thought about hard wiring the unit to the batteries and using RF or RS232 way, You could have one or two master units then salves units to send data and why not go all the way, Use a SD_Card so log the voltage and you can upload the data into EXcel These are just some ideas but it would amake it cool project
    Attached Images Attached Images

  10. #10
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default

    Hi Chuck,

    Thanks for the FLUKE shema.

    For my daily job, I use this kind of tool http://www.programma.se/se/battery.php.

    And for keeping track of every and each battery, the TMC is the best complement http://www.electricnet.com/product.m...?VNETCOOKIE=NO.

    I'm actually trying to make a kind of TMC recorder, smaller and handyer.
    Roger

  11. #11
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default At your own risk

    Hi,

    A low leakage zener diode can always protect your ADC input from high as well as negative voltages. Find the proposed solution as attachment. I recommend using a MCP1541 as your voltage reference.

    Thanks to the low impedance of the battery as a voltage source. Otherwise the circuit would not work on any source. As the source would get loaded and change itself.

    Ensure proper acquisition delay. Try to use RC osc (ADC Clock) and execute @ SLEEP after setting go/done bit.

    Best of Luck.

    P.S. - I never got paid for the project. I accept Paypal.
    Attached Images Attached Images
    Last edited by sougata; - 30th May 2009 at 16:33. Reason: Forgot something as usual
    Regards

    Sougata

Similar Threads

  1. Temp readings and voltage input
    By ruijc in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 7th July 2008, 12:35
  2. Expanded Scale Voltmeter
    By Pic_User in forum Schematics
    Replies: 6
    Last Post: - 8th February 2008, 20:32
  3. AD input and 7segment dysplay output
    By ruijc in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th November 2007, 13:45
  4. Help with final project
    By OvERKiLL in forum General
    Replies: 4
    Last Post: - 15th December 2006, 20:35
  5. measuring input voltage
    By thon in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 11th August 2004, 16:03

Members who have read this thread : 1

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