Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: newbie_teach on January 10, 2015, 12:10:01 PM

Title: Electric bicycle
Post by: newbie_teach on January 10, 2015, 12:10:01 PM
Hi,
To start off with, my aim is to build an electric bicycle.
I am a complete noob in these things,My questions are very basic and may seem very dumb but please be generous enough to answer.
Now questions,
1) I need to select a motor. I am complete newbie in the theory of these motors,like when we go super high amount of torque (200Kgcm in my case) the motor specifications change to power(hp) instead of torque and rpm. IN normal small robotic applications the motor which I buy has it's torque and rpm specs and not power.But in this case the motors are rated in terms of power.So how shall I calculate the torque and rpm.
Other question I had is, If a motor is rated at 12V 5A, and i provide a battery with 12V,10AH will it blow up the motor,or the motor will take its required 5A and work for 2hours?
For that matter any electric device, will it act same like,if we provide more current through the battery then the device wants,then it will take how much it requires instead of blowing up?
Title: Re: Electric bicycle
Post by: SeekingVision on January 12, 2015, 10:36:16 AM
The conversion of units can be done by googling the question. The situation postulated will indeed let the motor run for 2 hours all things being equal and in a perfect world, ie... No frictional losses and constant energy expenditure at an even amount.
Title: Re: Electric bicycle
Post by: Schlayer on January 14, 2015, 09:25:44 AM
MY brother actually did this exact thing to his own bicycle, and he got mixed results, but there was a lot of room for improvement, so I won't recount exactly what he did. You do not need to worry about the current the battery is rated for, that is its capability to supply current. A motor with a current draw of 5A will draw 5A. If you battery can only supply 1A and your motor draws 5A, it will cook the battery until the casing melts and... bad things will happen. Using a 10A battery is totally fine, much safer. Motors are more difficult to find, but we actually have a spare from his own bike so I can probably give you the model number when I get home this afternoon.
FYI: Power is torque times RPM speed for motors.
Title: Re: Electric bicycle
Post by: Schlayer on January 14, 2015, 10:16:57 AM
Update: I found a motor very similar to what he used since I remembered he told me it was an electric scooter motor.
http://www.eBay.com/itm/like/361021196585?lpid=82&chn=ps (http://www.eBay.com/itm/like/361021196585?lpid=82&chn=ps)
However, this is 12V and draws over 12A, so your battery might not be suitable to power it. You could probably do fine by downsizing, however. The same google search for 'electric scooter motor' gave me this as well:
http://www.monsterscooterparts.com/100-watt-motor-razor-e90.html?gclid=CjwKEAiAxNilBRD88r2azcqB2zsSJABy2B9668k_26GDXxV5cY45MCbUV8d4xUyptxpYJyXno6-g1xoCY43w_wcB (http://www.monsterscooterparts.com/100-watt-motor-razor-e90.html?gclid=CjwKEAiAxNilBRD88r2azcqB2zsSJABy2B9668k_26GDXxV5cY45MCbUV8d4xUyptxpYJyXno6-g1xoCY43w_wcB)

Cheaper, only 12V and 100W, meaning it draws less than 10A. (in terms of physical quantities, a form of power that isn't measured in watts will result from multiplying RPM times torque, but Voltage times Amperage = Wattage)
That will probably suit you better than whatever it was exactly my brother used. Best of luck!
Title: Re: Electric bicycle
Post by: newbie_teach on January 17, 2015, 12:12:10 PM
Thanks a lot for you reply,Sir. Any of these high power motors give a lot of rpm for example the one you showed me
http://www.ebay.com/itm/ELECTRIC-SCOOTER-BIKE-MOTOR-ENGINE-24-VOLT-250W-CURRIE-M-ST08-/361021196585?_trksid=p2054897.l4275 (ftp://www.ebay.com/itm/ELECTRIC-SCOOTER-BIKE-MOTOR-ENGINE-24-VOLT-250W-CURRIE-M-ST08-/361021196585?_trksid=p2054897.l4275) This one gives 2650Rpm on the shaft, that is a lot of speed(right?). I am a pretty heavy person, according to my . knowledge I would require more torque(correct me if i am wrong).To mechanically swap rpm and torque gears come into picture, what gear ratio will I have to use(sorry to be complete headache).I am trying to learn about gears as much as I can.A brief explanation though will be very helpful for me.
Title: Re: Electric bicycle
Post by: Schlayer on January 20, 2015, 10:15:52 AM
   I tried to look up some more info on the Razor scooter motor and the best I could find was that the owner's manual recommends riders not exceeding 120 pounds... However, that is for a scooter and not a bike. The difference is that going 10 miles per hour requires the motor to spin really fast on a 4 inch scooter wheel, but not so fast on a 24+ inch bicycle wheel. Circumference of the wheel times rotational speed of the wheel gives us our velocity, and motor power divided by the geared rotational speed will give us our rotational torque. That should mean we will need much more torque and much less speed out of the motor on a bike than it would in the scooter it is designed for, even when the bike/scooter are going at the same speed, since the scooter wheel needs to turn at least 6 times to cover the distance of one bicycle wheel rotation. (24"/4" = 6) Basically, we'll probably need a larger gear ratio than the bicycle alone can provide.
   The motor you mentioned runs at 2560 RPM without gearing; say the bike can give us a front/back gear ratio of 4.0 (say, 48 teeth / 12 teeth). This means we will get 2560/4 = 640 RPM with just bicycle gearing. That may not sound fast, but I bet it is frighteningly fast with such a large wheel. 640revolution/min* 60 sec/min * (24*pi) inches/revolution * 1foot/12inches = 67.02 feet... per SECOND! That's over 45 miles per hour. The motor likely isn't able to provide the torque necessary to get you up to that speed, but if it did, that would be incredibly dangerous.
   I just googled finding motor torque from power and came across an appropriate conversion factor between power, rotational speed, and torque. The 250W, 2560RPM motor should have about .9N*m of torque without gearing.  There's a bunch of annoying physics and stuff involved in determining this but that's not nearly enough. You're gonna need a bigger motor, which means a bigger battery too, unless you design an absurdly complex gearing mechanism with a ratio of close to 20.
Title: Re: Electric bicycle
Post by: newbie_teach on January 20, 2015, 10:54:22 AM
thank you again for reply,
my bicycle wheel is 25cm( 0.25m).My weight is around 90kg(198 pounds :P). So my force exerted on the surface of earth would 90kg*9.8m/s^2(acceleration due to gravity)=882N of force(lol that's a lot)
when I sit on the bicycle my force(weight) will be distributed on each wheel as 441N (441N for rear and 441 for front wheel,I guess rear wheel will have more force since the seat isn't exactly at the centre).
Hence,Torque on my wheel's axle must be greater than 150N-m so that the force on the tip of my wheel is torque=distance times force, force=torque/distance. If the torque on the axle is 150N-m,and my wheel radius is 0.25m force=150/0.25=600N.
Now if i use a motor of 3000rpm and gear it down to 10:1 ratio =, my rpm will be 3000/10=300rpm(i dont want much speed,25-30mph is ok). and torque will be orginal torque times 10.
Do I need to buy a motor with more rpm?
Will i need to gear it down more?

What conversion factor of torque did u mention?
P.S. I am very new to using forums.
Title: Re: Electric bicycle
Post by: bdeuell on January 20, 2015, 09:13:41 PM
If I am reading your post correctly you are making a significant error in your calculation. It appears you are using the static radial force on your rear tire, when you should be using the tangential force (under dynamic conditions) to calculate the required torque.

This tutorial might help explain the correct torque calculation.
http://www.societyofrobots.com/mechanics_dynamics.shtml (http://www.societyofrobots.com/mechanics_dynamics.shtml)

Title: Re: Electric bicycle
Post by: Schlayer on January 22, 2015, 09:58:38 AM
This tutorial might help explain the correct torque calculation.
http://www.societyofrobots.com/mechanics_dynamics.shtml (http://www.societyofrobots.com/mechanics_dynamics.shtml)

   That was actually incredibly helpful. That calculator tells me, assuming we want to not spend hundreds of dollars on a crazy motor, we can use a 250 Watt motor and still get to about 15mph with reasonable but a tad slow acceleration. As for the torque, that's kind of an issue. It needs to ultimately give us 219RPM with 310Kg*m of torque for that speed/acceleration, and will be using up to 223 Watts of power. I think a realistic pre-gearing expectation would be around 17Kg-m and close to 4000 RPM, which puts us right where we need to be in terms of the motor's power. However, 10Kg*m of torque is almost exactly 98N*m, which is a ton of torque at stock gearing. This is somewhat compensated for by the huge wheel radius, however.
     Since you're not a pro with motors and such I am just going to say that ordinarily for an application like this, you would want to use brushless DC motors. Those are more complicated and more expensive, plus they need speed controllers, but you will need one anyways for this project unless you want to be going either 0 or 15mph with no in between. It just happens that brushless motors are way more expensive, plus brushless speed controllers are also more expensive. You may be able to get a brushed motor ESC (from now on, ESC = Electronic Speed Controller) for this sort of motor for around $30-$70, whereas a brushless is easily over $100.
    With this kind of power, even brushed motors are getting expensive. This would be a little bit overkill but would probably do fine:
http://www.ebay.com/itm/24V250W-Brush-Motor-Reduction-Motor-DIY-Motor-Electric-Scooter-E-Bike-MY1016Z2-/251533537313?pt=Other_Vehicle_Parts&hash=item3a90913021&vxp=mtr (http://www.ebay.com/itm/24V250W-Brush-Motor-Reduction-Motor-DIY-Motor-Electric-Scooter-E-Bike-MY1016Z2-/251533537313?pt=Other_Vehicle_Parts&hash=item3a90913021&vxp=mtr)
http://www.ebay.com/itm/24V-350W-Electric-Motor-W-Gear-9T-Sprocket-24-Volt-350-Watt-MY1016Z3-U-ST11-/310663455118?pt=Other_Vehicle_Parts&hash=item4854fc218e&vxp=mtr (http://www.ebay.com/itm/24V-350W-Electric-Motor-W-Gear-9T-Sprocket-24-Volt-350-Watt-MY1016Z3-U-ST11-/310663455118?pt=Other_Vehicle_Parts&hash=item4854fc218e&vxp=mtr)

    The product page on one site says it's illegal to put these on an electric bike or scooter, apparently there's a law about motors over 200W.... (shh, nobody has to know  ;) ) However, it comes with a gearbox which will put us right in that 0.8-4.0 gear ratio butter zone which should allow the gears on your bike to handle the ratio changes, as it comes with nearly a 10:1 gearbox preinstalled. The 250W motor's stock speed should be 400RPM, and it even includes an 11 tooth scooter sprocket.  It might seem expensive, but I promise it'll be worth it to save you the headache of trying to make an absurd gearing mechanism for it. I have no idea why the 350W is so much less expensive but if you want to take the risk and get it it will likely work, just keep in mind for your gearing ratios that the 350W has only a 9 tooth sprocket gear. Also, yes, both sprockets are designed to be compatible with a bicycle chain, also known as 410 chain or 1/2" pitch chain. Hooray for DIY-ready motors!
    Since this motor takes care of the majority of gearing for you, you should probably use a bike you don't care for so much and sacrifice re-purpose it for this project by replacing the pedals entirely. The pedals house the front gears, and this motor's sprocket will be your new front gear, plus you should still be able to use the gear shifter in the rear that way. When my brother made his bike he did it in a very slack-job manner and didn't even use a chain drive and it came back to bite him, which is why I recommend replacing the front gears and sacrificing pedal power entirely. You may have a slowish acceleration, but you can probably get a pretty intense top speed shifting into low gear, as you would be approaching a 1:1 ratio. Basically, use it like an actual bicycle with pedals: high gearing means more torque means faster acceleration and less speed, then switch to a lower gear for a suicidal sprint at 400RPM * 60sec/min * (pi*2ft)/revolution = 41.89ft/second or over 28 miles per hour. (please don't actually do that, bikes are totally unsafe over 18mph) Let me know if that sounds reasonable and then we can talk about speed controllers.
Title: Re: Electric bicycle
Post by: Tommy on January 23, 2015, 06:23:56 AM
Quote
my aim is to build an electric bicycle.
newbie_teach, that seems like a natural extension of the robotic hobby.

few years ago I had the same idea, and it turned out to be one of my favorite toys.

http://endless-sphere.com/forums/viewtopic.php?f=28&t=41681&hilit=trailertrash (http://endless-sphere.com/forums/viewtopic.php?f=28&t=41681&hilit=trailertrash)


Tommy
 
Title: Re: Electric bicycle
Post by: newbie_teach on January 23, 2015, 11:01:34 AM
Tommy,
Thank you for sharing  :D

Schlayer,
That seems incredibly reasonable,I am not a engineering student/engineer,there's a lot of time for that(long story in short-I am basically a kid). I wanna learn about engineering(i find making/building things fascinating),but the motor would probably be the 350W one, so that i don't have much of mechanical mess...(i am not exposed to all those tools).But electronics probably the esc,i will make it.
Now,so that i can learn and just not build for the sake of building. What's the math behind selecting the motor of 350W with gear box(i know very basic info on gears).
The motor you showed me(the 350W version) has no much of specs(on ebay atleast), the 250W one has "rating speed=3000rpm and rating torque=0.8 N-m" rating here means base motor, before the gearbox right?
so even after gear reduction new rpm=3000/10(considering gear ratio is 10:1),and torque would be 8 N-m(0.8*10) on the shaft. which is not according to requirement right?
I know my calculations/predictions are wrong in someway,please show me my mistake and the "math" behind this.
Again sorry for being a pain.
Title: Re: Electric bicycle
Post by: newbie_teach on January 26, 2015, 05:41:03 AM
If I was not clear,What's the "math/calculations" behind finding the right torque on  the wheel axle
Title: Re: Electric bicycle
Post by: bdeuell on January 26, 2015, 07:28:59 AM
Are you looking to calculate the torque possible from your motor, the torque required to move the robot, or both?

both have been discussed in this thread
Title: Re: Electric bicycle
Post by: mklrobo on January 26, 2015, 04:49:08 PM
 :) Hello!
I saw on discovery channel that someone took a three wheel bicycle, and put an electric motor
on it. Had space for batteries and solar cells (recharge). They also used the 10 speed gear changer,
and seemed to work pretty well.
As far as calculations go, I have used a spreadsheet (Excel) to accomodate any and all formulas
that I could think of in a particular project. If some calculations seemed in conflict, the apparent
resolution would present itself. The spreadsheet can import information into a file, for processing
real word information. (to verify the calculated formula) You can use the spreadsheet on your PC,
or use it on a beaglebone black, or Raspberry Pi for compactness. Good luck!   ;D
Title: Re: Electric bicycle
Post by: newbie_teach on January 27, 2015, 03:26:40 AM
Sorry,
I read the thread 3-4 times,but I cant find "HOW" to calculate it.
HOW to calculate the torque required to move the robot?
HOW to calculate the torque delivered by the motor.
Please put it in a more simple way,for me to understand,maybe starting from basics.
Kindly bear this kid  :)

P.S.- Units in SI would be extremely helpful, since i cant relate kg*m to N-m  ??? torque=force*distance  ??? ??? ???
Title: Re: Electric bicycle
Post by: mklrobo on January 27, 2015, 07:24:00 AM
 :) Hello! I woudl offer an opinion......   8)
It seems you have 2 problems, one technical, one academic.
academic - TO CONVERT ANYTHING TO ANYTHING, SEARCH THE WEB FOR CONVERSION CHARTS.Some sites asks you for the info, then spit out the conversion right then.
Once you find the formulas that you think will work, put them in your spreadsheet, to have
for later calculations.

technical - more complicated; How to caculate specifics of parameters of motors requires
specific information about the motor; all motors are not created equal. The manufacturers
of the motor are helpful. If not, you will have to catorgize the motor (what kind), and then
SEARCH The WEB for the formulas specific to that type of motor.
The painful way is to collect books off of amazon, (I do) and use them for research for projects.
Hope this helps.  Good Luck!    ;D
Title: Re: Electric bicycle
Post by: mklrobo on January 27, 2015, 08:00:58 AM
 8) Hello!
I re-read your last post, and THINK I understand your question......

How to actually calculate the process, correct?
In this context, you will need some books on Physics, specifically
STATICS. There is a process called "free body diagram" in which all
forces are attached to the mechanisim in question. From Amazon,
use REA's, Problem Solvers series, namely, Physics, Strength of Materials
& mechanics of solids, machine design. The book Mechanics(statics * dynamics)
is really the book you want, while the others provide supporting info.

These books provide real world examples of applications that you are seeking.
Good Luck!   8) 
Title: Re: Electric bicycle
Post by: Schlayer on January 28, 2015, 12:11:43 PM
    I'm not really an engineer myself, in fact I'd almost describe myself as a kid too :P. I just learned enough physics to make my way around those equations from 11Th grade AP Physics C Mechanics.  Don't worry if you don't understand right away, I too have a passion for making things and building stuff and only recently even considered approaching my projects by working out mathematical and physical models to make sure everything would work properly. I used to always play it by ear, and didn't have and guarantee of success. My brother, currently working towards a CS major, really drove me into the math and such that I've been relating to you here, so don't blame yourself if you aren't totally on top of it. (I'm not really either, I just take an equation I'm given and assume it works when used right.) But I digress...
    The torque of the motor does indeed seem far too small, but I have a good guess why; the torque provided by any object is equal to the tangential force on the edge of a circle of a given radius where the force is applied, times the magnitude of the force. For a wheel, this is the edge of the wheel where it contacts the ground, but for a motor shaft with a diameter of under a half inch it's a far smaller radius. The torque of a bicycle wheel on a given motor shaft turning with some torque is really that force times the radius of the whole wheel. I am not totally sure what diameter the shaft is but let's say it's 3/4" (I think I saw that on one of the similar motors). There are some energy losses involved, so let's say maybe 80% of the torque of the motor is transmitted to the wheel. First we account for the ratio between our shaft and wheel diameters.  This is 24" / .75" * .8N-m = 25.6 N-m. This is about a quarter of the torque we need. However, we forgot the gearing ratio! assuming the gearing and torque transfers incur an 80% efficiency, we are still multiplying a quarter of what we want by 8 and we end up with 204.8N-m, or double the torque we need. 
@mkiribi, free body diagrams are not the sort of thing you can understand easily without learning them in a physics class setting like I have, so I'd hesitate personally to recommend them to a beginner. They are indeed a useful tool for physics modeling once you are familiar with them.
Title: Re: Electric bicycle
Post by: mklrobo on January 28, 2015, 12:56:26 PM
 :) Hello!
In reference to the learning of "how to", it would be difficult to encapsulate in a forum
type email; That is why I recommended books. In this forum, which includes microcontrollers,
some type of studying will be needed, which is (my opinion) is a type of exploration and
pioneering spirit. An invention  may come of this which brings $$ to the inventor, who knows?
In regards to the "how to" question, many colleges now put their classes, online, on Youtube.
He may find videos from the University of Colorado, University of North Dakota, and others,
that give the college level tutorial free. These courses go into detail, as far as as many questions
somebody could ask. (Well, maybe not THAT many.)
In any case, I have tried to help with information that I would find helpful, if I asked the
questions that were asked. Keep me posted on your endeavors!......... ;D ;D ;D
Title: Re: Electric bicycle
Post by: bdeuell on January 28, 2015, 07:50:04 PM
I did not mean to imply that the calculations had been sufficiently covered already, only that multiple calculations have been discussed and I was unsure if you were asking for help with one part in particular or all of them.

First I think it is important to note that theses types of calculations can vary in complexity greatly from the static forces only to a complex dynamic system model incorporating empirical data. For your project a basic model will be more than sufficient but if you decide to design this scooter for astronauts to ride around on Mars you will probably want a more accurate model. :P

With that in mind, below are a few calculations you can use to model the performance of your motor and scooter. You will probably want to calculate the system performance under a few different conditions such as nominal (long term) operation and peak (short intervals) operation.

Understanding motor specs:

It is important to first understand the meaning of various motor specs so that they can be properly used in your calculations. Motors have a rated torque/current at which the motor can operate continuously without damage (note: not all motors are are rated for continuous duty). The stall torque is the maximum torque the motor can deliver. Motors are not designed to run constantly at or near to stall conditions.  It depends on the motors thermal design as to how much current it can handle and for how long.

The rated operating point would probably be good values to use for your nominal robot/scooter operating conditions. The stall torque can be used to ensure that even under the most challenging operating conditions the motor will be able to provide sufficient torque.

If your motor does not include performance curves in its specs you can use a general trend for that motor type to get an idea of the performance at operating points between the data they provide. Below is a general performance trend for brushed DC motors.
(http://www.johnsonelectric.com/common/en/images/resources-for-engineers/automotive-applications/motion-technology/pmdc-motor/performance-curve-01.jpg)
Source: http://www.johnsonelectric.com/en/resources-for-engineers/automotive-applications/motion-technology/pmdc-motor.html (http://www.johnsonelectric.com/en/resources-for-engineers/automotive-applications/motion-technology/pmdc-motor.html)

Some of the motors posted early in this thread listed very few specs, however a quick search for some of the model numbers yielded much more complete spec sheets. I strongly encourage you to study some of these data sheets and try and understand the information presented, this is a very important skill for anyone who wants to build robots.

For gearmotors the specs often refer to the motor output but not always. To double check the specs and ensure you are interpreting them correctly you might want to calculate the torque from the speed and power. This only tells you the torque at one operating point so getting a copy of the datasheet is still a very good idea. Below is the equation for this calculation.
Quote
Torque can be calculated in SI units as

T = PW 9.554 / n         (1)

where

T = torque (Nm)

PW =  power (watts)

n = revolution per minute (rpm)
Source: http://www.engineeringtoolbox.com/electrical-motors-hp-torque-rpm-d_1503.html (http://www.engineeringtoolbox.com/electrical-motors-hp-torque-rpm-d_1503.html)

It looks like you understand how gear ratios work so I won't go into that.

I should mention that every time you transfer power with gears, a chain, wheels, or even the motor itself there are losses to friction, noise, and other factors. This can be accounted for in several ways but the easiest is to apply an efficiency. This is covered quite well in the tutorial I posted earlier.
Quote
This tutorial might help explain the correct torque calculation.
http://www.societyofrobots.com/mechanics_dynamics.shtml (http://www.societyofrobots.com/mechanics_dynamics.shtml)


Hopefully this is helpful for you and others looking to understand motor specs.

OK, that was a long post....but more to follow.
Title: Re: Electric bicycle
Post by: bdeuell on January 28, 2015, 09:11:55 PM
So hopefully you know all about the motor you want to use. Now you need to calculate how much torque you need to move your robot (or whatever you happen to be building).


Robot static forces

One force that your motors must overcome is gravity. First you need to calculate the weight of your robot this is the force of gravity on your robot. Now unless you robot is going straight up a wall you do not need to overcome this entire force. In the below equation your motors will need to overcome the Fp (equation (1)). You may want to run this calculation with a couple of different angles for your worst case and average operating conditions.
Quote
(http://docs.engineeringtoolbox.com/documents/1305/body-force-inclined-plane.png)

Neglecting the friction the force required to move a body up an inclined plane can be expressed with the formula

Fp = W h / l

    = W sin α         (1)

where

Fp = pulling force (N, lbf)

W = m g = weight of body (N, lbf)

h = elevation (m, ft)

l = length (m, ft)

α = elevation angle (degrees)

m = mass of body (kg, slugs)

g = acceleration of gravity = 9.81 (m/s2) = 32.174 (ft/s2)

Adding friction (1) can be modified to

Fp = W (sin α + μ cos α)         (2)

where

μ = friction coefficient
Source: http://www.engineeringtoolbox.com/inclined-planes-forces-d_1305.html (http://www.engineeringtoolbox.com/inclined-planes-forces-d_1305.html)

If you use equation (2) to account for the friction be sure to use the coefficient of rolling friction for "μ". Values for the coefficient of rolling friction can sometimes be found online and are dependent on both the wheel and ground surface. Also, if you account for rolling friction here it should not be included as an efficiency. 


Robot Dynamic forces

To keep things simple we will only look at the acceleration of robot as a rigid body. This is the force required to change the velocity of a mass. First you need to determine the maximum acceleration you desire.
Quote
Acceleration is the rate of change of velocity and time taken and can be expressed as

a = dv / dt   

  = (v2 - v1) / (t2 - t1)      (1)

where

a = acceleration (m/s2, ft/s2)

dv = change in velocity (m/s, ft/s)

v2 = final speed (m/s, ft/s)

v1 = initial speed (m/s, ft/s)

dt = time taken (s)

t2 = final time (s)

t1 = initial time (s)
Source: http://www.engineeringtoolbox.com/acceleration-d_1393.html (http://www.engineeringtoolbox.com/acceleration-d_1393.html)

Next you need to calculate the force needed for this acceleration.
Quote
F = m a         (1)

where

F = force (N, lbf)

m = mass (kg, slugs)

a = acceleration (m/s2, ft/s2)
Source: http://www.engineeringtoolbox.com/mass-weight-d_589.html (http://www.engineeringtoolbox.com/mass-weight-d_589.html)


Converting the force to torque

You will need to use the total force on the robot (sum of the static and acceleration forces).

Quote
(http://www.societyofrobots.com/images/mechanics_dynwheeltorqueFBD.gif)
Torque = Distance * Force
Distance = Wheel Radius
Source: http://www.societyofrobots.com/mechanics_dynamics.shtml (http://www.societyofrobots.com/mechanics_dynamics.shtml)


Applying torque to your robot

If you have several motors this torque should be divided by the number of motors.

You will need to apply any applicable gear ratios if there are transmission devices such as gears or chains between the wheels and motors. 

If you plan to account for any efficiencies (refer to previous post) those should also be included.

As long as the torque is less than the stall torque of your motor and your power supply can source the required current the motor will deliver the required torque.
Title: Re: Electric bicycle
Post by: bdeuell on January 28, 2015, 09:20:52 PM
Finally.... hope you made it through that.

Post back if you have any questions. If you are unsure of your calculations post what you have as it will help us identify where you might be running into problems.
Title: Re: Electric bicycle
Post by: newbie_teach on January 30, 2015, 03:28:00 AM
First off,
THANK YOU, thanks a lot.
I highly appreciate your effort to explain me!
the posts were pretty clear this time :D
As and when I start building this project i will keep you'll posted.
Again a million thanks for taking time and helping me out!  :)
Title: Re: Electric bicycle
Post by: newbie_teach on January 30, 2015, 06:57:47 AM
http://www.ebay.com/itm/Electric-Scooter-24V-350W-Brush-Motor-DIY-Reduction-Motor-EBike-Engine-Generator/251562338826?_trksid=p2045573.c100033.m2042&_trkparms=aid%3D111001%26algo%3DREC.SEED%26ao%3D1%26asc%3D28797%26meid%3D565024f7771142fd9c9319a060fea083%26pid%3D100033%26rk%3D4%26rkt%3D4%26sd%3D251533537313 (ftp://www.ebay.com/itm/Electric-Scooter-24V-350W-Brush-Motor-DIY-Reduction-Motor-EBike-Engine-Generator/251562338826?_trksid=p2045573.c100033.m2042&_trkparms=aid%3D111001%26algo%3DREC.SEED%26ao%3D1%26asc%3D28797%26meid%3D565024f7771142fd9c9319a060fea083%26pid%3D100033%26rk%3D4%26rkt%3D4%26sd%3D251533537313)
will this motor do?
Title: Re: Electric bicycle
Post by: mklrobo on January 30, 2015, 08:52:42 AM
 :)  bdeuell has done an outstanding job in explaining, that was
alot of info, and effort went into the posting of it. My Hat's
off to Bdeuell!!   :)  Good job!
Title: Re: Electric bicycle
Post by: Schlayer on January 30, 2015, 09:07:10 AM
I second that  ;D
Title: Re: Electric bicycle
Post by: Schlayer on January 30, 2015, 09:17:47 AM
http://www.ebay.com/itm/Electric-Scooter-24V-350W-Brush-Motor-DIY-Reduction-Motor-EBike-Engine-Generator/251562338826?_trksid=p2045573.c100033.m2042&_trkparms=aid%3D111001%26algo%3DREC.SEED%26ao%3D1%26asc%3D28797%26meid%3D565024f7771142fd9c9319a060fea083%26pid%3D100033%26rk%3D4%26rkt%3D4%26sd%3D251533537313 (ftp://www.ebay.com/itm/Electric-Scooter-24V-350W-Brush-Motor-DIY-Reduction-Motor-EBike-Engine-Generator/251562338826?_trksid=p2045573.c100033.m2042&_trkparms=aid%3D111001%26algo%3DREC.SEED%26ao%3D1%26asc%3D28797%26meid%3D565024f7771142fd9c9319a060fea083%26pid%3D100033%26rk%3D4%26rkt%3D4%26sd%3D251533537313)
will this motor do?

Yes, that looks like its simply a cheaper listing for a motor identical to the one I linked you. 1016Z3 model with the same gearing ratio of 9.78 and the same 9 tooth 410 chain sprocket :) Keep in mind however, you might have to spend quite a lot of money on a battery for these 24V motors.
http://www.batteryspace.com/24V-Ebike-Battery.aspx (http://www.batteryspace.com/24V-Ebike-Battery.aspx)
Title: Re: Electric bicycle
Post by: Schlayer on January 30, 2015, 10:34:53 AM
    Also, I may need to take back what I said about needing to replace your peal power system entirely; look at some actual E-bikes and you'll see none of them rely solely on electric power. https://www.electricbike.com/currie-ezip/ (https://www.electricbike.com/currie-ezip/) This is pretty much the cheapest E-bike on the market. It runs - that's about it. You should probably end up spending a little bit more than this E-bike's price on your own bike, since you found an incredibly cheap motor. You will want to source a speed controller that can handle your needs, then spend basically all of the remainder of your budget on a battery that's as large as you can get in terms of Amp-hours, since that translates directly to your 'range' or how far you can go before the battery dies and you're back to pedal power. Speaking of, we may as well take this opportunity to talk about batteries.
    The reason you shouldn't use a battery as cheap as the one on this $500 E-bike is because Lead Acid batteries (this is explained in the article I linked you to) are really awful when you need to use them for frequent discharging and recharging by more than 30% or so; they require replacing much sooner than any other battery. You can damage them by discharging too much similarly to Lithium batteries. Plus, whereas NiMH batteries have 1/4th the energy density of LiFePO4 but are also about a third the price, Lead Acid batteries have half the energy density of NiMH. Buying them also is hit or miss, as you might find a 13Ah NiMH like this: http://www.batteryspace.com/NiMH-Battery-Pack-24V-13Ah-With-Charging-/-Discharging-Terminals.aspx (http://www.batteryspace.com/NiMH-Battery-Pack-24V-13Ah-With-Charging-/-Discharging-Terminals.aspx) which is safe to discharge at a rate of 25 amps, which you need. 13Ah is fair, though $300+ seems expensive, though you will actually need to pay this much for cells that have the discharge rate you need and the added capacity is a bonus. 
   That battery seems absurdly expensive when you at first glance see this: http://www.batteryspace.com/sealedleadacidbattery12v20ah240whs.aspx (http://www.batteryspace.com/sealedleadacidbattery12v20ah240whs.aspx) This is a sub-$40 lead acid which you could use two of in series ($80) to supply 24V, and they each have 20Ah! almost double that of the NiMH! Except that they can't even remotely supply the continuous current you need. The clearly erroneous listing of a 300A max discharge rate should make you very suspicious. Looking at the data sheet we can confirm that the battery may discharge at a rate of 300 amps; for 5 whole seconds. There is a chart in the data sheet which shows that this battery cannot supply anywhere near 350W of power for your motor over a time period of more than 15 minutes. It would likely do terrible damage to the battery to even put this level of strain on it, even split between two batteries in series. Basically, do not use this battery.
   If you want to get a bit cheaper this could work: http://www.batteryspace.com/nimh-battery-pack-24v-10-ah-for-electric-bike-and-scooter-with-battery-and-charger-combo-options.aspx (http://www.batteryspace.com/nimh-battery-pack-24v-10-ah-for-electric-bike-and-scooter-with-battery-and-charger-combo-options.aspx) This comes with a charger and has 10Ah for a total of around $250, which is decently priced. I would still recommend you go bigger if you can however. Let me know if that all made sense or if you need any more help dealing with purely electronics.
Title: Re: Electric bicycle
Post by: newbie_teach on January 30, 2015, 10:48:09 AM
Electronics the esc will probably be scratch built, arduino hooked up to the throttle and map the ADC value and converting them to pwm range and given to the driver circuit(probably power transistors).
I have 2 options now, scratch build this thing,i can get a motor nearby for less than 10$(pretty sure) and then gear it down to a ratio close to 10 (9 teeth on the motor shaft and 90 teeth on the other side of the 90 teeth sprocket's axle  a 10 teeth sprocket and that goes to the rear cassette of gears).
or else simply buy this online motor and directly mount it on my bicycle and no problems from mechanics point of view.
What will be better,saving money and undertaking a heavy task of mechanics also not having access to much tools(i can find machinist's though), or just buy a ready motor and eliminate all this?
And another question,
If we have 2 batteries, say 1st battery is a SLA battery-6V,10AH
2nd battery is a li-ion battery,6V,10AH, we connect them in series. What will be the final output? 12V right?
in another situation say we have both li-on batteries and one of them is 6V,10AH and other one is 6V ,15Ah, we connect them is series what will be the final voltage and current specs?
Does connecting 2 different types of batteries(li-ion with SLA) cause problems?
Title: Re: Electric bicycle
Post by: Schlayer on January 30, 2015, 12:06:03 PM
   I would have to say its probably better to get the $30 motor with pre-mounted gearbox and other mounting hardware included. This will intimately save you a lot of headaches and time, already having a mounting solution and a properly sized sprocket and such. I would not recommend running two different types of batteries together in the same circuit as this leads to difficulties determining when your batteries are discharged, plus its generally just a hassle. To need to run multiple packs in parallel you need balancing circuitry that I personally don't know how to assemble, though I'm sure you can find it online easily. You can easily do any ESC controlling through an Arduino using a PWM output pin and the servo controller libraries built into Arduino's coding system, thus you should't need to worry about converting any values besides finding the max and min value for the ESC to accept. You will be entering values between -180 and 180 as if sending angles to the servo and these will be translated to the same signals an ESC needs to determine which direction to go in and how fast to run the motor. Go to adafruit's website; they have an in-depth tutorial on the subject I've used myself. http://arduino.cc/en/Reference/Servo (http://arduino.cc/en/Reference/Servo) Also google how to use this for an ESC since there is usually another 'arming' step that differs depending on your speed controller model.

http://batteryuniversity.com/learn/article/serial_and_parallel_battery_configurations (http://batteryuniversity.com/learn/article/serial_and_parallel_battery_configurations) This will help you with any battery related questions, but keep in mind with a 24V motor you need a 24V supply, not 12V. If you used four 6V lithium cells of 10Ah in series you would get the necessary 24V, but I think you need all those packs to be capable of discharging at a rate of 25A. or you will definitely wreck your batteries. Lithium batteries and I have not had a great pastime... Suffice it to say you should exercise extreme caution with rechargeable lithium battery cells. Make sure you have data sheets for every pack and triple check you are using them within those specifications.
Also, never leave Lithium batteries unattended while charging! My brother set fire to his carpet when his charger malfunctioned causing a LiFePo4 battery to overcharge and explode.
Title: Re: Electric bicycle
Post by: newbie_teach on January 30, 2015, 12:22:25 PM
So yeah, i'll order those motors first and then get back(maybe for help regarding mounting), and further discussions on batteries and esc
P.S. :- Any other motor's link will also be fine :) (in the same price range though)
Title: Re: Electric bicycle
Post by: newbie_teach on February 11, 2015, 03:13:31 AM
I will get back to this project soon, keep me posted on any suitable motor for this application (the ebay motor takes double the money for shipping 35$ for motor and 49$ for shipping)
Title: Re: Electric bicycle
Post by: Schlayer on February 11, 2015, 07:39:46 AM
Same motor, same gearbox, $56 with free shipping.
http://www.ebay.com/itm/24-Volt-350-Watt-Motor-Gear-Reduction-Razor-Dirt-Quad-Scooter-24V-350W-V-ST11/200700537982?_trksid=p2047675.c100005.m1851&_trkparms=aid%3D222007%26algo%3DSIC.MBE%26ao%3D1%26asc%3D29170%26meid%3Df5803da4ed8248c890fd9a7bf1fb58a3%26pid%3D100005%26rk%3D1%26rkt%3D6%26sd%3D370576591777&rt=nc (http://www.ebay.com/itm/24-Volt-350-Watt-Motor-Gear-Reduction-Razor-Dirt-Quad-Scooter-24V-350W-V-ST11/200700537982?_trksid=p2047675.c100005.m1851&_trkparms=aid%3D222007%26algo%3DSIC.MBE%26ao%3D1%26asc%3D29170%26meid%3Df5803da4ed8248c890fd9a7bf1fb58a3%26pid%3D100005%26rk%3D1%26rkt%3D6%26sd%3D370576591777&rt=nc)
Title: Re: Electric bicycle
Post by: newbie_teach on March 29, 2015, 04:55:31 AM
Hey guys sorry for the inactivity, (all exams and stuff killed me).
Now back to the project. While these days I found quite a strong motor in a nearby workshop for fairly cheap so I got super tempted to buy it and I bought it. So I'll be using this motor (if this fails I'll quietly turn back to ebay solution).
About the motor its a 40V DC brushed motor no further specifics on that but has a lot of torque. As said earlier ESC /motor driver will be made at home...any suggestions on how to make one?
And any idea about mounting the motor on to the bicycle frame?
Title: Re: Electric bicycle
Post by: Schlayer on March 31, 2015, 01:13:32 PM
     40V is quite a lot of power. I have no idea how you plan on making custom electronics to drive that motor without knowing more about it. You need to know the stall current of the motor to even begin figuring out how to construct a speed controller for it. I admit i'm not such an electronics whiz as to know how to build a traditional electronic speed controller, but I do know how you can make a manual speed controller using a massive rheostat/potentiometer and a use servo to control it. Problem is... well, pretty much all of it. for starters, a potentiometer that big is difficult to find and rather expensive. I had to use a pot for controlling the speed of a motor which drew only around 75W, and the cheapest we could find was still over $50. a 40V motor? Easily drawing 10A stall current (that's probably a generous underestimate) making your power draw a startling 400W. There is no way it's worth spending $150 on a rheostat to avoid paying $60 for a motor. And I don't have the slightest clue where you can get battery packs over 24V for under $100 which will last for any good amount of time. There are some results which come up when I search for speed controllers that handle 100s of Watts of power, but none have detailed spec sheets at all. The best looking thing is this: http://www.newegg.com/Product/Product.aspx?Item=9SIA35C1932019&nm_mc=KNC-GoogleMKP-PC&cm_mmc=KNC-GoogleMKP-PC-_-pla-_-Eco+Gadgets-_-9SIA35C1932019&gclid=Cj0KEQjwi-moBRDL4Omf9d_LndMBEiQAQtFf86cGN1HKSAHPY06J7ze9RPwRdxT0cQZEQJaGk3lVyc0aAnjN8P8HAQ&gclsrc=aw.ds (http://www.newegg.com/Product/Product.aspx?Item=9SIA35C1932019&nm_mc=KNC-GoogleMKP-PC&cm_mmc=KNC-GoogleMKP-PC-_-pla-_-Eco+Gadgets-_-9SIA35C1932019&gclid=Cj0KEQjwi-moBRDL4Omf9d_LndMBEiQAQtFf86cGN1HKSAHPY06J7ze9RPwRdxT0cQZEQJaGk3lVyc0aAnjN8P8HAQ&gclsrc=aw.ds) And that can't even handle 40V. It too requires a potentiometer to be rotated, but uses electronics within to manage power output in a more efficient way than one single huge rheostat.

     The short of it is, any kind of system where you need to safely control on the order of 100s of watts of power is gonna be very, very expensive, and if it isn't, it will be very, very dangerous :(.  Even my 75W motor with under 2 ohms of resistance generated too much heat to touch. I'm sorry, but the bottom line is, when you start out on an ambitious project like this, you need to start smaller and work your way up.  Believe me, I have run into this sort of problem numerous times in the past. I know it's not the best news to hear, but I think you need to downsize considerably. I'd still like to help you complete this project, but it might mean altering your plans a fair bit. Let me know of any further updates :)
Title: Re: Electric bicycle
Post by: newbie_teach on April 06, 2015, 03:47:23 PM
Frankly I never debate/argue with pro engineers/makers who have a ton of knowledge than me. But let me take a chance and clear this concept in my mind. I "need" to know the stall current you said,can't we make assumptions? How much can be the max stall current? Not more than 220A right? Just use a MOSFET IRF3205 has a drain current of 110A continuous and 220A burst VDS of 55v. Isn't that enough? By your potentiometer/rheostat method do u mean to power it up directly? No way that will be done. Your correct.
Basically a small potentiometer will be wired up with an arduino and just like the fade sketch where pot controls the LED's brightness instead of led there will be that motor driver circuit (no h bridge since only one direction is required).
Please correct me where I am wrong. I like being corrected.
Thank you for bearing and helping me :)
Title: Re: Electric bicycle
Post by: Schlayer on April 06, 2015, 04:44:22 PM
Well... The max stall current should definitely be less than 220 Amps, yes. I highly doubt the continuous drain would be over 110A also, but those number seems extremely high for a MOSFET at that price. If its true to its datasheet, that should indeed work. I don;t know a ton about transistors, but if I were you I'd make sure you have a fuse between the positive lead of your battery and whatever circuitry you have in that pot/controller circuit. You'll want one that will trigger at 200A like this: http://www.ebay.com/itm/Gold-ANL-Fuse-Holder-1-Foot-2-Gauge-Wire-200A-Fuse-/390461024295?pt=LH_DefaultDomain_0&hash=item5ae94a6827&vxp=mtr (http://www.ebay.com/itm/Gold-ANL-Fuse-Holder-1-Foot-2-Gauge-Wire-200A-Fuse-/390461024295?pt=LH_DefaultDomain_0&hash=item5ae94a6827&vxp=mtr)
My concerns about the MOSFET are mainly due to its size. You see that fuse has 2 gauge wire on it. 2! That's gigantic. Considerably smaller would melt under the heat of 100-200A of current. I'm really unsure how a MOSFET with such tiny pins could handle 110A continuous, but you are right that in all likelihood the motor draws well under that. I guess you may as well go for it and test it, but make sure you trigger it from a distance in case the MOSFET explodes!  I'll talk to a friend who is more familiar with MOSFETs and get back to you.
Title: Re: Electric bicycle
Post by: newbie_teach on April 08, 2015, 04:21:34 AM
http://www.futurlec.com/Transistors/IRF3205.shtml (http://www.futurlec.com/Transistors/IRF3205.shtml)
At least according to this drain current is 110A I read a several others too and they mentioned the same specs as well. I agree to your point that to carry 200A of current the fuse uses 2 guage wire which it nice and fat whereas the MOSFET pins use small tiny pins... Suspicious. Maybe it uses some special kind of metal. Please find out from your friend and let me know,I'm eager to know how this works.
Title: Re: Electric bicycle
Post by: Schlayer on April 08, 2015, 05:57:37 AM
    The spec sheet does reveal one fact about this little MOSFET which could explain the current capacity: its operating temperature. The thing can safely operate up to 175 C. My MOSFET knowledgeable friend says this checks out, it should probably work OK. however, he agrees that the stall current of a 40V motor could be monstrously high and still potentially kill those MOSFETs simply by being over 100A. To make sure this doesn't happen you will need a slightly expensive piece of equipment.
http://www.amazon.com/ACM03-Range-Digital-Current-Tester/dp/B00K4FNSX2/ref=sr_1_1?s=hi&ie=UTF8&qid=1428493725&sr=1-1&keywords=digital+clamp+DC+current (http://www.amazon.com/ACM03-Range-Digital-Current-Tester/dp/B00K4FNSX2/ref=sr_1_1?s=hi&ie=UTF8&qid=1428493725&sr=1-1&keywords=digital+clamp+DC+current)
My friend says this is what you'll need. It is a clamping multimeter. Any regular multimeter would fry under currents over maybe 10-20A. This gets up to 400A DC by using magnets and a clamping design to sense current without being plugged into it. There are cheaper meters out there but this is the least expensive some searching got me that measurers high DC current, the others gave only max AC current readings.
    You need to actually plug the motor up to some large battery pack (I recommend three 12V car batteries in series if you happens to have those around) and actually test running the motor and checking what stall current it maxes at. It will be difficult to get a proper rating even with this meter since the stall current is reached to suddenly, you will need to see if the meter has a mode for finding a maximum spike, or a graph, or something. Worst case scenario, stare at the meter while repeatedly power cycling the motor (on, off, on off, on, etc.) and assume the largest number you see is a bit under the stall current. That's the only way to play it safe using those MOSFETs and any other electronics you might want to interface with the motor. Make sure the batteries/power supply you are using to test have extremely high current draw ratings! EDIT: Maximum current draw ratings.
Title: Re: Electric bicycle
Post by: newbie_teach on April 09, 2015, 12:40:49 PM
I don't understand how my motor can draw over 100A if my battery can't supply that much. Lead acid batteries don't have much high discharged rates or energy density or whatever its called can someone please explain what's up with these batteries in detail? I feel confused how can a battery rated at 20Ah give 100Ah? Some people say lithium batteries can go up to several 100Amps? How does it work and is it completely true?
Title: Re: Electric bicycle
Post by: Schlayer on April 09, 2015, 02:39:26 PM
  A and Ah or Amps and Amp-Hours are totally different units. Amps (A), or Ampheres, are a measure of current. Ampere-Hours or Amp-Hours (Ah) are a measure of energy. Current is a discharge rate and Energy is a current capacity.  Amp-hours as a using of energy are pretty intuitive, though the unit names are confusing. Example: you have a 2Ah lithium battery. It can discharge at up to 20A max. If you draw 20A from this battery continuously, it will be drained after 2A/20Ah = 1/10h or 1/10th of an hour (6 minutes). There is no direct relationship whatsoever between the discharge rate (or current) of a battery and its current capacity! All batteries have limitations of how much current can be drawn at once, but this depends on the type and configuration of battery.

  You might fined a large lithium battery can discharge at up to 40A, but an SLA might only be able to deliver 5A even one of the same physical size, since they are using totally different chemical processes. If you try and draw more than the max from a battery (E.g. by using a motor with a 50A stall current) you will damage the battery and it might melt or have other bad things happen to it. Be careful about mixing up these units, it can be confusing rather often, but that's just one more thing to look out for :)
Title: Re: Electric bicycle
Post by: bdeuell on April 11, 2015, 04:29:50 PM
the maximum discharge rate of a battery is its maximum discharge rate without risk of damaging or destroying (depending on the battery chemistry explosion or fire can also be a very serious concern) the battery is capable of supplying much greater currents. Unless there is a battery protection circuit/device the current it can supply will be limited by the internal resistance of the battery. The maximum discharge spec may be listed with several values depending on length of time i.e. it may be capable of handling a higher current for 30 seconds than one hour. Higher discharge rates will also negatively impact battery life and capacity. the discharge rate is often listed in terms of C (for example maximum continuous discharge rate of 2C) where C is equal to the batteries capacity (for example a 12Ah battery C=12A).

Remember that brushed DC motors draw the full stall current when the speed is zero (regardless of load) which will occur every time your motor starts. However under a light load it is likely that your motor will accelerate quickly and the current draw will correspondingly decrease.

Also assuming you will be driving your motor with PWM (which relies on the inductance and resistance of your motor to produce an analog voltage) you must consider how the frequency will impact your motor controller. low pwm frequencies will not be filtered by the motor (acting as a LR filter) and high frequencies may result in excessive losses within the transistors.

I am by no means an expert in designing motor controllers /H-bridges but I suggest if you plan to build your own for this project you do some extensive research on proper design. you are dealing with some pretty extreme currents that can easily blow up components or melt wires. I haven't built a high powered h-bridge  like this myself but I worked on a project where the electrical engineers built their own for some motors with 110A stall currents... we had lots of problems smoking components and literally blowing up the transistors (pieces of the component flying)...not sure what the problem was but everything can have an impact including the firmware driving the motor controller.

in addition to all the design that goes into the electrical circuits you will also have to consider the thermal design.

I provide this information not in an attempt to discourage you from building your own controller but to share my knowledge of the complexity that is involved in developing a robust motor controller (especially for higher current requirements).