Adapting signal from Motorcycle crankshaft position sensor.
JustinSS
Posts: 5
I usually try to learn on my own but this is driving me crazy.
I am working on data logger for my motorcycle to help with my riding and only have one main hurdle. I am working at measuring the RPM by tapping into the crankshaft position sensor. It puts out an signal that is AC voltage with a varying frequency which is related to the actual RPM. So far I have run it through a rectifier so I could get a DC voltage then I passed it through a voltage divider circuit to bring it down to levels I could deal with more easily. Currently I get around .4v at idle (1300rpm) and around 6v at redline (18000rpm).
So far I was able to read the frequency of the signal by adding 1.2volts inline with it to get over the 1.4v logic threshold. It works nice and steady like that. The only issue is that it will be around 7 volts or more when going into the STAMP when I approach redline. I would prefer to either limit the output voltage to 5v or to use something else to take the varying signal and output a 5v signal. I looked at using an Op-Amp as a comparator but I'm not so sure. I am learning all of this stuff as I go so I am not all that knowledgeable about this stuff.
Any ideas would be appreciated.
Thanks,
Justin
I am working on data logger for my motorcycle to help with my riding and only have one main hurdle. I am working at measuring the RPM by tapping into the crankshaft position sensor. It puts out an signal that is AC voltage with a varying frequency which is related to the actual RPM. So far I have run it through a rectifier so I could get a DC voltage then I passed it through a voltage divider circuit to bring it down to levels I could deal with more easily. Currently I get around .4v at idle (1300rpm) and around 6v at redline (18000rpm).
So far I was able to read the frequency of the signal by adding 1.2volts inline with it to get over the 1.4v logic threshold. It works nice and steady like that. The only issue is that it will be around 7 volts or more when going into the STAMP when I approach redline. I would prefer to either limit the output voltage to 5v or to use something else to take the varying signal and output a 5v signal. I looked at using an Op-Amp as a comparator but I'm not so sure. I am learning all of this stuff as I go so I am not all that knowledgeable about this stuff.
Any ideas would be appreciated.
Thanks,
Justin
Comments
I would get rid of the voltage divider and feed the diode output·into a 4n25 or some other optical isolator
And you should get a nice steady 5-volt output or what ever you feed into the output stage.
It would be nice to know what the output is without the voltage divider!
I think the 4n25 can take about 30 to 50 volts using different input resistors.
Post Edited (Larry~) : 12/2/2009 7:06:18 PM GMT
4n25 is only good for 10000, so a different·opto needs to be used you still may get it with one resistor or you may need the voltage divider
having 5 to 60 volt spread,·its really odd that the voltage would change that much. turn on the headlight and check the output again does
this·motorcycle not have a voltage regulator on it?
God I must be stupid today the 4n25 will work its 10000 per second not minutes
Post Edited (Larry~) : 12/2/2009 8:05:53 PM GMT
The BS2 has internal over and under-voltage diodes to protect the I/O pin -- but these diodes are limited in the current they can conduct. Thus the need for an in-line series resistor of 20 Kohms to limit the current. The BS2 will then see a 'clipped' version of your oscillating voltage, which the COUNT instruction can count.