Exact match. Not showing close matches.
PICList
Thread
'[EE:] Voltage measurement'
2003\12\01@185557
by
Matt Redmond
Hi All,
I need to measure the voltage present at a car battery -
but this is simpler (I think/hope) than a full-blown
voltmeter type thing.
Basically I care about only three states: A total lack of
power (e.g., V-no_battery = 0V), the engine is not running
(V-battery = about 12V) and the engine is running
(V-alternator = about 13-14V).
Any way I can do this by using just two inputs on my PIC?
I'd like to avoid a chip that has an a/d converter if
possible.
I'm not necessarily looking for someone to hand me a
complete solution - a point in the right direction would
be most useful. I'll learn alot if I just know what such
a circuit is called - I can Google for the rest.
Thanks!
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuT
mitvma.mit.edu with SET PICList DIGEST in the body
2003\12\01@190844
by
Matt Redmond
Awesome - thanks for the help!
On Tue, 2 Dec 2003 11:00:34 +1100
Jake Anderson <.....grooveeeKILLspam
@spam@OPTUSHOME.COM.AU> wrote:
>use a schmit trigger buffer combined with risistor
>dividor networks
>IE set it up so that one IO line is high when voltage is
>> say 10, one when
>> 13
>if both are off then there is no power ;->
>
>{Original Message removed}
2003\12\01@191712
by
Jake Anderson
actually check your datasheet
many PICs have schmid trigger inputs
(just be carefull, digital logic has 3 states, on off and screwed. my
understanding is schmidt trigger should keep you out of zone 3)
{Original Message removed}
2003\12\01@193549
by
Matt Redmond
|
Herbert,
I'm trying to use t5he smallest PIC possible for my
application and also don't want to burn up ports
needlessly. Of course, if the cost of external components
required to support this makes a bigger PIC the more
attractive option then that's what I'll do.
-matt
On Mon, 1 Dec 2003 19:22:03 -0500
Herbert Graf <mailinglist
KILLspamFARCITE.NET> wrote:
{Quote hidden}>> I need to measure the voltage present at a car battery -
>> but this is simpler (I think/hope) than a full-blown
>> voltmeter type thing.
>>
>> Basically I care about only three states: A total lack
>>of
>> power (e.g., V-no_battery = 0V), the engine is not
>>running
>> (V-battery = about 12V) and the engine is running
>> (V-alternator = about 13-14V).
>>
>> Any way I can do this by using just two inputs on my
>>PIC?
>> I'd like to avoid a chip that has an a/d converter if
>> possible.
>>
>> I'm not necessarily looking for someone to hand me a
>> complete solution - a point in the right direction would
>> be most useful. I'll learn alot if I just know what
>>such
>> a circuit is called - I can Google for the rest.
>
> Just wondering why you'd like to avoid one with
>A/D? Baring that, any PIC
>with a comparator on board can do that. Baring that? You
>can use an external
>comparator or op amp to do it. TTYL
>
>----------------------------------
>Herbert's PIC Stuff:
>
http://repatch.dyndns.org:8383/pic_stuff/
>
>--
>
http://www.piclist.com#nomail Going offline? Don't
>AutoReply us!
>email
.....listservKILLspam
.....mitvma.mit.edu with SET PICList DIGEST in
>the body
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspam_OUT
TakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body
2003\12\01@195407
by
Herbert Graf
> Herbert,
>
> I'm trying to use t5he smallest PIC possible for my
> application and also don't want to burn up ports
> needlessly. Of course, if the cost of external components
> required to support this makes a bigger PIC the more
> attractive option then that's what I'll do.
Hmm, ok, fair enough, how small? The 12F629 has comparators on board and
it's 8 pins? There is of course the 14pin version (can't recall the part
number at the moment... 16F630? If you need more the 18pin 16F628 would be
my choice. TTYL
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listserv
spam_OUTmitvma.mit.edu with SET PICList DIGEST in the body
2003\12\01@200652
by
Russell McMahon
|
> I need to measure the voltage present at a car battery -
> but this is simpler (I think/hope) than a full-blown
> voltmeter type thing.
> Any way I can do this by using just two inputs on my PIC?
You could use a zener diode that pulled a port pin high when 12v was present
and a slightly higher value one that pulled the 2nd pin high when say 13v
was present. Distinguishing between the two with non-precision thresholds
(either zener or Schmitt) could be slightly tricky.
If pins used were more important than components you COULD do this with 1
PIC pin. Have a cct that clamped the pin low when at say 12v, high when at
say 13+ v and float when << 12v. The PIC can then detect hi/low/float easily
enough.
Another approach to consider is that there will be voltages that change when
the motor runs - eg alternator output, detecting their presence would give
you a separate motor run indication. Also, direction of current flow will
swap in some locations when alternator runs and be zero when power is off.
Using a VCO (voltage to frequency converter) would allow the PIC to
determine voltage from frequency. An eg 555 or similar would do for this. No
voltage = no signal. This has the advantage of giving you somewhat more
information than just the simple go/no go system that you propose. Odds are
that this will prove useful in due course.
RM
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email @spam@listservKILLspam
mitvma.mit.edu with SET PICList DIGEST in the body
2003\12\01@204509
by
Jinx
> was present. Distinguishing between the two with non-precision
> thresholds (either zener or Schmitt) could be slightly tricky
And don't forget that an auto environment is not always a happy
place for a PIC. There are spikes and voltage fluctuations that
could give false readings if too simple an interface is used. You
should consider an RC filter at least, with external Schottky diodes
to protect the pins. The PIC's PSU should be well-buffered and
smoothed too, to avoid resets and other unwanted glitches coming
through Vcc or ground. Depending where the measurement is to
be done, it might even pay to metal-shield the circuit to stop eg
alternator / ignition noise or, as I've come across lately and had to
fix, interference from RT's that severely and adversely affected s/w
A comparator input will do what's needed
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email KILLspamlistservKILLspam
mitvma.mit.edu with SET PICList DIGEST in the body
2003\12\01@205340
by
steve
|
> Basically I care about only three states: A total lack of
> power (e.g., V-no_battery = 0V), the engine is not running
> (V-battery = about 12V) and the engine is running
> (V-alternator = about 13-14V).
> I'm not necessarily looking for someone to hand me a
> complete solution - a point in the right direction would
> be most useful. I'll learn alot if I just know what such
> a circuit is called - I can Google for the rest.
The magic term you are looking for is "window comparator".
However, are you sure this is what you want to be looking for ?
Do you want to know if the engine is running or do you want to know
what state the battery is in ? If you put your fingers near the fanbelt, you
will learn that they are different things.
You can expect the battery voltage to be high just after you turn the
engine off and you can also expect the battery voltage to be low just
after if first starts, especially if it was hard to start on a cold morning and
has a slow idle. Just something to think about.
If you power your circuit from the battery, then the battery not present is
solved because your circuit won't run. If the light is of ......
Steve.
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservTakeThisOuT
mitvma.mit.edu with SET PICList DIGEST in the body
2003\12\01@210831
by
Lucas Hartmann
You could measure the battery voltage using a RC circuit. The battery
voltage charges the capacitor through a resistor.
Connect the capacitor positive terminal to an input of the pic, so that,
based on how long it takes for the pin to go to HIGH you can approximate the
battery level. To discharge the capacitor, make the pin an output in LOW
logic level.
You will need a diode to prevent the capacitor from charging to 12V and
damaging the input pin.
(CAP+) ----|>|--- (+5v)
If using PIC12F629 you could use the T1G pin, so Timer1 count will be
proportional to the voltage.
Lucas Hartmann
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservspamBeGone
mitvma.mit.edu with SET PICList DIGEST in the body
2003\12\01@220652
by
Bob Blick
2003\12\02@082330
by
Olin Lathrop
Matt Redmond wrote:
> Basically I care about only three states: A total lack of
> power (e.g., V-no_battery = 0V), the engine is not running
> (V-battery = about 12V) and the engine is running
> (V-alternator = about 13-14V).
>
> Any way I can do this by using just two inputs on my PIC?
> I'd like to avoid a chip that has an a/d converter if
> possible.
Why? Two resistors and a capacitor tied to an A/D input seems like the
obvious and simple answer. Many PICs have a built in A/D, and there is
usually at least one in a subfamily.
You could do this with a couple of opamps or comparators. Since you don't
need high accuracy, you could use bipolar transistors instead as
comparators.
Another option is use a 12F675 to look at the voltage with its A/D, then
output the two digital signals you want.
*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com
--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-request
TakeThisOuTmitvma.mit.edu
2003\12\02@082332
by
Olin Lathrop
Matt Redmond wrote:
> Jake Anderson <grooveeeEraseME
.....OPTUSHOME.COM.AU> wrote:
>> use a schmit trigger buffer combined with risistor
>> dividor networks IE set it up so that one IO line is
>> high when voltage is say 10, one when 13
>> if both are off then there is no power ;->
>
> Awesome
Not really. Check the data sheet for the schmitt triggers and note that
very large range where the output could flip. It will be tough to guarantee
you can detect the different between 12 and 14 volts. Also, the hysterisis
will be working against you, not for you as in normal schmitt trigger
useage.
*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com
--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-request
mitvma.mit.edu
2003\12\02@112207
by
Tim Hart
|
One more thing to watch out for. A dead Lead Acid battery is not 0V. It's 12.00V or so. Each cell is about 2.0 to 2.2 volts....6 cells and it's 13.2 for fully charged and 12.0 for empty.
And I'm with the group on this one....a resister division network and a PIC with A/D is the way to go....
Tim
>>> RemoveMEolin_piclistEraseME
EraseMEEMBEDINC.COM 12/02/03 06:39AM >>>
Matt Redmond wrote:
> Basically I care about only three states: A total lack of
> power (e.g., V-no_battery = 0V), the engine is not running
> (V-battery = about 12V) and the engine is running
> (V-alternator = about 13-14V).
>
> Any way I can do this by using just two inputs on my PIC?
> I'd like to avoid a chip that has an a/d converter if
> possible.
Why? Two resistors and a capacitor tied to an A/D input seems like the
obvious and simple answer. Many PICs have a built in A/D, and there is
usually at least one in a subfamily.
You could do this with a couple of opamps or comparators. Since you don't
need high accuracy, you could use bipolar transistors instead as
comparators.
Another option is use a 12F675 to look at the voltage with its A/D, then
output the two digital signals you want.
*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com
--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspam_OUT
KILLspammitvma.mit.edu
--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestTakeThisOuT
spammitvma.mit.edu
2003\12\02@121948
by
Matt Redmond
|
Okay, thanks Tim & everyone else. I'll digest all of
these responses and figure out how to do it.
Tim - gotcha on the 'dead' battery. It's actually a
missing battery I'm worried about - fairly certain that
will be 0v :-).
It sounds like the most difficult thing is going to be
differentiating between engine on and engine off. Perhaps
I can set up a calibration routine where the chip measures
and stores the voltage readings during known engine-on and
engine-off states & thus is calibrated for that particular
alternator/battery.
Thanks!
-matt
On Tue, 2 Dec 2003 11:21:29 -0500
Tim Hart <EraseMETim.Hartspam
spamBeGoneHAWORTH.COM> wrote:
>One more thing to watch out for. A dead Lead Acid
>battery is not 0V. It's 12.00V or so. Each cell is
>about 2.0 to 2.2 volts....6 cells and it's 13.2 for
>fully charged and 12.0 for empty.
>
>And I'm with the group on this one....a resister division
>network and a PIC with A/D is the way to go....
>
>Tim
--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestKILLspam
mitvma.mit.edu
2003\12\02@141849
by
Tim Hart
|
Detecting the engine being on should be really easy....there are lots of ways... Hall effect sensor (or even reed relay) and a Magnet on a shaft. Lights that come on. Many things come on with the Key...in the case of car. Noise is easy to detect. Temperature sensor? Air flow sensor in the intake? The exhaust could spin a fan. I'd say noise would the easiest....that's the preferred method my brain uses....
Missing Battery? You might lose it? Someone stealing them?
Tell us a bit more about your project....we all love finding solutions :)
Tim
>>> mdredmondSTOPspam
spam_OUTCHARTER.NET 12/02/03 11:18AM >>>
Okay, thanks Tim & everyone else. I'll digest all of
these responses and figure out how to do it.
Tim - gotcha on the 'dead' battery. It's actually a
missing battery I'm worried about - fairly certain that
will be 0v :-).
It sounds like the most difficult thing is going to be
differentiating between engine on and engine off. Perhaps
I can set up a calibration routine where the chip measures
and stores the voltage readings during known engine-on and
engine-off states & thus is calibrated for that particular
alternator/battery.
Thanks!
-matt
On Tue, 2 Dec 2003 11:21:29 -0500
Tim Hart <spamBeGoneTim.HartSTOPspam
EraseMEHAWORTH.COM> wrote:
>One more thing to watch out for. A dead Lead Acid
>battery is not 0V. It's 12.00V or so. Each cell is
>about 2.0 to 2.2 volts....6 cells and it's 13.2 for
>fully charged and 12.0 for empty.
>
>And I'm with the group on this one....a resister division
>network and a PIC with A/D is the way to go....
>
>Tim
--
http://www.piclist.com hint: To leave the PICList
KILLspampiclist-unsubscribe-requestspamBeGone
mitvma.mit.edu
--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-request
EraseMEmitvma.mit.edu
2003\12\02@154751
by
Russell McMahon
> It sounds like the most difficult thing is going to be
> differentiating between engine on and engine off. Perhaps
> I can set up a calibration routine where the chip measures
> and stores the voltage readings during known engine-on and
> engine-off states & thus is calibrated for that particular
> alternator/battery.
Highest "engine off" voltage is almost certainly going to be higher than
lowest "engine on" voltage. The former at some period of running with a
light electrical load and the latter soon after starting. Also state of
battery over time will make the ranges vary, especially if the battery is
not well maintained.
There will be other points in the system other than the battery itself where
the conditions will be much better defined.
RM
--
http://www.piclist.com hint: To leave the PICList
@spam@piclist-unsubscribe-request@spam@
spam_OUTmitvma.mit.edu
2003\12\03@084601
by
rco.genovesi
|
Engine on: a possible idea..
wrap a small coil around one of the spark cables (ignition).
When the engine is on, probably (?) you can detect high voltage spikes that can sensed as a frequency by the PIC (before this, is necessary to convert these pulses to a lower voltage and to a clean wave with a simple circuit).
But if the engine is "Diesel" type..
regards
Marco
---------- Initial Header -----------
From : "pic microcontroller discussion list" spamBeGonePICLIST
KILLspamMITVMA.MIT.EDU
To : .....PICLISTspam_OUT
MITVMA.MIT.EDU
Cc :
Date : Tue, 2 Dec 2003 12:18:18 -0500
Subject : Re: [EE:] Voltage measurement
{Quote hidden}> Okay, thanks Tim & everyone else. I'll digest all of
> these responses and figure out how to do it.
>
> Tim - gotcha on the 'dead' battery. It's actually a
> missing battery I'm worried about - fairly certain that
> will be 0v :-).
>
> It sounds like the most difficult thing is going to be
> differentiating between engine on and engine off. Perhaps
> I can set up a calibration routine where the chip measures
> and stores the voltage readings during known engine-on and
> engine-off states & thus is calibrated for that particular
> alternator/battery.
>
> Thanks!
>
> -matt
>
>
> On Tue, 2 Dec 2003 11:21:29 -0500
> Tim Hart <
TakeThisOuTTim.Hart.....
TakeThisOuTHAWORTH.COM> wrote:
> >One more thing to watch out for. A dead Lead Acid
> >battery is not 0V. It's 12.00V or so. Each cell is
> >about 2.0 to 2.2 volts....6 cells and it's 13.2 for
> >fully charged and 12.0 for empty.
> >
> >And I'm with the group on this one....a resister division
> >network and a PIC with A/D is the way to go....
> >
> >Tim
>
> --
>
http://www.piclist.com hint: To leave the PICList
>
TakeThisOuTpiclist-unsubscribe-requestKILLspam
spammitvma.mit.edu
>
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
2003\12\03@085151
by
Hulatt, Jon
> >
> > Tim - gotcha on the 'dead' battery. It's actually a
> > missing battery I'm worried about - fairly certain that
> > will be 0v :-).
> >
> > It sounds like the most difficult thing is going to be
> differentiating
> > between engine on and engine off.
The alternator "no charge" warning lamp signal should be good enough. you'll
need to condition it a bit because it'll be a mucky 12 volts.
Jon
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
2003\12\03@100814
by
Alessandro Queri
> Engine on/off:
Once I saw you can measure rpm via a magnetic pickup on the
alternator. Just add an opamp to square the signal.
Ale
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
2003\12\03@110811
by
Bob Ammerman
I got the assumption that the OP was trying to determine the three states:
1: No battery
2: Engine off
3: Engine running
By only looking at a +12v line in the car, without any other sensors.
I would think that 2 vs. 3 could be distinguished easily by the amount/type
of noise on the line over a short period of time.
Bob Ammerman
RAm Systems
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
2003\12\03@144912
by
gtyler
Use thw "AUX" terminal on the alternator, +- 2v when the engine is not
running, = bat. voltage when it is running.
George
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
More... (looser matching)
- Last day of these posts
- In 2003
, 2004 only
- Today
- New search...