ATMega168 Tachometer help using LM2907 chip

Thread Starter

StealthRT

Joined Mar 20, 2009
303
OK a questions:

Should R5 still be 4.7k for my 6-cylinder? Or does it need to stay with your 6.2k?

Also, i plan on using all SMD components in the final boards so the "space" issue will not be a problem. Besides, i will have 12v relays on the board as well so those are as tall (or maybe slightly taller) than any of the caps.

I'm unable to find the CAP .1UF 100V STACK METAL FILM on the mouser website. I have an account with them and have ordered there before. I think i can get the same shipping that i could get with Digikey if only i talk to them and show them proof. There good at matching digikey's prices. It would be great if you could post the links of the CAPS on mouser that i will need.

David

David
 

SgtWookie

Joined Jul 17, 2007
22,230
OK a questions:

Should R5 still be 4.7k for my 6-cylinder? Or does it need to stay with your 6.2k?
A 6-cylinder engine would need a 4.3k resistor.
Also, i plan on using all SMD components in the final boards so the "space" issue will not be a problem. Besides, i will have 12v relays on the board as well so those are as tall (or maybe slightly taller) than any of the caps.
Gee, why didn't you say you wanted to use SMD's to begin with?

Have you worked with SMD's before? They're not particularly easy for hobbyists to work with. You'll definitely need to make a PCB.
I'm unable to find the CAP .1UF 100V STACK METAL FILM on the mouser website. I have an account with them and have ordered there before.
I see. Mouser's a good outfit. Unfortunately, they don't carry the LM2917N-8, but Digikey does. However, if you're going SMD, you'll want the LM2917M-8 instead:
http://www.digikey.com/scripts/DkSearch/dksus.dll?PName?Name=LM2917M-8-ND

I think i can get the same shipping that i could get with Digikey if only i talk to them and show them proof. There good at matching digikey's prices. It would be great if you could post the links of the CAPS on mouser that i will need.
Mouser doesn't stock either version of the LM2917, so you're going to need to order that from DigiKey anyway. They do carry an NTE version, but it's more expensive. You might as well get the "real thing".

If you're wanting to go SMD, then that changes more stuff - you'll need SMD resistor, SMD capacitors, etc.
 

DickCappels

Joined Aug 21, 2008
10,187
Sorry to come to this discussion so late, but StealthRT, why are you messing around with the LM2907 when the ATMEGA168 has two 8 bit and one 16 bit timer/counters? You can measure the RPM directly using a digital input and any of those counters and dispense with the LM2907.
 

SgtWookie

Joined Jul 17, 2007
22,230
I agree, Dick.

I mentioned that in reply #10 when I wrote, "If you wanted actual RPM readings, you could sample the TACH input signal with the MCU, and count the positive-going transitions vs the clock speed".
 

Thread Starter

StealthRT

Joined Mar 20, 2009
303
DickCappels:
I do not know how to do that by using the ATMEGA168 chip itself. I saw some code for the timer function and it's way over my head to even begin to figure out what to use and all. I don't see it working anyways since the Tach wire has AC current coming from it in pulses and to my knowledge, the ATMEGA can only read DC current. Hints why i need a dedicated chip to do that before reading it. Of course, that knowlege is just from form posts and what i have read-so correct if nessassary.

SgtWookie:
OK, 4.3k it is for R5.

I will use SMD's on the final board, not this project board. I do not have the skills to solder tiny SMD's to a board. Thats why i wanted to use thru-holes for the project board THEN once all is final, find the same part but in SMD form.

Ok, ill order from Digikey since mouser does not carry the LM2917M-8.

David
 

Thread Starter

StealthRT

Joined Mar 20, 2009
303
Alright SgtWookie ill order that one.

Before i place the order, is everything correct in the latest schema? For the 14+ line, it will be more like 12v (i will take it from the car's battery)

Parts list:
- 1 x 470ohms
- 4 x .1uF
- 2 x 4.7k
- 1 x 10k
- 1 x 1k
- 1 x 4.3k
- LM2917N-8

(Of course ill get a lot more quantity, just looking to make sure i have the correct quantity for the board at hand)

If it looks OK then ill push the purchase button :)

David
 

SgtWookie

Joined Jul 17, 2007
22,230
Before i place the order, is everything correct in the latest schema?
Yes, with R5 being changed to 4.3k for a 6-cylinder engine, but you knew that already.

For the 14+ line, it will be more like 12v (i will take it from the car's battery)
Actually, it'll likely drop down to around 10v when the engine is trying to start, and pop up to around 14.5v right after the engine starts.
Parts list:
- 1 x 470ohms
- 4 x .1uF
- 2 x 4.7k
- 1 x 10k
- 1 x 1k
- 1 x 4.3k
- LM2917N-8
Looks good.
 

Thread Starter

StealthRT

Joined Mar 20, 2009
303
K, sorry to be so anal...

- RES 470 OHM 1/4W 5% CARBON FILM [http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=470QBK-ND]

- RES 1.0K OHM 1/4W 5% CARBON FILM [http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=1.0KQBK-ND]

- RES 10K OHM 1/4W 5% CARBON FILM [http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=10KQBK-ND]

- RES 4.7K OHM 1/4W 5% CARBON FILM [http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=4.7KQBK-ND]

- RES 4.3K OHM 1/4W 5% CARBON FILM [http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=4.3KQBK-ND]

- CAP .1UF 100V STACK METAL FILM [http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=P4725-ND]

- IC CONVERTER FREQ TO VOLT 8-DIP [http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=LM2917N-8-ND]

Let me know if you see something wrong. Kinda hard to fish though 100's of different types of resistors, etc...

* Note: Mouser is cheaper by a few bucks overall (and they do offer USPS shipping) :) *

David
 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
K, sorry to be so anal...

- RES 470 OHM 1/4W 5% CARBON FILM [http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=470QBK-ND]

- RES 1.0K OHM 1/4W 5% CARBON FILM [http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=1.0KQBK-ND]

- RES 10K OHM 1/4W 5% CARBON FILM [http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=10KQBK-ND]

- RES 4.7K OHM 1/4W 5% CARBON FILM [http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=4.7KQBK-ND]

- RES 4.3K OHM 1/4W 5% CARBON FILM [http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=4.3KQBK-ND]

- CAP .1UF 100V STACK METAL FILM [http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=P4725-ND]

- IC CONVERTER FREQ TO VOLT 8-DIP [http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=LM2917N-8-ND]

Let me know if you see something wrong. Kinda hard to fish though 100's of different types of resistors, etc...
Everything looks OK.

* Note: Mouser is cheaper by a few bucks overall (and they do offer USPS shipping) :) *
Cheaper by a few dollars? You're obviously buying more than is on your current shopping list. Oh yeah, Mouser doesn't stock the LM2917N-8; that's why they're cheaper.
 

Thread Starter

StealthRT

Joined Mar 20, 2009
303
Everything looks OK.


Cheaper by a few dollars? You're obviously buying more than is on your current shopping list. Oh yeah, Mouser doesn't stock the LM2917N-8; that's why they're cheaper.
Rain on my parade why dontcha SgtWookie :p

Thanks for your help. I'm ordering it now.

BTW, was that PCB design done in Eagle? If so, i have it so could you post the files on your next post so i can play with it a little? :)

David
 

SgtWookie

Joined Jul 17, 2007
22,230
Rain on my parade why dontcha SgtWookie :p
That's my job. It's nasty, but someone's gotta do it. ;)

BTW, was that PCB design done in Eagle?
Yes, v4.16r2.
If so, i have it so could you post the files on your next post so i can play with it a little? :)
Sure. If you edit them with a version later than v4.16r2, you're on your own.

Note that the polygon fill (copper pour) won't happen until you click the ratsnest button; it's necessary because the copper pour is the ground.

I changed the layout just a tad by moving R1 to make the trace routing just a bit more straightforwards, and increase the isolation.
 

Attachments

Thread Starter

StealthRT

Joined Mar 20, 2009
303
My parts came in today! YAY! :)

So i will be hooking it up tomorrow and posting back my status of how it all went (or better yet, what all i blew up!) :p

Ether way ill post something :)

David
 

Thread Starter

StealthRT

Joined Mar 20, 2009
303
Well sadly it did not do anything when i hooked everything up.. It was 0.00 throughout the whole process.





Thats the board layout that i have. I'm sure its hard to see/read so ask any questions you need.

David
 

SgtWookie

Joined Jul 17, 2007
22,230
You realize that 26A through 26E are all connected together, right?

That 4.7k resistor (R2) isn't doing anything. Basically, you've connected pin 6 (Vcc) to pin 7, which means that the output won't ever show anything.

Pin 7 is one of the inputs to the comparator. If it's held at Vcc, the output won't toggle.
 

Thread Starter

StealthRT

Joined Mar 20, 2009
303
Hum.. i followed the schema just as you put...

Oh, btw, its my first time working with a breadboard. I normally just use solder and solder them all with wires and such.

I think i need to just solder it so i don't get confused. There are a lot of things being hooked together on the 12+ line to pin 6.

If you have some parts laying around, could you take a pic of them all in the breadboard the way i need to connect this one? If not its fine, ill just do the solder thing.

David
 

SgtWookie

Joined Jul 17, 2007
22,230
It's not that bad as it is:



Does the 1k go to ground?
No, it goes between pin 5 and the +5V supply you're using for your ATMega168.

[eta]
Now that you mention it, I realized that although I showed the 1k resistor being connected between pin 5 and the +5v supply on the schematic, I didn't include a wire pad for it, so on the board there wasn't a place to connect the +5V supply wire to! Of course, if the ATMega168 has weak internal pull-ups available, that resistor could be done away with altogether.
 

Attachments

Last edited:
Top