Scaling voltage measurment cct.
Two series resistors. Voltage divider.
ACJacques
moparjody gravada:
> Dunno what happened to my last post?
>
> Anyways, what I want to do is measure a voltage using a similar
> circuit as is in
>
> http://www.parallaxinc.com/downloads/Resources/Stampworks/StampWorks_E
> xperiment_27.PDF
>
> This uses a national semi. Serial ADC to read in a variable voltage.
> This is for 5 volts, but the problem is, I want to read 12VDC.
>
> What is a quick and dirty way to scale this before putting it into
> the ADC?
>
> Thanks
> Jody
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
ACJacques
moparjody gravada:
> Dunno what happened to my last post?
>
> Anyways, what I want to do is measure a voltage using a similar
> circuit as is in
>
> http://www.parallaxinc.com/downloads/Resources/Stampworks/StampWorks_E
> xperiment_27.PDF
>
> This uses a national semi. Serial ADC to read in a variable voltage.
> This is for 5 volts, but the problem is, I want to read 12VDC.
>
> What is a quick and dirty way to scale this before putting it into
> the ADC?
>
> Thanks
> Jody
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Comments
Anyways, what I want to do is measure a voltage using a similar
circuit as is in
http://www.parallaxinc.com/downloads/Resources/Stampworks/StampWorks_E
xperiment_27.PDF
This uses a national semi. Serial ADC to read in a variable voltage.
This is for 5 volts, but the problem is, I want to read 12VDC.
What is a quick and dirty way to scale this before putting it into
the ADC?
Thanks
Jody
Connect a pot across your 12VDC input and ground. Take the wiper of the pot
to the ADC input, and set the ADC input at 5VDC with a full 12VDC across the
pot. At full scale - 12VDC the ADC will think it is seeing 12V.
In the processing section of your ADC read routine, the output of the ADC
will appear as "result" or something similar. For instance
AD0 = result
Now then you have to increase AD0 until it equals 12 VDC.
AD0 = AD0 * 2.4
The Stamp can't handle a decimal so you have to trick it a little by writing
AD0 = 48*/2 ' This will give you the equivalent of AD0 * 24.
At this point your ADC output will be something like 12000 if you are using a
12-bit ADC. To get this to a usable value, write:
serout 16, N9600, [noparse][[/noparse]"Voltage = ", dec AD0/1000, ".", dec3 AD0]
This is the general approach. It you are using an 8-bit or 10-bit ADC then
the numbers will have to be adjusted accordingly. If I can be of further
help let me know.
Sid
Where I wrote 48*/2. change it to
AD0 = 240*/100
That will make it a bit more manageable.
Sid
jody.gallant@s... writes:
> What is a quick and dirty way to scale this before putting it into
> the ADC?
>
Create a voltage divider with a precision (1%) resistors.
-- Jon Williams
-- Parallax (Author of "StampWorks")
[noparse][[/noparse]Non-text portions of this message have been removed]
Jody
--- In basicstamps@y..., Newzed@a... wrote:
> For Jody
>
> Connect a pot across your 12VDC input and ground. Take the wiper
of the pot
> to the ADC input, and set the ADC input at 5VDC with a full 12VDC
across the
> pot. At full scale - 12VDC the ADC will think it is seeing 12V.
>
> In the processing section of your ADC read routine, the output of
the ADC
> will appear as "result" or something similar. For instance
>
> AD0 = result
>
> Now then you have to increase AD0 until it equals 12 VDC.
>
> AD0 = AD0 * 2.4
>
> The Stamp can't handle a decimal so you have to trick it a little
by writing
>
> AD0 = 48*/2 ' This will give you the equivalent of AD0 * 24.
>
> At this point your ADC output will be something like 12000 if you
are using a
> 12-bit ADC. To get this to a usable value, write:
>
> serout 16, N9600, [noparse][[/noparse]"Voltage = ", dec AD0/1000, ".", dec3 AD0]
>
> This is the general approach. It you are using an 8-bit or 10-bit
ADC then
> the numbers will have to be adjusted accordingly. If I can be of
further
> help let me know.
>
> Sid
Sid
use a zener diode connected to the positive point and a resistor to ground,
the connection point between the 2 will read the input voltage minus the
zener voltage this method gives higher resolution. For example a 1N4741 and
a 4.7K resistor to ground will give a range of about 10 to 15 volts.
KF4HAZ - Lonnie
Original Message
From: "moparjody" <jody.gallant@
> Anyways, what I want to do is measure a voltage using a similar
> circuit as is in
>
> http://www.parallaxinc.com/downloads/Resources/Stampworks/StampWorks_E
> xperiment_27.PDF
>
> This uses a national semi. Serial ADC to read in a variable voltage.
> This is for 5 volts, but the problem is, I want to read 12VDC.
>
> What is a quick and dirty way to scale this before putting it into
> the ADC?
>
> Thanks
> Jody