Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

How to measure 0-30V with ADC that has 5V maximum input ?

Status
Not open for further replies.

Giftbox

Newbie level 4
Joined
Sep 10, 2005
Messages
7
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,281
Activity points
1,335
I use PIC16F877 which has on chip 10 bit ADC.I have the problem when I use ADC measuring voltage 0-30V.
I have tried to use voltage divider but not work.

My circuit
http://tinypic.com/ixcgaq.jpg
 

eng_ahmed22

Full Member level 4
Joined
Jun 7, 2005
Messages
190
Helped
20
Reputation
40
Reaction score
5
Trophy points
1,298
Activity points
2,916
Re: How to measure 0-30V with ADC that has 5V maximum input

hi Giftbox
may you can use potential devider (voltage devider), it is 2 resistance in series, and the voltage drop across the 2 resistors will reduced with the ratio between the 2 values. if u want more details, just tell me


this is usefull link http://hyperphysics.phy-astr.gsu.edu/hbase/electric/voldiv.html

hope that help u :D
bye
Ahmed


:cry: i am sorry, i didn't see ur circuit,
i suggest to add a buffer (opamp with unity gain befor ur ADC
this may solve the problem
bye

ahmed
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,459

Giftbox

Newbie level 4
Joined
Sep 10, 2005
Messages
7
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,281
Activity points
1,335
Re: How to measure 0-30V with ADC that has 5V maximum input

I have added voltage follower to the my circuit but still not work
The objective of my circuit is digital volt meter that can measure 0-30Vdc
and show on LCD.

If I connect voltage 0-5Vdc direct to ADC input it work fine.

My new circuit
http://tinypic.com/ixdncx.jpg

Please help me.
 

Davood Amerion

Advanced Member level 2
Joined
Mar 1, 2005
Messages
584
Helped
116
Reputation
232
Reaction score
24
Trophy points
1,298
Location
Persia
Activity points
6,351
I think voltage follower not nessesary for your circuit.
because of input impedance of ADC (uC) is high.
I think it is because of you dont define that pin as input!
in the other word you must define ADC pin as input.
:D
 

vaclavp

Newbie level 6
Joined
Jul 31, 2002
Messages
13
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
120
Re: How to measure 0-30V with ADC that has 5V maximum input

Giftbox said:
I have added voltage follower to the my circuit but still not work
Are you sure that you don't have AN0 as output ? What is on output if you set "1" in your program ? Still 80mV ?

Vasek
 

Tornado

Full Member level 3
Joined
Apr 26, 2002
Messages
167
Helped
11
Reputation
22
Reaction score
9
Trophy points
1,298
Activity points
1,265
Re: How to measure 0-30V with ADC that has 5V maximum input

Hi Giftbox, can you test the LM358 separate to see if is working properly?
It is probably blown by ESD or short circuit or the power polarity connected
reverse. Your circuit is correct. Another thing to keep in mind is that LM324 and LM358
will never output 5Volts with a 5Volt supply due to their output design that subtracts aprox. 1Volt from the max. VCC voltage.
It should be okay up to 4 volts. In this case you have to change the 2K res to around 1k54 I let you do the calculation.
So when your input voltage is 30Volts the divider should output 4Volts. then you have to scale your ADC accordingly.
The simplest is to use a rail to rail single supply opamp, check with National Semiconductors.

Tornado
 

eng_ahmed22

Full Member level 4
Joined
Jun 7, 2005
Messages
190
Helped
20
Reputation
40
Reaction score
5
Trophy points
1,298
Activity points
2,916
Re: How to measure 0-30V with ADC that has 5V maximum input

hi
ur circuit seems good. but i think u may try to add pullup resistance to ur port pin.
i did have a problem like this but with a comparator. and when i added a pullhigh resistance to the op amp output it works will and the problem dissapears. whos know?? :D

don't forget to define ur pin as input

hope this help u and solve ur problem

best regards
AHMED
salam
 

Faros

Newbie level 5
Joined
Jul 2, 2005
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,395
Re: How to measure 0-30V with ADC that has 5V maximum input

Hi every one …

Using the op amp to reference an ADC is only needed in 2 cases:

1- When the input signal is low level relative to ADC sensing range

Example the signal under test is from 0 to 200 mv while your selected ADC has a range from 0 to 10 v then; an OP AMP is needed as a DC amplifier.

2- if your input is varying over a narrow gap

For example : your input signal are varying form a min of 2v to a max of 2.2 v then , you will need an op amp to scale the op form 0 when it’s at 2v up to full ADC scale at 2.2v

In your case a potential divider should do the job correctly... If not, check resistor values and/or your code.

thank you ...
 

Gorgon

Full Member level 6
Joined
Nov 10, 2005
Messages
345
Helped
75
Reputation
150
Reaction score
67
Trophy points
1,308
Location
Norway
Activity points
3,638
Re: How to measure 0-30V with ADC that has 5V maximum input

Giftbox said:
I use PIC16F877 which has on chip 10 bit ADC.I have the problem when I use ADC measuring voltage 0-30V.
I have tried to use voltage divider but not work.

My circuit
h**p://tinypic.com/ixcgaq.jpg
Hi,
Try to disconnect the PIC input and then measure the voltage over the 2k resistor. I am also a bit uncertain about your connection, is the ground symbol the same as 0V(Vss)? Have you connected the 30V negative to 0V? A single floating +30V doesn't give you any voltage over the resistors!

TOK ;)
 

contagiouseddie

Member level 2
Joined
May 10, 2004
Messages
51
Helped
8
Reputation
16
Reaction score
5
Trophy points
1,288
Activity points
490
Re: How to measure 0-30V with ADC that has 5V maximum input

The maximum output voltage from LM324 and LM358 is only Vcc - 1.5 V. Considering no gain is required on the op-amp, the maximum input voltage is only 3.5 V if Vcc is 5V. Higher input will be clipped off.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top