PDA

View Full Version : Protect PIC's input against "high" voltage using AD



flotulopex
- 29th May 2009, 09:40
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...

Jerson
- 29th May 2009, 12:17
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.

Ioannis
- 29th May 2009, 13:19
and if you use logic and low Rds mosfets (Look at Vishay) then your error will be minimum.

Ioannis

Archangel
- 29th May 2009, 15:43
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 ?

flotulopex
- 29th May 2009, 16:50
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=1243611259">

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)!

sougata
- 29th May 2009, 17:28
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.

Archangel
- 29th May 2009, 18:02
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/info/circuits/scr_overvoltage_crowbar/scr_over_voltage_crowbar.php
http://www.uoguelph.ca/~antoon/circ/SCR-Ovp/SCR-Ovp2.html
http://www.electronics-radio.com/articles/analogue_circuits/power-supply-electronics/over-voltage-protection.php
http://www.ibiblio.org/kuphaldt/socratic/output/thyrcir.pdf

flotulopex
- 29th May 2009, 18:59
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).

chuck
- 29th May 2009, 19:34
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 :D These are just some ideas but it would amake it cool project :cool:

flotulopex
- 29th May 2009, 22:27
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.mvc/TMC-2001d-Battery-Management-System-0001?VNETCOOKIE=NO.

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

sougata
- 30th May 2009, 16:25
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. :D