Previous in Forum: DC voltage Circuit Breaker   Next in Forum: reluctance motor
Close
Close
Close
7 comments
Rate Comments: Nested
Associate

Join Date: Jul 2007
Posts: 26

number of rev

08/04/2007 12:17 PM

i am suppose to program a micro controller, and the program should have the number of rev of the rotating disc in a mechanical energy meter as one of its parameters.

can anyone tell me how to use a counter to count the number of rev?

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Guru
Popular Science - Weaponology - New Member United Kingdom - Member - New Member

Join Date: May 2007
Location: Harlow England
Posts: 16512
Good Answers: 670
#1

Re: number of rev

08/04/2007 12:34 PM

It depends how you are sensing the disc..

But just s'pose you have some sort of sensing and it goes from 1 to 0 every rotation into an input port of the controller.

There are two basic ways .

1 Simple and dirty:_ Have the microcontroller in a constant loop monitoring the port every time it sees the state change from 1 to 0 increment a counter.

2. Clever way{- Make sure the port you go into can be used as an interrupt, write your interrupt routine to do the counting...this way the micro' can be doing other funky stuff while it's waiting.

If the above doesn't make sense then you are in big trouble!

Maybe someone will have other ways or tell be I'm being too complicated or too simple or maybe, like baby bear's porridge, it's just right....

__________________
health warning: These posts may contain traces of nut.
Register to Reply
Guru
Engineering Fields - Manufacturing Engineering - New Member Hobbies - Target Shooting - New Member United States - Member - New Member Hobbies - Hunting - New Member

Join Date: Dec 2006
Location: Charlotte, NC USA
Posts: 791
Good Answers: 17
#2

Re: number of rev

08/04/2007 4:09 PM

How accurate do you need it? You might try a timer. If you know the speed, start a timer and count the seconds / rpm / 60 = turns and so on. Quick and easy but not accurate.

__________________
Be careful of what you wish for .....
Register to Reply
Power-User

Join Date: Jun 2006
Location: Central America
Posts: 227
Good Answers: 1
#3

Re: number of rev

08/04/2007 6:54 PM

All of the above plus my two cents worth. You need to count rpm and the microcontroller must see it. You need a digital tachometer. It´s assumed that the microcontroller is capable to accept diect input from the tachometer. Otherwise read the manual and regroup.

Register to Reply
Guru
Popular Science - Weaponology - New Member United Kingdom - Member - New Member

Join Date: May 2007
Location: Harlow England
Posts: 16512
Good Answers: 670
#4

Re: number of rev

08/05/2007 5:41 AM

The question states revs...

Some are assuming RPM.... the two are entirely different.

In an electricity meter it is just total revolutions??? (counted over the billing period?)

I dunno, nuffin to do wiv me mate.

__________________
health warning: These posts may contain traces of nut.
Register to Reply
Guru
Canada - Member - New Member Hobbies - Musician - New Member

Join Date: Dec 2006
Location: Western Canada
Posts: 1863
Good Answers: 39
#5

Re: number of rev

08/05/2007 2:25 PM

can anyone tell me how to use a counter to count the number of rev?

Two methods: either have a dark spot on a light colored disc or a hole. Any of the normal photo-optic sensors with an emitter and receptor will do the trick.

One state transition = one revolution of the disk.

If the meter is such that reverse rotation is possible under some operating conditions, you might want to include a feature to detect direction of movement.

This is called quadrature and will require twice as many detection points. Quadrature refers to the exact position of the two sensors so that the trigger of one occurs before the other. Direction of movement is now detected by seeing which optical path is first interrupted.

Several IC manufacturers have application notes describing the details of establishing quadrature and which chip to use. They also include other details such as how to avoid false triggering, maskign of signal by ambient conditions. for example; many electrical meters are mounted on the exterior of a building for easy acces by meter readers. Such meters are exposed to bright sunlight. The disc in the meter may also acquire heat from solar radiation input. Depending on the infra-red spectrum of the sensor it may be blinded by reflected sunlight off a bright aluminum disk or it may see the heating of the disk as a continuous signal that mask the transition from zero to one. Careful mechanical design and sheileding of sensor /emitter is required.

Samgamo is one of the larger suppliers here in Canada and they have already solved the problem. I recall first working on this problem about twenty years ago.

Are you re-inventing the (electric) wheel? ( smile)

Elnav

__________________
Elnav
Register to Reply
Guru

Join Date: Jul 2006
Location: Eastern Kansas USA
Posts: 1503
Good Answers: 128
#6

Re: number of rev

08/05/2007 5:47 PM

This question is dual-posted as two threads. Can someone combine them?

Register to Reply
Guru

Join Date: Feb 2006
Posts: 1758
Good Answers: 6
#7

Re: number of rev

08/05/2007 7:57 PM

Dual posted Discussion:

http://cr4.globalspec.com/thread/10780

http://cr4.globalspec.com/thread/10780/number-of-rev

Register to Reply
Register to Reply 7 comments
Copy to Clipboard

Users who posted comments:

coffeebean (1); elnav (1); Haajee (1); jmueller (1); Labyguy (1); user-deleted-1105 (2)

Previous in Forum: DC voltage Circuit Breaker   Next in Forum: reluctance motor
You might be interested in: Counter and Timer Boards

Advertisement