Spark plug tachometer - Page 1
Forum section: electronics / beginners

author: RyersonBaja
author_rank: Contributor
timestamp: July 22, 2017, 07:39:06 pm
content: Some contextI'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.

author: tpowell1830
author_rank: Frequent Contributor
timestamp: July 22, 2017, 08:49:19 pm
content: Are you doing the circuit because you need it, or just to say you designed it? There is a device that you can purchase for this that uses the spark plug for tachometry.https://www.amazon.com/TOOGOO-Engine-Digital-Tachometer-Motorcycle/dp/B00JQ1XRIG

author: Benta
author_rank: Super Contributor
timestamp: July 22, 2017, 08:50:21 pm
content: QuoteSo wrapping a wire around an ignition cable is NOT a modification? Something strange about those rules.Apart from that, capacitive coupling to the ignition cable will likely give you much better results. There is almost no current there, but lots of voltage.

author: RyersonBaja
author_rank: Contributor
timestamp: July 22, 2017, 09:01:32 pm
content: Quote from: tpowell1830 on July 22, 2017, 08:49:19 pmI know about that. I need data logging, so that's useless for me unfortunately.Quote from: Benta on July 22, 2017, 08:50:21 pmNo, it's not, because it doesn't change anything about the engine. Drilling and tapping a hole in the engine case to mount a hall effect pickup for the flywheel magnet would be a disallowed modification.This circuit is already using capacitive coupling, unless I'm completely misunderstanding how it works. Only one end of the wire wrapped around the ignition line is connected to the circuit. The other hangs free. Think of it more like an antenna.

author: Fraser
author_rank: Super Contributor
timestamp: July 22, 2017, 09:23:38 pm
content: I have a tool called Road Dyno that logs engine revolutions and does some clever maths with the cars specs to work out 0 to 60 times and rough BHP.The bit that may interest you is that the syste uses two input methods. It can collect ingnitiin timing using a direct connection to the ignition coil switched primary it via an inductive coupling clamp on the HT lead, similar to that used with timing lights. They are available as spare parts or you can make one with a clip on EMI inductor with some wire wrapped through it as a secondary output.Modern cars often have a tachometer signal output on the ECU and that can be used as a clean tachometer signal.If you look for road dyno projects you should find various projects including one called Street Dyno that uss a simple tap on the HT coil to pick up the signal, filter it and pass it to a PC's sound card. The sound card is used as an A to D and the software reads the revolutions of the engine. I will see if Incan find the project for you.I used it before buying Road Dyno and it worked well.Fraser

author: Benta
author_rank: Super Contributor
timestamp: July 22, 2017, 09:27:02 pm
content: QuoteI'm going out on a limb here, but would placing an IR-reflective sticker on the crankshaft belt pulley and placing a reflective sensor across from it (using double-sided tape, of course) be against the rules?

author: tautech
author_rank: Super Contributor
timestamp: July 22, 2017, 09:29:20 pm
content: For shits and giggles years back I just wound a few turns around a bit of ferrite rod from an old transistor radio, terminated it with a resistor and connected the probe and reference lead across it.Works fine as a non-contact inductive pick up tacho using the scopes inbuilt frequency counter........for a auto engine multiply by 2 and then 60 to get RPM.

author: HighVoltage
author_rank: Super Contributor
timestamp: July 22, 2017, 09:32:53 pm
content: Wrap a piece of aluminum or copper foil around the spark plug wire.Connect it to a second capacitor to ground and build a 1000:1 capacitive divider and your circuit is done.Or just place the copper foil on the outside of the coil housing, that will also work.

author: Fraser
author_rank: Super Contributor
timestamp: July 22, 2017, 09:41:46 pm
content: Links.....My Road Dyno kit....http://www.dynoplus.co.uk/roaddyno.shtmlThread containing useful links.....http://www.fuelly.com/forums/f10/home-dyno-program-still-around-9563.htmlStreet Dyno.......http://www.pelicanparts.com/techarticles/streetdyno/street_dyno.htmNote there are other ways to capture RPM data. I know nothing about your vehicle so it is hard to offer more comment. Modern cars use individual ignition coils for each cylinder but as you are trying capacitive coupling your vehicle appears conventional ignition coil plus HT leads to spark plugs. I us Road Dyno with an Rover 'A' series engine in my Mini Moke.P. S. Capacitive coupling is my least favourite pick-up method. There are oscilloscope leads sold by PICO and others that uses a simple clip on capacitive coupler. It works but I did not like it much.Fraser

author: Rerouter
author_rank: Super Contributor
timestamp: July 22, 2017, 09:52:13 pm
content: For automotive, this is my go to counter circuit, its meant to drive a schmitt trigger micro input. the 30pF capacitor act as the low pass filter,the op amp is primarily to maintain a correct center point, its essentially your sensitivity control, if your getting false positives you would adjust RV7 closer to ground. this is used to make the circuit follow the largest frequency and not the noise. with a re-locking time of about 0.3s if the signal changes amplitude greatly.the C18 capacitor solves the ground reference issue, while R25 makes sure there can never be a damaging amount of current in, and D4 protects the transistor for the negative swing.

author: Fraser
author_rank: Super Contributor
timestamp: July 22, 2017, 09:53:18 pm
content: An important question....... does the vehicle already have a tachometer fitted ? If it does, and it is electronic rather than mechanical, you can obtain a good techno signal from the input to the instrument. No engine Mod involved.Fraser

author: floobydust
author_rank: Super Contributor
timestamp: July 22, 2017, 10:16:17 pm
content: Spark plug wiring generates a ton of broadband RFI, it's a fast pulse with lots of ringing.So I think your datalogger will get a lot of noise on its GND. It could mess up your other sensor signals.You'll see varying spark amplitude depending on firing voltage- misfires, hard acceleration etc. will move that around.If this is a motorcycle engine with one coil (dual output) per two cylinders, a cylinder's spark voltage alternates high/low.This all would make me not favour the capacitive-coupling approach.You could tie into the existing crank position sensor, where it feeds into the ignition module. Probably a variable reluctance pickup.Not sure if tieing into an existing wire is considered a "modification". There may be a provision for a factory dashboard tach on the old wiring harness, connecting to the coil primary.Automotive timing lights have a clip-on inductive sensor, like thisripoff of Silicon Chip Magazine's timing light article.A split ferrite-core on the spark plug cable, with 100turns.Or an inductive pickup near the ignition coil to pickup its flux.

author: MarkS
author_rank: Unknown
timestamp: July 22, 2017, 11:49:36 pm
content: I assume the vehicle is a 100% custom project with no OBD II port?

author: SkyMaster
author_rank: Frequent Contributor
timestamp: July 23, 2017, 01:53:13 am
content: Quote from: MarkS on July 22, 2017, 11:49:36 pmBaja SAE engine used to be Briggs & Stratton engine, single cylinder with the spark plug powered from a magneto. Cannot be more basic than this.RyersonBaja will probably come back and confirm if this is still the case.

author: MarkS
author_rank: Unknown
timestamp: July 23, 2017, 02:37:19 am
content: Quote from: SkyMaster on July 23, 2017, 01:53:13 amAh. When I saw "Baja", I was thinking about the cars they race there.

author: RyersonBaja
author_rank: Contributor
timestamp: July 23, 2017, 03:29:01 am
content: Quote from: tautech on July 22, 2017, 09:29:20 pmHuh. I'll try that. I'll let you know later this week how it goes.Quote from: Fraser on July 22, 2017, 09:23:38 pmI'll have a look at it. I don't entirely think it will do what I need. I want engine RPM and rear wheel speed in the same data set. Right now we're using a CVT, and this data will help immensely in adjusting the CVT springs to give us the gear ratios we want. We know that we need to replace the CVT springs to be less stiff, we're just not sure quite how much yet.Quote from: Rerouter on July 22, 2017, 09:52:13 pm@Rerouter:I'll try that later this week. Seems like it will work better than what I have. Will probably also give me better RFI protection.Quote from: Fraser on July 22, 2017, 09:53:18 pmQuote from: MarkS on July 22, 2017, 11:49:36 pmQuote from: SkyMaster on July 23, 2017, 01:53:13 am@Fraser, @MarkS, @SkyMaster: Yes, this is the engine:http://www.briggsracing.com/racing-engines/model-19It uses a carburetor, and the spark is driven by magneto. No electronic controls on the engine. It doesn't come with a tachometer (otherwise I'd just use that). If I was allowed to modify the engine, there's quite a bit of work I'd do. It feels very underpowered.Quote from: floobydust on July 22, 2017, 10:16:17 pmI generally agree about not liking capacitive coupling. It was just my first attempt at this.The RFI from this is one of my big concerns, as I will have other sensors feeding analog signals into the board (I haven't finished the board design yet). I don't have a crank sensor or I'd just splice into the wiring and use that signal directly. Its a magneto driven by a magnet on the flywheel. I would prefer to use an inductive pickup - do you have any suggestions on buying/building one for cheap?I unfortunately don't have a timing light I can rip apart. I could buy one if that's the best way to do this, but I have a feeling its not. Also I'd be concerned about size and durability - they seem kinda bulky and don't clip on securely. Wouldn't want to drive around with it hanging on the back. This is an offroad car. Competition generally looks like this:

author: Monkeh
author_rank: Super Contributor
timestamp: July 23, 2017, 03:54:40 am
content: Quote from: RyersonBaja on July 23, 2017, 03:29:01 amIsn't that the point?

author: tronde
author_rank: Frequent Contributor
timestamp: July 23, 2017, 03:58:20 am
content: What you describe was in fact used as a RPM sensor in some cars in the late 1970's. You have the same functionality with the inductive timing lights. Here is a cuircuit based on the same idea. Have no experience with it, but should be cheap and easy to test.http://www.dragonfly75.com/motorbike/timinglight.htmlElse you can try to find a cheap timing light and modify it.

author: tautech
author_rank: Super Contributor
timestamp: July 23, 2017, 03:59:34 am
content: Quote from: RyersonBaja on July 23, 2017, 03:29:01 amOh, Briggs & Stratton...........probably a spark every revolution then.

author: floobydust
author_rank: Super Contributor
timestamp: July 23, 2017, 06:19:47 am
content: The engine probably uses solid-core ignition cable and that is notorious for RFI.I would put a sensor to pick off the magneto magnet on the flywheel.If you can mount one in the fan cover. A variable-reluctance inductive sensor, or hall-effect. The magnet is pretty strong but the flux concentrated on the inside of the flywheel I think. I don't really know this motor. Try put a screwdriver near the flywheel and see if the magent pulls.You need a RPM sensor on the input and output shaft of the CVT, so that might be a better place.Vibration on this Baja is gonna be the killer.tronde, that dragonfly75 circuit is full of errors, I would not use it.

author: Rerouter
author_rank: Super Contributor
timestamp: July 23, 2017, 10:29:13 am
content: note that with my circuit you would ideally run twisted pair to the coil. the current is limited by the resistor, but you still dont want it acting as an antenna.

author: AndrewM
author_rank: Contributor
timestamp: July 24, 2017, 04:14:51 pm
content: Quote from: Rerouter on July 23, 2017, 10:29:13 amFor your circuit, what do I connect pin 1 to? Where does the other wire from the twisted pair connect?Is this meant to tie into the spark coil output, or pick up the signal from the spark line by wrapping around it?If it ties into the spark coil directly, I can't use it.

author: Rerouter
author_rank: Super Contributor
timestamp: July 24, 2017, 08:18:19 pm
content: 1 side to ground, 1 side to freq0, of the coil.

author: amyk
author_rank: Super Contributor
timestamp: July 25, 2017, 02:45:40 am
content: Quote from: Benta on July 22, 2017, 09:27:02 pmIf what counts as a "disallowed modification" is anything difficult or impossible to reverse, then what about reusing one of the existing bolts for the covers etc. to hold a bracket for a sensor? Then it could be removed easily and with no trace of its existence.

author: RyersonBaja
author_rank: Contributor
timestamp: July 25, 2017, 03:38:17 am
content: Quote from: amyk on July 25, 2017, 02:45:40 amThe "disallowed modification" rule is pretty much that - no permanent modifications to the engine, no modifications that change how the engine operates.I'll have another look at it the next time I'm at school (won't be until friday, maybe next monday), hall effect sensor triggered by the flywheel magnet would be the best option, if I can find somewhere to mount it.I can't reliably use anything optical because of how much mud gets everywhere.If you look here:http://www.briggsracing.com/sites/default/files/m19-dimensional-drawings.pdfYou'll sorta see the problem. There's that big shield containing the pull starter covering the flywheel. I'd need to find space in that to mount the sensor. I'll pull it off and look next time, I might be able to fit something inside. I guess I could also mount it on the gearbox side of the clutch, but its not really any easier to fit it there either. Your plan of using an existing bolt hold would work, as long as it didn't interfere with the bolt's original purpose.I was hoping to be able to pick up something off the spark line because its just easier mechanical-wise, even if the circuitry is a little more complicated. I'll try tautech's and Rerouter's ideas, and if neither of those work, then I'll have to find somewhere to mount a magnet + hall sensor, or hall sensor to pick up the flywheel magnet.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 25, 2017, 07:08:44 am
content: Quote from: RyersonBaja on July 22, 2017, 07:39:06 pmyou already have a good circuit to start with. except you want to do better filtering so you get a nice single pulse ideally. have you tried moving 1N4735 to 1N4148's cathode? and change to bigger capacitor value to get nicer pulse? and then the output A (B = ground) connected to mcu handling interrupted pin? misfire is not an issue i guess since engine is a mechanical system there is no way a piston can mistep in non-disaster condition, so you can presume that in mcu programming (any misfire can be predicted as misfire) (read averaging or natural averaging nature). another engine's trait that you can presume is its should be no more than 6000 - 10000 rpm depending on your system, so any spike/interrupt that result in rpm calculation greater than this is a false spike. so you can delay at some proper timing after an interrupt has been processed.btw, at first thought yesterday i was about to suggest tapping from ecu digital tacho line normally available in modern consumer vehicles as someone suggested earlier, but after looking at the baja competition video, i believe tapping the spark plug line is the simplest non intrusive one can get, if ecu is not available. i built almost similar concept as yours few years ago for detecting when a camera flash is burst by using an inductor placed near the flash light.

author: tautech
author_rank: Super Contributor
timestamp: July 25, 2017, 07:58:52 am
content: Quote from: RyersonBaja on July 25, 2017, 03:38:17 amFacts are most small engine shops use some sort of inductive wireless tacho for all repair and tuneup work.A couple of typical examples:https://www.jackssmallengines.com/jacks-parts-lookup/part/husqvarna/502711401http://www.baileysonline.com/Chainsaw-Parts/Repair-Tools/Tachometers-Ammeter/Oregon-Wireless-Tachometer.axdBoth these units are non-contact and are used in only close proximity.For low RPM stuff like Briggs you can also use a Treysit Sirometer, a vibro tach with a resonating wand that when adjusted to max vibration you read the RPM off the scale. Not practical for anything but hands-on use but reasonably accurate all the same.Knock something up based around a length of ferrite rod like I suggested, shunt it to remove unnecessary amplitude and maybe limit the output with a clamp then into a counter.Your lawnmower, motorbike or car can provide a RFI source while you get it all sorted.

author: Fraser
author_rank: Super Contributor
timestamp: July 25, 2017, 12:15:21 pm
content: One question...... As this is not Formula 1 where telemetry is streamed to a pit crew / huge technical team who can tweak settings..... why do you want this logger running during competition ? I would have expected a logger such as you describe to be fitted during vehicle testing and setup. That is to say. You can mount whatever you like to the engine during testing and engine profiling. You just unbolt the sensor package and logger on competition days. Nothing 'illegal' about that.I would fit all manner of sensors to the engine when doing testing runs. Monitoring head temperature, air temperature, exhaust gas CO content, RPM, Ignition waveform and ground speed (via a wheel sensor). The 'package' could be easily fitted for testing and designed to be easily removed when in competition. With such comprehensive data you could learn a lot about engine behaviour. The B&S engine is a simple beast and not exactly 'raced tuned' or the most reliable of ignition systems. Misfires would cost performance. Spark Plug gap is important and a decent HT level to the spark plug is essential. If your B&S still uses points to create the spark, timing them and gap setting is critical to performance. You really should be monitoring such during testing.Correct fuel to air mixture is also a challenge with the simple B&S carburettor. The CO Monitor would give an idea of how well the carb is coping with different throttle settings. You should be allowed to tweak idle mixture on the carb as that is unique to each engine. Changing jet size is likely not permitted though.Fraser

author: Raj
author_rank: Frequent Contributor
timestamp: July 25, 2017, 02:25:30 pm
content: Can"t attach a magnet? use optical tech

author: RyersonBaja
author_rank: Contributor
timestamp: July 25, 2017, 07:53:47 pm
content: Quote from: Fraser on July 25, 2017, 12:15:21 pmMajority of our testing is done at competition events, where we get practice/setup time on the track before the competition stages, and time between stages we can work on the car. We might only get 2-3 days of testing outside competition. The easily removable bolt-on sensor is what I'll do if I can't get it working any other way.I'd love to do a lot of that basic engine work, but there's no point for most of it. We can adjust spark plug gap and idle speed, but that's about it. Spark is triggered by a magneto, which is bolted onto a fixed mount on the engine block. No adjustment there either.The only meaningful engine adjustment we can make is idle speed. So we can play with that, and then adjust the centrifugal clutch appropriately.http://bajasae.net/content/2017_BAJA_Rules_1_3_2107.pdfSee page 10/11/12 if you're curious about the rules.The purpose of this datalogger is really two sets of measurements - suspension behaviour and CVT/gearbox behaviour.The datalogger will record suspension movement and wheel speed for all four tires independently. It also has an accel/gyro to measure car body movement. We can use this to make suspension adjustments - we are using adjustable dampers, and can preload the springs, or change them out for springs of different stiffness without too much difficulty.The other task is to measure wheel speed vs engine speed and throttle load. Throttle load is easy - just a potentiometer spun by the throttle cable. So is wheel speed - magnet on the wheel, hall effect sensor nearby. The accelerometer data will let us know approximately how much the wheels are slipping during acceleration. We can change CVT spring preload or even replace the CVT springs to change the gear ratios.

author: larrybl
author_rank: Regular Contributor
timestamp: July 26, 2017, 02:53:28 am
content: Interesting thread, I use a Harbor freight infrared Tack to set the RPM's on these. Requires that I stick a reflective tape on the blower housing to get a reading. Most of these are twin cylinders but the plugs fire on every revolution. I have been looking for a cheep but reliable, and decent tachometer that I can add to these. The one I am thinking of trying is thishttps://tinytach.com/

author: RyersonBaja
author_rank: Contributor
timestamp: August 03, 2017, 04:58:20 am
content: Quote from: tautech on July 25, 2017, 07:58:52 amGot around to trying the inductive tach today. I took a ferrite core from an old radio, wrapped some wire around it, shunted the ends with a 100ohm resistor, and took some measurements. One end of the resistor was tied to the chassis as a "ground" reference. I confirmed that I had good contact to the engine block with an ohmmeter.The following measurements were done with 10x probes, on a Rigol DS1054z.This works nicely, I'm getting a good difference in signal across the resistor, although it seems to vary a fair bit.Those all seem to get caught using the segmented memory. When I zoom out to try to see all the pulses, it doesn't seem to catch everything. I have a feeling this is more to do with the oscilloscope recording such a short signal on a long timescale, but I'm not sure.Of course, these all have much too large of a signal to be useful for me. Switching the probes to 1x significantly attenuated the signal. (and yes, I made sure the oscilloscope was set to 1x mode when I switched the probes - it was set to 10x mode, as appropriate, for the above images). Signal amplitude still varied quite a bit.Once again, I have the same issue where it doesn't seem to be catching every spark. For reference, the engine is idling at ~1200RPM, or ~20Hz. Maybe a little faster.Am I on the right track that the "lost" signals on the 50ms timescale are not actually lost signals, but a limitation of the oscilloscope?Any suggestions on filtering this signal?I was thinking I could connect either end of the shunt resistor, through low pass filters, into a differential amp. Differential amp output would go into an adjustable schmitt trigger (trimmer potentiometers on the board, so I can adjust it if needed). That goes into a monostable multivibrator, which sends a clean pulse to the microcontroller.My main concern would be keeping as much noise as possible out of my power/ground planes on the board. Everything is running at 3.3V.I would be concerned about signals that are too large, even after the lowpass, going through the diff amp's protection diodes to the board's power/ground plane. Is this worth being concerned about or am I overthinking it?Would two opposing zeners in parallel with the shunt resistor work? If this can be done, considering the signal pulse is ~20MHz, how do I ensure I choose zeners that are fast enough?

author: tautech
author_rank: Super Contributor
timestamp: August 03, 2017, 06:10:01 am
content: You're making this harder than it needs to be.Cut the multi channel and Math BS, it's not needed. Too much info and it's just not needed.We/you don't need to examine individual pulses in any detail only know that they are there and see the amplitude. The more that are on the display the more accurate the frequency measurement will be......not that it matters for other than proof of concept. A 20ms timebase setting is plenty slow enough.No need for a chassis reference as the measurement can be made just across the winding.Use only one channel and an amplitude setting that is sufficient to get all pulses above the trigger setting.1200 rpm should equate to 20 Hz (sanity check)For interfacing with a micro the shunt on the pickup coil can be changed to adjust the amplitude but you should add some way to limit the amplitude, signal diodes series'ed across the windings to get above the input threshold but little more, certainly stay less that the micro max input rating. A Schmitt trigger as a buffer will work too with similar protection.

author: tron9000
author_rank: Frequent Contributor
timestamp: August 03, 2017, 08:09:44 am
content: You say the rules say not modification to the engine, but what about the input to the transmission? its there any part of the transmission input coupling you can modify with a pickup sensor?

author: Delta
author_rank: Super Contributor
timestamp: August 03, 2017, 05:43:57 pm
content: Take the signal from the magneto killswitch wire.Or is this considered as a modification?

author: floobydust
author_rank: Super Contributor
timestamp: August 03, 2017, 08:00:29 pm
content: I worked on Formula SAE and it was a lot of fun.You can try a building block approach - you need to rectify, filter out HF artifacts, clamp voltage and one-shot to prevent false-triggering from the ringing.I would try a discrete transistor solution like this, values are out of a hat as a start. Or perhaps other members have a circuit in mind.It's really trying to perform 4-5 functions in few parts.R2 gives a small load to the pickup coil to dampen ringing. Adjust for good pickup coil amplitude at lowest ? (idle) speed. I don't know your coil at all, 1-10ktypical.The pickup coil is not hard-grounded to the engine to prevent conducting RFI from the ignition system coming in to the logger, so R3 100R.R1/C1 give a bit of HF filtering above ~5kHz. Easiest to adjust R1 there.D1 clamps -ve excursions and Q1 turns on only on +ve excurions.R5/C2 are a pulse-stretcher ~0.3msec. But not ideal as exponential ramp, so a second transistor might be added there. If the logger has Schmidt trigger inputs should be OK.I would experiment with the values and see if there is hope. A textbook solution uses an instrumentation amp, comparator, one-shot but a bit complex and fragile on a baja run.So simplicity is what I prefer to start with.

author: RyersonBaja
author_rank: Contributor
timestamp: August 05, 2017, 06:30:06 pm
content: Quote from: tautech on August 03, 2017, 06:10:01 amThanks.Test circuit I threw together quickly out of stuff I had lying around. Why 12v? I had a car battery nearby. It was a dead battery, so actually 11v, but close enough.Result:Thanks. I'll play with it a little more, but that should work.Quote from: floobydust on August 03, 2017, 08:00:29 pmStill more complex than I need. Also I'm not at all concerned about fragility - its all getting soldered onto a PCB, which is then going to be in a waterproof case, mounted securely somewhere in the car.

author: floobydust
author_rank: Super Contributor
timestamp: August 05, 2017, 07:53:41 pm
content: Um that circuit is not doing what you think. Remember the input signal is AC. Your scope shows 1/2 wave because the op-amp is not biased at 1/2Vcc for -ve pulses.No biggie, but I would have some resistance before the clamp diodes to limit the current pulses they will see. There could be enough DC resistance in your coil for this.Right now, you get 8.64Vpk output and +/-0.7V input, but gain is sorta less. Unless scope probe was 10X but numbers should jive.

author: rbm
author_rank: Regular Contributor
timestamp: August 10, 2017, 12:38:23 am
content: I work on a BMW K75 motorcycle as a hobby-interest, a family of motorcycles which is popular to customize into cafe racers. One problem encountered by customizers with this bike is getting a good solid engine RPM signal for the aftermarket tach. Most try to use either a spark-wire pickup or reading the RPM signal fed to Pin 16 on the OEM cluster. The end result is usually an unstable tachometer needle that varies wildly.Based on the circuit that Floobydust presented above, I came up with a circuit that functions excellently in this application and may be useful for the OP's baja project. Instead of trying to condition the secondary signal picked up using a ferrite-cored coil, I am tapping into the signal sent to the primary of coil #1. I wrote up my how-to in the following article:http://www.k100-forum.com/t12786-rpm-signal-conditioning-circuit-to-prevent-aftermarket-tachometer-needle-instability#151513

author: tautech
author_rank: Super Contributor
timestamp: August 10, 2017, 01:01:50 am
content: Quote from: rbm on August 10, 2017, 12:38:23 amIt mightn't work on Briggs & Stratton as the ignition is one sealed magneto driven unit. The only possible other point (other than inductive) is the Stop wire.....but you'd need to put a scope on it to see if there's a signal that's related to rpm.

author: floobydust
author_rank: Super Contributor
timestamp: August 10, 2017, 04:23:03 am
content: This Briggs engine seems designed just for this competition. It has an alternator option that you could also pick RPM off of, but I think this motor has no starter/battery?OP can't really connect things, they are seen as "modifying" the engine.rbm, that BMW circuit looks good, I would recommend C1 0.1uF should be 400V part.Automotive ignition module's IGBT clamps the primary spike to ~400V. Typical 1:70-85 ignition coil that is ~30kV max. with an open-circuit on the plug wire, to protect the coil. Spark plug firing results in less.FGP3040 Ignition IGBT

author: RyersonBaja
author_rank: Contributor
timestamp: August 14, 2017, 06:42:03 pm
content: Quote from: floobydust on August 05, 2017, 07:53:41 pmProbes are 10x, but so is the scope settings, so those numbers are right. I did the single-side op-amp bias on purpose for that test.Something is fishy here. I'm still trying to track down why the diodes aren't clamping the way they I expected. Just as a test, I did this, measuring across the diodes (probe ground on one side of diodes, probe on the other)Results (sorry about the photos, I didn't have a USB key at the time to save from the scope):https://imgur.com/a/Gq4G7At a smaller timescale, it looks like generally like this:If i had to guess, I'd guess that I'm running into a problem with the diode not switching fast enough, but IIRC, 1N4148s have a reverse recovery time of ~4ns, which is much faster than the spike I'm seeing here. I'm seeing spikes much larger than the ~0.7-1V I would expect. Or maybe the diode is acting properly, but I'm shoving too much current through it for a 0.7v drop on a 1N4148, and I should use a higher-current diode?Next time I'm in the shop, I'll try some different resistors and see if it makes any difference, I wish I had thought of it before.Ideas?I could put the scope on the stop wire next time I'm in and see if I can get a signal from it, but I have no idea what the voltage on this line might be, and I don't want to blow up the front end of the scope.@rbm: Thanks, but I can't use it, because I can't wire into the primary coil. Its sealed inside the magneto unit, which is enclosed in a solid block of plastic/epoxy, which I'd have to dissolve to get into (thus violating the "no engine mods" rule).

author: Ian.M
author_rank: Super Contributor
timestamp: August 14, 2017, 07:05:44 pm
content: I wouldn't probe the stop wire with a cheap +/-30V max USB scope, but a proper scope with a 10V/div input attenuator setting and a x10 CAT II rated probe should be fine. Its *REALLY* unlikely to have high voltage to the kill switch, and if it did there would be a warning notice in the engine's installation manual. However it wouldn't hurt to check with a DMM before scoping it

author: tautech
author_rank: Super Contributor
timestamp: August 14, 2017, 08:37:13 pm
content: I just checked the pickup I made years ago.......a dozen turns around the ferrite rod SHUNTED with 150.The resistor tames the ringing and you'd add the clamping after.Preferably close as possible to the counter.

author: RyersonBaja
author_rank: Contributor
timestamp: August 14, 2017, 08:39:39 pm
content: Quote from: tautech on August 14, 2017, 08:37:13 pmDiodes in parallel with resistor? I'll try it.

author: tautech
author_rank: Super Contributor
timestamp: August 14, 2017, 08:49:12 pm
content: Quote from: RyersonBaja on August 14, 2017, 08:39:39 pmYep.There's a trade off with amplitude and ringing management from the shunting along with decreased sensitivity.With scope measurement that's comparatively easy to work around as the scope will give frequency (RPM) at the trigger level setting where you can set this above the ringing to get a cleaner result.This is why I suggested you use something at home like a lawnmower or motorbike to get the pickup part roughly optimised before moving forward.

author: Delta
author_rank: Super Contributor
timestamp: August 14, 2017, 11:50:35 pm
content: Just use the bloody magneto kill switch wire will ya!Use a resistor and Zener (or even an LED) in series to earth and hey presto.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: August 15, 2017, 12:07:37 am
content: tautechs approach should work for you, but if you don't like wrapping a wire around the spark plug there are other approaches. One has already been mentioned - detecting the rf using a cheap radio. The other is to emulate riders and drivers who can accurately estimate RPM using their own built in acoustic sensors.Both of these approaches work and have been implemented in the field. Both should be immune to the mud. But care does need to be taken to make sure you don't pick up adjacent cars. A little thought about the effects of 1/R^2 should be all you need to cover this problem.

author: tautech
author_rank: Super Contributor
timestamp: August 15, 2017, 12:33:22 am
content: Quote from: CatalinaWOW on August 15, 2017, 12:07:37 amThat's ^ not what I've referred to or suggested all along, instead an inductive pickup with turns on a ferrite rod.Using a ferrite rod will impart some directionality sensitivity but this can be addressed with a rigid mount that gives best results.Management of the signal to what the OP needs is the next step so to get clear defined pulses and then control amplitude to his counter.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: August 15, 2017, 03:50:16 am
content: Sorry about the confusion. I was referring to your comment about how to process the capacitively coupled signal.

author: RyersonBaja
author_rank: Contributor
timestamp: August 20, 2017, 07:06:40 pm
content: Quote from: tautech on August 14, 2017, 08:49:12 pmThanks for the small engine suggestion, but I'm stuck doing all the work at school. I don't have a small engine at home (don't own a motorbike, electric lawnmower), and the oscilloscope belongs to the school anyways. Not really much point in me spending money on my own test equipment when the Uni lets me use whatever I need, as long as it stays at school.Still getting sorta the same problem as before, with the 120ohm in parallel with the diodes. Diodes are really acting more like capacitors. See:https://imgur.com/a/l5JEyFor comparison, I replaced the diodes with a 1uF cap in parallel with the 120ohm.https://imgur.com/a/4ArG0Its definitely attenuating, as compared to 120ohm alone, but the diodes seem to be turning on too slowly to clamp the signal.Do I just need a much faster diode? I didn't think I would, the signal seems to be on the order of ~50MHz, and 1N4148s should be good well past this.Would the following be worth trying? (component values are just a guess right now, might be worth trying higher values of R2/R3)My idea here would be to limit current through the diodes. C1 is probably not necessary, but could be chosen for additional attenuation. I'll try it monday and see.

author: tautech
author_rank: Super Contributor
timestamp: August 20, 2017, 08:10:41 pm
content: R1 value can be reduced further, even halved with a pair of 120's paralleled.I'd fiddle with initial attenuation to get the ballpark value you need and then apply clamping to limit output.1N4148's should be plenty fast enough but you could look at Shockley diode data sheets but with the disadvantage of needing two in series to give similar clamping value to a silicon diode.

author: Delta
author_rank: Super Contributor
timestamp: August 20, 2017, 09:42:03 pm
content: There is a ready made signal just waiting for you on the Magneto's kill wire. Why are you insisting on fannying around trying to inductively couple to an HV wire?

author: Ian.M
author_rank: Super Contributor
timestamp: August 20, 2017, 10:29:09 pm
content: Probably. However if the 'magneto' has an integrated electronic ignition system, the kill wire may be a 12V logic signal. 5 minutes running, testing the line with a DMM on frequency and a 0.47uF HV capacitor in series with the test lead would tell if there is a RPM related signal there.