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.

Frequency to Microprocessor input.

Status
Not open for further replies.
To implement a tach, you have two choices: count events per unit time, or measure the period between events using a high frequency clock (like the cpu clock of a microprocessor). Doing the former with any significant resolution means waiting a relatively long time between updates (like a second per update). Doing the latter means you can get higher resolution in a shorter time (like the interval between successive power strokes). Doing the latter, however, requires that you do a division to get the RPM:

f=k/period, where k is a constant.
Thanks Mike. I'm sure I will go through the pain once I start trying to write the capture.

Jason
 
Hey Spec,

Sorry the diagram wasn't viewable on my phone last night so didn't see you had posted it.

Thanks ever so much, I will need to source the 6N139, but will definitely try the design for my solution.

Will definitely get back to you with the results.

Thanks again, Jason.

No probs HJB- I only posted the schematic about 3.5 hours ago.

It turned out that, according to my analysis, nothing much changed from the rough sketch, which is good news.

Yes, you need a 6N139.

spec
 
Spec, all components ordered and should be here Monday.
 
While I was waiting for my components to come I decided to give Les's idea a crack, mainly to increase my knowledge and also alittle bit of curiosity

So I put a 10nf cap to ground, 10k in series, a 5.1v zener to ground and measured the output. Although the signal was a hell of a lot cleaner it still showed a massive variation in frequency. I would expect this was due to noise spikes still on the output.

How would I get rid of these noise spikes.

See files.

Jason.
 

Attachments

  • IMG_4178.JPG
    IMG_4178.JPG
    1.4 MB · Views: 260
  • IMG_4179.JPG
    IMG_4179.JPG
    1.5 MB · Views: 265
Hello.

I have finally got the components and tested the 6n139 option without success. I'm only doing this on breadboard to try and see how I got on butnot getting anything readable on the scope.

Spec, can you please advise.

Jason
 

Attachments

  • IMG_4204.JPG
    IMG_4204.JPG
    1.6 MB · Views: 267
  • IMG_4205.JPG
    IMG_4205.JPG
    949.7 KB · Views: 273
Going back to the zener option with alittle more filtering gives me a decent signal.
 

Attachments

  • IMG_4206.JPG
    IMG_4206.JPG
    1.5 MB · Views: 264
  • IMG_4210.JPG
    IMG_4210.JPG
    1.4 MB · Views: 265
After earthing pin 3 it all magically started to work.

See results.

Would like to thank the people who have helped me on this.
 

Attachments

  • IMG_4215.JPG
    IMG_4215.JPG
    1.4 MB · Views: 268
  • IMG_4217.JPG
    IMG_4217.JPG
    1.5 MB · Views: 249
Spec.

Fitted and seems to be working good. Thank you for your help.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top