3

I am currently working on a project, where I design a PID-Controller for a 2-axis stabilization with brushless-propeller-motors.

My question is: Does an Arduino UNO have enough computing power to perform this task in a useful manner? Arduino UNO Specs

And secondly: If the UNO was really too slow for this task, would the newly released Arduino ZERO PRO perform at an acceptable rate? Arduino ZERO PRO Specs

Thanks for your help and inputs in advance!

hallole
  • 35
  • 1
  • 6
  • 2
    what bandwidth do you require? that's the real question. Can you complete the accumulation tasks before your next sample is due to satisfy your system bandwidth –  May 31 '15 at 18:25
  • JonRB is exactly right! And don't forget about any processing which needs to be done on the sensor inputs before getting to the PIDs. Also note: on the UNO a floating-point PID implementation will be much slower than a 'long' PID implementation. –  May 31 '15 at 18:32
  • 1
    PID is a relatively simple algorithm. You probably only need something like 50 updates per second at the most (wild guess). So my guess, on the limited amount of info given, is that the uno will do fine. – Gerben May 31 '15 at 19:03
  • @Jay J floating point math is not that much slower than fixed on the UNO. In my experience the time savings (if any) have not been worth the extra work to do fixed point safely. – BrettFolkins May 31 '15 at 19:14

1 Answers1

5

Assuming you're not doing anything too fancy, yes, it should be fine.

There's even a library to do all the work for you: http://playground.arduino.cc/Code/PIDLibrary

Majenko
  • 105,095
  • 5
  • 79
  • 137