Some context I'm working on building a data logging system for my school's Baja SAE team. Among other things, I want to record engine RPM. Unfortunately, the competition rules prohibit any sort engine modification, otherwise I'd just bolt a hall effect sensor near the flywheel to pick up the flywheel magnet.
From research I've already done, I came up with this, which sort of works. As far as why I chose those diodes, its just what I had lying around at the time. I don't have any particular need to use this specific circuit if you have an idea for something better.
When I attach the oscilloscope probe to point A, and the probe's ground clip to point B, I get this signal every time the spark fires:
That's an easy enough signal to trigger from after some filtering. However, I have a few problems:
Ground referenceI won't have a good path to ground for the data logger. Its battery powered, and at best, I can ground to the car chassis. I tried this by attaching a wire at point B and attaching it to the chassis. I then attached another oscilloscope probe at point B, to measure the difference between A and B. If it matters, the chassis is made of 41xx series steel, with some aluminium nonstructural components (I don't know exactly which alloys).
I got a bunch of signals that look like this, which are mostly useless, as there's no real difference between channel A and B.
Sometimes I got a usable signal (as follows), but it didn't happen every time, and I couldn't reliably replicate it.
Am I looking at this wrong? Is there any way to get this to work the way I want it to? Am I on the right track with it being a grounding problem? Is there a different way I should be measuring engine speed?
If this circuit will work, then I have another problem:
Signal variation and input protectionUsing the initial configuration, where the circuit grounds through the probe ground clip, I'm seeing significant variation in signal size when the engine is running:
If I add a diode between point A and the oscilloscope probe (1N4148), I get this:
Changing timescale, each spike looks sorta like this:
Aside from a lower-frequency lowpass filter, is there another way I should do input protection? Do I even need to worry about it? I need to prevent these spikes from damaging or interfering with other components on the datalogger (which runs at 3.3V). I've seen spikes as low as ~3.4V and high as ~8.2V pk-pk.