Exact match. Not showing close matches.
PICList
Thread
'[PIC] Measuring negative Voltages'
2007\03\03@142945
by
Jens M. Guessregen / Mailinglists n/a
Hello all,
I am searching for an idea to measure negative voltages. -12V is the
voltage to be measured, so the measurement range should be maximum -15V.
I know how to measure positive voltages and how to use the ADC in the
PIC16F, but I have no idea about negative voltages (circuit...).
Any ideas welcome ...
Oh, the PIC I am using is 16F872 and 16F877 ..
Best Jens
2007\03\03@144713
by
Marcel Birthelmer
Jens,
you'll probably want to use an opamp to scale/shift your desired
measurement voltage to within the PIC's measurement range. Other than
that, the only option I know of is to shift the PIC's operating
voltage so that Vdd is -10 and Vss is -15 (or similar), so that your
signal is within operating range again. This is very dependent on what
your application is and what the rest of the circuit looks like etc.
- Marcel
On 3/3/07, Jens M. Guessregen / Mailinglists <spam_OUTjmg_mailinglistsTakeThisOuT
mcm-it.de> wrote:
{Quote hidden}> Hello all,
>
> I am searching for an idea to measure negative voltages. -12V is the
> voltage to be measured, so the measurement range should be maximum -15V.
> I know how to measure positive voltages and how to use the ADC in the
> PIC16F, but I have no idea about negative voltages (circuit...).
>
> Any ideas welcome ...
>
> Oh, the PIC I am using is 16F872 and 16F877 ..
>
>
> Best Jens
>
> -
2007\03\03@161748
by
Piclist
|
Hi Jens,
Have a look at this link with great information.
www.facstaff.bucknell.edu/mastascu/eLessonsHTML/Interfaces/ConvDVM.ht
ml
Alss you should consider negative thinking, not meaning to negative, but
with the power supply.
Bring what npormaly would be the positive voltage to Ground and supply the
ground true a 7905 negative voltage regulator with -5 volt. As the A/D in a
PIC cannot measure more than it supply voltage you need a voltage devider
and compesate for that in your display program.
If you need to measure positive and negative voltages, eg from +12 to -12,
you should use a OpAmp to shift this voltage to +24 - 0 volts and then a
voltage devider and make the software know that +12V is actuale 0 Volts.
Hopis this helps a bit.
Harry
{Quote hidden}> -----Oorspronkelijk bericht-----
> Van:
.....piclist-bouncesKILLspam
@spam@mit.edu [
piclist-bounces
KILLspammit.edu]
> Namens Jens M. Guessregen / Mailinglists
> Verzonden: zaterdag 3 maart 2007 20:30
> Aan: Microcontroller discussion list - Public.
> Onderwerp: [PIC] Measuring negative Voltages
>
> Hello all,
>
> I am searching for an idea to measure negative voltages. -12V
> is the voltage to be measured, so the measurement range
> should be maximum -15V.
> I know how to measure positive voltages and how to use the
> ADC in the PIC16F, but I have no idea about negative voltages
> (circuit...).
>
> Any ideas welcome ...
>
> Oh, the PIC I am using is 16F872 and 16F877 ..
>
>
> Best Jens
>
> -
2007\03\03@164500
by
Jinx
> Any ideas welcome ...
How about the voltage going in through a Schottky diode bridge
followed by a divider ? I think Vdrop across the diodes would be
fairly consistent with the divider as a load, but you could do some
measurements to make sure, and compensate in the ADC result
2007\03\03@182316
by
Steve Smith
Translate the -ve voltage to +ve
Use the vref as the end of the potential divider instead of 0V
So for 15v of -ve and 5 v of processor voltage the a-d reads 0 (1024) to 20V
(0) using a 5 k and a 15K as the divider. Just make sure the vref is solid..
The value comes out upside down 0v will give an a-d value 768 (assuming 10
bit) -5v (512) -10 (256) -15 (0)
Simplest I could think of....
Steve
{Original Message removed}
2007\03\03@201028
by
Jinx
part 1 583 bytes content-type:text/plain; (decoded 7bit)
> you'll probably want to use an opamp to scale/shift your desired
> measurement voltage to within the PIC's measurement range
Which you can do with an inverting amp. The attached will make
Vee for the op-amp. Quite simple with an I/O and a timer rollover
IRQ to toggle it. With a light load you'll get within a few mV of -5V
with PIC Vcc of 5V. Divider is on the op-amp i/p. Op-amp o/p
should have a Schottky (anode to Vss, cathode to o/p) to prevent
PIC pin seeing -ve voltage, possibly also 5V1 zener to catch any
positive overshoots
part 2 803 bytes content-type:image/gif; (decode)

part 3 35 bytes content-type:text/plain; charset="us-ascii"
(decoded 7bit)
2007\03\03@221738
by
Harold Hallikainen
> Translate the -ve voltage to +ve
>
> Use the vref as the end of the potential divider instead of 0V
>
> So for 15v of -ve and 5 v of processor voltage the a-d reads 0 (1024) to
> 20V
> (0) using a 5 k and a 15K as the divider. Just make sure the vref is
> solid..
> The value comes out upside down 0v will give an a-d value 768 (assuming 10
> bit) -5v (512) -10 (256) -15 (0)
>
>
> Simplest I could think of....
> Steve
>
I like this technique. I first saw it used in a Maxim ADC. I used it just
last week when a client wanted an analog to DMX encoder and their analog
voltage was 0 to -24V. Worked great!
Harold
--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!
2007\03\03@224104
by
Jinx
> > Use the vref as the end of the potential divider instead of 0V
Steve or Harold -
I can't picture this. 'splain please ?
2007\03\04@015424
by
Harold Hallikainen
For a simple case, imagine you have a pair of 10k resistors in series. One
end of the series string is connected to +5V. The other end is connected
to ground. The center is connected to the ADC input. The ADC sees 2.5V.
Now, take the bottom of the series pair (that was connected to ground) and
run it through a range of +5V to -5V.
When the "bottom" of the series pair is connected to +5V, the ADC gets
+5V. When at ground, the ADC gets +2.5V. When at -5V, the ADC gets 0V.
Scale the resistors as required for the voltage range you want. If you
assume to top resistor is 10k, you have 500uA through it when the ADC is
at 0V. That same 500uA goes through the bottom resistor. If you want the
max negative voltage to be -10V, the bottom R=10V/500uA.
OK?
Harold
>
>> > Use the vref as the end of the potential divider instead of 0V
>
> Steve or Harold -
>
> I can't picture this. 'splain please ?
>
> -
2007\03\04@020937
by
Steve Smith
|
Stunning explanation....
Just one note it comes out backwards (0v = 1024)
Steve
-----Original Message-----
From: .....piclist-bouncesKILLspam
.....mit.edu [EraseMEpiclist-bouncesspam_OUT
TakeThisOuTmit.edu] On Behalf Of
Harold Hallikainen
Sent: 04 March 2007 06:54
To: Microcontroller discussion list - Public.
Subject: Re: [PIC] Measuring negative Voltages
For a simple case, imagine you have a pair of 10k resistors in series. One
end of the series string is connected to +5V. The other end is connected
to ground. The center is connected to the ADC input. The ADC sees 2.5V.
Now, take the bottom of the series pair (that was connected to ground) and
run it through a range of +5V to -5V.
When the "bottom" of the series pair is connected to +5V, the ADC gets
+5V. When at ground, the ADC gets +2.5V. When at -5V, the ADC gets 0V.
Scale the resistors as required for the voltage range you want. If you
assume to top resistor is 10k, you have 500uA through it when the ADC is
at 0V. That same 500uA goes through the bottom resistor. If you want the
max negative voltage to be -10V, the bottom R=10V/500uA.
OK?
Harold
>
>> > Use the vref as the end of the potential divider instead of 0V
>
> Steve or Harold -
>
> I can't picture this. 'splain please ?
>
> -
2007\03\04@021100
by
Jinx
> assume to top resistor is 10k, you have 500uA through it when the
> ADC is at 0V. That same 500uA goes through the bottom resistor.
> If you want the max negative voltage to be -10V, the bottom R=
> 10V/500uA.
>
> OK?
Yup, thanks
2007\03\04@024036
by
Tobias Gogolin
|
Only one problem... he wouldnt get the full resulution on as neg. voltage
range...
He'd still have a bit of resolution left all the way from 0V to +Vref
Correct me if Im wrong he could also use the conventional Voltage divider to
0V
and then offset the center voltage of the divider by means of a zener diode
of about the value of Vref that is slighltly preloaded (with a resistor) to
vref...
On 3/3/07, Harold Hallikainen <harold
spam_OUThallikainen.org> wrote:
{Quote hidden}>
> For a simple case, imagine you have a pair of 10k resistors in series. One
> end of the series string is connected to +5V. The other end is connected
> to ground. The center is connected to the ADC input. The ADC sees 2.5V.
> Now, take the bottom of the series pair (that was connected to ground) and
> run it through a range of +5V to -5V.
>
> When the "bottom" of the series pair is connected to +5V, the ADC gets
> +5V. When at ground, the ADC gets +2.5V. When at -5V, the ADC gets 0V.
> Scale the resistors as required for the voltage range you want. If you
> assume to top resistor is 10k, you have 500uA through it when the ADC is
> at 0V. That same 500uA goes through the bottom resistor. If you want the
> max negative voltage to be -10V, the bottom R=10V/500uA.
>
> OK?
>
> Harold
>
>
> >
> >> > Use the vref as the end of the potential divider instead of 0V
> >
> > Steve or Harold -
> >
> > I can't picture this. 'splain please ?
> >
> > --
2007\03\05@023546
by
Vasile Surducan
On 3/4/07, Tobias Gogolin <@spam@usertogoKILLspam
gmail.com> wrote:
> Only one problem... he wouldnt get the full resulution on as neg. voltage
> range...
Why ?
2007\03\05@054918
by
Mark Rages
On 3/3/07, Jinx <KILLspamjoecolquittKILLspam
clear.net.nz> wrote:
>
> > you'll probably want to use an opamp to scale/shift your desired
> > measurement voltage to within the PIC's measurement range
>
> Which you can do with an inverting amp. The attached will make
> Vee for the op-amp. Quite simple with an I/O and a timer rollover
> IRQ to toggle it. With a light load you'll get within a few mV of -5V
> with PIC Vcc of 5V. Divider is on the op-amp i/p. Op-amp o/p
> should have a Schottky (anode to Vss, cathode to o/p) to prevent
> PIC pin seeing -ve voltage, possibly also 5V1 zener to catch any
> positive overshoots
>
If you use the inverting connection, you don't need a special Vee
supply for the op-amp. Use an op-amp where the common-mode range
includes ground (most of the 5V-friendly op-amps qualify).
Regards,
Mark
markrages@gmail
--
You think that it is a secret, but it never has been one.
- fortune cookie
2007\03\05@112006
by
Jens M. Guessregen / Mailinglists n/a
|
> For a simple case, imagine you have a pair of 10k resistors
> in series. One end of the series string is connected to +5V.
> The other end is connected to ground. The center is connected
> to the ADC input. The ADC sees 2.5V.
> Now, take the bottom of the series pair (that was connected
> to ground) and run it through a range of +5V to -5V.
>
> When the "bottom" of the series pair is connected to +5V, the ADC gets
> +5V. When at ground, the ADC gets +2.5V. When at -5V, the ADC gets 0V.
> Scale the resistors as required for the voltage range you
> want. If you assume to top resistor is 10k, you have 500uA
> through it when the ADC is at 0V. That same 500uA goes
> through the bottom resistor. If you want the max negative
> voltage to be -10V, the bottom R=10V/500uA.
>
> OK?
>
> Harold
Thanks,
This is so simple and should work.
I do not need fine accuracy, I just want to get an idea of some voltages
coming out of a power supply.
Best Jens
2007\03\05@144915
by
Tobias Gogolin
Math, Physics, Electronics
lets say he used the voltage div. to Vref at 5V and wanted to measure down
to -10 without offseting with a zener diode...
Then he would have 1/3 range in the positive and 2/3 in the negative...
On 3/4/07, Vasile Surducan <RemoveMEpiclist9TakeThisOuT
gmail.com> wrote:
>
> On 3/4/07, Tobias Gogolin <spamBeGoneusertogospamBeGone
gmail.com> wrote:
> > Only one problem... he wouldnt get the full resulution on as neg.
> voltage
> > range...
>
> Why ?
> -
2007\03\05@151040
by
Harold Hallikainen
|
True, some of the range allows for positive voltages. This may be wasted
ADC counts if you are only measuring a negative voltage. In my most recent
application of this circuit, I only needed 8 bits of resolution, so I set
the ADC to 10 bits and then multiplied the result by a constant to get
what I wanted (after subtracting out the offset).
I don't trust the tolerance and stability of a zener to do an offset like
this. I think the error introduced by a zener would be substantially more
than losing a bit of resolution.
Harold
{Quote hidden}> Math, Physics, Electronics
> lets say he used the voltage div. to Vref at 5V and wanted to measure down
> to -10 without offseting with a zener diode...
> Then he would have 1/3 range in the positive and 2/3 in the negative...
>
>
> On 3/4/07, Vasile Surducan <
TakeThisOuTpiclist9EraseME
spam_OUTgmail.com> wrote:
>>
>> On 3/4/07, Tobias Gogolin <
RemoveMEusertogo
TakeThisOuTgmail.com> wrote:
>> > Only one problem... he wouldnt get the full resulution on as neg.
>> voltage
>> > range...
>>
>> Why ?
>> --
2007\03\05@153658
by
Vasile Surducan
There are two issues here:
1. his input range is 0...-15V or the range to be measured is around -12V
(say -10V...-15V ) ?
2. it's unknown if the source is floated or not relative to the
microcontroller ground
As long those two questions have no answer from the person who asked
the initial question, the whole math, physics and electronics together
can't help for an appropiate answer.
Assuming the source signal is completely floated from the PIC
supply/ground, is necessary a simple divider 0...-15V to 0...-5V
without any trick. -5V could be connected to PIC ground and 0V to the
AD input. And the measurement resolution will be 10 bit. Typical
situation when a simple battery (other than PIC supply) is measured.
Assuming the signal is not floated (one line of the signal must be
connected to the microcontroller ground or VDD) there are at least two
choices:
a. using a divider on the negative voltage (0...-5V) followed by an
inverter (0...+5V), 0V signal connected to PIC GND and PIC supply: GND
= 0V, VDD = +5V
b. using a divider on the negative voltage (0...-5V), 0V signal
connected directly to the AD input, -5V signal connected to the PIC
ground, PIC supply as follows: VDD= 0V, GND=-5V, all electronics
around the PIC adjusted accordingly.
Software adjustment for full scale is required (1023 means 0V, 0000 means -5V)
Both situation will gave 10bit resolution.
Vasile
On 3/5/07, Tobias Gogolin <usertogoEraseME
.....gmail.com> wrote:
{Quote hidden}> Math, Physics, Electronics
> lets say he used the voltage div. to Vref at 5V and wanted to measure down
> to -10 without offseting with a zener diode...
> Then he would have 1/3 range in the positive and 2/3 in the negative...
>
>
> On 3/4/07, Vasile Surducan <
EraseMEpiclist9
gmail.com> wrote:
> >
> > On 3/4/07, Tobias Gogolin <
RemoveMEusertogoEraseME
EraseMEgmail.com> wrote:
> > > Only one problem... he wouldnt get the full resulution on as neg.
> > voltage
> > > range...
> >
> > Why ?
> > --
2007\03\05@172933
by
David VanHorn
Would it be silly of me to suggest a current mirror?
A pair of transistors, and a couple resistors.
2007\03\05@235811
by
Vasile Surducan
2007\03\06@044453
by
Alan B. Pearce
>Would it be silly of me to suggest a current mirror?
>A pair of transistors, and a couple resistors.
Well I thought of a current source and resistor, which at the most negative
voltage gives an output voltage close to 0V, and at minimum required
negative voltage gave close to 5V - IIRC he was looking to measure -15
to -10V. Only problem with this arrangement is that it gives an upside down
scaling.
A current mirror would be nicer if the measurement range did not scale 1:1
to the ADC range, and also has the advantage that minimum negative
corresponds to minimum positive input to the ADC.
2007\03\06@045102
by
Alexandre Guimarães
Hi,
> Would it be silly of me to suggest a current mirror?
> A pair of transistors, and a couple resistors.
Could you elaborate that ? It is not obvious to me how a current mirror
can be used in this application.
best regards,
Alexandre Guimaraes
2007\03\06@061238
by
Michael Rigby-Jones
|
>-----Original Message-----
>From: RemoveMEpiclist-bouncesTakeThisOuT
spammit.edu [EraseMEpiclist-bouncesspam
spamBeGonemit.edu]
>On Behalf Of David VanHorn
>Sent: 05 March 2007 22:30
>To: Microcontroller discussion list - Public.
>Subject: Re: [PIC] Measuring negative Voltages
>
>
>Would it be silly of me to suggest a current mirror?
>A pair of transistors, and a couple resistors.
>--
Simple current mirrors tend to have fairly crummy performance over temperature etc. but it might be good enough. We have used the Philips BCV61 and BCV62 (NPN and PNP) dual transistors for high side current measurement with "good enough" results.
Regards
Mike
=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================
2007\03\06@100318
by
David VanHorn
>
>
> Simple current mirrors tend to have fairly crummy performance over
> temperature etc. but it might be good enough. We have used the Philips
> BCV61 and BCV62 (NPN and PNP) dual transistors for high side current
> measurement with "good enough" results.
Zetex has one, packaged as such.
2007\03\06@100527
by
David VanHorn
On 3/6/07, Alexandre Guimarães <RemoveMElistasKILLspam
logikos.com.br> wrote:
>
> Hi,
>
> > Would it be silly of me to suggest a current mirror?
> > A pair of transistors, and a couple resistors.
>
> Could you elaborate that ? It is not obvious to me how a current mirror
> can be used in this application.
Ok, picture a mirror made with a pair of PNP transistors, with emitters to
VCC.
Set up the sensing side to go 1mA (or some other convenient number) when -V
is at max.
On the other side, you get 0-1mA which you can then sense across a 1k
resistor to ground as 0-1V, or scale any other way that's convenient.
2007\03\06@104242
by
Jens M. Guessregen / Mailinglists n/a
Hello,
> There are two issues here:
> 1. his input range is 0...-15V or the range to be measured
> is around -12V (say -10V...-15V ) ?
The nominal voltage is -12V. The voltage can have some tolarance, so
-10V to -14V is the allowed range.
On error, the voltage can somewhere between -14V and 0
> 2. it's unknown if the source is floated or not relative to
> the microcontroller ground
Source GND must be also PIC GND.
-12V is only one of 5 measured voltages, but all other are positive. But
all have the same reference GND.
Best Jens
More... (looser matching)
- Last day of these posts
- In 2007
, 2008 only
- Today
- New search...