• Hello ES! We could use some help to get us past the finish line on building the new knowledgebase for the forum.
    Can you donate? Please see our fundraising page. Thank you!

Bafang M820 thread

Waynemarlow

Regular
Joined
Jul 9, 2016
Messages
913
Location
Bucks, England
The little Bafang M820 motor is starting to be used in a number of frames, both Gravel and EMtb. Its tiny in form, weighs 2.3kg's and for all intents and purposes should be a great little motor putting out circa 500 - 600W's, ( I'm using 52 volts on 48 Volt firmware and seeing 620 W's at the battery ) what more could you want.
1753377034017.png
Sadly for the EMtbers amongst us, the firmware programming is not the best and has such limitations one has to wonder whether the slightly heavier big brother M510 ( which is a great motor ), may well be an option with lots of adjustibility for the users needs. If you want small form, limited power with low weight then the M820 is still an option particularly for road and gravel use. The one downside for me is compared to the M510, the M820 is more noisy ( my motor is relatively new and may well yet quieten down with more use ).

So how or can we alter its characteristics enough to make it a better motor. Using BESST and the official Bafang program, then other than altering the assist levels and the startup angle, not a lot more I'm afraid. However a member here @AndreyPr has written a program for us which can imitate the official program for the M820 and also for all other Bafang CAN motors.


So can the M820 torque sensor be altered. I think so. Have a read form Page 9 of the OpenBafangTool thread


And


where posters are discussing both the OpenBafang Tool and another Canable program written by @bart594's Bafang Canable Pro.

Rather than alternate between the above threads, lets set up a more specific M820 thread where we can discuss the merits or not of this little motor.

My findings so far are that using the BESST Tool and using the OpenBafangTool I can alter to some extent the characteristics. But with limited knowledge and what appears to be the motors reacting to changes much like the programming of the M620 motor, then at this stage its very much trial and error. If we refer to those M620 threads I picked up


And


There are a number of similarities and yet I have to disagree with some of the posters statements as being somewhat different in relationship to the M820.

Before I go over my knowledge, has anyone else looked at and actually changed the parameters, as it will save us time if others already have covered the changes ?
 
I'm sure that with 36V versions firmwares changes made via CAN in spd table will not give any effect.
So can You share your firmware version ?
 
Doing a bit more tonight then things are a little clearer to me. Not yet fully understanding but the motor reacts in not to unsimilar ways to the M620. I think another thread may have made that clearer.


Where the poster says
First port of call, getting outputs from the torque sensor:
Surprisingly, it is not a CAN sensor. Don't waste days trying to figure out why you can't receive messages from it, there aren't any to receive.
It has 5v and ground as per the m500 but:
2 outputs for a (possibly 22 pole) rotary encoder (quadrature cadence sensor) at 3.8v logic (level shift to 3.3v for esp)
1 analogue output for 0-120nm torque at ~0.8 - 4.2v. (shift to max 3.1 for esp adc)

Is the sensor the M620's as both have the same splines, unlike the other M series motors ?

So heres my thinking.
Just to get things the same I'm using 52 volts on
1753475187747.jpeg

The parameters from the factory with this firmware were.

1753475323309.jpeg
On the road this was awful to ride feeling quite dull and not at all lively, more about just economising on using least W's to achieve a certain speed.

Off road it was truely awful. Off road you could get into a state at higher cadences after a long climb where the motor feels as though it is cutting back due to over heating, dropping back to just under 300W's in Boost. On doing a few climbs I realised that my cadence was dropping back to just under 90 from around 92 -95 and although not feeling as though, almost certainly putting not as much pressure on the pedals.

After a few trial and error programmings I've ended up here.

1753475774095.jpeg
Now there's another factor in this, Speed. Using a BBRacing plug on device I can change the max speed realtively easily on the bike. As per Smorgasboards musings, as you increase the max speed the more spread the changes over a wider speed become. Speed definately has an influence on the parameters and anybody playing with the settings will have to find whats best at there max set speed I'm afraid. I'm all off road so the higher 45km suits me better and is probably equivalent to the 2 magnet solution Smorgasboard talks about.

So I'm sort of leaning to the following in the Spd Assist parameters, possibly correct, possibly incorrect ?
Assist Level is levels of motor speed or in our case cadence. Those with a lower cadence will look at the lower levels for the most results.
Start Torque is exactly that in Nm where 60 is the max.
Max Torque is the max torque sensor output at that level. In my case at level 3 I want a full spread of the torque sensor as its where in my cadence I can exert max pressure. Level 5 I tried that at 60 but found the motor was not smooth, my peddling at that higher cadence couldn't exert max pressure through out the full rotation of the peddle and the sensor was outputting a varied output, the bike felt jerky and really not smooth at higher rpm.
Return Torque I'm not sure about, it seems to have some influence on the way the motor reacts when it reaches the max speed. I'm not clear on this so more research please.
Min current is, again I'm not sure, but I think when the Min Start Torque is reached, that is the beginning current at the start of the ramp up.
Max Current is I think the max current needed to maintain a set speed. So at say 20mph X % of current is needed to maintain that speed. Again I'm not fully sure here but off road I set it to a max 100%

So please lets take these things not as gospel but just as a starting point to try various settings and see what actually suits your requirements. Report back and let us know how you are getting on as the more users try it, the more we will begin to get a full understanding.
 
Last edited:
If someone don't have expensive BESST and want to test spd table,
I made @bart594 canable pro tool compatible with m820 motor:
Thanks! I hope the changes you did can work for M400 and hub motor controller CR S10F.350.FC too which both don't respond to parameters 6010. Will test coming days.
M400 has a torque sensor with CAN but under tab "Info" there was no data for "Info sensor". By adding 3 lines it now shows Torque sensor info too like HW and Softw. version etc.
I also uncommented 2 lines for read "Display data" (1 and 2) because some display's don't send this data on their own and because of that no ODO or trip etc. was visible.
Maybe someone can make a thread for "Bafang Canable Pro Master" so all info and modifications can be discussed in one thread. And if modifications are useable they can perhaps brought together in one repo?
 
Hm, most of the changes look familiar to me ;)
Yes that's actually fork from your repo, thanks for that.
I hope the changes you did can work for M400 and hub motor controller CR S10F.350.FC too which both don't respond to parameters 6010.
That was main job here (to remove params 6010), so it should work.
And if modifications are useable they can perhaps brought together in one repo?
I can open pull request for my changes, those are all in separate tab. But I'm not sure of this undervoltage changes by @stancecoke, how to detect which firmware/motor support this.
 
Has anyone put more working to tuning the M820? I am really curious what the maximum torque and W that could be reliably pulled from this little motor with a vesc or phaserunner. Could it be tuned to put out number similar to a Bosh CX gen5?
 
You are comparing different weight classes here. More likely Bosch CX gen 5 should be compared to M510.

The biggest problems of M820 is not of lack of torque or power.
 
Yes the M510 is a more direct comparison, it's also 600g heavier.

Drives like the new Mahle M40 and the Avinox M1 are 2.5kg and putting out numbers that are at 100nn and 800+ watts. The Maxxon Air S is 2kg and doing 90nm and 620w.

What's keeping the M820 for putting out 80nm and say 750w? I assume heat dissipation is it's biggest hurdle if it was running a different controller?

Are the drives from Mahle and DJI running roughly 300g more copper windings to handle higher amps? They are also looking for longevity.

Looking at the M600 and Luna was promoting 300% the power from a stock unit when replacing the controller. Looping back to the initial question, could the M820 do 40-50% more power without killing it with the understanding that it's a hot rodded item and it's lifespan will be shorter?
 
Drives like the new Mahle M40 and the Avinox M1 are 2.5kg and putting out numbers that are at 100nn and 800+ watts. The Maxxon Air S is 2kg and doing 90nm and 620w.
Yeah but this are fresh motors, M820 is much older.
could the M820 do 40-50% more power without killing it with the understanding that it's a hot rodded item and it's lifespan will be shorter?
I don't think no one tried before. When custom firmware arrive there will possibility to pull more amps from stock controller. But it may be risky because i'm not sure if m820 have thermal protection.
 
There are two possibilities with this motor. If it is able to generate power and torque without overheating it will likely shear the plastic gear it has. If it is not able to generate power and torque without overheating then it is not able to generate power and torque.

There is no replacement for displacement and this motor is tiny.
 
There are two possibilities with this motor. If it is able to generate power and torque without overheating it will likely shear the plastic gear it has. If it is not able to generate power and torque without overheating then it is not able to generate power and torque.

There is no replacement for displacement and this motor is tiny.
I am working more along the lines of Lotus "add lightness" vs the no replacement for displacement.

Not looking to throttle this. I want to build a trail bike refined to my power hour lunch ride. Lighter weight bike with just a 14s2p pack from Samsung 50S cells. Cover off 800m of climbing with me still putting in a decent amount of effort.

If I could just buy a Mahle or Avinox M1 motor only without battery or frame I would. I build my own steel full suspension frames.
 
You can run the M820 on 52 Volts giving around 625W's at the battery. Seems fairly reliable thus far at about 400 miles.

Lighter weight bikes are not just about the motor. To get good riding manners you will probably need the same suspension, wheels tyres frame weights as per the full fat versions. At the end of the day with all components being equal by going to a motor such as the M820 you will only be about 400gms lighter.

In comparison buy a smaller drinks bottle and only take 500ml of water instead of the full 1 litre of which you will probably like myself only drink 400ml anyway.
 
Last edited:
Yes the M510 is a more direct comparison, it's also 600g heavier.

Drives like the new Mahle M40 and the Avinox M1 are 2.5kg and putting out numbers that are at 100nn and 800+ watts. The Maxxon Air S is 2kg and doing 90nm and 620w.

What's keeping the M820 for putting out 80nm and say 750w? I assume heat dissipation is it's biggest hurdle if it was running a different controller?

Are the drives from Mahle and DJI running roughly 300g more copper windings to handle higher amps? They are also looking for longevity.

Looking at the M600 and Luna was promoting 300% the power from a stock unit when replacing the controller. Looping back to the initial question, could the M820 do 40-50% more power without killing it with the understanding that it's a hot rodded item and it's lifespan will be shorter?
Looking at the Avinox M1, it really is a brilliant design and quite a bit more advanced than the others. The planetary gear system is much more space efficient, light weight and allows the motor slightly more length. The motor magnetic circuit also looks really good. I guess if you are designing Drones for Chinese Military you learn a thing or two. I'm waiting for someone to come out with an axial flux motor and raise the bar again.
 
I got a M820 controller now and found, it has only 6 MOSFETs, while the M510 has 12 MOSFETs. So the maximum capable power will be smaller of course....
 
@stancecoke you are a star in these sort of matters.

Smaller power is not the issue at the moment. Anything around 650W's is probably more than enough, anymore and you may as well simply buy a M510 or M560. The real problem is the firmware at the moment.
 
anyone with a M820, or even without opinion on this "grinding" noise coming from the Motor? i also saw one other video on YT with a similiar sound... its hard to record... while riding its even more distinct then in the stand only...



this are the two other videos i found on yt:
 
Back
Top