Hello,
I'm trying to capture engine RPM in diesels into an 18F series PIC, but it could easily be any uC because my question is about the circuit involved, not really about the PIC.
Background story, if you're interested:
<background story>
I originally/now am using an LM2907 frequency to analog converter to make an easy to read analog voltage for the PIC. This allowed me to "cheat" and not have to set up the CCP/timers/code for what is an already fully loaded/strained chip. However, the LM2907 really isn't working out very well because of its characteristics. At lower frequencies of the range it is configured for, there is more jitter and variance than at higher, which is exactly opposite of what I need. It also doesn't have near the resolution/accuracy that I need (at 600 rpm, it fluctuates from 600rpm readings to 1200rpm readings). There is also another, bigger problem - I need to be able to interface with not just crank angle sensors (1 pulse/rev) but cam angle sensors (2 pulses/rev), which changes the frequency range, which requires a physical capacitor change on the chip. This is a show stopper for a chip, but in software it's a simple matter to correct for.
</background story>
I don't have to worry about ignition coils and the dirty stuff they throw out since these will all be diesel engines and (obviously) they don't have spark plugs. So my RPM source must come from a hall sensor or an output signal from the PCM. Every engine out there will have a hall sensor on either the crank or cam, so that's the lowest common denominator I can use.
So my question is, what kind of circuitry can be used to interface a hall sensor (with a 0v to 15v range most likely, maybe higher) to a 5v max (or 3.3v max) input without altering the original signal on the line (which still must be used by the car's PCM)?
I was looking at optoisolators and they seem to be able to do the trick nicely. However, will sending the signal through the LED with enough amperage to light it up alter a hall sensor's output significantly? Also, it doesn't look like I should need to do any more cleaning up of the signal on the other side, before sampling by the CCP of the PIC correct? Are there any modern/popular optoisolator part numbers I should be looking at besides the 4N35 series?
Thanks,
Ray
I'm trying to capture engine RPM in diesels into an 18F series PIC, but it could easily be any uC because my question is about the circuit involved, not really about the PIC.
Background story, if you're interested:
<background story>
I originally/now am using an LM2907 frequency to analog converter to make an easy to read analog voltage for the PIC. This allowed me to "cheat" and not have to set up the CCP/timers/code for what is an already fully loaded/strained chip. However, the LM2907 really isn't working out very well because of its characteristics. At lower frequencies of the range it is configured for, there is more jitter and variance than at higher, which is exactly opposite of what I need. It also doesn't have near the resolution/accuracy that I need (at 600 rpm, it fluctuates from 600rpm readings to 1200rpm readings). There is also another, bigger problem - I need to be able to interface with not just crank angle sensors (1 pulse/rev) but cam angle sensors (2 pulses/rev), which changes the frequency range, which requires a physical capacitor change on the chip. This is a show stopper for a chip, but in software it's a simple matter to correct for.
</background story>
I don't have to worry about ignition coils and the dirty stuff they throw out since these will all be diesel engines and (obviously) they don't have spark plugs. So my RPM source must come from a hall sensor or an output signal from the PCM. Every engine out there will have a hall sensor on either the crank or cam, so that's the lowest common denominator I can use.
So my question is, what kind of circuitry can be used to interface a hall sensor (with a 0v to 15v range most likely, maybe higher) to a 5v max (or 3.3v max) input without altering the original signal on the line (which still must be used by the car's PCM)?
I was looking at optoisolators and they seem to be able to do the trick nicely. However, will sending the signal through the LED with enough amperage to light it up alter a hall sensor's output significantly? Also, it doesn't look like I should need to do any more cleaning up of the signal on the other side, before sampling by the CCP of the PIC correct? Are there any modern/popular optoisolator part numbers I should be looking at besides the 4N35 series?
Thanks,
Ray