PDA

View Full Version : COMPARATOR - Voltage Reference settings



flotulopex
- 8th October 2007, 20:28
Oooops! I mixed up things!!!

I'll have to use AD instead of Comparator.

Going back to my datasheet for some trials...

-----------------------------------
Hello,

I want to measure a current (voltage) like in my simplyfied shema but I'm not sure this is possible this way.

To not affect the load's voltage, I put the precision resistor at the voltage regulator's input.
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2078&stc=1&d=1191870556">

The circuit is 12V powered and, of course, the PIC has a clean 5V feeding.

Assuming the load draws from 0A to 1A, my 1ohm precision resistor R1 will drop between 0V and 1V.

A) Is it possible to measure the voltage difference this way?

B) Is correct to connect the R1 to CIN+ and CIN-?

C) What will the comparator's registers (CMCON0 & VRCON) settings be?

Still a little lost with the use of comparators...

nomad
- 9th October 2007, 07:06
Hi,

The regulator will draw current even when the load isn't drawing anything, so your readings will be off.

you would need to use a voltage divider, as those points are well above the pics max input levels.

as far as the rest goes, I just did a blinky light and got an lcd to work. so can't help with ad adc comparators etc. :)