Jump to content
Electronics-Lab.com Community

Electric assist bike


Recommended Posts

Hi, I am building an electric assist bike and need some help with the concept as I don't know much about motors. It will be a 300W 24V DC motor, driven by PWM with a microcontroller helping.

I want the level of assist to be dependant on the rider - not have it pre-set by setting the motor speed. The rider selects an assist level which remains fixed but proportional to the riders effort.

The motor drives a seperate cog to the rider (ie there are two chains).

ie At 50% assist the motor will attemp to drive the bike at 30 rpm if the rider is wanting to maintain 60 rpm. If the rider changes up a gear and is going at 70rpm the motor will adjust to supplying 35 rpm of the effort.

If the rider freewheels the motor turns off. It's speed is set by the rider pedalling at a set point

At 66% assist motor drives bike at 40 rpm if rider goes at 60 rpm

At 90% asssit the motor drives bike at 54rpm if rider goes 60 rpm

At 10% assist the motor drives bike at 6 rpm if rider goes 60 rpm

(In practice there will be a high and low limits the motor won't be permitted to exceed )

Imagine the rider maintaining 60 rpm in 50 % assist, motor is driving bike at 30 rpm. As the rider approaches a junction they slow down but keep pedalling. As they slow or change gear the motor slows proportionally - at 40 rpm, motor drives bike 20 rpm, at 20 rpm motor drives bike at 10 rpm until the low rpm cut out stops the motor assist or the rider stops pedalling.

Same in reverse when pulling away.

So the motor will be "over driven". My PWM circuit will be tuned to drive the motor at a ratio less than the motor is actually going. The rider will be driving the bike and the motor.

Does this sound OK, can I damage anything? Will the motor act as a brake?

All comments welcome.

Link to comment
Share on other sites


Ok I'm doing a bit of mechanical engineering at college at the moment and I'm not too good at it but I'll do my best.

The problem with your idea Kiwi Bruv, is that you're using speed as a measure of effort and power when power is a factor of speed and torque.

Ok, imagine you used a constant speed circuit set the speed of the motor to 60rpm:

If the rider didn't pedel then the motor would work at nearly full power. If he/she made some effort the motor wouldn't work as hard, and if the rider put enough effort in to make it turn at 60rpm the motor would turn off.

Now if you set the motor to half the speed of the rider (as you were suggesting) and the motor  is driving the bike through a gear ratio of 2:1 then the motor wouldn't do anything as the motor would always be rotating at half the speed of the rider. If you alterd the ratio to 4:1 the motor would always be on as the constant speed circuit is trying to get the motor to half the speed of the rider and because of the gear ratio the rider will always be going 4 times as fast as the motor.

I'd use maybe a constant current source (it'd have to be a switched mode) this would give the motor constant torque. Or you could program the micro controller to supply the motor with different amounts of power at different speeds.

Also have you considered the mechanical construction of your project?

This is often the hardest part of electromechanical projects like yours, the electronics are easy design and test the circuit, build the PCB and they're finished. Now you have to assemble the mechanical part and this can involve welding, precise machining and alignment go gears and moving parts.

Link to comment
Share on other sites

Thanks Alun,

Suprisingly the mechanical part is quite straight forward. There are a lot of scooter and bike parts available now.

I have welded a cog in place of the 1st gear on the back wheel. The motro drives this cog and the rider has the other 12 gears to choose from. The motor then sits under the riders seat, fixed to the two struts. The chain and cogs are standard electric scooter parts. I have an 11.65 to 1 ratio so if the motor is doing 2000 rpm the wheel is doing 171 rpm or about 20 km/h

I know my concept isn't quite right. Ideally I need to measure torque but this will get too complicated/expensive I think.

Also this is an assist machine, so I can keep the motor and drive chain relatively small. I can't quite figure out what "assist" means electrically.

If you imagine riding along and someone starts pushing you gently, you take some pressure off the pedals and maintain speed, this is the effect I want.

So after your clear help I'm thinking the rider determines the speed set point by pedalling at the appropriate speed, the processor then controls the motor to this new speed and also controls the current applied depending on the level of assist selected (might be 3 or 4 levels)

I know how to build a PWM speed controller but not how to control the current through it. Do you have any references?

Many thanks




Link to comment
Share on other sites

Alun,

I've been thinking about this and looked on the 4QD site for some explanations but I still don't understand how the voltage and current can be controlled seperately.

PWM will control the motor speed by applying bursts of full voltage (and current).
Current limiting seems to work by turning down the PWM and therefore the speed. So current limiting will also reduce the speed won't it?

I can see how I can use my microcontroller to do all this but don't get the principle.

Any comments or references  gratefully received.

Link to comment
Share on other sites

PWM controls motor speed by changing the duty-cycle of the full voltage pulses applied to the motor. The motor's average current is determined by its load and you probably need a tachometer to adjust the PWM for it to maintain a speed with varying loads like hills.

The PWM needs a throttle to control it. Since you don't have a throttle pedal or motorcycle handgrip, about the only way to detect rider effort is with a switch on a chain tensioner. When the chain is tight, slowly ramp up the speed like a gentle push. When the chain is slack, maintain the speed. Braking resets it.

Link to comment
Share on other sites

Thanks Guru, the chain tension switch is a great idea.

I am beginning to think an electic assist bike is just a name for an underpowered electric bike.

If you think of the rider as 100W motor. When the other motor is driving at a set speed and the 100W motor kicks in and takes some of the load the other motor would slow down an amount exactly equal to the load taken up by the 100W motor for the same speed.

So it's just a balancing act around the set point of the other motor. The assist level is really the same, it just happens at different speeds.

I wonder though how some commercial bikes advertise a range of assist levels 0.5 assist (regen or charging the batteries) and 1 assist up to 4 assist, these being equivalent to extra riders.

I think these must be tied to speed.

Link to comment
Share on other sites

Kiwi Bruv,
Sorry if I confused you about PWM, when I talked about constant current this is totally different to PWM. PWM controls the average voltage across the motor. Constant current would make the current through the motor constant and thus its torque which is directly proportional to the current.

Any audioguru has a very good idea to use a chain tensioner to measure the torque produced by the rider and a tachometer to measure the speed of the bike. PWM is definitely the best way to control the power to the motor.

Are you thinking about constant speed? I wouldn’t recommend this because unless to attach a motor cut-out switch to the break it would be hard to stop.

I think you mean  you want the motor total kick in when you pedal harder.
You might not even need a microprocessor, and you could even do away with PWM.

If you used a chain tensioner with a variable resistance output you could attach this to a comparator in a potential divided and then set the motor to turn on when the rider pushes the pedal harder than a predetermined threshold.

Link to comment
Share on other sites

Thanks.

I've done alot of reading over the last week and now have a much clearer understanding of DC motors.

I know I don't need a micrprocessor for the project but it just makes it more flexible and interesting for me.

I am going to start with a motor & on off switch, then a PWM control and then see if I want to/ need to refine it further.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...