Electric Bikes

79 views
Skip to first unread message

Jarrod Tuma

unread,
Apr 11, 2012, 7:19:25 AM4/11/12
to connected-commu...@googlegroups.com
Hi Guys
I'm sure there are others around who are either already working on EV's, or have in the past, or interested for the future! I haven't been to a physical meeting in a while so thought I'd ask the mailing list, wider audience anyway.
I am starting on an "electric assisted" bicycle project, I'm aiming for > 2KW peak power and > half-hour runtime at reasonable speeds, with pedal assist, Basically a useful urban travelling bike. it also has to be light enough not to be a hard slog when the batteries go flat.

I started this all off by playing with a fisher&paykel washing machine motor and a $30 ESC from hobbyking, which did not work, I believe because the ESC expected the motor to have far less inertia than it presented. So I modified the esc to use sensors for controlling the motor, reprogramming the micro, which did work, and was a bit of fun but was never going to make a practical bike, so I thought it was time to get serious.

I have bought a 2.7KW brushless outrunner and 300WH (16 x 5000mAh lipo cells) of batteries from hobbyking to experiment with, all weighing 2.7KG and cost $180 inc shipping from aus warehouse.
My aim (and what I thought CCHS would be interested in as a project) is to produce an open source motor/battery control system.
some specs I'm aiming for:
- 3-phase, 200A, 80V trapazoidal motor control with current sense - possibly extend this to sinusoidal drive (which I'm pretty sure is simply a matter of software)
optoisolated gate drivers.. maybe not required for this size motor, I was looking at something like the intersil HIP4086 N-channel fet bridge driver or TI DRV8301 to drive six 75V, 230A IRFS3107PBF FET's
- Sensored motor control for better low speed control and simplicity - this means crafting a Hall sensor adapter for the cheap hobby king motors, which are sensorless
- ATMEGA or ARM controller for it all
- Modular/adaptable battery monitoring and balancing, allowing the use of cheap hobby lithium cells which come without safety circuitry

These ones are desirable, but secondary
- Regenerative breaking, this should be mostly implementable in software without much extra hardware.
- (modular?) Battery charging, this is possibly the most challenging part of the project, while brushless control is pretty common place these days charging 67V of batteries at 5A is no small task - and this is apparent by the lack of such chargers for small EV's (at reasonable prices) on the market. this may need to be a separate unit, with AC input, or possibly onboard with a low voltage DC input (12V@30A? ie charge from a car battery, reduced current would be acceptable for a slow charge or 70-80VDC@5A input)
- USB charging jack, it would also be neat if the microcontroller could interface with an android phone via ADK, a phone could then be a removable monitor/interface/trip computer for the bike. 
- Some form of security
- all circuitry to be reasonably compact so that it is easily placed on a bike frame. I'm imagining a separate user interface module up on the handlebars.

And for those interested in this sort of stuff, here is some light reading
http://scolton.blogspot.com.au/ Fantastic blog of an MIT student, who appears to now reside in south australia. a lot of motor control design, and I am basing my current thoughts off the  his latest "flying flux" controller, there are other controllers on there, even a 3-phase brushless arduino shield (is there anything it can't do?)
http://www.etotheipiplusone.net/ "equals zero" blog, this guys tinytroller looks good. 
Most of the other MIT blog links you can find off these two sites are also interesting.. days of reading 
As for battery management, I just came accross the open revolt project which looks like it has applied a similar sort of system as I proposed, but scaled up to a car

Any input on the specs above is welcome
I'm still not entirely sure how CCHS shared projects work but if anyone is interested (and wants to enlighten me on the dynamics of a shared project) let me know

Cheers. 
Jarrod

George Patterson

unread,
Apr 11, 2012, 9:07:07 AM4/11/12
to connected-commu...@googlegroups.com
Hi Jarrod,


On 11 April 2012 21:19, Jarrod Tuma <jtum...@gmail.com> wrote:
> Hi Guys
> I'm sure there are others around who are either already working on EV's, or
> have in the past, or interested for the future! I haven't been to a physical
> meeting in a while so thought I'd ask the mailing list, wider audience
> anyway.

Yep, there has been some discussion on EVs in passing in the recent past.

> I am starting on an "electric assisted" bicycle project, I'm aiming for
> 2KW peak power and
> half-hour runtime at reasonable speeds, with pedal
> assist, Basically a useful urban travelling bike. it also has to be light
> enough not to be a hard slog when the batteries go flat.
>
> I started this all off by playing with a fisher&paykel washing machine motor
> and a $30 ESC from hobbyking, which did not work, I believe because the ESC
> expected the motor to have far less inertia than it presented. So I modified
> the esc to use sensors for controlling the motor, reprogramming the micro,
> which did work, and was a bit of fun but was never going to make a practical
> bike, so I thought it was time to get serious.
>
> I have bought a 2.7KW brushless outrunner and 300WH (16 x 5000mAh lipo
> cells) of batteries from hobbyking to experiment with, all weighing 2.7KG
> and cost $180 inc shipping from aus warehouse.

I hope that you did the research. The maximum motor size allowed on a
electrically-assisted bicycle is 200w when ungoverned (whatever that
means).

from http://www.vicroads.vic.gov.au/Home/SafetyAndRules/RoadRules/Bicycles.htm
> A motorised bicycle is not classed as a bicycle if:
> * the motor is the primary source of power
> * the motor's power output exceeds 200 watts (whether or not the motor is operating).
>
> These are considered to be motorcycles.

This means that if you remove the pedals from an electric bike, you
require a motor cycle helmet and register the bike as a motorcycle.
The 200watt motor rating is annoying as Europe has a maximum of 250w
which is more reasonable and more readily available.

I'm don't really have the background to be able to comment fully but a
quick scan

> - ATMEGA or ARM controller for it all
> - Modular/adaptable battery monitoring and balancing, allowing the use of
> cheap hobby lithium cells which come without safety circuitry
>
> These ones are desirable, but secondary
> - Regenerative breaking, this should be mostly implementable in software
> without much extra hardware.

I hope it will be doing more braking than breaking. :-)
Regen. braking becomes less efficent at lower speeds and should not
replace the friction brakes. Perhaps use the motor on the back wheel
only. Perhaps supercaps here.

With any project, you are selling it to someone who will need to put
aside their current project for a bit to work on a group project so it
needs to capture their interest. Making yourself available to answer
questions and discuss it does help. Feel free to attend a meeting and
pitch it to the group.

I'd suggest writing some documentation on-line as a brain dump of
ideas as people will read it fi they know about it and are even
remotely interested. It also helps ensures that ideas are not
forgotten, such as the vicroads link that I provided above.

Regards


George

Clifford Heath

unread,
Apr 11, 2012, 9:16:57 AM4/11/12
to connected-commu...@googlegroups.com
Jarrod,

Though I don't currently have spare time for a motor control project,
it's an area I studied intensely for a few years, so I'd like to join the
discussion.

On 11/04/2012, at 9:19 PM, Jarrod Tuma wrote:
> I started this all off by playing with a fisher&paykel washing machine motor

I thought those were basically stepper motors (i.e. electrically commutated)?
They have huge torque and I heard of a UK project that produced blindingly
fast go-carts with that type of motor.

> ... the intersil HIP4086 N-channel fet bridge driver

Not familiar with the 4086, but if it's anything like the 4081, it's excellent.
Beware though, these kinds of currents and the *very* fast switching
require *very* careful board design. You'll get massive EMI really easily
and if you don't kill your own logic, you'll at least kill radio and TV for
blocks around and have ACMA down on you like a ton of bricks.
Assuming you get past making smoke, that is :). Budget for at least
a half-dozen sets of FETs… There are all kinds of tiny transients that
become deadly at these currents.

Self-oscillating programmable current-limit is pretty easy to implement and
a good idea. Just a comparator comparing the current waveform from a
sense resistor to a programmable voltage. Look at the reference circuits
around the National LMD14245 for ideas.

> - Regenerative breaking, this should be mostly implementable in software without much extra hardware.

I doubt software is fast enough (assuming you meant braking, not breaking :)).
Generally you turn on both low-side FETs to create a dead short - one
FET conducts in the reverse direction, but that's not a problem b/c the
resistance is so low that the reverse voltage never turns on the body diode.
The short must be left there until *but not longer than* the current rises to
just below saturation of the motor inductance. Then you rapidly switch so
the inductor current is steered back into the battery (i.e. the motor inductance
spans a higher voltage than the supply). Leave it there until the current
reaches zero (but doesn't reverse), rinse and repeat. I.e. it's a very adaptive
and real-time thing, hard to get right in software.

There's (used to be?) a lot of good clues around this at 4qd.co.uk - that
business specialises in these so he doesn't share all his secrets, at least not
all in the same circuit… but most of the tricks are there if you look hard
enough.

Oh yeah, one final thing. If your motor has an output greater than 200W,
you're subject to all the motorcycle law - helmets, licenses, engineering
certification, roadworthiness, registration. There is hope that we might follow
the direction Europe looks to be taking and increase that limit to 1000W, but
for now… please consider.

Clifford Heath.

Jarrod Tuma

unread,
Apr 11, 2012, 9:54:44 AM4/11/12
to connected-commu...@googlegroups.com
I hope that you did the research. The maximum motor size allowed on a
electrically-assisted bicycle is 200w when ungoverned (whatever that
means).

from http://www.vicroads.vic.gov.au/Home/SafetyAndRules/RoadRules/Bicycles.htm
> A motorised bicycle is not classed as a bicycle if:
>     * the motor is the primary source of power
>     * the motor's power output exceeds 200 watts (whether or not the motor is operating).
>
> These are considered to be motorcycles.

This means that if you remove the pedals from an electric bike, you
require a motor cycle helmet and register the bike as a motorcycle.
The 200watt motor rating is annoying as Europe has a maximum of 250w
which is more reasonable and more readily available.

I'm don't really have the background to be able to comment fully but a
quick scan
You are correct, 200W is the legal limit for riding on the road without a license. but this is for use on private property. (for the record) 
Really though that is one of those unenforceable laws. so long as the power is not ridiculous (which 2KW is not..) what are they going to do? put the bike on a dyno? power could be limited in software to 200W. Anyway I was aware of it and it doesn't worry me.

I hope it will be doing more braking than breaking. :-)
Regen. braking becomes less efficent at lower speeds and should not
replace the friction brakes. Perhaps use the motor on the back wheel
only.  Perhaps supercaps here.
ah that made me laugh. I'm guessing the first prototype will indeed do some breaking
Good points, caps are an option, and could help the batteries out with heavy acceleration too. However supercaps are not cheap, nor power dense. The battery bank should be able to take 10A of regen charge current, of course I could only imagine using regen when coming up to a red light or seeing that I will need to stop in the distance, not for hard braking.

With any project, you are selling it to someone who will need to put
aside their current project for a bit to work on a group project so it
needs to capture their interest. Making yourself available to answer
questions and discuss it does help. Feel free to attend a meeting and
pitch it to the group.

I'd suggest writing some documentation on-line as a brain dump of
ideas as people will read it fi they know about it and are even
remotely interested. It also helps ensures that ideas are not
forgotten, such as the vicroads link that I provided above.

Yeah I was more hoping for some discussion I guess. see what happens, might have to tag along to a few meetings ;)
A blog/wiki for early stage development is a good idea.


Ah new email from Cliff, 
I thought those were basically stepper motors (i.e. electrically commutated)?
They have huge torque and I heard of a UK project that produced blindingly
fast go-carts with that type of motor.
ohh link?
they are basically (3 phase) stepper motors.. but so are all brushless motors. I think the distinction between steppers and brushless DC is the presence of a position feedback loop, which in BLDC motors is done by sensing the back EMF or with hall sensors or some other rotary encoder. Steppers also commonly have a higher number of poles thus steps per revolution, usually using mechanical/magnetic tricks to achieve this, ie those crazy stator layouts.
you can run a BLDC motor open loop just like a stepper motor (but with 3 phases instead of 4) in fact I was doing this with my f&p motor, and witnessed all the shittyness you would get with a regular stepper motor. then I closed the loop with position feedback and it ran amazingly well.
The downside with these motors is that they are huge, difficult to mount and heavy. As a mate told me I would be "that guy with a washing machine motor on his bike." also may be a bit tricky to say its under 200W, compared with the motor I bought from hobby king which is the size of my fist, it would be hard to convince someone its greater than 200W!

Not familiar with the 4086, but if it's anything like the 4081, it's excellent.
Beware though, these kinds of currents and the *very* fast switching
require *very* careful board design.
Yeah keeping the logic sane might be a challange, I would have thought that the transients are not so bad with most motors due to winding inductance.. ie the trapezoidal current response motors have to the square wave driving waveform. this also smooths out the PWM peaks. Still I understand I will have to deal with some high current at high frequencies.

Look at the reference circuits
around the National LMD14245 for ideas.
Current limit done in hardware sounds like an excellent idea, I will check that out

I doubt software is fast enough (assuming you meant braking, not breaking :)).
software can be pretty quick ;)
This is not a high-rpm motor, but yeah it could be a challange.
oh and I think I may have actually meant what I typed subconsciously. 




George

--
You received this message because you are subscribed to the Google Groups "Connected Community HackerSpace" group.
To post to this group, send email to connected-commu...@googlegroups.com.
To unsubscribe from this group, send email to connected-community-h...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/connected-community-hackerspace?hl=en.


Clifford Heath

unread,
Apr 11, 2012, 5:46:36 PM4/11/12
to connected-commu...@googlegroups.com
On 11/04/2012, at 11:54 PM, Jarrod Tuma wrote:
> ... the transients are not so bad with most motors due to winding inductance.

Large inductance means you get fast voltage transients. Plan to mount
a small high-current inductor right at the switches so those steps don't
couple in elsewhere. Keep the return loops super-close, preferably on
the exact opposite side of the board. Twist all high-current wiring, etc…
Don't forget about ground currents; ground is just the trampoline that
everything else bounces off.

> I doubt software is fast enough (assuming you meant braking, not breaking :)).
> software can be pretty quick ;)

> This is not a high-rpm motor, but yeah it could be a challenge.

The RPM isn't the issue. The braking effect is achieved in response to
the L/R time constants, not the RPM.

Clifford Heath

Ben Somerville

unread,
Apr 11, 2012, 8:45:20 PM4/11/12
to connected-commu...@googlegroups.com
Hi Jarrod
There is very active Electrical Vehicle branch of the ATA (ata.org.au)
where members have already built EV bikes, cars etc.
Meeting Dates:
May 16 2012 – This is a joint meeting of the ATA Melbourne branch and
the ATA Melbourne EV branch – Topic e-bikes. Further details to
follow. This topic about electric bikes would be of interest to you.
April 30 2012 – A Volvo conversion – Greg Sievert and Wayne Bowers
Introductions – Mario Giannattilio

The ATA EV melbourne branch provides a forum for anyone interested in
Electric Vehicles such as bicycles, cars and other forms of transport.
Format
There is a monthly 30-45 minute meeting where matters pertaining to
electric vehicles are discussed followed by a guest speaker who speaks
to one of the many topics relating to electric vehicles. The formal
part of the night is followed by an informal gathering for tea, coffee
and biscuits and a chance to catch up with like minded people. There
is no need to book and everyone (ATA member or not) is most welcome.
Meeting details
Meetings are usually held on the 4th Wednesday of each month at 7:00pm
in the Engineering Faculty, Swinburne University, Hawthorn campus
(entry via the EN building). but meeting dates may vary, check
bulletins at ata.org.au
For a map of Swinburne see www.swinburne.edu.au/campuses/hawthorn/index.html
If you get lost on the campus, ring 0433 187 702.
Live web streaming and on-demand content.
Live web streaming of the next meeting and recordings of previous
meetings can be viewed at
portal.rivustv.com/listContentPPP.php?user=12109. No charge for live
streaming but small charge for after event viewing.
Ben Somerville
Member CCHS and ATA Melbourne Branch Committee member

Jarrod Tuma

unread,
Apr 11, 2012, 9:41:01 PM4/11/12
to connected-commu...@googlegroups.com
Clifford,
You mean have inductors on the power rails? yeah, or keep the power rails away from any logic/signal and filter the supplies for the logic. or both.
Fast voltage transients are not so bad, its transient current that causes EMI right?
So, short power tracks, symmetric return loops, power rail filtering, decoupling caps scattered around the logic

Ah just re-read your previous email, missed the bit where you explained regen braking. so would this usually be done with some analog circuitry? I guess the micro could measure the battery current and adjust its PWM duty cycle to maximise this, or just guess, which would not be 100% effective but should still do something as long as the duty cycle remains short.
or use a similar circuit to the current limit comparator you mentioned earlier.
Sounds like an interesting challenge. Maybe for a later prototype

Clifford Heath

unread,
Apr 11, 2012, 10:08:48 PM4/11/12
to connected-commu...@googlegroups.com
On 12/04/2012, at 11:41 AM, Jarrod Tuma wrote:
> You mean have inductors on the power rails?

No, a series inductor. Keeps the voltage slew rates lower on the power wiring
to the motor inductance. They will capacitively couple into everything otherwise,
though shielding can help.

> yeah, or keep the power rails away from any logic/signal and filter the supplies for the logic. or both.

You'll need major filtering on the power rails, again starting with a capacitor
directly across the supply at each H-bridge. Transient currents flow through
these caps, and those currents radiate more the bigger the enclosed loop area.

Loop area, loop area, loop area. Just keep thinking about that, and think about
every part of your current waveform, including the switching glitches.

> Fast voltage transients are not so bad, its transient current that causes EMI right?

No, you can radiate EM either capacitively (voltage) or inductively (magnetic).

Transient current radiates proportional to loop area, which makes it a biggie.
Magnetic coupling is much harder to shield... but both can be problems.

> Ah just re-read your previous email, missed the bit where you explained regen braking. so would this usually be done with some analog circuitry? I guess the micro could measure the battery current and adjust its PWM duty cycle to maximise this, or just guess, which would not be 100% effective but should still do something as long as the duty cycle remains short.

Right. You have a high inductance low-resistance motor, and you want to
put a dead-short across it, until the current reaches a level just shy of
blowing up your MOSFETs, less than your maximum charge current, and
short of inductor saturation (I think you implied it's a coreless motor, so
saturation is less likely to be an issue). If you leave the short there too
long, you'll need new MOSFETs :). If you let the current rise too high then
steer it into the batteries, you'll need new batteries. A lot of traps!

Definitely a case for doing it with hard-wired comparators...

Clifford Heath.

Andy Gelme

unread,
Apr 11, 2012, 10:08:56 PM4/11/12
to connected-commu...@googlegroups.com
hi Jarrod,

On 2012-04-11 21:19 , Jarrod Tuma wrote:
> I'm sure there are others around who are either already working on
> EV's, or have in the past, or interested for the future !

Whilst not specifically about electric bikes ... the New Zealand
Tumanako project provides open-source hardware and software to recharge
and drive electric vehicles ...

http://sourceforge.net/apps/mediawiki/tumanako/index.php?title=Main_Page
http://wiki.greenstage.co.nz/saker/Tumanako
http://blog.greenstage.co.nz/2009/03/let-fun-begin.html

Some of us may recognize Vik Oliver on the list of people ... who is
always into interesting projects.

> I'm still not entirely sure how CCHS shared projects work but if
> anyone is interested (and wants to enlighten me on the dynamics of a
> shared project) let me know

As George pointed out, the key is to present an engaging project that
will interest others enough to join in. There needs to be a project
champion who leads the effort and keeps the momentum going. Good
communication skills and some documentation helps. Using on-line
repositories for the hardware designs and software means that the
project artifacts are available for all.

I'd suggest that you start by having a project brief (goals, approach)
and some reference information, e.g gathering together the URLs
mentioned in your email ... in one place, on-line. It's good to have
somewhere to direct people who want to know more about your project and
the progress. That place may be the CCHS Wiki ... it's up to you.

The CCHS space provides a physical location to meet, get things built
and interact with people with different domain skills. In all other
respects, a CCHS group project is just like any other open-source
hardware / software project ... and the same approaches apply.

--
-O- cheers = /\ /\/ /) `/ =
--O -- http://www.geekscape.org --
OOO -- an...@geekscape.org -- http://twitter.com/geekscape --

Russel

unread,
Apr 13, 2012, 2:51:59 AM4/13/12
to connected-commu...@googlegroups.com
Silicon Chip magazine did a detailed story on converting F&P motors in their Feb issue http://www.siliconchip.com.au/cms/A_112762/article.html if anyone is interested

Jarrod Tuma

unread,
Apr 15, 2012, 11:25:33 PM4/15/12
to connected-commu...@googlegroups.com
On 12 April 2012 10:45, Ben Somerville <bts...@gmail.com> wrote:
Hi Jarrod
There is very active Electrical Vehicle branch of the ATA (ata.org.au)
where members have already built EV bikes, cars etc.
Thanks for the heads up Ben, might tag along tonight.

in other news,
I have made a pcb to hold the hall sensors, and mounted them (and the motor) to a steel plate, I've got this bent in such a way that it works like a leaf spring when mounted on a pannier rack, holding the motor against the back wheel (which has a 2.5cm socket mounted on the shaft) I calculated it would go about 50km/h with 30V, so probably 40 when loaded, depending on the current my controller can handle etc.
First couple of tests show that friction drive is going to slip with even a fraction of full power, so this is just a really basic test platform to play with, I plan on mounting a sprocket on the motor and chain drive it to the back wheel.

Got my reprogrammed hobbyking speed control working with pwm and the sensors, seemed to work fine on a current limited supply, so tried that out with batteries. due to a software bug, full pwm dutycycle was dumped into the almost stationary motor (with the bike wheel on the ground) which fried some fets :( hardware overcurrent protection is looking like a good idea. But some more intelligent software would prevent this kind of thing too.
bit of a learning experience

David Payne

unread,
Apr 17, 2012, 8:40:39 AM4/17/12
to Connected Community HackerSpace


On Apr 16, 11:25 am, Jarrod Tuma <jtuma...@gmail.com> wrote:
> On 12 April 2012 10:45, Ben Somerville <btso...@gmail.com> wrote:
>
> > Hi Jarrod
> > There is very active Electrical Vehicle branch of the ATA (ata.org.au)
> > where members have already built EV bikes, cars etc.
>
> Thanks for the heads up Ben, might tag along tonight.

Melbourne also has a branch of the Australian Electric Vehicle
Association Inc. (AEVA).,
http://www.aeva.asn.au/melbourne , as you may have already learned
from someone at ATA.
(I'd be VERY surprised & disappointed if ATA was now trying to keep
people ignorant of "rival" groups as has long been the practice in eg.
most computer groups).

Jarrod Tuma

unread,
Apr 17, 2012, 8:44:10 AM4/17/12
to connected-commu...@googlegroups.com
I have not been to a meeting yet, the ebike talk was not on monday, I think its next week

Andy Gelme

unread,
Apr 17, 2012, 10:06:49 PM4/17/12
to connected-commu...@googlegroups.com
hi All,

On 2012-04-17 22:40 , David Payne wrote:
> (I'd be VERY surprised & disappointed if ATA was now trying to keep
> people ignorant of "rival" groups as has long been the practice in eg.
> most computer groups).

Let's not create and publicly spread what appears to be untrue
speculation about another community group. If you must, please do that
on your own web-site or email list ... somewhere not associated with the
CCHS.

All of the people we've met from the ATA EV group have been helpful and
passionate about EV ... and don't seem at all like the sort of people
who'd engage in that sort of politics.

Let's keep the discussion technical ... thanks.

Ben Somerville

unread,
Apr 18, 2012, 3:59:24 AM4/18/12
to connected-commu...@googlegroups.com
ATA is a very broad church, we work with every body.
Ben

Reply all
Reply to author
Forward
0 new messages