Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Tacho

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
Tubeampman

Bascom Member



Joined: 27 Feb 2006
Posts: 100
Location: Bodo

norway.gif
PostPosted: Thu Jun 26, 2014 9:59 pm    Post subject: Tacho Reply with quote

Hi

has someone made a tachometer with 1 rpm resolution and can give me som hints on how this can be done.
Let say we have an engine with a sensor that give us one puls pr. revolution.

If i calculate the frequency i can get more than 60rpm resolution.

Am not asking for someone to make the code for me, just a formula or some basics.


Thanx
Øyvind

(BASCOM-AVR version : 2.0.7.7 )
Back to top
View user's profile
kimmi

Moderator



Joined: 24 Feb 2006
Posts: 1922
Location: Denmark

denmark.gif
PostPosted: Thu Jun 26, 2014 11:09 pm    Post subject: Reply with quote

Hi Øyvind
did you see AN #138 - RPM meter

_________________
/ Kim
Back to top
View user's profile Visit poster's website MSN Messenger
AdrianJ

Bascom Expert



Joined: 16 Jan 2006
Posts: 2483
Location: Queensland

australia.gif
PostPosted: Fri Jun 27, 2014 3:52 am    Post subject: Reply with quote

AN 138 seems remarkably complicated.

With 1 pulse per rev, just measure the time between pulses using a high speed timer, like eg timer1. The timer input capture function works well for this. Set the prescaler to give a count which does not overflow at the lowest possible engine speed.

Then the rpm is just 60,000,000/timer count, if the count is in microsec. Scaling the count to the actual clock frequency and divider used is pretty obvious.

_________________
Adrian Jansen
Computer language is a framework for creativity
Back to top
View user's profile Visit poster's website
O-Family

Bascom Expert



Joined: 23 May 2010
Posts: 320
Location: Japan

japan.gif
PostPosted: Fri Jun 27, 2014 9:10 am    Post subject: Reply with quote

Original page
http://www.ne.jp/asahi/shared/o-family/ElecRoom/AVRMCOM/RevCounter/RevCounter.html

Google translation
http://translate.google.com/translate?hl=ja&sl=ja&tl=en&u=http%3A%2F%2Fwww.ne.jp%2Fasahi%2Fshared%2Fo-family%2FElecRoom%2FAVRMCOM%2FRevCounter%2FRevCounter.html&sandbox=1
Back to top
View user's profile Visit poster's website
Tubeampman

Bascom Member



Joined: 27 Feb 2006
Posts: 100
Location: Bodo

norway.gif
PostPosted: Fri Jun 27, 2014 2:54 pm    Post subject: Reply with quote

Hi

Thanx to all of you for helping me, now i have the formula from Adrian and finished code to look at Smile



Øyvind
Back to top
View user's profile
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum