Dave said:
What would be the basic setup for this approach? An oscillator on the
remote board that the PIC would monitor the frequency of?
---
No, I think that method would be too "drifty", and the frequency too
high because of the size of the plate.
What I'd do is something like this:
+HV +V +V +V
| | | |
| | | [R7]
[R1] [R2] | |
|| | | | +--[R6]--+
|| | | | | | |
|| |--+---[C2]---+------|----+--|+\ |
|| | | | | >--+
|| C1 [R3] [POT[<----|-/
___||___ | |
|___ ___|--+--------+------+
|| |
|| GND
||
||
||<--SPOKE
||
The fixed plate of C1 (the capacitor formed by the plate and the
wheel spoke) is charged up to some relatively high voltage through
R1, a high-valued resistor, and connected to C2, which is used to
block the DC bias, but to let through the change in voltage which
occurs because of the change in capacitance as the spoke passes by
the plate. R2 and R3 are also high-valued resistors which comprise
a voltage divider which serves to bias the comparator's
non-inverting input and set it at a particular voltage. The pot is
used to set the trigger threshold of the comparator, and when the
voltage on the non-invertiing input becomes more positive than the
voltage on the inveting input, the output of the comparator will go
high, then when the voltage on the + falls to below the reference
voltage on the - input, the output will go low. Properly adjusted,
there should be a single pulse out of the comparator every time a
spoke passes the plate. R6 is used to set the hysteresis in the
circuit, which will keep the comparator from chattering around the
switching point and generating multiple outputs for a single spoke
passage.
The nice thing about this circuit is that since a _change_ in
capacitance is all that's being detected, instead of some phenomenon
which depends on the absolute value of the capacitance, the drift in
capacitance (from whatever source) becomes unimportant. Also, the
amplitude of the output from the capacitor can easily be adjusted by
changing the value of the high voltage bias on the cap, which can
probably be used to advantage in dirty environments. Also, the cap
ought to be a snap to clean; just blow it off with an air hose when
it gets dirty.