I just made an electrically assisted bike conversion......

bobc

10 kW
Joined
Jan 20, 2011
Messages
993
Location
Knutsford England
Unfortunately I came to this forum far too late to use any of the wide ranging information on here - so forgive me if the bike contains lots of widely recognised "tried failures". I made the bike with my nephew (who will actually use it) from RC gear I had lying around, & wanted to use the project to check on some of the engineering detail I'm putting in another project. Anyway - some of the details might be of general interest (seemed to be on the bvs board) & might give folk new ideas about how to make some bits & pieces. FWIW the bike rides really well, carries Matt up a 1 in 7 hill with a 40A ESC & goes at 12.5mph with the 6s battery pack (exactly according to plan....).
I put an extra freewheel on the other side from the deraillieur cassette by lathing off the disc brake mount & putting a left hand thread on it. The sprocket is simply laser cut - cost me about £10. I bevelled the sides with an angle grinder and fettled the teeth by pressing each against the side of the right size drill (5mm in the case of this 8mm chain)
Img_0028.jpg

It's fixed by a couple of clamp plates (the inner one visible in the picture). Doing it again I'd put the sprocket in place of the inner clamp plate, simply to move the sprocket inwards, away from chain & seat stays.
Here's how I took drive off the outrunner motor.
Img_0024.jpg

That's effectively a taperlock fixing - the screws pull a brass taper into a taper reamed hole in the commercial sprocket (that one's 6mm chain). My back of envelope calculations say it's good for over 60Nm torque & the motor's good for 4Nm so it should be OK.
I made a simple circuit with 2 555 timers to control the ESC from a hall effect twist grip - would be easy & neat on veroboard(stripboard) - I'll put the schematics on here when its done right (the original was made to work with a broken twist grip!!!). We used a servo tester for first tests.
bike003.jpg

The layshaft bearing bolts screw into the top plate tohold it together while assembling the bike; top plate and clamp plate have a 32mm diam groove fly cut in 'em to stop the seat tube squashing.
Hope that's of some interest - the bike was rescued from a skip but seems basically sound. The motor is FAR too big I know - I note there's a 470W outrunner on hobbyking for less than $15 which would be perfect for a legal UK bike assist!
 
Nicely done!

I love that laser cut sprocket.
 
Hi Bob,

Welcome to the 'sphere.

You've already read my comments on the BVS forum, hopefully you'll find stacks of useful stuff on here that you may find helpful.

Jeremy

PS: Do you have any leads on user-friendly laser cutting services in the UK? I've Googled a fair bit, but can't find any that will do one-offs.
 
HI Jeremy,
The laser place I use are at the end of the industrial estate where I work (I generally just walk down there with the dxf's on a memory stick at lunchtime...). They do up to 20mm thick, but the thicker stuff is not so accurate, really no better than a flame cut. But thinnish stuff is very good - I just made a 3 module 58 tooth gear in 6mm and it rolls beautifully on a machine cut spur.
I think every town will have a laser cutting outfit and they probably all use very similar machinery, I'd check yellow pages (or yell.com) & visit them with your dxf when you have a trial project. Actually my lot are next door to "congleton propshafts" another incredibly useful crew...
Here's an 80 tooth bike sprocket in stainless I did for a mate's folding bike - there was no way of getting his gearing up to snuff otherwise at any price!
ricsfolder.jpg
 
Awesome build. Be careful with that ESC... I feel like it should be easy to burn up with this setup:D Only because it's going to be very tempting to thrash. I've been toying with a jackshaft setup for a while too. Yours is a nice example.
 
Welcome! nice build you have there, I am hoping to do something similar in the near future, but with finer chain, what voltage are you running?
 
Thanks gents,
grindz145 - that was one of the things I wanted to find out - it looks to me as though the ESC is current mode controlled from the way it behaves e.g. slowing down under big load - so it should whack the 40/50A on the label into any motor I wire it to. It was a very cold day so the fact that it didn't get warm is maybe non too surprising!
LIghtcycle the primary chain is only 6mm - I don't think I'd want to go much smaller! We use 1/4" chain on the greenpower cars at similar speed & power level & they generally last about 1000 miles (until the small sprocket is noticeably worn) so I reckon it's OK for a test setup in the short term. I'm thinking for a "proper job" I'd use a steel spur on the motor onto a big delrin gear on the jack shaft maybe 0.5module - any thoughts? these gears are reasonable cost from HPC & I should be able to do 10:1 in a single step.
cheers
Bob
 
I don't have alot of experience with the ESCs, but I do know how hard it is for those to commutate at low RPM without halls. If down the road you start to see controller failures, you can always add sensors to the motor and use a sensored controller, which will just by design, be alot more robust. Definitely report back on how well the gears hold up, I imagine they'll do pretty well. :mrgreen:
 
bobc said:
Thanks gents,
grindz145 - that was one of the things I wanted to find out - it looks to me as though the ESC is current mode controlled from the way it behaves e.g. slowing down under big load - so it should whack the 40/50A on the label into any motor I wire it to. It was a very cold day so the fact that it didn't get warm is maybe non too surprising!

The ESC is extremely unlikely to have any sort of current limiting at all, the vast majority of them use brute force (adding more FETs) to deal with the over-current situation. The only RC controllers I know of that have current control of sorts are the really high end ones, like those from Castle Creations and Kontronik, for example.

RC ESCs usually just rely on the cube law power vs rpm characteristic of a prop (be it on an aircraft or a boat) to control current. Normal RC model use can't get the controller into the low rpm high current region that's so difficult for the FETs, unlike use on an ebike where this is a real probability.

Jeremy
 
bobc said:
I'm thinking for a "proper job" I'd use a steel spur on the motor onto a big delrin gear on the jack shaft maybe 0.5module - any thoughts?
Hi Bob,
Following the formula given by HPC Gears, you end up with a torque check of around 0.3Nm for 0.5MOD (@ 8mm width) :) For 0.8MOD it would be 3 times that...
 
Interesting - I would have said that puttingthe ESC on a motor that was 4 times too big for it (in current terms) then riding up hills under current limit it would surely have zapped the ESC if it were running "open loop" - I'll have to play some more! And it was the most bargain basement device available... ;^)
Miles, torque rating must be a function of diam? (no. of teeth..) I'd not looked at details yet - As it happens a 14krpm motor at 470W is 0.36Nm so quite near, but like you say, it's no big deal to go up to 0.8MOD. Any thoughts on longevity of delrin gears under this kind of loading - anybody run one?
 
bobc said:
Miles, torque rating must be a function of diam? (no. of teeth..) I'd not looked at details yet - As it happens a 14krpm motor at 470W is 0.36Nm so quite near, but like you say, it's no big deal to go up to 0.8MOD. Any thoughts on longevity of delrin gears under this kind of loading - anybody run one?
They give a value for each pitch, that you then multiply or divide, depending on the number of teeth, rpm, size of mating gear, hours/day usage etc.
Following what Jeremy said above, the problem with using things on ebikes is the high torque levels you can get at low motor speeds...
If you know Kv for your motor, you also know the torque constant (Kt), and can work out the torque for a given current. Kt (Nm/A) = 9.549/Kv (rpm/V)
I've no experience using Delrin gears, yet... See: http://www.endless-sphere.com/forums/viewtopic.php?f=28&t=8035 and the topics relating to the plastic planet gears used in geared hub motors.
 
bobc said:
Interesting - I would have said that puttingthe ESC on a motor that was 4 times too big for it (in current terms) then riding up hills under current limit it would surely have zapped the ESC if it were running "open loop" - I'll have to play some more! And it was the most bargain basement device available... ;^)

If you whip the heatshrink off the controller you'll quickly see that there's no current measurement device on there at all, not even on the supply side. Some very high-end controllers do sort of measure phase current, by monitoring the Rdson (or more accurately the voltage drop) of one or two output FETs, but this is, by it's nature, a very hit and miss way of measuring current, due to the massive variation in Rdson, both from one device to another and with temperature. It's adequate for protection if everything is over-sized for the job, but not really accurate in terms of setting a particular current level.

The critical thing for the controller is the motor LR time constant, if that's big enough, and the controller PWM rate is fast enough, then the current will naturally tend to limit due to the sluggish rise time compared to the small pulse widths at low throttle.

Jeremy
 
great stuff guys,
Interesting thread MIles - he gave up with the gears pretty quickly but on the other hand was putting a lot more power through moulded gears made of goodness knows what... I think I'll have to do what appears on the face of it to be a conservative design then see how it lasts compared to the chain drive. But I don't like trying to make a compact thing with a big reduction ratio using chains or toothed belts. Efficiency of chains takes a nose dive when you go below 12 teeth on a sprocket.
Good idea Jeremy, I'll do a little exploration (so far as I can without killing it). I would (however) have thought it's easy & cheap enough to get a shunt on the DC- connection - the peak I there would be = phase current (a brushless drive is open circuit on one phase) so I kinda assumed they would use that for current control ('cos it's what I'd do...). I'm going to get me an ATmega BLDC control demo board & learn the job properly :^)
I know if you read up on brushless drive control they always go on about closing the speed loop (with a PID) - for our purposes we don't want to close the speed loop, we want direct control of the torque (& therefore the current). Such a control scheme would work fine for props as well, (though you might want to compensate for the speed squared non-linearity) - you'd end up with a drive that looked after itself and was nearly universally applicable (& my bargain bucket ESC actually gave a damn good impression of it!). I can't believe i've just been outrageously lucky - that doesn't happen to me......
 
bobc said:
...... Any thoughts on longevity of delrin gears under this kind of loading - anybody run one?

I dont know about "Delrin", but race go karts commonly run "composite" plastic axle sprockets ( 70 -90 t on a 219 ..8mm..pitch) with power levels of 25 -30 kW and rpms of 3000 rpm. Thats 250,000 + T/min chain speed. :wink:
 
bobc said:
Good idea Jeremy, I'll do a little exploration (so far as I can without killing it). I would (however) have thought it's easy & cheap enough to get a shunt on the DC- connection - the peak I there would be = phase current (a brushless drive is open circuit on one phase) so I kinda assumed they would use that for current control ('cos it's what I'd do...). I'm going to get me an ATmega BLDC control demo board & learn the job properly :^)
I know if you read up on brushless drive control they always go on about closing the speed loop (with a PID) - for our purposes we don't want to close the speed loop, we want direct control of the torque (& therefore the current). Such a control scheme would work fine for props as well, (though you might want to compensate for the speed squared non-linearity) - you'd end up with a drive that looked after itself and was nearly universally applicable (& my bargain bucket ESC actually gave a damn good impression of it!). I can't believe i've just been outrageously lucky - that doesn't happen to me......

The ebike controllers all, without exception, measure supply current and use that to limit phase current, usually using some sort of algorithm that estimates the motor LR time constant and uses that to predict phase current from average supply current plus rpm plus throttle demand. Most uControllers that are used in off-the-shelf BLDC controllers don't have fast enough A/D converters to measure the phase current peaks on the supply side shunt, so they use a combination of averaging supply current to control phase current (as mentioned above, taking account of pulse width and likely motor LR) plus, in the case of the XieChang controllers a simple peak detector that detects fast spikes of current and interrupts the controller to shut it down.

There are a few threads here that are worth a read. First off, here's a thread that describes the way we collectively discovered the secondary peak current shut-down function on the XieChang: http://endless-sphere.com/forums/viewtopic.php?f=2&t=16910&p=247194&hilit=solved#p247194 that gives an insight into the way that the Chinese designers coped with the phase current limiting problem for a low LR motor.

Next, Ricky has been putting together a very slick controller that does have fast enough A/D converters to measure and control phase current directly: http://endless-sphere.com/forums/viewtopic.php?f=2&t=23205 and his thread is very well worth a read for an insight into high-end controller design.

Finally, I've had a go and built a simple controller that controls phase current spikes with pulse-by-pulse current limiting, using an off-the-shelf BLDC controller chip: http://endless-sphere.com/forums/viewtopic.php?f=2&t=23350 and one or two others are taking this design and looking at replacing the hardware control chip I'm using with a uController, like this one: http://endless-sphere.com/forums/viewtopic.php?f=2&t=24519

There are a few other threads around where there's been a lot of theorising about ideal controllers and ways of adding additional features, but I'm not sure that any real-world controllers have yet emerged from these debates yet.

There are also several discussions here on throttle control algorithms, plus a couple of attempts to implement power control. All the ebike and RC controllers that I know of use open-loop speed control, with the throttle directly controlling the PWM duty cycle, with some intervention from the current limit circuit when required. Torque control is challenging, because it demands motor phase current measurement. Ricky can do it with his slick controller, but those of us using supply current monitoring will have to make do with power, rather than torque, control. This still requires a PID loop, as the process is to use the measured supply current and use it as a feedback signal to a loop driven by a power demand signal from the throttle. The loop output would directly control PWM duty cycle to get the motor to deliver the demanded power. I'm working on adding it to my controller, as I'm convinced that a power, rather than speed, throttle will feel more natural. Getting a fast enough PID loop in a uController is non-trivial though, as I've already discovered. It needs a fairly fast uController, running some efficient code, to get the response down to the few tens of mS needed for good throttle feel.

Jeremy
 
We got this bike going properly today; Matt shelled out on 3x 5Ah 3s Lipolys and a 100A ESC so we wired these up & had a go.
As you'd expect it now goes faster (more volts) and is rather more of a handful to control (more amps) (it really does try to wheelie...). It fairly rocks up the 1 in 7 hill, nothing gets hot (or even, apparently, warm). The only problem is that the new ESC looses synch if you gas it when it's going slow (loud motor noise and no torque) and it doesn't seem possible to feather the throttle to get round the problem. If others have had this issue, I'd like to know how you got round it!
The ESC came with no manual so I've not dug out any info on it yet: it may be possible to adjust the timing, PWM rate and acceleration values - would we expect these to improve matters?
I can always whack more big 'C's on there if we think that will make it better(?)
I'll stick a short vid on utube....
[youtube]0CRp9Mn0ehk[/youtube]
We'll make a box for the electrics on Saturday. The batteries look as though they will fit in a drinks container!
Img_0056.jpg
 
bobc said:
. The only problem is that the new ESC looses synch if you gas it when it's going slow (loud motor noise and no torque) and it doesn't seem possible to feather the throttle to get round the problem. If others have had this issue, I'd like to know how you got round it!...

Yep ..sync loss...very common problem with some BLDC & RC ESC combinations. Search the forum for much discussion.
You may improve it with ESC prog changes.. soft start and high pwm are usually helpfull,....
... but the most reliable cure ( still not 100%) is to change to a Castle Creations ESC .... but high $$$$'s ! :?
 
All good experience - the little old ESC seemed to be unconditionally stable on a ludicrously oversized motor; a much more expensive & appropriately sized one isn't - I guess that's the reality of using RC gear in a bike.... I'll try to get it fixed somehow - it is usable now but it's full throttle/high speed only (actually not so bad for its intended usage)
Here's a still from the video - there's the ebike grin.....
ebike-grin.jpg
 
Did some experimetation with the beep codes today: tried altering the timing, PWM frequency etc. The only thing that made it better was enabling the soft start - fortunately Matt is used to it now & basically has no problem with it at all. I had a quick go and it is really quite good now. He's itching for a bigger cog to get it's speed on the flat up, but I think he's forgetting what it's for - to grind him up pendle hill (he's just been using it for fun 'till now)(every minute he can....)
It's a turnigy super brain 100 ESC - 2 weeks of heavy usage now & still going strong - nothing gets warm.
 
Back
Top