Currently trying to learn programming for my job, so I went out and bought the simplest micro of them all- a basic stamp 2. Or a BS2 for short. Radio shack sells it for I think 80$- I forgot the price since the company payed for it.
READ THE WHOLE BOOK!!! and do all of the activities. It is the basics in programming and will teach you alot.
I am currently working on a program to display the RPM's and limit them to a preset ammount "which is adjustable"
The rpm sensing was easy forsheezy- I used the primary taps on the side of the ignition coil to pickup pulses for the stamp to read. I then fed this through a bank of resistors because it was killing my irf840 all the time. It seemed there was a sharp HV spike when the coil was turned off "like all inductors" you use a pull down resistor on the 840 to ensure the gate doesnt float around and send the stamp bogus readings.
here is teh schematic I threw together.
Here is the program that only turns on pin 10 when the rpm's are exceeded. I am working on making it blink really fast to really hold the rpm's at a certain limit, hopefully causing excess noise and fire emitting from your exhaust =)
Ill update the program after I redesign it and varify its working with the rev-limiter later on.
----------------------program staring below---------------------------
' {$STAMP BS2}
' {$PBASIC 2.5}
SpeedIn PIN 15 'Receive Input from Hall Sensor
Capture CON 125 ' Num of msec to listen for input
rpm VAR Word ' value to hold the RPM of the engine
pulses VAR Word ' input pulses from Engine
pulses = 0
DO
COUNT SpeedIn, Capture, Pulses
rpm = (Pulses * 60)
DEBUG CR, "Pulses = ", DEC pulses
DEBUG CR, "RPM = ", DEC rpm * 4, CR,CR
DEBUG ? pulses
IF pulses > 5 THEN
HIGH 10
ELSEIF pulses < 5 THEN
LOW 10
ENDIF
LOOP
microcontroller tach and rev limit
microcontroller tach and rev limit
[img]http://i37.tinypic.com/2m6keid.jpg[/img]