Go Down

Topic: Measure HIGH rpm and sent to computer HELP inertiadyno (Read 2 times) previous topic - next topic

Linkan

Hi,

In school I work on a project. I'm about to make a inertiadyno for model motors, running att speeds up to 30000PRM. thus I have to know the time for every rotation of the "inertiawheel" during the acceleration of the motor and not lose any signals.
I use a reflex detector to get a puls from status low to high and read it on pin2 at my arduino atmega328.

The problem is that when I run the test of the motor and plot the graph (Watt over rpm) in my computer after the run the line sort of jumps up very high here and there and sometimes goes to zero. I think im losing information somewhere, maybe in my logger or on to way to my computer. (I count the time for the first rotation and send it directly to the computer, then the second rotation and send that time to the computer and so on..)

(I havent my code here right now)

I ques my code is to simple to do this at those high RPM:s, so i would like to ask someone to give me a idé of how to write a good script that can handle this high rpms and not lose any data.

Thanks!


pluggy

Without a circuit diagram and a sketch we're struggling.  It sounds like its missing revs or possibly adding a few in sometimes.

Magician


Some spec. data on your sensor, from where you getting signals
would be really helpfull.
30.000 rpm is not a problem for arduino, as it 30.000/60 = 500 Hz only.
the same time if pulse is short in time (microsec. area),
it could be lost.

Linkan

Well, the pulses is very long. I have painted half the inertiawheel white and half black so the length of the pulses is no problem I guess.
again I haven't the script here right now because Im writing this from my mobile.

let's say I get pulses with a freqency of 500hz, then my arduino sends data to the computer of a frequency 500hz to, can't that  be a problem for the computer to process that information, even its very small data?

Magician


There is always difference between what you expect and reality...
In other words, if it painted in half doesn't mean the signal follow it sharp.
Only oscilloscope may show the truth.
In meantime, I'd suggest in order to suppress the noise/jitter 
(what , probably the cause)
try to read digital input a few times in a row, 3-5 should works, and
"majority" decision after that.
If more than half "0"-s, than it LOW and vice versa.

Go Up