Bafang M500/M600 thread

Hello and thanks to everyone for the help provided on this forum.

I have an EconicOne CrossCountry e-bike. I am using that bike on a private property and 25km/h was pretty annoing, especially on short distances where the battery range is not that important.

The bike is great as it is, but I have decided to try and unlock the speed limit.

After finding some cables online i've notticed that my plugs are in triangle shape and the cables online were having a round plugs.
After a little more research I have found out that the bike is using a CAN protocol and not UART. It is using this in order to comply with the european regulations from what I understand.

After finding this forum and mall hints everywere i tried to unlock the bike using the cheapest way possible.
Most of the CANBUS2USB adapters are quite expensive, while a cheap chinesse arduino clone and MCP2515 Module can be found in almost any country with fast and cheap delivery.

I will link all the posts that helped me and and also the pictures.

The following image helped me understand the cables and how to connect them.
file.php


At the following url you can see some pictures with how I have connected the arduino to the bike and also the code for the arduino.
https://drive.google.com/drive/folders/1zExZM7Ve7k3tGI3LBkSZa-HnKf0AM-3u

Be carefull with the cables! You can fry things with that battery (laptop, arduino and other things)
Also the connection between the arduino and the MCP2515 module is done through different pins according to the arduino type you have. On a regular arduino the pins used for SPI are 13,12,11 and 10/9. My Mega arduino that I had arround the house uses the pins 50 to 53.

SPI%2BPIN%2BON%2BTHE%2BARDUINO%2B2560%2BMEGA%2B%2528MISO%2529%252C%2B%2528MOSI%2529%252C%2B%2528SCK%2529%252C%2B%2528SS%2529%2B%25282%2529.webp

ff293fbdca7a143ad5c4cb8d0575e554.jpg


After you have connected the arduino to the MCP2515 AND THE MCP to the bike upload the code from google drive and after that you can put the bettery in and turn it on. If the display turns on as normal you haven't meesed up any connection. Now you can open the CanHacker software (You can find it in the zip from the google drive url).

Here you should update the settings first.
1. Sellect your CAN device on your own COM port.
2. Set the COM Baudrate to 115200 or whatever you have used in your arduino code.
3. Set the CAN Baudrate to 250Kbit/s as this is what those bafang bikes usually use.
4. Uncheck RTS HS and Listhen Only and press ok

After this you can press the connect button and it should start displaying data like in the first picture from the google drive url.

Try and save the original configuration in case you need to revert at some point.
This was the line I was interested in: 02F83203 6 C4 09 C0 01 B6 08 where C4 09 = 9C4HEX = 2500 (25km/h)
I wanted to update that to 35km/h so I have used CanHacker to send the new value AC 0D D0 01 E8 08. The first 2 groups are representing the speed limit, the next 2 groups are representing the wheel size and the last one the perimeter of the wheel. (Casainho helped me understand that in his well comented code https://github.com/OpenSourceEBike/EV_Display_Bluetooth_Ant/blob/main/firmware/display/can.c)
I have also updated my wheel size and perimeter.

At first I was trying to do that, but no change was getting propagated. So I thought maby CanHacker cannot update messages and only send temporary ones on the BUS. But apparently that is not how CAN BUS works. SUPERJC helped me with a pece of code that I can use direclty on the arduino to update the data. Here I've understoos that when you do the update you don't use the same ID as you can read on the screen. So I have tried to update using this ID: 05103203. Unfortunately this didn't work either
and few hours later xyz502 gave me another id (85103203) and this worked as expected.

There is a picture with what I had to transmit on the google drive url.

After sending that the readings changed to the new value.

This is a BAFANG rear motor 250W 500Wpeak.

Thanks again everyone!
 
Hey Folks!

I have a cortina e-common ebike with a bafang m400. I used the tips here to unlock the 25km/h to 45 km/h. All worked fine for over a year. But all of a sudden it is turning off in the middle of cylling, or just standing still and sometimes it just won't turn on. There are no error codes. Does anyone have any idea how to fix this?

Thanks in advance.
 
npcspellen said:
Hey Folks!

I have a cortina e-common ebike with a bafang m400. I used the tips here to unlock the 25km/h to 45 km/h. All worked fine for over a year. But all of a sudden it is turning off in the middle of cylling, or just standing still and sometimes it just won't turn on. There are no error codes. Does anyone have any idea how to fix this?

Thanks in advance.
Most probably is your battery pack, like an unbalanced cell.
 
casainho said:
npcspellen said:
Hey Folks!

I have a cortina e-common ebike with a bafang m400. I used the tips here to unlock the 25km/h to 45 km/h. All worked fine for over a year. But all of a sudden it is turning off in the middle of cylling, or just standing still and sometimes it just won't turn on. There are no error codes. Does anyone have any idea how to fix this?

Thanks in advance.
Most probably is your battery pack, like an unbalanced cell.

How can i check this? I brought the bike dealer to the dealer. They told me it was in the engine. And it would cost me 700 euro for a new engine since the speed is unlocked. But they couldn't tel me what the problem in the engine could be. And also i have no idea if unlocking the speed limit can really harm the engine since i usually ride between 30-35 km/h. It is just weird to me. Since it happens at random moments.
 
The torque sensor seems to be linear and with very repetitive results (tested by CiDi and me, we have same values for our different motors).

I was able to measure some values and extrapolate the others. Seems this torque sensor can only measure up to near 40kgs. The TSDZ2 torque sensor is able to measure up to 100 kgs, but it is not linear and the highest resolution is also on the first 40kgs.



Even if it only measures 40 kgs, I think that value is only surpassed at startup / very low cadence like 30 RPM or less. So, maybe the pedal human power will be accurate most part of time of pedaling -- I did some simulation of max values for different cadences and seems at cadence 50, it measures max of about 350 watts -- and 350 watts is an high value for me. For me, an average value is 250 watts and I can not sustain 350 watts for more then some minutes (I also run and I have a run power meter and this values are similar to the ones I measure on TSDZ2).

So to resume, I think we can implement the Human Pedal Power meter and we should get some good results. Maybe the values will not be good when pedaling very slow at 50 or less cadence.

Here the simulations:



I also do some light trail runs and I use a Garmin watch that has a metric called "stamina" that represents my energy. As I am tall, fat and not fit, I have low stamina and so I need to manage very well my energy so I can go to the end of the trails of 15kms.
For example today, I was able to run the 15 kms and never stop to walk because I was tired, so I did manage well my energy and in the end, my Garmin watch stamina said I had energy for only more 3kms - quite accurate for the way I was felling tired:



The Garmin watches or cycling GPS computers as Edge, can also calculate stamina for cycling activities but for that it needs the real time input of pedal human power. My plan is to calculate the pedal human power from Bafang M500/M600 torque sensor, using our EasyDIY display, and send wireless by ANT to the watch or GPS computer, so the user will be able to see later the graph of pedal human power as also got the real time stamina while cycling.

Here the example of my running power (around average 250W) and stamina graphs on the 15 kms trail run:

 
I just finished the build notes for the display, Bafang version: https://opensourceebike.github.io/build_display-bafang_m500_M600.html

I didn't change anything on the build process concepts compared to the TSDZ2 version. This displays are working well and withstand with the water from when I wash my EBikes. I do not have yet experience with rain, but I hope I will on next winter.
 
Hi. Anybody here experienced a bafang m600 motor the pedal assist randomly cuts off without error? i dont think the problem is with the speed sensor or the magnet since i tried installing another m600 motor on the same bike , it has no problem... any advice or help is appreciated. thanks
 
casainho said:
The torque sensor seems to be linear and with very repetitive results (tested by CiDi and me, we have same values for our different motors).

I was able to measure some values and extrapolate the others. Seems this torque sensor can only measure up to near 40kgs. The TSDZ2 torque sensor is able to measure up to 100 kgs, but it is not linear and the highest resolution is also on the first 40kgs......

It seems Bafang made simplification and used the mapping that is commonly used by big brands now. You can find it for example here at Polini motor custom app where you map input torque to output torque (same you can find at Yamaha PW-X2). What we can see that the characteristic is linear only to some point and then got saturated to max value. I am not saying this is best solution but it maybe the reason why bafang sensor has limited range.
2022-06-05 21_56_37-Polini E-bike – Aplikacje w Google Play — Mozilla Firefox.png
source: https://play.google.com/store/apps/details?id=com.bitcycle.ep3plus&gl=US

Also on short cranks like 150mm you can read up to 47,59kg ;)
 
szkuba said:
casainho said:
The torque sensor seems to be linear and with very repetitive results (tested by CiDi and me, we have same values for our different motors).

I was able to measure some values and extrapolate the others. Seems this torque sensor can only measure up to near 40kgs. The TSDZ2 torque sensor is able to measure up to 100 kgs, but it is not linear and the highest resolution is also on the first 40kgs......

It seems Bafang made simplification and used the mapping that is commonly used by big brands now. You can find it for example here at Polini motor custom app where you map input torque to output torque (same you can find at Yamaha PW-X2). What we can see that the characteristic is linear only to some point and then got saturated to max value. I am not saying this is best solution but it maybe the reason why bafang sensor has limited range.
2022-06-05 21_56_37-Polini E-bike – Aplikacje w Google Play — Mozilla Firefox.png
source: https://play.google.com/store/apps/details?id=com.bitcycle.ep3plus&gl=US

Also on short cranks like 150mm you can read up to 47,59kg ;)
That makes sensor for the motor power I see on the display, it seems to hit a limit at a certain point even if I press more the pedals, like on level 1 (9 assist levels), I get max of 170 motor watts.

Some one told me this: "Bafang M500/M600 has a bit inferior control to Shimano and Bosch. In single track, stops and starts. In Shimano the control is as if you don't have a motor." -- does anyone understand or knows the difference?
 
casainho said:
Some one told me this: "Bafang M500/M600 has a bit inferior control to Shimano and Bosch. In single track, stops and starts. In Shimano the control is as if you don't have a motor." -- does anyone understand or knows the difference?

I can field this one, the Bafang Ultra family is not, in my opinion, programmed for delicate maneuvering. They appear to have set the minimum assist to something like 10%, and there's no proportional ramp up to that despite having a torque sensor. You start turning the crank and suddenly it's there. This gets pretty dangerous when you're creeping up on an intersection or trying to navigate a tight corner, it'll throw you right into what you're trying to avoid. I've taken to just turning the assist level to 0 when I'm approaching something that needs delicate maneuvering.

Same with stops - the default programming keeps the motor turning after you've stopped pedaling for as much as a full revolution (and even what feels like 1/4 of a revolution when braking).

This is why you see a lot of the published tunes for the UART versions focused on smoothness. The Bafang makes it feel very obvious that there's a motor, and it's going to leap in with "full" force. Perhaps Shimano has spent more time building some finesse into how it ramps power up and down so it feels more natural.

The Bafang control is goofy fun when you're just going for speed and sloppy turns, but I find it frustratingly sloppy.
 
boudin said:
casainho said:
Some one told me this: "Bafang M500/M600 has a bit inferior control to Shimano and Bosch. In single track, stops and starts. In Shimano the control is as if you don't have a motor." -- does anyone understand or knows the difference?

I can field this one, the Bafang Ultra family is not, in my opinion, programmed for delicate maneuvering. They appear to have set the minimum assist to something like 10%, and there's no proportional ramp up to that despite having a torque sensor. You start turning the crank and suddenly it's there. This gets pretty dangerous when you're creeping up on an intersection or trying to navigate a tight corner, it'll throw you right into what you're trying to avoid. I've taken to just turning the assist level to 0 when I'm approaching something that needs delicate maneuvering.

Same with stops - the default programming keeps the motor turning after you've stopped pedaling for as much as a full revolution (and even what feels like 1/4 of a revolution when braking).

This is why you see a lot of the published tunes for the UART versions focused on smoothness. The Bafang makes it feel very obvious that there's a motor, and it's going to leap in with "full" force. Perhaps Shimano has spent more time building some finesse into how it ramps power up and down so it feels more natural.

The Bafang control is goofy fun when you're just going for speed and sloppy turns, but I find it frustratingly sloppy.

Let me build on this a bit. A UART based ULTRA is completely adjustable to the owner's desires (easily tuned!). A UART based ULTRA with the FREY "Smooth" tune installed on it is an exercise in finesse and low speed control I'd put up against anything. Even the torque sensing seems right.

However, the CANbus version of the Ultra is NOT user programmable (by anyone), and the programming there is more like the proverbial bull in a china shop....

I don't think either of the Ultra motors are directly comparable to the 500/600 series, which have a lot more finesse, but seem to be a work in progress at BAFANG.
 
AHicks said:
I don't think either of the Ultra motors are directly comparable to the 500/600 series, which have a lot more finesse, but seem to be a work in progress at BAFANG.

The Bafang models are not exactly decipherable, but I thought the Ultra _is_ one of the 500/600 series, the G510/M620. Am I mistaken? If so, what then exactly is the 500/600 series? I see the G530 (CANbus MTB, 200W), several G52x (which I presume are also CANbus), and the G510 on the Bafang motor product page, how are those different?
 
casainho said:
That makes sensor for the motor power I see on the display, it seems to hit a limit at a certain point even if I press more the pedals, like on level 1 (9 assist levels), I get max of 170 motor watts.

Some one told me this: "Bafang M500/M600 has a bit inferior control to Shimano and Bosch. In single track, stops and starts. In Shimano the control is as if you don't have a motor." -- does anyone understand or knows the difference?

All the commercial motors seem to do the same, each level has a max Watts and the rider input is simply a percentage of that depending on the torque sensor reading. They all have a ramp up though to get going and some like the Bosch is fairly generous ( a lot of riders voice admiration for the “power” of the Bosch simply confusing power and acceleration). My M600 is very generous in that the same ramp up is used right across all 9 levels and at the lower levels that 350Ws is way more than the level setting and thus you get this surge of power and then the motor backing off to get back to the max assist level. Most riders consider this almost dangerous in some ways but it’s perfectly manageable.

It’s that one ramp up surge used right across the range which is Bafangs foible at the moment. I quite like it in some ways as you can in places where you can’t turn your pedals in say amongst rocks and ruts, dab the peddle and the surge will carry you through. If that surge worries you fit a brake sensor on the rear brake, it shuts the motor down immediately. Now if Bafang had a variable ramp up dependant on the level, would it solve most of the motor problems ?

Bosch FAZUA and Shimano are more refined and with their upper levels now resembling what you guys did in the TSDZ2 project with a both torque and cadence and speed inputs rather than just torque, I can’t remember what you called it but it was my go to on the TSDZ2. All manufacturers apart from Bafang now have Apps which the rider can set most parts of the motor response to their needs almost like the TSDZ2 project could do. I suspect it’s actually available to do so in the Bafang as well but as yet nobody has deciphered the Canbus codes sufficiently to enable this function. The first App writer who does so will see their App sell well.

I’m not sure Caisanho that you can do much about the way the motor operates as yet but what would be good would be a simple tool to download the latest version of the firmware to the motor ( there are now quite a number of firmware versions available ). The Bafang BEEST tool is not working well for most users and is very limiting. Now your display has all that is needed to Bluetooth across from a PC the latest firmware and download it to the motor ? The Bafang 241C display has it in memory ready but as yet the function is greyed out and not available.
 
Waynemarlow said:
casainho said:
That makes sensor for the motor power I see on the display, it seems to hit a limit at a certain point even if I press more the pedals, like on level 1 (9 assist levels), I get max of 170 motor watts.

Some one told me this: "Bafang M500/M600 has a bit inferior control to Shimano and Bosch. In single track, stops and starts. In Shimano the control is as if you don't have a motor." -- does anyone understand or knows the difference?

All the commercial motors seem to do the same, each level has a max Watts and the rider input is simply a percentage of that depending on the torque sensor reading. They all have a ramp up though to get going and some like the Bosch is fairly generous ( a lot of riders voice admiration for the “power” of the Bosch simply confusing power and acceleration). My M600 is very generous in that the same ramp up is used right across all 9 levels and at the lower levels that 350Ws is way more than the level setting and thus you get this surge of power and then the motor backing off to get back to the max assist level. Most riders consider this almost dangerous in some ways but it’s perfectly manageable.

It’s that one ramp up surge used right across the range which is Bafangs foible at the moment. I quite like it in some ways as you can in places where you can’t turn your pedals in say amongst rocks and ruts, dab the peddle and the surge will carry you through. If that surge worries you fit a brake sensor on the rear brake, it shuts the motor down immediately. Now if Bafang had a variable ramp up dependant on the level, would it solve most of the motor problems ?

Bosch FAZUA and Shimano are more refined and with their upper levels now resembling what you guys did in the TSDZ2 project with a both torque and cadence and speed inputs rather than just torque, I can’t remember what you called it but it was my go to on the TSDZ2. All manufacturers apart from Bafang now have Apps which the rider can set most parts of the motor response to their needs almost like the TSDZ2 project could do. I suspect it’s actually available to do so in the Bafang as well but as yet nobody has deciphered the Canbus codes sufficiently to enable this function. The first App writer who does so will see their App sell well.

I’m not sure Caisanho that you can do much about the way the motor operates as yet but what would be good would be a simple tool to download the latest version of the firmware to the motor ( there are now quite a number of firmware versions available ). The Bafang BEEST tool is not working well for most users and is very limiting. Now your display has all that is needed to Bluetooth across from a PC the latest firmware and download it to the motor ? The Bafang 241C display has it in memory ready but as yet the function is greyed out and not available.
I am being trying to write down a list of potential things we would win if developing our own motor firmware. For now, it is:
1. change assist levels
2. unlimited battery voltage range (24V up to 52V)

I am still using for first times my EBike and see how much I value it and how much I will be able to invest on this motor, like to spend money buying parts needed for development.
 
I run my 48 volt version M600 on 52 volt batteries ( 58.4 volts fully charged ) without error. In some ways I think running at these voltages + running shorter cranks ( 155mm ) seemed to have taken a fairly ordinary engine into a high cadence pretty nice engine.

I'm not sure its the assist levels creating the problem, they already are nicely spaced out ( in the 9 levels ) and sure you could customise them slightly for individual needs but and here is the big but, its the same ramp up across all levels. If say you have only 120W's on level 1 but the ramp is 350W's as mine is, then the max W's of the level gets drowned out everytime you start to peddle. My engine takes about 1.5 revolutions before it returns back to the level 1 setting. Its annoying in some ways as in the higher levels the ramp up gets smothered by the cadence sensing and the torque sensor almost becomes obselete. I really wish Bafang had a Emtb rider designing a Emtb version as I am fairly convinced thats its a road rider who has never ridden Mtb designing the firmware.
 
boudin said:
AHicks said:
I don't think either of the Ultra motors are directly comparable to the 500/600 series, which have a lot more finesse, but seem to be a work in progress at BAFANG.

The Bafang models are not exactly decipherable, but I thought the Ultra _is_ one of the 500/600 series, the G510/M620. Am I mistaken? If so, what then exactly is the 500/600 series? I see the G530 (CANbus MTB, 200W), several G52x (which I presume are also CANbus), and the G510 on the Bafang motor product page, how are those different?
The Ultra/M620 is a much bigger, heavier, sturdier motor than the M600. Few similarities.
 
I am being trying to write down a list of potential things we would win if developing our own motor firmware. For now, it is:
1. change assist levels
2. unlimited battery voltage range (24V up to 52V)

I am still using for first times my EBike and see how much I value it and how much I will be able to invest on this motor, like to spend money buying parts needed for development
.

[/quote]

You mention "change assist levels". Do you mean have the ability to personally assign/customize power level or speeds to each PAS level? That would be a wonderful feature as I believe the number one complaint among those using geared hub drives is "it's too fast in PAS 1".

And one more question/idea if you don't mind? Regarding this initial acceleration value and spool up time. Would it be in our best interest to have 2 different sets of parameters based on throttle input, as well as a separate set for torque sensing/PAS levels?

I'm thinking about jerky response using PAS, and wanting everything available, right now, for crossing a busy road with your throttle.
 
npcspellen said:
any ideas on my topic?
https://endless-sphere.com/forums/viewtopic.php?f=49&t=116439

Your question was on an M420 motor and this is an M500/600 specific thread. You might have better luck in a different thread, or a general posting.
 
AHicks said:
The Ultra/M620 is a much bigger, heavier, sturdier motor than the M600. Few similarities.

Thanks, I appreciate the correction - I didn't know the M600 was a dedicated motor model and from searches turning up this thread every time I searched for M620 details thought the thread was about the whole 6xx series.
 
boudin said:
AHicks said:
The Ultra/M620 is a much bigger, heavier, sturdier motor than the M600. Few similarities.

Thanks, I appreciate the correction - I didn't know the M600 was a dedicated motor model and from searches turning up this thread every time I searched for M620 details thought the thread was about the whole 6xx series.

The M600 vs. M620 similarity in play within this thread has to do with the fact they both use CANbuss interfaces, which is a fancy way of saying they are very difficult, or truth be told (for most of us), pretty much impossible to change the tuning. This is in direct contrast to the earlier UART interface Bafang Ultra and BBSxx series motors which are TOTALLY adjustable. Many CANbuss motors have been sold to owners who aren't very happy with that fact they've been delivered with pretty clumsy programming, and are waiting for something to be developed that will change that. There's a LOT of this kind of discussion in this thread! Speaking for myself, it's the reason I follow it pretty closely - picking up tid-bits here and there that help me get my (71 year old) head wrapped around some of these ideas..... My thoughts anyway, FWIW.
 
I am being trying to write down a list of potential things we would win if developing our own motor firmware. For now, it is:
1. change assist levels
2. unlimited battery voltage range (24V up to 52V)
3. improve Walk assist: original Walk assist rotates the wheel at 1 or 2 km/h, which is very slow, rendering useless this feature
 
casainho said:
I am being trying to write down a list of potential things we would win if developing our own motor firmware. For now, it is:
1. change assist levels
2. unlimited battery voltage range (24V up to 52V)
3. improve Walk assist: original Walk assist rotates the wheel at 1 or 2 km/h, which is very slow, rendering useless this feature

Please expand on what you mean by "change assist levels".
 
Back
Top