Control of a small 12V DC motor

Hey, So I have never done anything like this before, so I am as new as possible. I have a lead screw, with a sleeve nut sliding up and down it. The screw is powered by a 12V DC motor. This is for retractable landing gear for a remote control airplane. So when the plane takes off, I need to retract the landing gear (by powering the lead screw) and then turn it off when the gear is retracted, and when landing I need to power the screw with reverse current, and similarly stop it when it is completely down. Somebody suggested using limit switches at either end a some sort of micro-controller. The problem is, I have no idea where to start for a micro-controller. So here is the question:

What controller would you suggest? Where can I find code to do such a thing? Any other info you think may be helpful would be seriously appreciated.

This probably isn't very helpful, but hasn't this problem been solved long ago for RC planes, before microcontrollers were so prevalent? I'd guess that there's a servo solution that avoids the need entirely to carry additional processing power. Of course, if you want a microcontroller on board your aircraft, the Arduino can certainly take care of this for you.

Indeed - the Mini Pro is the ultimate lightweight option (1.35gramme) - although a separate USB-serial adapter is needed to program it. The Arduino Nano might be sufficient however and has USB built-in so much more convenient.

As for the motor you need an H-bridge to drive it, there are many available but make sure its good for the motor involved. Some sort of microswitches could serve as end-stop detection. And you'll need an interface to control it from the RC receiver. Arduino has pulseIn function that can be used to measure servo-style inputs. Conceivably if the motor isn't too powerful to damage the mechanism you could use current sensing to detect end-stops.

Thanks for the replies thus far, I should also mention that I have 2 channels available on my Remote control.

So the mini pro says that it is either a 3.3 Volt, or a 5 Volt, but also that it can take input of 5 to 12 Volts. So can I hook this thing up to a 12 Volt battery, and can it output 12 Volts? I will only be running about 0.5 Amps.

You can indeed use 12V supply, but the Arduino's voltage regulation will bring it down to 5V & 3.3

dlybb: ..and can it output 12 Volts? I will only be running about 0.5 Amps.

The Arduino has a built-in voltage regulator to supply its own 3.3V or 5V needs from a 12V source, but it WILL NOT output 12V. All the output signals are TTL 3.3V or 5V (and this depends on the model of Arduino you choose.)

Arduino outputs will safely handle about 15 to 30 mA. To drive a 500 mA (and your motor will probably suck 2,000 mA or more during startup) will require an additional driver circuit -- that is the H-bridge that MarkT mentioned. Look around for postings by rugged circuits about his H-bridge. That would be a very good choice functionality-wise. I'm not sure about weight wise. Look for the motor driver circuit to add another 5-10 grams though.

A possibly suitable motor driver circuit could be a couple of TTL level reed relays. If you can find a DPDT one, that would take care of the reversing requirement. Then a SPST one can handle the on-off. You likely don't need to modulate the current in the motor -- which is something a MOSFET driver circuit could do.