Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

10Bit ADC + VREF

Status
Not open for further replies.

Scarr

Member
Hi all,

I want to monitor a voltage for sudden changes in voltage (0.004v) the the voltage is normally at 1.5v but does wander (it is supposed to wander) can you take a look at my attachment and I want to know if this will basically work when I get correct diode and cap or have I got it totally wrong.

Steve
 
What is your VREF. Is it set internal or are you using the diode and cap to set VREF+?

"(0.004v)" is the limit of a 10 biat ADC with a 5 volt ref. There will be some noise so you probably won't be able to see 4mV of movement in your voltage.

Why the diode and cap? What are you hoping to do?
 
You might not even need the cap and diode.
It looks like your using the diode and cap to generate a filtered voltage, ie a voltage that doesnt change quickly, if so you dont need to, the pics own reference voltage is good enough.
As Ron mentioned your on the edge of the reolution from the atod within the pic, to improve things an op amp would make a difference, you could capacitively couple the input of the op amp and use reasoanbly high gain to give you a good measurement.

Edit: Just occured to me that you might be using the comparator rather than the atod, this might work 4mV on the other hand is pretty close tolerance, you'd have to make sure noise isnt an issue.
 
Last edited:
Hi guys,

I might not have explained what I am trying to do very well, let me try again

I want to capture fast changes in voltage whilst allowing the voltage to wander over time, so here is a list of input voltages over time

1.501v
1.502v
1.501v
1.502v
1.503v
1.504v
1.509v <<<<<
1.508v
1.509v
1.510v
1.509v
.
.Some hours later
.
3.049v

The point I was trying to capture is the sudden jump in voltage <<<<< and I thought that if VREF followed the voltage but with a lag (caused by having the cap+diode i place) this would allow a greater resolution because if your only measuring a difference of max 1v from VREF this gave better resolution, but maybe I have that part wrong! also I thought it look a neat way of having a auto-calibrating trigger?

Steve
 
The idea sounds liek it might work, however with such a small diffo in vref and the measured voltage noise might be an issue.

A pic expert might be better knowledged to answer that one, I've only ever used +5v as vref.

Dont forget that the diode drops around 0.6v, you might be better with a resistor there.
 
Last edited:
hi Scar,
A diode has a forward voltage drop change of -2mV/Cdeg rise, just a 2Cdeg rise would give an an 'apparent' change of 4mV.

Also a PIC's ADC is ratiometric with respect to its Vref.

I would consider an external detection method that signals the PIC when a change has occurred, a 'signal slicer' is close to what you need.


EDIT,
Whats the time scale rate of change you must have
 
Last edited:
Your idea of using a delayed reference is good, but the voltage should be pre-conditioned before it hits the PIC. As mentioned, the ADC in the pic is not well suited to do it directly, but if you setup an op-amp as a differential amplifier with gain, you will be able to see the small steps better.
 
Last edited:
The point I was trying to capture is the sudden jump in voltage <<<<< and I thought that if VREF followed the voltage but with a lag (caused by having the cap+diode i place) this would allow a greater resolution because if your only measuring a difference of max 1v from VREF this gave better resolution, but maybe I have that part wrong! also I thought it look a neat way of having a auto-calibrating trigger?

No, there are quite strict limitations as to what Vref can be - consult the data-sheet.
 
Put in front of the ADC a amplifier with a DC gain of 1, and a high frequency gain of 10.
Using the example the step form 1.504v to 1.509 will read 1.504 to 1.559. The 50 mV step is easy to see and will drop back in a couple of samples.

1.501v
1.502v
1.501v
1.502v
1.503v
1.504v
1.509v <<<<<
1.508v
1.509v
1.510v
1.509v
.
.Some hours later
.
3.049v

OR

Another method is to read the signal normally and to have a second ADC channel that has a DC blocking filter and a amplifier that has a gain of 10. Any fast change will be amplifier by 10 but a steady signal will fade away.
 
OK, I have been looking more at the input and found that if I can block all the slower rising signals then i will be left with only the trigger (I will provide difference in rise times as soon as I can) is this possible? bearing in mind once the real trigger rises fast it will not fall for a long time (could be hours).

So what I am looking for is a way to only allow a fast rise to be seen at the MCU pin (probably 2m rise as opposed to 100ms, but like I said I will confirm ASAP)

I have looked at high pass filters but being a newbie it is a little over my head, ideally a simple 8pin IC with I2C or SPI would be great but I doubt there is such a thing for this.

Thanks

Steve
 
Last edited:
OK, I have been looking more at the input and found that if I can block all the slower rising signals then i will be left with only the trigger

I have looked at high pass filters but.....

block all slow rise time = high pass filter
 
Status
Not open for further replies.

Latest threads

Back
Top