Searching \ for '[PIC]: Unknown Voltage on PIC pin.' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/power.htm?key=voltage
Search entire site for: 'Unknown Voltage on PIC pin.'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Unknown Voltage on PIC pin.'
2001\01\11@182546 by David Dunn

flavicon
face
i have an unknown voltage that will vary from about 0 volts up to about 30, and i need to determine what that voltage
is via a 16F877 pin.

i know that i could just do a simple voltage divider, put that on a A/D pin and figure it up.

what i'd like to do is find a way to get it without drawing current all the time.

i'm wondering if there's not somethign i could do with a known RC circuit and the PiCBasic POT or RCTIME commands to
determine what that voltage is .. with this setup i wouldn't be drawing current except when i execute one of those
commands.

i'll only need to check this voltage every 30 seconds or so.



thanks for any ideas you may have !



david dunn

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu


2001\01\11@190152 by Drew Vassallo

picon face
>i have an unknown voltage that will vary from about 0 volts up to about 30,
>and i need to determine what that voltage
>is via a 16F877 pin.

I don't know about the inputs of a 16F877, but I assume that 30V is a little
out of spec.

>i know that i could just do a simple voltage divider, put that on a A/D pin
>and figure it up.
>what i'd like to do is find a way to get it without drawing current all the
>time.

Then why not just put a transistor in to open the current path when not in
use?  Turn it on, take your reading, turn it off.

--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu


2001\01\12@025808 by Vasile Surducan

flavicon
face
You may use either a:
CMOS switch set on or off by a pic pin from time to time
or a high impedance input divider( giga ohms) using a FET operational
amplifier conected all the time to the signal.
Vasile


David Dunn wrote:
{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\01\12@070439 by Roman Black

flavicon
face
Drew Vassallo wrote:
>
> >i have an unknown voltage that will vary from about 0 volts up to about 30,
> >and i need to determine what that voltage
> >is via a 16F877 pin.
>
> I don't know about the inputs of a 16F877, but I assume that 30V is a little
> out of spec.
>
> >i know that i could just do a simple voltage divider, put that on a A/D pin
> >and figure it up.
> >what i'd like to do is find a way to get it without drawing current all the
> >time.
>
> Then why not just put a transistor in to open the current path when not in
> use?  Turn it on, take your reading, turn it off.

Do both together, turn the transistor on and power up
your 2R divider (so about 30v==5v), then turn it off,
and a small C on the bottom resistor will determine
the time to discharge, and the PIC pin can measure the
time to reach the 0.2v at the schmidt input low
threshold, time will be relative to the amount of
volts on the 2R divider at the start. This will
work. It will have to measure from 30v to about
4.8v minimum, as the PIC schmidt pin needs to exceed
0.8v to give high level.

It would take two pins and two transistors. ie,
PIC pin drives npn, drives pnp to turn on 2R divider.
And it is only good for 30v to 4.8v range.

Now I challenge someone to do it with ONE PIC pin!!
Or less/no transistors! Or better range!

Requirements:
1. must measure up to 30v
2. must draw no current from measuring circuit
when not needed.

:o)
-Roman

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\01\12@084721 by M. Adam Davis

flavicon
face
Use a resistor, cap, and zener (no a/d):

0-30vdc+-----/\/\/---+----------+-------PIC I/O
                    |          |
                    |          |
            +--|>|--+   +--||--+
            |           |
            |           |
            |           |
Gnd----------+-----------+

To take a reading, drop the pin to gnd for a few ms, then float the pin
and check it to see when it goes high.  Put it on an interrupt pin or
interrupt on change and you can just use a timer.  Put it on the CCP pin
in capture mode and you'll get the interrupt and the exact time when the
pin changes.

If the voltage is over 5 volts then there will be some current draw, but
only very little (much less than a regular voltage divider)

-Adam

Roman Black wrote:
{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\01\12@100438 by Roman Black

flavicon
face
M. Adam Davis wrote:
{Quote hidden}

Sorry no prize! ;o)
It doesn't totally switch off. And the current
draw will be identical to the 2R voltage
divider, as at 30v the top resistor will
still drop 30v-5v and I =E/R
I do agree that at lower voltages approaching
5v it will draw a bit less current though.
-Roman

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\01\13@200925 by Oliver Broad

flavicon
face
OK Usual disclaimer, this is an untested circuit but...

Take an N-type logic level FET. Connect the gate to PIC VDD and the source
to the measuring pin. Put the capacitor between the pin and ground, the
resistor between the drain and the voltage. Drive the input pin high and the
FET turns off. No drain at all. Drive the pin low then float it and measure
the charge time. Obviously the pin will not rise above the Vdd-FET Vth but
this should not be a problem.

Oliver.


{Original Message removed}

2001\01\14@034020 by Roman Black

flavicon
face
Oliver, that is *extremely* clever!
I have saved your email for future reference.
I think you could even use a high voltage
FET to measure high (100v+) DC voltages.
Brilliant. And has total turn-off for
low power. :o)
-Roman



Oliver Broad wrote:
{Quote hidden}

> {Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...