Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How can i measure a bipolar voltage?

Status
Not open for further replies.

kieennx

Junior Member level 3
Junior Member level 3
Joined
Jul 8, 2005
Messages
29
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,288
Activity points
1,613
Hi all,
i have to measure a bipolar voltage (it can be positive or negative) in my design for alarm and protection. The voltage ranges from - 20V to +25V. The voltage will be calibrated to 0-5V before putting into ADC on AVR MCU. I need both absolute value and sign.
Please help me because i'm not much familiar with analog electronics.
Regards.
 

Borber

Advanced Member level 5
Advanced Member level 5
Joined
Dec 31, 1999
Messages
1,600
Helped
235
Reputation
472
Reaction score
111
Trophy points
1,343
Location
on third flor
Activity points
11,862
If it is about DC voltage you may use fullwave rectifier to get absolute value and comparator to get sign.
 

echo47

Advanced Member level 6
Advanced Member level 6
Joined
Apr 7, 2002
Messages
3,933
Helped
638
Reputation
1,274
Reaction score
90
Trophy points
1,328
Location
USA
Activity points
33,176
The simplest circuit uses two resistors and one voltage reference.
As Input goes from -20V to +25V, Output goes from 0V to 5V:
Code:
Input ----12K-----+
                  |____ Output
                  |
+2.5V ----1.5K----+
I suggest doing the absolute value and sign calculations in your MCU software.

Basically, I solved these simultaneous equations:
via = -20
vib = 25
voa = 0
vob = 5
(via - voa) / r1 = (voa - vref) / r2
(vib - vob) / r1 = (vob - vref) / r2

Other resistors values will work, if you keep their ratio constant.
 

kieennx

Junior Member level 3
Junior Member level 3
Joined
Jul 8, 2005
Messages
29
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,288
Activity points
1,613
Thanks all of you. But i want to get the maximum accuracy as possible as i can. The voltage is DC value but it can change its sign sometime. By using rectifier or resistor voltage divider as you suggested, the accuracy maybe low, i'm afraid of that. If there's some circuit that can have higher accuracy (maybe using Opamp?), please tell me how to build it.
Thanks and best regards.
 

solace76

Newbie level 4
Newbie level 4
Joined
Jul 18, 2005
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,344
Hello,
What you are designing is a dc volmeter of some type, you will find that most of the microcontroller companies like Atmel, Microchip, Philips etc have an application note area on their websites, I am sure u will find one such applicatio about a voltmater over there.

Regards
 

VVV

Advanced Member level 5
Advanced Member level 5
Joined
Nov 26, 2004
Messages
1,575
Helped
384
Reputation
768
Reaction score
88
Trophy points
1,328
Activity points
19,971
I would definitely go with the circuit suggested by echo47.
All the A/D which feature a "pseudo-bipolar" input actually use that approach.

The only thing is you should make sure the resistors track one another over temperature. Therefore, I recommend using one of these resistor networks, RTY from Koa Speer: www.koaspeer.com/koa/index.html

They will track to 10ppm/°C. Better ones are available, but the values of the resistors inside are usually identical. Anyway, if you get one with 8 resistors inside (from Bourns or BI Technologies), you connect 7 of them in parallel and the 8-th one is the other resistor. Say you get a 12K network, you will have a 12k and a 1.7k resistor. With some minor adjustments, it can work.
 

kieennx

Junior Member level 3
Junior Member level 3
Joined
Jul 8, 2005
Messages
29
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,288
Activity points
1,613
Thanks for helps. I'll try to use the voltage divider suggested by echo47. Is there any good voltage reference creator beside LM336? I'm afraid of bad voltage reference (used for ADC and for the voltage divider).
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top