Hi All,
I just need a bit of advice for my on-going project.
I have a requirement where I have to interface a digital pin on a Teensy (3.6) with a stator to obtain RPM. The stator outputs a rising and falling signal I am only interested everytime the stator signal falls to zero (via a FALLING interrupt). When this happens a counter is incremented by 1 and using that I can work out an RPM value.
The code is simple and trying it with a signal generator running at the same frequency as the stator, it works perfectly.
Now my problem is the voltage that the stator is capable of outputting. The stator voltage depends on revolution speed and at an idle speed can go as low as 4-5v but at high RPM, the stator can output 40v+. Obviously this would blow the Teensy to bits.
I was thinking of using a 3v Zener diode and resistor (probably 10k) on the input to clip the max voltage to 3v as there will be virtually no current involved as it will just be a signal in to a digital input pin on the teensy and I am only interested when the signal moves from high to low.
Does this sound a viable solution to the issue? I have not tried it yet and it's theory at the moment but it does seem a viable solution.
So to summarise, the stator will output voltage pulses proportional in frequency to RPM in a square wave type of effect that will go from high to low then back to high and can rise to around the 40v mark at peak or as low as 4v. I am just trying to measure when the pulse goes from high to low via a digital pin on the teensy via an interrupt routine. Pulses will be 6 pulses for every complete revolution. I am proposing limiting the high voltage to 3v using a Zener diode clipping circuit.
Any advice much appreciated or a better way of doing it.
Many thanks in advance.
I just need a bit of advice for my on-going project.
I have a requirement where I have to interface a digital pin on a Teensy (3.6) with a stator to obtain RPM. The stator outputs a rising and falling signal I am only interested everytime the stator signal falls to zero (via a FALLING interrupt). When this happens a counter is incremented by 1 and using that I can work out an RPM value.
The code is simple and trying it with a signal generator running at the same frequency as the stator, it works perfectly.
Now my problem is the voltage that the stator is capable of outputting. The stator voltage depends on revolution speed and at an idle speed can go as low as 4-5v but at high RPM, the stator can output 40v+. Obviously this would blow the Teensy to bits.
I was thinking of using a 3v Zener diode and resistor (probably 10k) on the input to clip the max voltage to 3v as there will be virtually no current involved as it will just be a signal in to a digital input pin on the teensy and I am only interested when the signal moves from high to low.
Does this sound a viable solution to the issue? I have not tried it yet and it's theory at the moment but it does seem a viable solution.
So to summarise, the stator will output voltage pulses proportional in frequency to RPM in a square wave type of effect that will go from high to low then back to high and can rise to around the 40v mark at peak or as low as 4v. I am just trying to measure when the pulse goes from high to low via a digital pin on the teensy via an interrupt routine. Pulses will be 6 pulses for every complete revolution. I am proposing limiting the high voltage to 3v using a Zener diode clipping circuit.
Any advice much appreciated or a better way of doing it.
Many thanks in advance.