i want to count the pulses i get from the engine of a car to calculte the engines revolutions per minute ...how do i handle these pulses with a microcontroller ...can i feed them direcly..just cant fogure it out ..and also which microcontroller would suit this situation...tell me of a microcontroller that easily avaliable in the market...
Hi Hasan,
You can use a PIC16F84 with a 32,768KHz crystal. The pulse signal should be 5V and is feed to the one of the interrupt enable pin of PIC such RB0/INT. 32,768 crystal provides a real time clock for PIC can count the revolutions in rpm.
Hi Hasan,
You can use a PIC16F84 with a 32,768KHz crystal. The pulse signal should be 5V and is feed to the one of the interrupt enable pin of PIC such RB0/INT. 32,768 crystal provides a real time clock for PIC can count the revolutions in rpm.
Use Pic16F628... Cheaper, more memory, same pinout
Also, depending on how fast the signal is coming in you might need more then 32768hz (wich is incredibly slow). If the pic is still handling the previous interrupt while a new one comes in then that pulse will be lost.
It all depends on how fast your pulses come in and how much calculating your interrupt routine has to do.
You can get a accurate RTC on virtually any frequency if you use the pic's timer.
I would use the input capture function of the micro and the known clock period to compute the frequency and thus the rpm. I found this technique works well and by varying the number of "captures" you wait for, you obtain a dc filter that smooths out the tachometer.
Thanx for the replies guys ill look into each of these PIC to see which one suits..anyway where can i get their data sheets..and also Isotope asked how to display the result..well i have thought of two things first the leds and second the seven segment display..an lcd would look better but i dont know much about them ..hope some of u has worked on them...anyway thnx again
A standard LCD based on a common controller is easy to construct and *very* well documented all over the internet. Used 7 segment displays is easy too, but to have more than 1 you will probably need to rapidly multiplex the displays so you can drive them with the small micros.
yes correct, for eg: 5v to 10v.
actually I've installed an aftermarket tachometer to my car(comes with no tachometer) problem is, I could not get the actual rpm reading ,the tacho's shows only 50%.(signal taken from 1 of wire thats runs to the coil pack)
thanks
Do you know what the signal looks like that you are connecting to the tachometer? I would guess that it is a series of pulses rather than a voltage, but I may be very wrong. You could use a simple non-inverting op-amp (with the appropriate power handling to amplify your input signal).
Most aftermarket tach's are designed to be connected to the ignition coil.So if your tach is configured for a 4 cylinder engine, it would be expecting two pulses for every revolution, since you are taking a signal from the crank sensor, you only get one pulse per revolution(hence the %50 RPM readings).Either configure the tach for 2 cylinders or find the proper wire at the coil pack.What kind of vehicle is it?
Actually, since you said "coilpack" and not coil, I'm assuming you have a waste spark ignition setup.So 2 cylinder configuration is probably your only option, since a collective tach signal is probably not present due to the lack of a factory tach.
Most aftermarket tach's are designed to be connected to the ignition coil.So if your tach is configured for a 4 cylinder engine, it would be expecting two pulses for every revolution, since you are taking a signal from the crank sensor, you only get one pulse per revolution(hence the %50 RPM readings).Either configure the tach for 2 cylinders or find the proper wire at the coil pack.What kind of vehicle is it?
1000 thanks Eclipsed,
correction,after recheck the wire is not connected directly to the crankshaf sensor.it is connected to the coil pack from the ECU.an input for the ECU is a combination of the crankshaf and other sensor's
Since the ECU has 2 triggers going to the coil pack, the wire you have it hooked up to is only half of the ignition signal, set the tach for 2 cylinders and your problem will be solved.If you don't have a 2 cylinder setting, you have to "make" a collective tach signal,diode isolate both triggers from each other and then run them to the tach.