idea for Arduino off-season project

*Inexpensive and portable wheel speed controller for use during shooter development. Use for exploring, developing, demonstrating, and tuning speed control algorithms:

Decode the signal from a counter on a spinning wheel, compute RPM, feed the computed RPM and a setpoint into a control algorithm which computes motor command, and generate an output PWM signal corresponding to that motor command.

Does an Arduino have what it takes to do this?

Funny, I was thinking of doing the same sort of thing with a Raspberry Pi.

I also want our team to work on implementing a pneumatic based position control based on the whitepaper. We could really have used this to vary the elevation of our shooter.

Certainly, the arduino has more than enough power to run a simple PI loop for speed. It is actually better than a raspberry pi as it is a real time

I guess there really is only one way to tell :yikes:

There are several approaches to measuring and determining RPM. Figuring out which approach is optimal is going to have to be included in a project like this.

In fact, that might be a Whitepaper all by it’s self…hint hint.

I have used an Aduino with a fairly low speed motor, (vex motor) to drive a low CRP quad encoder (100 CRP) and it worked very well. Higher speeds and CPR’s may prove challenging, but heck, what fun is it when everything is easy??

Count me in.

a hall effect sensors would probably work best for a wide range of speed and applications.

I think it Archimedes that said “Give me a place for a microprocessor and with sensors and motors I will move the whole world.”

Or something like that.


The Arduino absolutely has the capabilities of doing this. We are using one this year to monitor our drive encoders (approximately 5000 counts/sec each - ISR triggering only on ‘A’ phase change, ‘B’ phase just for direction). I’ve also used it to determine RPM on our shooting wheel using a 256 count encoder on a wheel spinning at over 8000 rpm (‘A’ phase counter only). An internal 0.5 microsecond resolution timer was used in the RPM calculation. While I am not using it at the moment, I have code to drive 8 PWM signals off a timer (ISR driven). I’ve also ported the PID code we used to use on the IFI controller to the Arduino, but haven’t had a chance to debug it. So your project is definately feasible. This is being done on a Mega, only because it is what I happened to have available, but a smaller Arduino would also suffice.


I’m attaching the “Servo.cpp” file from the Arduino servo library. Reading through it seems to indicate a 1uS resolution for generating the PWM signals. That is far more than enough resolution to control any of the FRC motor controllers. Combine that with the comments above and it looks like this project just might be a winner.

Servo.cpp (12.2 KB)

Servo.cpp (12.2 KB)