I need help to divider the 7.2v to read with pic ..
+ 7.2v -----------R2 = ?k
|
| R1= ?k
---
-
Some Help or Idea
Thanks all for the Help..
I need help to divider the 7.2v to read with pic ..
+ 7.2v -----------R2 = ?k
|
| R1= ?k
---
-
Some Help or Idea
Thanks all for the Help..
<table><tr><td valign=top>That thread shows how to calculate the voltage once you know the resistor values. But, as I read the question again, apparently you are looking for the resistor values themselves.
First, determine the Maximum voltage that you will need to read. If you want to read 7.2 volts, then you should be prepared to read higher than that. Let's say 7.5 is the max (up to you though).
Vin = 7.5 <-- max Input to voltage divider
Vout = 5 <-- max Output voltage to pic
Using your best educated guess, choose a value for R1. Say, 2700 ohms.
R2 = R1/(1-(Vout/Vin))-R1
R2 = 2700/(1-(5/7.5))-2700
R2 = 5400 ohms
Use the closest Standard Value 5.6K
Then to do the reverse, just plug those resistor values into the formulas in the other thread.
http://www.picbasic.co.uk/forum/showthread.php?t=541</td><td valign=middle></td></tr></table>
HTH,
Darrel
Actually, I'd like to add a little here... sure use the formulas as given, but for a PIC input I like to ensure that R2 is at least 10K (optimal for an ADC)... or even higher, otherwise the current flow through the Resistor chain is excessive, especially important if you are going to use it as a Battery Low indicator.
Interesting,
I was purposely trying to keep it Under 10K to stay within the "maximum recommended impedance for analog sources".
I can see the advantage with a battery application, but would you also need to increase ADC_SAMPLEUS?
Or is it OK as long as R1 stays below 10K?
<br>
DT
Darrel,
I use this concept in many of my designs, and with "R1" being equal or below 10k I have never seen any problem at all.
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
For most PICs the recommended maximum input impedance is 10K... although it does vary (example 12F675 it's 2.5K). I've actually used the 12F675 with the same 10K input circuitry I use with a 16F876 and the same default 50uS settling time without problems. I don't use ADCIN but prefer to set and poll the GO/DONE bit for a completed conversion. Like with all things, it's a case of try it and see, and if it works for you - use it. For Battery-Low applications with Comparator Inputs, I've had 470K/220K R1/R2 combinations before now just to keep the current down.
Great, thanks you two!
Well, I've learned my 1 thing for today. I guess I can take the rest of the day off.
But before I do that, let's see if we can finish off jetpr's question.
Assuming now that R1 can always be 10K (or 2.5K), we can forget about the guessing part and just calculate R2 with the same formula.
Vin = 7.5 <-- max Input to voltage divider
Vout = 5 <-- max Output voltage to pic
R1 = 10000
R2 = R1/(1-(Vout/Vin))-R1
R2 = 10000/(1-(5/7.5))-10000
R2 = 20000 ohms
Hmmm, Nice round numbers too.
<br>
Last edited by Darrel Taylor; - 23rd February 2006 at 01:10. Reason: 2.5K
DT
Hi,
I need to read a car battery, it ranges from 10v to 14.8v. In my circuit i have used a zener 10v to drop the voltage to 0-4.8v.
Should i modify it to use voltage divider (10K/5K) instead ?
Sorry eletronic is just a hobby to me, just learning :-)
You should use the voltage divider with simple resistor... also add a 10-100nF at the PIC a/d input to smooth the results. It's amazing how much noise you can remove. Also, doing multiple reading then average them to avoid odd results it's just a better practice in, at least, car application.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi, SerandreOriginally Posted by serandre
Your Zener idea is not so bad ... but zener voltage is not stable with temp .!!! so, your measurement will be somewhat false ( in a car temp is not so constant ...).
There would be a simple solution : use a cheap TL431 trimmable "zener" instead of the diode. see TL431 datasheet for that.
http://pdf1.alldatasheet.com/datashe...OLA/TL431.html
Alain
Last edited by Acetronics2; - 18th June 2006 at 09:46.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks