Interfacing to a spark plug wire inductive clamp

Status
Not open for further replies.

DaveAK

Well-known member
I'd like to use a Teensy 4.0 to read engine RPM of my motorcycle by using a generic spark plug wire inductive clamp I bought through Amazon, (link), but I just don't know what circuitry to put between the clamp and the Teensy. Using my Analog Devices Discovery 2 scope I can see a very clean signal generated that's a little under 10V at idle (1350ish RPM as the engine was cold). However it looks like the sampling done might have a peak voltage over 25V so I didn't rev it up to see exactly how it responded because I didn't want to blow the scope up. Obviously I'm looking for some kind of 3.3V pulse to the Teensy but I'm not sure how to design something that will take a signal that possibly has some significant voltage variation. Something based around an opto-isolator maybe?

Any (polite :)) suggestions?
 
So I'm still struggling with this. I'm finding a lot of information, but can't quite put it together. Before I get to plugging things in to the Teensy, and making a circuit to condition the signal, I want to understand what I'm dealing with. Here's where I'm at so far:

  • Typical spark plug wire runs in the kV range at mA current levels.
  • Timing for engine will be less than 100Hz frequency / 10ms period, with a typical spark duration of 1-2ms. (Should be easily measurable with an oscilloscope.)
  • My clamp is a split-core current transformer (I think?) with 5 turns on the secondary, (I know 'cause I split it open and counted them).
  • This means that I'm getting 1/5th of the already low mA from the plug lead. Right? (I can't really measure it with a typical multi-meter because it's a pulse and not a constant current.)
  • And this is where my brain shuts down ...
I found this on current transformers during my search:

The secondary winding will supply a current into either a short circuit, in the form of an ammeter, or into a resistive load until the voltage induced in the secondary is big enough to saturate the core or cause failure from excessive voltage breakdown.
I think this is what I've been missing - a load with which to sink the induced current to. But I'm just shooting in the dark and stretching my limited electrical experience to its limits. I don't really understand anything after "resistive load".

I don't know the exact values of the system so I'm just looking to ballpark it so I can understand what I see in my scope. Using V=IR and assuming 1mA for the sake of argument, if I put a 5.6kOhm resistor across the clamp leads could I expect to see a 5.6V pulse on the scope? It'll do +/-25V so even if I hook the clamp backwards I should just see a negative pulse. Once I get into the realm of something measurable that I can understand I can work towards adding diodes to correct current flow and work from there. Right now I feel hopelessly out of my depth. :confused:
 
What sort of motorcycle is it? Perhaps this is an X -> Y problem and you could much more easily get your signal directly from the CDI or tachometer.
 
You can use a lower value load resistor to reduce voltage. The big issue is that spark current is highly variable - hence the limiter circuit.

If you want to learn/understand, I recommend putting the circuit into LTSpice.
 
Thanks guys! Here's some follow up.

What sort of motorcycle is it? Perhaps this is an X -> Y problem and you could much more easily get your signal directly from the CDI or tachometer.
2017 Harley-Davidson Sportster. Clamps like this are just a convenient way of getting to the timing without having to dig in to other wiring or components. Since they're a very common tool for this very job that's why I chose one. However, if I eventually install a coil-on-plug system then I'd need an alternate solution. I've thought about getting a signal prior to the coil, but I'd want a preexisting connection I can tap in to, or I'll be back in to measuring current flow with a clamp-on sensor I'd guess.

@DaveAK What is wrong with the circuit that defragster highlighted for you?
I don't think there's anything particularly wrong with the circuit, although I don't fully understand it, which isn't helped by having 3 components marked with red asterisks. Also I don't have the thyristor mentioned and don't want to pay $5 shipping for a 50 cent part. I want to understand what I'm doing better before I start ordering parts. Another concern is that one post mentions a clamp with 200ohm resistance suggesting many secondary turns, and mine isn't like that. Having said that the circuit is from a Sport Devices SP1 Dyno DAQ unit which I am currently using. It has a very simple clip on clamp with no turns and maybe is capacitance driven? Again just a very uneducated guess. If I can find where the image is referenced from maybe I could get more info. The link shows it's hosted on the Sport Devices server. The SP1 clip on clamp has a connector that isn't easy for me to test with otherwise I'd see what I could do with it.

connect teensy to CAN of bike, and read the RPM over the network?
I have already done extensive CAN work on this bike and isolated the RPM messages amongst others. Unfortunately the RPM is only output every 200ms and I feel like I need something more responsive for my dyno application. This was going to be my preferred method until I embarked down my current path. Just as an FYI because I know you're a CAN guy I do now have the ability to read and write the entire ECM map over CAN and I've decoded about 80% of it.

You can use a lower value load resistor to reduce voltage. The big issue is that spark current is highly variable - hence the limiter circuit.

If you want to learn/understand, I recommend putting the circuit into LTSpice.
So am I right in heading down the V=IR path? Only knowing that I'm working in the low mA range until until I get a corresponding voltage reading on my scope. Then depending on resistor value chosen I should be able to work backwards to calculate current to make sure I'm heading in the right direction.

And yes, the spark is highly variable and will need some kind of limiter circuit, maybe exactly like the one defragster originally linked. What I'm hoping to achieve is to first get a signal I can reliably measure and understand with my scope. Then try some circuitry with components that I do have on hand to see what improvements I can make. Once I have a comfort level with that I can move on to making a circuit that's Teensy friendly.

I've tried LTSpice before and didn't have much success. I can't remember what I was trying to achieve though. Maybe it's time to try it again now I have something specific in mind. I can model each of my steps and compare with actual observations. Is there anything comparable to LTSpice that'll work on Linux to save me breaking out my laptop?
 
your RPM should be broadcasted on the bus, but if latency is an issue you can request the PID for it to receive it within 2-5Hz rates, the bus one should be broadcasted live without the requests, I would check a different ID as sometimes the RPM can be in 2 different IDs, it is on my car anyways, usually it is the cluster that limits the speed as usually it acts as a gateway, takes live input and sends it on it's own ID at a different pace, my old car did that...
 
your RPM should be broadcasted on the bus, but if latency is an issue you can request the PID for it to receive it within 2-5Hz rates, the bus one should be broadcasted live without the requests, I would check a different ID as sometimes the RPM can be in 2 different IDs, it is on my car anyways, usually it is the cluster that limits the speed as usually it acts as a gateway, takes live input and sends it on it's own ID at a different pace, my old car did that...
RPM is broadcast on the bus and I have been able to isolate the PID and that's how I know it's only at 5Hz, (200ms period). It's very possible that it's broadcast on a different PID as I haven't deciphered them all yet, (in fact only a few with certainty), but I have a complete list of PIDs transmitted. There are some PIDs transmitted at 20Hz and some at 100Hz, and one curious one at 61Hz. There is of course an input to the ECM from the coil and I wouldn't know if it's the cluster that's producing the PID I'm reading or the ECM without further testing. While I could request a PID I'm trying to avoid putting anything on the bus that isn't already there.
 
I've been chipping away at this and found a great Youtube video on modeling a spark gap in LTSpice. Didn't really need to do this, but it was very useful in learning LTSpice with something I'm actually working on. I'm not sure how far I'll go with modelling the complete system but I enjoy learning new stuff. To that end I finally learned what the ubiquitous 555 timer actually does! And the purpose/operation of the thyristor in the example schematic defragster linked to. I also just read up on more of the specs of my bike's ignition system and have found that it has an Ion Sense input into the ECM that triggers on every spark, so that remains a possibility. And I've got some of the parameters of the coil itself should I decide to model that in LTSpice.

But right now I'm thinking of switching to a capacitive pickup instead of inductive. The example schematic linked to was from Sport Devices and showed the basics of their SP1/SP3 dyno DAQ's. I'm actually working on a replacement for an SP1, but it has a capacitive pickup not inductive, so I'm not sure why their diagram shows circuitry for an inductive one. Now my question is what can I hook this kind of pickup to? I have a CAP1188 capacitive touch board from Adafruit that I've never used but won't be suitable. I've read the datasheet and the cycle time is too great for my needs, besides not knowing what capacitance levels I'll be dealing with. I've found an Arduino based dyno project (Ardyno) that has a capacitive engine RPM sensor, but they show it being grounded to the bike, (I also found a Youtube video on making a capacitive clamp for the Ardyno that also showed this grounding). There's also a schematic with a 555 timer that I'm dissecting. The clamp I have has a single lead and the SP1 has no other connection to the bike. Can I mod the Ardyno circuit to work with a non-grounded clamp? I think I've got everything to breadboard both inductive and capacitive systems, except the thyristor for the inductive circuit. From what I understand from Wikipedia I may be able to swap that out for a couple of transistors but I'll have to double check that.
 
I would have just taken a timing light and use the LED/bulb to create a step down signal I can use in an Arduino. Just remove the bulb and you should be able to work from there. Plenty of options to convert that into a 3.3v or whatever signal. A timing light is cheap enough that it really isn't overly complicated.

In fact, even just disassembling one would be worth doing to see how one of those works.
 
Status
Not open for further replies.
Back
Top