Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

lm2917 frequency voltage converter, non linear output?

Status
Not open for further replies.

Dakta

New Member
I'l add more details as we go, but just got a quick question really.

**broken link removed**

I'm using the above essential circuit to count flywheel passes using an inductive sensor, the idea was to route the voltage output to the adc on a pic so I could display the speed on an lcd.

Everything in my circuit is identical with the above, including values, except for one thing....

I calculated that idling my flywheel would make the input frequency around 50hz. I was happy with this, that'd allow me to go up to about five times the speed of idle as the diagram states 66hz per volt, which is about the window i wanted and still be in the 0-5v range of the pic adc input.

Excellent :D

However it wasn't to be, in practice the circuit works, and apart from a few niggles it works quite well - however the voltage at idle was 3v. Thinking I'd made an error in my calculations I installed a trimmer pot as a voltage divider between the lm2917 and the pic. I now calibrated the idle speed down to about 50 on my display (8 bit adc reading) and if I rev up it goes up, if I let it idle it then goes back to around 50.

So I'm getting very close to the solution, there just is a problem now as the output isn't linear. For example:

RPM -> ADC Reading (through voltage divider)

800 -> 50

1600 -> 100

3200 -> 110

4000 -> 170

I'm just wondering what could cause the non-linear output at the 3200 mark. I'm wondering if this could be a noise issue on the inductive sensor side, or a noise issue on the adc side, maybe the voltage being output is too high for the lm2917? (remember it gives out 3v at 800rpm).

Just looking for ideas really, I've put a small cap on the adc pin which has helped smooth the readings at a fixed speed, but there is still this problem with linear ridings at high rpm.

Any thoughts appreciated!
 
Last edited:
Is it necessary to convert the rpm information into a voltage? Why don't you just count the revolutions directly with the micro using the signal from the inductive sensor?
 
I found this Googling around it has a little bit about component values and linearity:

Applications Information
CHOOSING R1 AND C1 There are some limitations on the choice of R1 and C1 which should be considered for optimum performance. The timing capacitor also provides internal compensation for the charge pump and should be kept larger than 500 pF for very accurate operation. Smaller values can cause an error current on R1, especially at low temperatures. Several considerations must be met when choosing R1. The output current at pin 3 is internally fixed and therefore VOR1 must be less than or equal to this value. If R1 is too large, it can become a significant fraction of the output impedance at pin 3 which degrades linearity. Also output ripple voltage must be considered and the size of C2 is affected by R1. An expression that describes the ripple content on pin 3 for a single R1C2 combination is:
It appears R1 can be chosen independent of ripple, however response time, or the time it takes VOUT to stabilize at a new voltage increases as the size of C2 increases, so a compromise between ripple, response time, and linearity must be chosen carefully. As a final consideration, the maximum attainable input frequency is determined by VCC, C1 and I2:
USING ZENER REGULATED OPTIONS (LM2917) For those applications where an output voltage or current must be obtained independent of supply voltage variations, the LM2917 is offered. The most important consideration in choosing a dropping resistor from the unregulated supply to the device is that the tachometer and op amp circuitry alone require about 3 mA at the voltage level provided by the zener. At low supply voltages there must be some current flowing in the resistor above the 3 mA circuit current to operate the regulator. As an example, if the raw supply varies from 9V to 16V, a resistance of 470 will minimize the zener voltage variation to 160 mV. If the resistance goes under 400 or over 600 the zener variation quickly rises above 200 mV for the same input variation.
www.national.com
 
Is it necessary to convert the rpm information into a voltage? Why don't you just count the revolutions directly with the micro using the signal from the inductive sensor?

It isn't, to be honest. As I understand it though (I'm no expert with these sensors) they produce ac signal with a voltage that increases with speed aswell as frequency, so I imagine it would need some 'dressing' to be able to be plugged into the pic directly, at the same time I am developing the program to be quite complicated, using look up tables, data logging, plotting positions on a 'map' depending on speed etc, I'd imagine taking time off to do a bit of counting might be a bit of an unwanted load on the processor. I could do just one timed count I guess, but even then I'd have to do at least four a second.

I'm not ruling it out as an option, if I could make it work directly with the pic, but the lm2917 looked a whole load more convenient (if it worked).
 
I see. I've used the LM2917 (albeit 20+ years ago) to interface a speed measuring radar to a chart recorder. The frequencies I was dealing with were considerably higher, and I don't recall having similar problems. The signal from the radar was also a square wave.

Is there a way to get a higher frequency from your flywheel arrangement? For instance, relocating the inductive sensor to detect the teeth of a gear rotating on the same shaft as the flywheel?
 
I'm afraid not, it's the same sensor that the engine management system uses which is sent from the ecu then to the dash unit (though the tachograph reads the rpm right all over the scale).

So unless noise can be generated in a tee'd sensor only on the Tee then I think we can rule out ac noise (the whole thing is shielded btw).

Just to edit, here's the full circuit to the pic:

**broken link removed**

The value jumps around a bit so I added that teensy cap. It did help a bit so I might increase it's value. The pot is in a voltage dividing config so I can 'tune' the rpm.

I was wondering actually if perhaps the pot might be leaking the signal to ground. Would this make any sense at all?
 
Your assumption of 66Hz per volt is incorrect, That only applies to that exact circuit in the datasheet. You have changed the value of (in your circuit) C2 to 22nF instead of the recomended 10nF. I designed a tach for a car using the points as a signal.

Try to use accurate components

This extract from my design might help you.

LM2907-14N

This IC takes our RPM to a voltage level.

4 stroke, 4 cylinder engines as found in the Austin mini generate two sparks per engine revolution. Thus a 9000RPM (Assumed max) will output 18000 spark pulses. 18000 per minute is 300 per second therefore for design purposes maximum frequency of 300Hz is used.

As per the data sheet Capacitor C1 is governed by

Fmax = I2/(C1*Vcc) .... (I2 is stated as 180uA)

The Vcc value is regulated at 12V thus for a maximum frequency of 300Hz C1 will need to be less than 50nF. The conclusion from this formula is a indirect proportionality between capacitor value and maximum frequency!

Thus C1 < 50nF

From Datasheet Page 4 : R1>= V3Max /I3min ... (I3min is stated as 140uA)

Thus we can conclude that if we want our output voltage to be 10V for full scale then

R1 > 71K

Now that we have our restrictions we use the main formula: Vout = Vcc x Fin x C1 x R1 (using maximum values of Vout = 10 and Vcc =12 and Fin = 300) we solve for C1 and R1.

Since cap values are hard to come by we substitute for an availible value (within our restriction) and see if the R1 value can be achived.

From the above two results, a possibility would be:
C1 = 33nf
R1 = 84175 (80K plus a 10k series pot)
C2 = 1uF (or less)
Also RL = 10k (not important)
 
Last edited:
Thanks for your reply StudentSA.

Shouldn't vcc be 7.5 as that's the internally regulated voltage for my 2917n8.

I doubled the value of the capacitor as I only want the revs to read up to about 4000.

4000 is the maximum permissable speed of this engine, yet I thought it best to try and fill the 0-5v constraints of the adc comparator.

with a 22nf capacitor this is my calculation:

with a four gap flywheel at 800 rpm, the frequency is 53hz.

so voltage output at idle should be = 7.5v x 100k x 22n (0.00000002) x 53Hz

which is just less than a volt.

But I don't get just less than a volt. I get many volts! I am fairly confident that my ac signal is clean, as my engine management system is very sensitive.

any ideas?
 
Last edited:
Hmm well i've made some adjustments and we 'seem' to be getting there.

Now I get about 1v at tickover, and as you rev up it shoots up to about 6v.

And then it stays there, though this is about 2000 rpm. Still a bit short of my 4k rev range.

Could the signal be going out of range for the 7.5v internal supply, but if so then why?

My capacitor modification should effectively double vout for a given frequency, which should be okay considering my rev range is only half of most engines.



I have placed an order for some 10nf capactitors. I will try these, use the reference circuit from the datasheet as it is given and test the results.
 
Last edited:
Don't have a scope I'm afraid so I'm stuck.

I don't understand this, at idle speed it measures the signal perfectly, about 0.8v on my multimeter (53hz) but at 100hz and above it's about 5v, then it doesn't go any higher - it sticks at 5v output until the revs drop below 100hz'ish.

The output voltage does bounce a fair bit though, even when its measuring the right voltage, you can see it visibly moving if you hook up a analogue multimeter, does that help identify anything?
 
Last edited:
How are you getting the signal from the sensor to the 2917? Are you using shielded cable? Ignition wiring might be putting a lot of crap on your input signal.
 
Oh gosh don't open that can of worms!

;)

It's a diesel so there's no fancy sparkplugs or HT leads.

I am using shielded cable, its not just shielded but its earthed shielding aswell - there is a slight exception in that right at the end theres a couple of inches or so exposed (nopt bare wire, but just plastic insulation) so I could solder it to the board.

I know noise is a major, major problem so I used shielded audio cable with a decent current rating and wrapped it in aluminium foil on the outside too!

The car wouldn't start without the audio cable, so I'd like to think I've learnt to be careful.

I could try and get rid of the remaining two inches if you think it'd help?

I do appreciate the assistance so far btw :) we'l get there!
 
Last edited:
What is your sensor? I know you said it is inductive. Does it have a part number with a datasheet?
What features are you sensing on the flywheel?
 
Last edited:
It's just a standard Bosch crank sensor.

I'll see if there's a part number tomorrow.

The features I can tell you about, it's a flywheel with four holes evenly drilled into it at 12, 3, 6 and 9 o clock.
 
It's just a standard Bosch crank sensor.

I'll see if there's a part number tomorrow.

The features I can tell you about, it's a flywheel with four holes evenly drilled into it at 12, 3, 6 and 9 o clock.
Standard? I'll bet Bosch has more than one "crank sensor".
For example, **broken link removed** says it has a digital output. They can't do that without a wire for power (+12V).
 
Yes as far as I'm aware there's a few hundred.

Don't hold much hope for a datasheet, it takes distributor status just for their library of part numbers.

We are safe to say though, that they use generally two types, the hall effect that produces your dc pulses, and the inductive type with ac pulses.

This is the latter. Rover arn't so secretive with their engine management wiring diagrams, which considering both sensors are used on different models it's fairly easy to tell which runs what as fit one to the other and it doesn't run. :)

This is a three pin type, it has no power supply and one connector is for the shielding, which is grounded to the management computer.
 
Last edited:
I was recently using a lm2917 also and found out I didn't need it, I was converting my tach output, a square wave, to DC, but it turned out that all I had to do was integrate the square wave with the correct rc network for my frequency, so if you amplify your inductor output to a square wave, you can integrate that.
Kinarfi
Also, how are you using the sensor, how does it get it's signal, close the crank shaft, close the the teeth where the starter starter engages, how many pulses per revolution.
Thanks
 
Last edited:
....It gets it's signal from the flywheel - the sensor is fitted to the back of the flywheel (gearbox) cover and the flywheel passes by.

It does not count the teeth - there are four holes drilled into the flywheel, and these are picked up.
 
Status
Not open for further replies.

Latest threads

Back
Top