View previous topic :: View next topic |
Author |
Message |
ZZX Guest
|
Analog Volts |
Posted: Tue Jun 13, 2006 11:26 pm |
|
|
Hi forum,
can the analog port read more than 5v, say 12v signal. If not, i can scale the voltage down using the divider circuit to read it. problem is that i have some resistive network further down the line and the current drops due to this divider circuitry.
Any suggestions? How can i read it without this problem? |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
Re: Analog Volts |
Posted: Wed Jun 14, 2006 1:32 am |
|
|
ZZX wrote: | Hi forum,
can the analog port read more than 5v, say 12v signal. If not, i can scale the voltage down using the divider circuit to read it. problem is that i have some resistive network further down the line and the current drops due to this divider circuitry.
Any suggestions? How can i read it without this problem? |
Use a high impedance voltager divider and feed the it to the PIC a/d input via an op amp configured as a voltage follower. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
|
Posted: Wed Jun 14, 2006 7:51 am |
|
|
The specs usually state that the input can reach .3V above VDD which the max is around 6.5v - 7.5v, depending on the PIC you are using. Anything above this and you will, most likely, fry the PIC and let out all of the magic smoke.
Ronald |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Wed Jun 14, 2006 8:08 am |
|
|
rnielsen wrote: | The specs usually state that the input can reach .3V above VDD which the max is around 6.5v - 7.5v, depending on the PIC you are using. Anything above this and you will, most likely, fry the PIC and let out all of the magic smoke.
Ronald |
By using a CMOS opamp and running the opamp from the 5 volt rail, this problem is avoided. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
Re: Analog Volts |
Posted: Wed Jun 14, 2006 10:49 am |
|
|
asmallri wrote: | ZZX wrote: | Hi forum,
can the analog port read more than 5v, say 12v signal. If not, i can scale the voltage down using the divider circuit to read it. problem is that i have some resistive network further down the line and the current drops due to this divider circuitry.
Any suggestions? How can i read it without this problem? |
Use a high impedance voltager divider and feed the it to the PIC a/d input via an op amp configured as a voltage follower. |
Or you could use a lower impedance divider with a ground resistor of 2.5k or less. This way you can avoid distortion without using an additional opamp. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
Re: Analog Volts |
Posted: Wed Jun 14, 2006 11:58 am |
|
|
kender wrote: | asmallri wrote: | ZZX wrote: | Hi forum,
can the analog port read more than 5v, say 12v signal. If not, i can scale the voltage down using the divider circuit to read it. problem is that i have some resistive network further down the line and the current drops due to this divider circuitry.
Any suggestions? How can i read it without this problem? |
Use a high impedance voltager divider and feed the it to the PIC a/d input via an op amp configured as a voltage follower. |
Or you could use a lower impedance divider with a ground resistor of 2.5k or less. This way you can avoid distortion without using an additional opamp. |
Lower impedance wouldn't work. If you reread his post he states that there is some resistance already and using the lower impedance causes a voltage drop. Now if this resistance were fixed, you could probably compensate for it. Depending on the resistance, the best bet might be to use an opamp. |
|
|
ZZX Guest
|
|
Posted: Wed Jun 14, 2006 11:04 pm |
|
|
Thank u all for all the valuable suggestions,
Heres precisely something im doing :
14V --------/\/\/\/\/\---------- to load
14A | Rnet |
| |
| |
Div Network1 Div Network2
i.e im reading the voltages on both ends of Rnet(6.25milli ohms) and is meant to calculate the current. Now if my divider network 1 and two both have 3 resistors each of 4.7k, and not high impedance ones, since most current would flow straight to the load. Do u guyz think this solution would work provided i choose apropriate load which will be calculated as:
P= V x I
then R=P/(I)^2 |
|
|
ZZX Guest
|
|
Posted: Wed Jun 14, 2006 11:06 pm |
|
|
*The dividers in the schematic are at the ends of the Rnet resistors; |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Wed Jun 14, 2006 11:31 pm |
|
|
ZZX wrote: | meant to calculate the current. |
I would suggest to use a current sense amplifier such as MAX472 or MAX4080. You could also use an instrumentation amplifier, although you'll need a supply rail higher than the the voltage in the line you're measuring.
http://www.maxim-ic.com/appnotes.cfm/appnote_number/746 |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Thu Jun 15, 2006 10:54 am |
|
|
This article describes your exact situation. How to monitor voltage across a small shunt resistor in a +12V bus using an A/D that reads a small voltage relative to GND.
http://www.electronicdesign.com/Articles/ArticleID/12629/12629.html
Look for the "Associated figure" link near the bottom. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
ZZX Guest
|
|
Posted: Tue Jun 20, 2006 1:47 am |
|
|
Hi folks,
Im back with the issue. I tried reading voltage across a shunt using dividers. Each divider has 3 x 4.7k Resistors, so 11.44 volts at both ends of the shunt gives about 3.8V across each resistor. Now everthings at hand except a small problem. In my divider circuit, one side measures 3.78v while the other 3.79 volts. This creates a problem when i upscale it i.e x3 to know the actual voltage. Hence at the terminals when the actual voltages are 11.44,11.44(across shunt), here i get 11.37 and 11.34v(upscaled calculated). ive used 1% tol resistors here.
Can anybody suggest how to reduce the gap? (0.03 difference ) |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Tue Jun 20, 2006 11:34 pm |
|
|
ZZX wrote: | ive used 1% tol resistors here.
Can anybody suggest how to reduce the gap? (0.03 difference ) |
- You can measure the exact value of all of your resistors with a meter. Meters typically give 4 digits, which might be equivalent 0.1% presicision (there's probably an exact number for the precision in the meter's manual). Store the resistor values in thwe EEPROM and apply corrections to your readings.
- You can buy 0.1% resistors. You can also hand-pick resistors from the batch.
- Or (best of all), you can use one of the proposed differential/instrumentation/current-sense amplifier topologies.
- Hall effect current sensors are often used for high current. They are made by Allegro http://www.allegromicro.com/hall/currentsensor.asp and Zetex
Last edited by kender on Tue Jun 20, 2006 11:53 pm; edited 1 time in total |
|
|
Eugeneo
Joined: 30 Aug 2005 Posts: 155 Location: Calgary, AB
|
|
Posted: Tue Jun 20, 2006 11:53 pm |
|
|
It looks like you have a power supply of 14 volts. Could you use an opamp that accepts inputs of 14 volts then follow and divide? |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Wed Jun 21, 2006 7:33 am |
|
|
There are dedicated chips that will do this much better and cheaper than hand matching resistors. Look at Maxim MAX471 & MAX472. Maxim even gives free samples at their web site.
If you really want to roll your own try either of these two designs from the article I mentioned before.
http://www.electronicdesign.com/Files/29/12629/Figure_01.jpg _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
|