How to choose the right brushless outrunner motor for e-bike project I am planning to build my own electric bike and I have stumbled apon some confusion. I want to use brushless outrunner motors for this project as I have used these motors many times for other projects, I have experience in using them. But I am quite unsure which rated motor I should get. I want to reach 25mph, more is better. My plan is to have the electronic speed controller (ESC) connected to my Arduino board so that I can control speed, battery level, etc. Unfortunately, with the hub motors, the ESC are different, meaning that I can't interface them with the Arduino.



As you can see, the wire that's hanging off at the bottom, is the wire that will be connected to the Arduino board.

Any help is appreciated, thanks for your time.

Sid
I assume you're using model RC (car or helicopter) parts. When I built my first e-bike several years ago, I also used similar model RC parts. 

The control wire on the bottom of your photo leading from the electronic speed control (ESC) uses standard servo control signals.  If you don't absolutely need the arduino, then you'd control the ESC through a servo tester. These are about $5-15 eurodollars. You'd replace the potentiometer on the top with something easier to control - either a bigger paddle, an on/off button, or to a throttle that has potentiometer outputs (most have hall-outputs, so you have to buy carefully as you also have to match resistance range):



Note that you can control a servo ESC through your arduino. You just need the arduino servo library. I refer to this after talking about the servo tester because it's less fault tolerant (and you still need to find a pot-throttle). You don't want your throttle control to fail-closed - that is, to fail in a way that leaves you at full throttle. With arduino  or any CPU-control, this is a possibility, so you should have an immediate battery cut-off switch that uses a different cut-off mechanism (I.e., a contactor to your main battery) near your controls. 



And finally about the motor selection. The tiny little motor you have in your photo only has sufficient power at very high RPMs (thousands of RPM). You'll have to figure out sufficient reduction gearing to get it to wheel speed (which are only a few hundred RPM). That's tough to do in a way that also allows the motor to safely freewheel.

Generally, e-bikes tend to operate at higher voltages (36 volts or more) than RC models (which tend to operate at 6s or 24 volts max). This is because you generally want at least 250 watts of power -- if not 750 or beyond. Higher voltages mean less current for the same power. But it also means you have to select a motor that is wound for as few RPM/volts as you can.

You also have to select your ESC (speed controller) carefully as very few can handle high voltage and high current. 

There are more options than when I did my project, but you'll also find that once you price a good brushless motor ($80-120) and a good high-power ESC ($100-150) and the necessary mechanical, electrical, and electronic hacking that you have to do, you're within spitting distance of a ready-made hub-motor or mid-drive motor that are designed specifically for e-bikes and are plug-and-play.

Have fun!