Does anyone have an idea of how to get sensible frequency measurements from the "W" output of a car battery generator? As I understand it, the W gives raw pulses (of up to 15V) AC. Now there must be a way to "tame" this to a LT 5V signal and measure the frequency. Any ideas?
I'm not much on car mechanics, but are you talking about the output from an "alternator" or an old fashioned "generator"?
If I ain't mistaken, I believe the output of an alternator comes out in three-phase AC, which is actually three simultaneous AC voltages coming out at once, on three or more conductors. If you read between two of them you should get one AC voltage reading at whatever freq. that might be, and all three freqs. should be the same.
Like I said, I'm not a car mechanic, but three-phase is three-phase, which I haven't worked with or studied for quite a few years, and I'm not even sure if that's how car alternators operate. There are probably circuit diagrams for frequency analysers/counters to be found on the internet; maybe one or more of them could be applied to an Arduino.
I'm sorry I can't be of much more help, but thought I would add some information.
You are right, I am talking about a n alternator. And the "w" pin on the alternator gives a pulse I want to read the frequency of, this is only from one of the magnets, so it should be one phase only. Anyone done something similar?
You could rectify it and then use a voltage divider. Since you won't be drawing hardly any current this should work. Then just count the pulses. You can set the arduino to interrupt on a pin when it reaches a certain threshold. Just make the interrupt handler increment a counter.
I was trying to build a digital tachometer readout and took a signal off the low tension line of the distributor through a 24k resistor to a digital input with an 11k pull down (odd values because they were what I had to hand):
On some motorcycles, the electronic tachometer gets its input from the output of the electronic ignition. That's the same output that feeds the low side (primary) of the ignition coil (transfmormer). This output comes out as pulses.
To be used as input to the tachometer, the pulses are fed to a frequency to voltage converter, such as an LM2917 IC chip, which converts those pulses into a varying dc voltage that varies in proportion to the pulse frequencies. Of course, the pulse frequencies are in direct proportion to the engine RPM.
Once those pulses are converted into varying dc, the tach circuitry just reads that varying dc as a volt-meter would. The LM2917 chip was made specifically for this purpose, and Information on the chip can be found on the internet. Here's a location: [u]http://cache.national.com/ds/LM/LM2907.pdf[/u]
However, counting those pulses is a problem, because the ignition coil causes a lot of ringing and distortion and will give a counting circuit a lot of problems to deal with, which results in miscounts, discounts and no-accounts in the kings court. ;D(old joke). I know this, because I tried to do that, and it didn't work so good. But, I did try the LM2917 route and it worked for my purposes.
I forgot to mention that, the 12v pulses from an electronic ignition need to be dropped to less than 5v before applying them to a microcontroller ckt. On my motorcycle, I fed the ignition pulses to a 220K res. in series with 110K res to ground, then took the voltage pulses from across the 110k to ground, which resulted in pulses of less than 5v. I tried using a 5v Zener diode across the 110K, but I found that Zener's require a certain level of current to operate properly and that the 220k res. was restricting the current to a level that was too low for the Zener to operate properly. So took the zener out, since it wasn't working anyway.
So I use a clipper circuit to clip the pulses to whatever voltage level I want. Here's where you can find info on clipper ckts*.http://www.ee.lamar.edu/EELABS/ELEN3108/Lab2.pdf)*
In place of the clipper ckt. battery I used a 3.3 voltage regulator, and it worked.
It is close to impossible to argue against taking protective measures except with your wallet and there is also a short and long term side to that argument going both ways.
Nevertheless I'm curious to see/understand the technical justification as to why additional protection is needed. Keeping in mind also that the built-in diodes have a forward voltage of 0.3V whereas whatever external diodes you add are likely to have a significantly higher forward drop.
There's also an application note from Atmel where they suggest to use (or abuse if you like) the protective diodes for a zero-cross mains detection (one mains phase connected to a digital input pin with only a a high series resistor). In this note they state that the protective diodes are good to 1mA.
For a petrol engine it is common to use the negative terminal on the coil as a tach input signal. This signal (decaying sinus) peeks at +/- 200V for every ignition pulse (2 times per RPM for a 4 cylinder 4 stroke engine, 3 for a 6 cylinder etc.). For this type of input, a single rectifier diode plus a peek detector (could be a simple voltage divider) wired to a digital input pin works well.
For a diesel engine it is common to use the W output from the alternator as a tach sensor. This is a pulse train at approximate alternator output voltage (e.g. in the 13.7V to 14.4V range against Gnd). The pulse rate is proportinal to engine RPM, but typically not in a 1:1 ratio so calibration is needed. I would wire this input directly to an Arduino digital pin through a large series resistor (e.g. 100k) and then count pulses using interrupts. You would need another tach to figure out the calibration constant needed for your RPM calculation unless you can get documentatioin on the alternator RPM to engine RPM ratio from the car manufacturer.