SparkFun Forums 

Where electronics enthusiasts find answers.

For the discussion of Arduino related topics.
By tomcat_meow
#197221
I'm new to the world of Arduino and thinking of buying one to build a project of mine. I have some general questions about the implementation of the arduino. My project involves making a speed controller for approx 30 rpm on a large wheel approx 4 ft. diameter. I was thinking to glue magnets on the outer perimeter of the wheel every so many degrees and have a magnetic reader to create pulses for the arduino to read and act on a motor to keep the speed fairly constant.

So far I've bought an arduino uno 3 and loaded the arduino IDE and played with the led on pin 13 and seems fairly easy to program. So I will begin working on the program for my project but ....

My main question is when you program in the IDE and compile the code and it sends it to the arduino does the program remain in the arduino permanently or once the power is turned off? Right now the arduino is powered by my laptop and I don't want to dedicate my laptop to the project so I figure I can power the arduino with a power supply separately but once the laptop downloads my program and is disconnected, does the arduino start up and run my program automatically when powered up on it's own or does it have to be re loaded each time it's powered up?
By rcwilcox
#197240
Echo theropod's answer. If you haven't found it already, search for Hall Effect (if you use your own magnets) or Rotary Encoder (if you just want to attach to an output shaft) for your RPM sensor to drive your feedback loop.

https://www.sparkfun.com/products/9312

https://www.sparkfun.com/products/10790

Do a net wide search on PID controller to help you design the loop. While the following is a paper on following a line with a LEGO robot, the PID concepts are the same and should be easy to translate to your application.

http://www.inpharmix.com/jps/PID_Contro ... obots.html