rotary encoder high speed

Hi, everyone I am new arduino user, i want to know if arduino can handle this project.
I have a motor running at 450 rpm and a rotary encoder of 360 Pulse / rotation. It gives us 7.5 r/sec, plus I have to take measurements on 2 analog ports. (The project is a crankshaft balancer).
thank you

Could you use the hardware counters?

please what the hardware counter?

Hi, everyone I am new arduino user, i want to know if arduino can handle this project.
I have a motor running at 450 rpm and a rotary encoder of 360 Pulse / rotation. It gives us 7.5 r/sec, plus I have to take measurements on 2 analog ports. (The project is a crankshaft balancer).

This task should be no problem for a 16MHz Arduino. 7.5 rev/sec * 360 pulses/rev = 2700 pulses/second. Approximately 370 microseconds between pulses. You should be able to read the encoder with attachInterrupt() and counting and timing in software. You can use the encoder pulse as an external input to a hardware timer/counter, but I don't think that will be necessary, and it is more complicated.

Are you trying to hold 450 rpm constant? How accurately do you need to determine the rpm? Why are you using an encoder with so many counts per revolution? Is this a quadrature encoder? If so, you can read less than the full number of counts available, and lower the interrupt/processing tasks on the Arduino.

analogRead() takes about 100 microseconds, but can be made faster if necessary.

Can you describe a bit more about what you are tying to achieve? Do you currently have an Arduino?

tank’s
I use a variable speed drive for a fixed rpm, and I use a proximity sensor as a marker of axis 0. I wrote a small sketch without any interruption to see the time that it takes please try it.

int count;
int i;
unsigned long time;
int planA=A0;
int planB= A2;
int tabA[360];
int tabB[360];

void setup()
{
count=0;
pinMode(planA, INPUT);
pinMode(planB, INPUT);
Serial.begin(9600);
}

void loop()
{

for ( i=0; i<360; i++)
{
delayMicroseconds(370);
count=count+1;
tabA[i]= analogRead(planA);
tabB[i]= analogRead(planB);
}
time=micros(); 
Serial.print("time=");
Serial.println(time );
delay(5000);// break to view 

}

Please read the forum instructions and learn to post with code tags. http://forum.arduino.cc/index.php/topic,148850.0.html

Your code has been corrupted as posted. Go back and modify that posting. There is an edit/modify pulldown at the bottom right corner of your post.

Sorry , please need your help.

Thanks for revising your posting with code tags. You will get more help on this forum if you post in this format.

Sorry , please need your help.

To do what? I'm not certain what you are trying to see with your test sketch. What do you think you learned?

and I use a proximity sensor as a marker of axis 0

If you can use this sensor, instead of the 360 count/revolution encoder,and still monitor and control your rpm you will have an easier task, and there will be no issue of the analogRead() time and the encoder interrupts.

The calculations and control activities of the rest of the program are also important.

I think you should be able to monitor 450 rpm and take 2 analog readings successfully. If you run into problems I believe they can be solved.

Get started with your mechanical assembly , write real code, and possibly start a new thread if you encounter issues.

I will try to complete the mechanical assembly, write the final code to test and I remind you. Thank you for your help