ATMega168 Tachometer help using LM2907 chip

SgtWookie

Joined Jul 17, 2007
22,230
"no movement" - what do you mean by that? No output at RUN/ ?

Are you feeding a signal to the tach input?

If so, try jumpering another 10k resistor between IC1 pins 1 and 6.
 

Thread Starter

StealthRT

Joined Mar 20, 2009
303
"no movement" meaning that it stays constant at 5.05v when the cars off/while starting and started.

I'm feeding a signal FROM the tach wire off the ECU to the chip.

Still want me to put another 10k in?

David
 

SgtWookie

Joined Jul 17, 2007
22,230
"no movement" meaning that it stays constant at 5.05v when the cars off/while starting and started.

I'm feeding a signal FROM the tach wire off the ECU to the chip.
OK. Did you try revving the motor up slightly, say to a fast idle of 1200-1800 RPM to see if it's just out of range? An out-of-tolerance cap might do that.

Still want me to put another 10k in?
Try the fast idle thing first. Then add the 10k resistor from pin 1 to pin 6.

Are you seeing about 7.5v on pin 6?

You DO have the board grounded to the vehicle's chassis or battery negative terminal, right?
 

Thread Starter

StealthRT

Joined Mar 20, 2009
303
Still stays the same if i rev the engine.

Put the 10k in between 1 and 6 and still the same results.

Pin 6 has 7.5-7.6v.

And yes, the board is grounded via the battery.

For an FYI i am using my voltmeter to read the RUN line. I'm pretty sure thats not the problem though since the RUN has volts coming out of it (5v or less). But i thought i would add that piece of info just in case.

David
 

SgtWookie

Joined Jul 17, 2007
22,230
OK.
Remove the 10k resistor going from pin 1 to pin 6 that I just had you add.

Make sure that none of the component leads are shorting out against each other.

Then take some more photos like you did before, and post them.

.PNG format is preferable to .JPG, as they won't lose image quality like .jpg will.
 

SgtWookie

Joined Jul 17, 2007
22,230
Actually, before you do that...
Turn power on.
Measure the voltage from pin 8 to pin 7; it should be about 3.8v, or 1/2 the voltage from pin 8 to pin 6.
Then measure the voltage between pin 3 and pin 7; write it down.
Start the engine, let it idle. Measure the voltage between pin 3 and 7 again; write it down.
Rev the engine to fast idle. Measure the voltage between pin 3 and 7 again; write it down.
 

SgtWookie

Joined Jul 17, 2007
22,230
More questions...
R3, the 1k resistor to the ATMega's 5v supply. Is there a common ground between this circuit and the ATMega's supply? If not, and you're measuring the voltage on the wire between the ATMega's supply and ground, you'll always read 5v no matter what the LM2907 is doing.

If the long wire on pin 5 is connected to the ATMega's input pin, disconnect it for the moment; if the I/O pin was accidentally configured as an output pin and held high, you won't see pin 5 change.
 

Thread Starter

StealthRT

Joined Mar 20, 2009
303
Ok lots of info here :)

Measure the voltage from pin 8 to pin 7; it should be about 3.8v, or 1/2 the voltage from pin 8 to pin 6.
I get 3.7v on 8 and 7. 7.5v on 8 and 6.

Then measure the voltage between pin 3 and pin 7; write it down.
3.7v


Start the engine, let it idle. Measure the voltage between pin 3 and 7 again:
3.5-3.6v


Rev the engine to fast idle. Measure the voltage between pin 3 and 7 again:
Keeps going lower... 3.4v...3.2v...







David
 

Thread Starter

StealthRT

Joined Mar 20, 2009
303



UPDATE:
I just read your other post. I am not using the ATMEGA right now. I am just using a voltmeter to see what the "RUN" is so the ground is from the car and the 5v is from the Regulator.


David
 

SgtWookie

Joined Jul 17, 2007
22,230
OK David... sorry, but I messed up a formula when I was originally calculating the value for R5. :rolleyes:

R5 needs to be somewhere between 240k and 270k, instead of 4.3k like I suggested before.

If C3 is exactly 0.1uF, then:
if R5 is exactly 240k Ohms, you should get pin 5 transitioning from high to low when engine RPM is 405.
if R5 is exactly 270k Ohms, you should get pin 5 transitioning from high to low when engine RPM is 360.

Right now with R5 being 4.3k, you'd have to rev the engine to above 22,640 RPM to get that output to go low... unless you install a turbine, you ain't gonna get there.

Sorry 'bout that, but it's just a one-resistor fix.

If you want it to trigger at some other RPM, let me know.
 

Thread Starter

StealthRT

Joined Mar 20, 2009
303
Well i have a 270k so i will replace the 4.3k R5 with that tomorrow. It's raining here right now so its not the great environment right now to work on it :eek:P

for the RPM range, I'm just looking for something that's "average" for all cars. 360rpm sounds good.

If i haven't said it enough, allow me to say it now and tell you how much i appreciate your time with helping me out with this project, SgtWooke. :)

David
 

Thread Starter

StealthRT

Joined Mar 20, 2009
303
:)

Well i am happy to post that it worked with switching the 4.3k out for the 270k. its around 5v without starting and during starting its around 4.0v-3.25v then then it goes to .05v when started and stays steady. However, i did not rev the engine once it was started but im sure it should stay at the .05v?

David
 

SgtWookie

Joined Jul 17, 2007
22,230
:)

Well i am happy to post that it worked with switching the 4.3k out for the 270k. its around 5v without starting and during starting its around 4.0v-3.25v then then it goes to .05v when started and stays steady.
Interesting - perhaps R5 is a bit large and/or C4 is a bit large.

You don't want RUN/ to drop unless the engine has actually started running. Perhaps RUN/ started dropping as the engine was starting?

However, i did not rev the engine once it was started but im sure it should stay at the .05v?
Revving the engine would only keep the RUN/ output low. The thing to find out now is how low you can idle the engine before RUN/ rises. Try putting it in gear, turning on all the lights & A/C with the fan on high, and see if RUN/ goes back high.
 

Thread Starter

StealthRT

Joined Mar 20, 2009
303
Should i try changing the R5 again? The lower end of resistors i have are in the range of [27k, 33k, 39k, 51k, 56k, 68k, 82k, 120k, 150k, 180k, 220k, 270k, 330k, 470k]

Or should i change the C4? The Capacitors that i have handy are [100uF, 47uF] but they both are Electrolytic Capacitors.

David
 

SgtWookie

Joined Jul 17, 2007
22,230
Should i try changing the R5 again? The lower end of resistors i have are in the range of [27k, 33k, 39k, 51k, 56k, 68k, 82k, 120k, 150k, 180k, 220k, 270k, 330k, 470k]
Try 180k. If you do not get lower than 0.1v at RUN/ when the engine is idling with full load (in gear, lights/radio/AC/blower going full blast), then it is not enough resistance. If you DO get 0.1v at RUN/ when the engine is idling with full load (blah blah etc) then try 150k. We're looking for the threshold.

Once you determine the lowest resistance where RUN/ is no longer below 0.8v, increase to the next higher value, and re-test to ensure that it DOES go below 0.8v.

Or should i change the C4? The Capacitors that i have handy are [100uF, 47uF] but they both are Electrolytic Capacitors.
C4 is currently around 0.1uF, and it may be a bit too large.
Don't replace it with a larger cap, because it would induce a HUGE lag in the response time. It needs to be the low-leakage type that it is now. It should be OK.

I'm just trying to help you "tweak it in" to the best response with the components you have available. How it's responding right now may be optimal, but you won't be able to tell without a bit of experimentation.
 
Last edited:

Thread Starter

StealthRT

Joined Mar 20, 2009
303
Alright here are the results of the R5:

150k = 1.7v-1.8v
180k = 1.2v-1.4v
270k = Could not find them :eek:(
330k = .06v-.15v
470k = .06v constant

David
 

SgtWookie

Joined Jul 17, 2007
22,230
Alright here are the results of the R5:

150k = 1.7v-1.8v
180k = 1.2v-1.4v
270k = Could not find them :eek:(
330k = .06v-.15v
470k = .06v constant
Odd; you'd just tested it with a 270k the other day?
Try it with 200k, 240k and then again with the 270k. Let's stay in that range.

Measure with the engine off, while cranking, and then at idle - for all three.
One of those three values should work well for you.
 

Thread Starter

StealthRT

Joined Mar 20, 2009
303
Ha I guess that's why I couldn't find any 270k's. I forgot I used them already and I didn't put them back in the pack.

I do not have any 200k or 240k's. I'll have to see if radioshack has any of this for 100 times the retail price :/

I can already tell you that when the engine is off it will be around 5v. But I will test while starting and when it has started tomorrow pending me finding the resistors of course.

David
 

SgtWookie

Joined Jul 17, 2007
22,230
You can use two 470k resistors in parallel to get 235k.
You can use one 470k and one 330k resistor in parallel to get 194k.
 

Thread Starter

StealthRT

Joined Mar 20, 2009
303
Ok:

235k:
Engine off: 5.02v
Cranking : 1.5v
Idle : .06v

194k:
Engine off: 5.02v
Cranking : can not really tell..
Idle : .06v / .11v / .25v / .61v / .44v / .43v....

David
 
Top