Shop OBEX P1 Docs P2 Docs Learn Events
Measuring rpm through the cigarette lighter plug. — Parallax Forums

Measuring rpm through the cigarette lighter plug.

Brian SmithBrian Smith Posts: 44
edited 2011-05-06 16:58 in General Discussion
The Gtech Pro ( www.gtechpro.com·) states that it can measure a cars RPM through the cigarette lighter plug. They say they are the only data system in the world to do this. Well you guys seem pretty smart. How is it done? Im pretty sure that it senses the ignition pulses and you have to tell it how many cylinders the engine has. But how can it sense these pulses?
«1

Comments

  • GenesisGenesis Posts: 42
    edited 2006-01-12 03:49
    It likely has a capacitor in the sensor and then looks for the high frequency pulses that get through. They'd be low-level, but there, on a gas engine.

    It won't work on my car - its a diesel·cool.gif

    Kinda stupid though if you ask me, with the OBD connector right there.· Get the right data, clean, easy to access.· Geez - why do it the hard way when every car out there these days has an OBD-II port?
  • Brian SmithBrian Smith Posts: 44
    edited 2006-01-12 03:52
    ·No, it says on the webssite that it works with diesels! I guess that throws out the ignition pulse idea.confused.gif

    Can you get RPM from the OBD2? My car is a 59 model. No port, no computer, no electronic ignition nothing. Its even got a mechanical tach and speedo.

    Post Edited (Brian Smith) : 1/12/2006 3:56:27 AM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-12 05:28
    This thread is being moved from the BASIC Stamp Forum to the Sandbox Forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2006-01-12 06:09
    I'm really not familiar with how much electrical noise is acceptable and present on an automotive electrical system.

    Here is a schematic capable of detecting a ripple of .6V or more on a DC-supply line ranging from 6V to 100V.
    The carrier frequency of the ripple can vary from 1kHz to 10kHz. This circuit uses a bi-polar transistor on the
    input. If you used a N-MOS device in place of the 2n3904, you could most likely get much less than .6V

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 1/13/2006 12:01:51 AM GMT
    1371 x 639 - 87K
  • knightofoldcodeknightofoldcode Posts: 233
    edited 2006-01-12 08:41
    Brian Smith said...
    No, it says on the webssite that it works with diesels! I guess that throws out the ignition pulse idea. confused.gif


    Can you get RPM from the OBD2? My car is a 59 model. No port, no computer, no electronic ignition nothing. Its even got a mechanical tach and speedo.

    Unfortunatly, the OBDII spec hasn't been defined all that well, and some cars have the RPM, other's don't.

    I know my '96 Ford Mustang does have OBDII (first year required by law) and it does have RPM in the ODBII data. But I know alot of others don't have the PRM info.

    The OBDII system was intended to be used for the emisions systems, so alot of car makers didn't put anything but what was required by law to be present, and RPM wasn't required.

    There are some really neat converters from ODBII to RS-232 serial.

    Of course, you're '59, won't have a OBDII. [noparse];)[/noparse]

    ODBII was required by federal law, in the US, to be in any car produced after January 1, 1996. Alot of cars from Ford had them in '95. Not sure of Chevy, or any other car makers.

    Knight.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-
    This message transmitted with 100% recycled electrons.
    -=-=-=-=-=-
    Gravity doesn't exist. The Earth sucks.
    -=-=-=-=-=-
    Make a man a fire, and he will be warm for the night.
    Light the man on fire, and he will be warm for the rest of his life.
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-
  • JavalinJavalin Posts: 892
    edited 2006-01-12 09:55
    Some cars use the CAN (Controller Area Network) bus.

    I believe some of the standards (as mentioned above) have a RPM wire in the dashboard "diagnostic" port? Else this is readable via the CAN bus - depends on the age and model and whats been implemented by the manufacturer!

    Check out;

    http://www.embedded.com/showArticle.jhtml?articleID=13000304

    and

    http://www.racelogic.co.uk/_downloads/vbox/Datasheets/CAN Parameter List.pdf

    Cheers

    James
  • stamptrolstamptrol Posts: 1,731
    edited 2006-01-12 13:01
    In the dim past, I owned a couple of Lada's. They were the Russian variant of a Fiat. The tachometer on those cars was driven from the alternator by seeing the pulses generated by the three-phase rectified voltage generated at the alternator.

    Plugged into the lighter socket seems a bit of a stretch as the battery would really filter out the pulses. But, it may be using a high-frequency pass filter to let in only the the small ripple riding on the vehicles DC system.
  • Jim RicheyJim Richey Posts: 82
    edited 2006-01-12 14:43
    It sure makes you wonder how the frequency information is being monitored.Is it possible they are using some sort of audio?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thanks, Parallax!
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-01-12 14:50
    Thier comment that only the cigarette plug is used and it works on diesel engines narrows down how they do it to only one possibility, and that is by monitoring the output of the alternator. All generators produce AC voltages, but car systems run on DC, therefore the AC must be converted to DC, even though the voltage has been converted to DC, it has slight ripples of the voltage (unless some extra circuitry has been used, but when have you ever heard of an non-luxury auto manufacturer go the extra mile when a cheaper method is "good enough"), it is measuring those ripples and since the alternator is turned by the engine, the frequency of the generated AC is proportional to the RPMs of the engine, therefore the ripples are proportional to the RPMs.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • DannyDanny Posts: 56
    edited 2006-01-12 17:19
    OK, say that is what it is watching.
    Now, what about the reduction and corresponding speed difference caused by the different sized pulleys on different engines?
    Kind of makes you wonder how accurate it can be.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Never create anything you can't control"
    "The amount of intelligence on the planet is fixed... the population is growing"
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-01-12 17:40
    I too was wondering the same thing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • DannyDanny Posts: 56
    edited 2006-01-12 19:15
    OK, couldn't resist.
    Went to their site and downloaded manual.
    On page 40 there is a procedure to calibrate the tach portion.
    So it must be counting pulses.
    Since you have to use a regular tach to calibrate the unit it obviously samples and stores the pulses for known RPMs then calculates everything in between.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Never create anything you can't control"
    "The amount of intelligence on the planet is fixed... the population is growing"
  • Jim RicheyJim Richey Posts: 82
    edited 2006-01-12 22:28
    The company has a forum on their website.It is explained that the RPM signal is taken from the alternator pulses,which find their way into the DC supply, and then are compared to a host of conditions selected by the user.Apparently the unit can be tricky to calibrate because lots of information must be entered regarding particular engine characteristics.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thanks, Parallax!
  • Brian SmithBrian Smith Posts: 44
    edited 2006-01-13 04:37
    So I looked at the forums at Gtech. It looks like a·LOT of people have problems with reading RPM on the gtech pro. So if·Gtech cant get it right, I know I cant. I dont·need to measure RPM through the cigarette lighter, I was just wondering·how it was done. ·So what do you guys think the best way to measure RPM with a stamp would be?·Im running a distributor, carburetors and mechanical gauges.·
  • knightofoldcodeknightofoldcode Posts: 233
    edited 2006-01-13 04:41
    Brian Smith said...
    So I looked at the forums at Gtech. It looks like a LOT of people have problems with reading RPM on the gtech pro. So if Gtech cant get it right, I know I cant. I dont need to measure RPM through the cigarette lighter, I was just wondering how it was done. So what do you guys think the best way to measure RPM with a stamp would be? Im running a distributor, carburetors and mechanical gauges.

    Easiest (and safesty) way would be via the ODBII port, assuming you're vehicle is newer than a 1996.

    Knight.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-
    This message transmitted with 100% recycled electrons.
    -=-=-=-=-=-
    Gravity doesn't exist. The Earth sucks.
    -=-=-=-=-=-
    Make a man a fire, and he will be warm for the night.
    Light the man on fire, and he will be warm for the rest of his life.
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-
  • Jim RicheyJim Richey Posts: 82
    edited 2006-01-13 16:51
    Are you using a GM HEI distributor?If so,you can utilize the tach connection.Another method would be to use a trigger,either hall effect or optical,at the crankshaft balancer.Most current engines have a hall effect sensor at the flywheel,reading the crank position,providing the reference pulse needed for timing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thanks, Parallax!
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2006-01-14 21:10
    This circuit might work a little better than my previous schematic post.
    The circuit below will respond to a 5mV(or more) Voltage ripple with a
    frequency ranging from 1kHz to 20kHz over a DC offset ranging from
    6V to 60V.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
    889 x 439 - 45K
  • KenMKenM Posts: 657
    edited 2006-01-15 02:55
    The cigarette lighter rpm pickup works from alernator ripple.

    The one listed in the link below works most of the time, but on some models has trouble at low rpm.

    http://www.kmt-gmbh.com/de/automotiv/rpm8000.html

    Regarding OBD 2 ports and engine rpm. Every passenger car sold in the U.S. since 1996 has an OBD2 port and it has an rpm output.....by regulation, it must.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ken
  • Eric REric R Posts: 225
    edited 2006-01-15 03:13
    Brian Smith said...
    ·So what do you guys think the best way to measure RPM with a stamp would be?·Im running a distributor, carburetors and mechanical gauges.
    If you read the signal from the pickup of the HEI then this will work fine for you
    913 x 522 - 60K
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2006-01-15 03:55
    KenM,

    ...Ok, so by looking at the link that you provided says....

    "...a DC signal level of about 12V superimposed with an AC signal of about 50mV."

    From the latest circuit that I posted, It has a sensitivity of 5mV and should work for picking off the pulses.

    http://forums.parallax.com/attachment.php?attachmentid=40105

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • ChrisPChrisP Posts: 136
    edited 2006-01-15 04:25
    Brian,
    ·With a points ignition your best bet will be to read the ground signal on the coil. RPM can be read as frequncy, 8 break points per distributor revolution, turning half as fast as the engine so 1000 RPM /2 times 8 points / 60 seconds gives you a frequency of 66 and 2/3's hertz at idle. To read the signal directly from the coil ground directly·you'll need a 5 volt zener diode and a current limiting resistor so your stamp never see's more than 5 volts on the input pin.

    Once you have all that, either use count to count pulses over a period of time to get frequency, or pulsin to measure a single pulse and calculate frequency,
    ·
  • ZoingZoing Posts: 3
    edited 2011-05-05 22:13
    Hi Beau, hope you would see this as the thread is quite old. I tried to run a simulation of this circuit on LTSpice but does not seem to work (for me). Attached is the schematic.
    RippleDetector.rar
    But actually, if this is to be used for alternator ripple detection, the frequency would be max 200Hz at most (you have specified 1-20KHz).

    This circuit might work a little better than my previous schematic post.
    The circuit below will respond to a 5mV(or more) Voltage ripple with a
    frequency ranging from 1kHz to 20kHz over a DC offset ranging from
    6V to 60V.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • ZoingZoing Posts: 3
    edited 2011-05-05 22:20
    KenM wrote: »

    The one listed in the link below works most of the time, but on some models has trouble at low rpm.

    http://www.kmt-gmbh.com/de/automotiv/rpm8000.html

    Ken, this is actually the unit that gave me the idea of trying to build such a circuit in to my project in the first place (instead of trying to fix halls and magnets to flywheels etc.....). Yes, it is proving to be very challenging to do. Need to work on both petrol and diesels and battery system is either 12v or 24v. Do you think I should abandon this approach?
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2011-05-05 22:52
    Zoing,

    Any way you can post a scope view of the cigarette lighter plug to see what the signal looks like?
  • ZoingZoing Posts: 3
    edited 2011-05-05 23:01
    Yes as soon as I capture it I will do so.

    By the way I have been working on my own circuit but it uses OpAmps

    Zoing,

    Any way you can post a scope view of the cigarette lighter plug to see what the signal looks like?
  • Heater.Heater. Posts: 21,230
    edited 2011-05-06 02:03
    My plan to measure engine RPM from the lighter socket would be:

    1) Block the DC with a capacitor.
    2) Apply a low pass filter, cut off say 200Hz (That's 12000RPM!!)
    3) Amplify to a suitable input voltage for a Prop ADC input.
    4) Sample the incoming voltage values in batches of 1024 at a known, fixed, sample rate.
    4) Use the Fast Fourier Transform on the Prop to pull out all the frequencies in those samples (Well 512 of them, should be enough resolution)
    5) Find the largest frequency present.

    That result will, I suspect be a harmonic of your alternator rotation speed. From your alternator pulley ratios you can determine the engine RPM from that.

    Here is a suitable FFT object for the Prop: http://forums.parallax.com/showthread.php?128292-Heater-s-Fast-Fourier-Transform.&highlight=heater_fft
  • LeonLeon Posts: 7,620
    edited 2011-05-06 03:29
    Coincidentally, a similar topic came up on the MSP430 group for measuring a diesel engine RPM. Here is the thread:

    http://tech.groups.yahoo.com/group/msp430/message/48381

    I suggested getting it from the engine noise with a microphone, which should be feasible. The technique has several advantages.
  • $WMc%$WMc% Posts: 1,884
    edited 2011-05-06 14:52
    I wonder how their weeding out the injector noise from the 3 phase ALT noise on the diesel engine?
    Most new diesels are Elc fuel injected.(Big injectors, lots of current)
  • Heater.Heater. Posts: 21,230
    edited 2011-05-06 15:44
    If the injector noise is in a harmonic relation ship with the alternator then that's not an issue. Just fourier transform the signal find the biggest noise frequency peaks and from those get the RPM. I guess that depends on the alternator pulley ratios. If they are such that these are not harmonically related we have a problem.

    Mind you I'm only guessing as I have never looked that noise on a car cigarette lighter:)
  • localrogerlocalroger Posts: 3,452
    edited 2011-05-06 16:39
    I'm really not familiar with how much electrical noise is acceptable and present on an automotive electrical system.

    Back in the 90's when I was using the 8051-based Blue Earth Controller to do what I'm doing with Propellers today, I had an Intel white paper about design for automotive systems (a big target market for the 8051) and it turns out the answer to this is...

    A LOT.

    It's been awhile but I seem to recall being warned to be ready for brownouts to 7VDC (especially during starting), overvoltages to 18V, occasional ripple in the multiple volts range, and kilovolt level millisecond spikes on both the power and common mode ground level from the ignition system, huge static charges from the tires and operator interaction with the seat upholstery, oh and the ground plane is Smile too. The thing left me wondering how anything electronic works within 10 meters of a car.
Sign In or Register to comment.