5V and 12V Vehicle RPM signal and the Prop
eagletalontim
Posts: 1,399
Good evening once again! I am altering a project that I already have working to be able to pick up a vehicle's tach signal. Right now, I am just using a 2 resistor voltage divider to drop the 5V raw signal voltage before it enters the Prop. This is working 100% and has been for over a year now. What I am attempting to do is to (A) protect the prop pin a little better, and (B) allow either a 5V or a 12V tach signal to be able to be connected to the Prop.
My thoughts to do this would be to use a simple NPN transistor with the incoming signal voltage dropped using a 150K and a 39K voltage dividing circuit. This would make the voltage of the base Pin on the transistor between 1.03V with a 5V signal or 3.3V with a 16V (Highest spike) signal. I am currently using some NPN 3904 transistors found here : http://rohmfs.rohm.com/en/products/databook/datasheet/discrete/transistor/bipolar/umt3904.pdf in a different project and noticed they can handle a max of 6V at the base. Would this possibly work for me or is there a better, more reliable way?
I am also wanting to read RPM from a range of 0 to 13,000 and for some reason can't seem to get my math figured out with using the above NPN transistor. It has a rise time of 35 ns and a fall time of 50 ns. If I want to read up to 13,000 rpm, how would I calculate if this transistor could handle 13,000 RPM. With my 4 cylinder, I get 2 pulses per revolution. So I must figure with a V8, it could be 4 pulses per revolution.
If there is an easier way to do this or a better SMD IC that will handle this already, please let me know. I am almost ready to put in a HUGE parts order to Digikey. Any help is GREATLY appreciated!
My thoughts to do this would be to use a simple NPN transistor with the incoming signal voltage dropped using a 150K and a 39K voltage dividing circuit. This would make the voltage of the base Pin on the transistor between 1.03V with a 5V signal or 3.3V with a 16V (Highest spike) signal. I am currently using some NPN 3904 transistors found here : http://rohmfs.rohm.com/en/products/databook/datasheet/discrete/transistor/bipolar/umt3904.pdf in a different project and noticed they can handle a max of 6V at the base. Would this possibly work for me or is there a better, more reliable way?
I am also wanting to read RPM from a range of 0 to 13,000 and for some reason can't seem to get my math figured out with using the above NPN transistor. It has a rise time of 35 ns and a fall time of 50 ns. If I want to read up to 13,000 rpm, how would I calculate if this transistor could handle 13,000 RPM. With my 4 cylinder, I get 2 pulses per revolution. So I must figure with a V8, it could be 4 pulses per revolution.
If there is an easier way to do this or a better SMD IC that will handle this already, please let me know. I am almost ready to put in a HUGE parts order to Digikey. Any help is GREATLY appreciated!
Comments
1 / (35ns + 50ns)
1 / 85ns
11.7 MHz
13000rpm *4 pulse / rev
52000 ppm
867 pps
Really not a Propeller-related subject, it's about transistors, transistor specs, BW.
(Your ppms/rpms aren't a concern unless those pulses are "super narrow", which I doubt.)
Missed that "GREATLY appreciated" part. :zombie:
To me, a lot depends on knowing that.
What to do should be tailored to that.
If it's something that's already pulled-up then I wouldn't just start hanging resistors.
Maybe you could go with a variation of the Philips I2C 5V-3V level shifter (only as 12V-3V)?
Maybe you could use a opto device (speed considerations), if there's current enough to light the IRED in one.
Transient suppression diodes, zener-like devices for clamping, are out there.
Automotive is moving more and more to opto and fibre, etc.
One nice thing about this is it places a very low load on your input signals from the car/motorcycle. Normally in the micro amp range. I have seen some strange things happen if you load the tach/speed signals as it also affects the other devices that rely on those same signals. On one of my bikes, the tach would kind of float with my circuit connected and sometimes even if the circuit was removed, but the cable was left connected. Some strange antenna side effect.
Also, using a Zener diode is another option to protect the prop from a higher voltage input. http://www.electronics-tutorials.ws/diode/diode_7.html
I also looked at this one from the 28205 prop board, the input spec shows
The input tolerances are quite wide ranged.
The 10K and diodes are totally redundant due to the minimal clamp current that would flow, there is no way that the input signal through 470K could ever cause a problem not even at a much higher voltage. As for the cap that would only be necessary for noisy non-digital signals.
The only issue I see with using an Opto is you need to draw about 10ma from the input (tach/speed) signal to drive the LED of the opto. You could use some other circuit before the opto's LED to limit the current on the tach/speed signal.
This schematic is from a Supra Auto transmission control board by Jim Edwards. It appears to use a 12v pulse for RPM signal. This appears to be yet another method.:)
http://www.falstad.com/circuit/#%24+1+5.0E-6+109.66331584284586+50+5.0+50w+448+112+448+176+0w+448+112+608+112+0w+448+272+448+320+0g+448+320+448+368+0p+688+112+688+176+0r+336+112+416+112+0+1000.0w+288+112+336+112+0w+416+112+448+112+0w+688+112+608+112+0z+448+240+448+192+1+0.2+3.3w+448+176+448+192+0w+448+240+448+272+0g+688+256+688+304+0w+688+176+688+256+0R+192+224+144+224+0+2+5.0+12.0+0.0+0.0+0.5w+192+224+288+224+0w+288+224+288+112+0o+4+64+0+35+4.676805239458889+9.765625E-55+0+-1
Almost the same goes for the Falstad circuit, it seems to have the seemingly obligatory clamp in there in the form of a Zener yet the input resistor value is very high at 100K. Low voltage Zeners are not ideal for starters in that they have a "soft knee" and start to leak current as they approach the knee resulting in a lower voltage in this case but it still works, although again it is redundant due to the high input resistance of 100K (I=V/R = 7V/100K = 700ua). So it could easily have used a 470K instead also without the Zener. The use of a simple linear regulator without any kind of input filtering works fine on the bench but is not really recommended for automotive use which indicates inexperience.
So as I said before, KISS, just use the two high value resistors, maybe a cap, all the other stuff is just fluff.
http://www.falstad.com/circuit/#%24+1+5.0E-6+109.66331584284586+50+5.0+50r+304+336+384+336+0+470000.0r+384+368+384+448+0+220000.0c+528+368+528+448+0+3.3E-9+1.1384227601593058E-17r+528+336+608+336+0+10000.0g+704+384+704+464+0R+704+240+704+192+0+0+40.0+3.3+0.0+0.0+0.5w+160+336+304+336+0w+384+336+528+336+0g+384+448+384+480+0g+528+448+528+480+0w+608+224+608+336+0p+608+128+656+128+0w+608+128+608+224+0w+384+368+384+336+0w+528+368+528+336+0d+704+304+704+240+1+0.805904783d+704+384+704+304+1+0.805904783w+608+336+640+336+0w+640+336+640+304+0w+640+304+704+304+0R+112+288+48+288+0+5+40.0+14.0+0.0+0.0+0.5w+112+288+160+336+0o+11+64+0+34+5.0+9.765625E-5+0+-1
Peter, KISS is correct, but, numerous posts and methods have been made on the forum, yet, no one method has been agreed as good and industry standard.
If i get time tomorrow, ill have a look at your method. It would save a lot of hassle:)
This RPM sense thread is something that ive been drawn to, as it fits nicely with a 2nd project RPM counter im hoping to try. I appreciate your time in having a look. I dont mean to add to confusion by posting diagrams, hopefully we can find a solution.
Oh boy, in all the increasing clutter the obvious solution also happens to be the simplest. The appellation "Industry standard" is meaningless without industry knowledge, don't just copy a circuit because it has been used before.
It is in cases like this that a LM339 will allow you to adjust what YOU want the threshold to be. While being more complicated, it gives you the ability to adjust.
In most cases, the simple single resistor will work. You just need to make sure you know what your input signal will look like under all operating conditions.
Here is a video of that project using a Propeller to replace the instrument panel of my bike....
The LM1815 looks like a pretty neat chip. Only down side is you would need a chip for each input you're trying to connect to. Would get pretty expensive quickly if you wanted to sense many signals.
One thing with a LM339 is you could use a PWM output in software to set the reference voltage allowing the code/user to adjust the threshold for the inputs.
As long as you're insured that your low state on the 12V inputs is pretty close to 0V then the simple single resistor solution would be the best and would also work on the 5V signals.
I don't understand what you are missing, the resistor method is happy with 3V, 5V, 12V, 24V, whatever. You can of course adjust the ratio so that it only works when it's above a certain voltage but otherwise a 1:1 ratio is fine and will work pretty much with any voltage. Even if you don't have a square wave it doesn't really matter either as once the threshold has been crossed it is effectively "square" in that it is either high or low. It probably pays to have software that confirms an edge and debounces it but that only requires a small delay and a resample anyway.
The single resistor that Jim mentions is fine too but the "pulldown" resistor is recommended and this pulldown could also be treated as a voltage divider if you wanted to trim the threshold voltage but the thing is, just put in two resistors, you can fiddle the values later if you like, no need to wait for 3 months R&D on this minor detail.
I think you are missing the point of why high value series resistors are mentioned as they limit the current to the Prop pin which can deal quite well on its own in clamping small amounts of current (< 500ua). Without the Prop connected then you will be able to measure the higher voltage because it is not clamped but once it's connected to the Prop the voltage will not rise much above this clamped value.
Do you know like when you feed a resistor into the base of an NPN for instance that the resistor's job is to limit the current but the base of the transistor is "clamped" at 0.6V? There is no "divider" there. In somewhat similar manner the clamping diodes start to conduct and bleed current from the input pin when the voltage goes more than 0.3V above Vdd. As long as that current is under 500ua it is within acceptable datasheet limits. All you need for this is a current limit resistor and at 16V for instance the minimum resistor value is calculated as R=V/I where V = 16V - 3.6V (Vdd+0.3) = 12.4V / 500ua = 24.8K. But that's the minimum value and we don't have to go anywhere near that as the Prop pin resistance is extremely high (CMOS) so we can use a much higher value resistor and still be safe (current limited) even for much higher voltages.
BTW\, When your question has been answered multiple times you have got stop yourself from asking more questions and just ponder over the answers because all the information is there, anymore only adds clutter.
The "stop asking questions" is not about not being bothered to answer your questions, it's just that they have been answered multiple times and it's like you keep taking a lucky dip with the various answers rather than just trying a very simple approach at no cost that has been explained extensively. Go figure.
When you talk about a max of 500ua current, that to me is saying put a high value resistor in the circuit till the component does not get hot. If the max voltage of a component input is say 3.3V +/- 0.3V and I have a 5V power source, all I know I can do is either put in a 3.3V regulator, or put a resistor voltage divider to bring the voltage down to 3.3V. I use online calculators to help me figure this out. I would not be able to tell you if a 1/8, 1/4, or 1/2 watt is needed. I would LOVE to learn all the math involved with electronics! It would make things so much easier on everyone, including me. The way I have learned is to either tear something apart and trace the circuit or buy bread boards to easily change out components quickly if something gets too hot or is not wire up correctly. If I get stuck on something, I try to research it but usually get stuck since I don't understand what the triangle symbol means, or what the "fancy" looking "B" means along with many of the other symbols. I do know that "V" or "E" = Voltage, "I" = current, and "R" = resistance. Common sense tells me not to merge the "+" rail directly with ground as that is a 0 ohm short.
So having said all that, I hope you now understand why I continue to ask question. Without asking questions, I would probably still be staring at a blinking LED (My first project).
What has worried me with this part of my project is the wide range of voltage I am wanting to read vs the "HIGH" threshold of the prop pin and the max voltage to the prop pin. Since the code I am using waits for the pin to go low, then high, then low again, I need to make sure the voltage going into the prop drops below the "HIGH" threshold of 1.6V and then increases above that 1.6V reliably.
You posted this : "All you need for this is a current limit resistor and at 16V for instance the minimum resistor value is calculated as R=V/I where V = 16V - 3.6V (Vdd+0.3) = 12.4V / 500ua = 24.8K."
That made me understand a bit more about what I was working with, but I am still worried about voltage for some reason. That may work with a 16V input, but I am not sure on a 5V input. I really wish I understood more!
Right now, I have a 741 op amp that is connected to the 5V rail and it switches the output to the negative side for each pulse coming in. If the input is 5V or 16V, the output gets pulled to ground and it give me a square wave. I have connected it so that it does not switch the output to ground with a voltage below 4V. Maybe this is a more expensive way to go about this, but I am ensured that I will never exceed the prop pin's input voltage no matter if the incoming pulse from the tach is 12V or 5V. This consists of 1 op amp and 3 resistors. Using the 2 resistor method may be cheaper, but I worry too much about frying something because I did not calculate it correctly.
also
same at 5v with same circuit?
how high a dc voltage would You connect to it and feel confident of getting away with it?
If i've grokked this correctly, its incredible and thankyou very very much for opening my electronics eyes a little wider ;-)