'Current detection with a PIC?'
I need to detect a change in current using a PIC. I am using the PIC16C73
and was wondering if the A/D would be the way to go. The application needs
to detect a current pulse from a load that is a minimum of 500usec wide and
a maximum of 5msec wide. The pulse is the response to a command. The PIC
only needs to determine if the command was acknowledged or not. The ack
pulse will be at least 60ma above the normal current draw. I think normal
current draw is from a few ma to over 500ma. The drive voltage to the load
is a bipolar wave as follows:
| | |
0 | | | with a pulse width of ~58usec.
| | |
-v ____| |____|
I thought about using a resistor in the return line and sensing the voltage
across the resistor, but with a wide range of possible "idle" current levels
it seems kinda hard to get the needed resolution.
|Norm Cramer wrote:
Using your sense resistor you could:
a) use a high pass filter to monitor the voltage across it
b) use a peak detector to monitor the voltage across it.
Since it appears you only are trying to see if the ACK was received
or not the A/D is overkill. A comparator is more appropriate. (OTH,
if it's already there ...) Even though I've been recently reamed by
the PIC16C622's comparators, I can still recommend them for this
Aside... A complaint not worthy of its on message:
The PIC16C622 comparators have one mode that brings the comparator
outputs off of the chip. Typically, you would want to use these outputs
as part of a hysteresis circuit. Unfortunately the comparators have
been designed (mis-designed) in such a way that it is nearly impossible
to use them this way. While I don't totally agree with everything in
Martin's PIC wish list, I would think it would be nice if you could
program the comparator's output polarity....
More... (looser matching)
- Last day of these posts
- In 1996
, 1997 only
- New search...