RevZ
Newbie level 3
- Joined
- Jan 24, 2009
- Messages
- 4
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,318
For measuring the engine speed on a two-stroke engine with adequate precision, I found the following project for the Arduino:
https://www.pjrc.com/teensy/td_libs_FreqMeasure.html
It's easy to set up, however it uses pin 8 which is a digital I/O pin.
That webpage says it wants to have a TTL input (0-5V with highs being >3V and lows <1.5V, I assume). However, the signal it would be receiving isn't TTL-safe, nor safe for the Arduino in its entirety.
The signal is picked up off the lighting coil on the ignition ground plate, which like the magneto itself generates an electrical pulse from the spinning of the flywheel and with four magnets (two opposed polarity pairs) passing by per revolution of the flywheel, the resulting waveform looks like this:
With the voltage peaks varying between ±6V at idle with all the lights off (slightly less under load) and beyond ±12V unloaded / around ±12V with a slight load applied (6-12 with full load), around 12000 revolutions per minute.
The frequency of the pulses would be 400 Hz at that speed.
What would I need to do to turn this waveform into a signal that will pick up nicely on the Arduino's digital I/O pin? If they say it expects a TTL signal I'm not one to try and get around it, but on how to get a good working signal out of it, I honestly have no clue. I understand what has to happen, but haven't the slightest clue on how to actually do it safely so I don't fry the AVR or anything..
https://www.pjrc.com/teensy/td_libs_FreqMeasure.html
It's easy to set up, however it uses pin 8 which is a digital I/O pin.
That webpage says it wants to have a TTL input (0-5V with highs being >3V and lows <1.5V, I assume). However, the signal it would be receiving isn't TTL-safe, nor safe for the Arduino in its entirety.
The signal is picked up off the lighting coil on the ignition ground plate, which like the magneto itself generates an electrical pulse from the spinning of the flywheel and with four magnets (two opposed polarity pairs) passing by per revolution of the flywheel, the resulting waveform looks like this:
With the voltage peaks varying between ±6V at idle with all the lights off (slightly less under load) and beyond ±12V unloaded / around ±12V with a slight load applied (6-12 with full load), around 12000 revolutions per minute.
The frequency of the pulses would be 400 Hz at that speed.
What would I need to do to turn this waveform into a signal that will pick up nicely on the Arduino's digital I/O pin? If they say it expects a TTL signal I'm not one to try and get around it, but on how to get a good working signal out of it, I honestly have no clue. I understand what has to happen, but haven't the slightest clue on how to actually do it safely so I don't fry the AVR or anything..