Bafang M500/M600 thread

casainho said:
I am now more fit,.......
...
I do not like my M500 because the lowest assist level 1 is still to much for me, I wish it was way lower! But it is not only that, I wish to be force to always give my average 200W pedal power and only after that, the motor assist would turn on. See this graph:


.....
This is a dream, as the original firmware does net let us configure such advanced modes. If we could develop our own firmware, we could do it. The pedal power value could be measured by the Bafang M500 torque sensor.

My power curve recorded by my pedals:

I understand fully your desired mode. the linear support is not the best. Actually your idea graph this look like a progressive mode? If you extrapolate the lines into something more smooth then it reminds me those graphs:
magic-jpg.63721


original thread here:
https://www.emtbforums.com/threads/shimano-trail-mode-vs-bosch-emtb.22235/

How about heart rate control for support level?
 
Waynemarlow said:
casainho said:
I am being riding a road and gravel bicycle. I am now curious if I could have also an electric one. Does anyone knows if there are information for Bafang M800 build? like that forums with messages for builds with Dengfu frame and M500 motor??

https://www.emtbforums.com/threads/new-bafang-m820.29230/

Just curious as I've not been following the developers thread on the M500 and M600, Casainho has there been any development on breaking down the CAN commands to enable ( what is effectively the new Pro BESST software ) that we can customise the existing motors ?

I want to highlight something that is of relevance here:
We've all (me, cidi, casainho, others) have done extensive work breaking down the CAN commands fully.
The problem seems to be that the CAN commands aren't working at all on m500/m600 (non m510) motors, aka: Get ignored.

That being said:
The Pro BESST software has been taken offline.
If ANYONE can send me a copy of the Pro BESST software, we can at least get it into the repo to give people the option of looking into if and how-much it works on m500/m600
 
szkuba said:
casainho said:
I am now more fit,.......
...
I do not like my M500 because the lowest assist level 1 is still to much for me, I wish it was way lower! But it is not only that, I wish to be force to always give my average 200W pedal power and only after that, the motor assist would turn on. See this graph:


.....
This is a dream, as the original firmware does net let us configure such advanced modes. If we could develop our own firmware, we could do it. The pedal power value could be measured by the Bafang M500 torque sensor.

My power curve recorded by my pedals:

I understand fully your desired mode. the linear support is not the best. Actually your idea graph this look like a progressive mode? If you extrapolate the lines into something more smooth then it reminds me those graphs:
magic-jpg.63721


original thread here:
https://www.emtbforums.com/threads/shimano-trail-mode-vs-bosch-emtb.22235/

How about heart rate control for support level?

eMTB mode is indeed the thing one need to look for, with a low level, it should be about what @Casainho is looking for.

To be honest, I don't get the liniar modes much at all. With shifting, we can already ensure we are at our prefered cadence most-of-the-time.
When it comes to torque, we have a minimum and a "confortable"-max torque, but after that we basically always want expodential assistance.

So basically an eMTB (and ignoring the rebranded bosch emtb-light progressive mode), is the best of both worlds.
 
szkuba said:
I understand fully your desired mode. the linear support is not the best. Actually your idea graph this look like a progressive mode? If you extrapolate the lines into something more smooth then it reminds me those graphs:
Yes, seems similar to what I want and I understand the idea of "curved smooth corners", although I would not smooth so much to avoid masking my body energy production characteristics. Also I would need to clear define that values and change them quick on the display. That 200W my average pedal power, get lower over the hours of pedaling (just like my pedal power graph shows!). So, from the display, I would need to quick change 2 things: my average pedal power + assist level ramp up.

szkuba said:
How about heart rate control for support level?
Heart rate was popular before we had the power meters (they are still expensive!) but now for running, for instance, just recently we got running power directly on the watch without the need for any extra sensor. For activities like swimming, there are no power meter sensors so we still need to use the heart rate, but for cycling and running, using power is way better than heart rate.
 
ornias said:
To be honest, I don't get the liniar modes much at all. With shifting, we can already ensure we are at our prefered cadence most-of-the-time.
When it comes to torque, we have a minimum and a "confortable"-max torque, but after that we basically always want expodential assistance.
Bafang M500 uses the pedal torque but what I do is power. When I shift my gears, I ended up doing a constant power, not a constant torque. Every time I shift my gears because I want to increase the cadence, but maintain my power, the motor assistance decreases, and that is not what I want!

About "expodential assistance", I would prefer to have something linear that is easy for me to understand, to predict, because I want to merge on my mind calculations with the following data: my pedal power, motor power, heart rate data and my blood glucose sensor data.

Usually if I am already in to much stress, my heart rate increases to much even if I am providing low power on the pedals. Stress can be because I am very tired or something about my blood glucose levels, I may need to eat something or simple to take a rest.
 
casainho said:
.....
Yes, seems similar to what I want and I understand the idea of "curved smooth corners", although I would not smooth so much to avoid masking my body energy production characteristics. Also I would need to clear define that values and change them quick on the display. That 200W my average pedal power, get lower over the hours of pedaling (just like my pedal power graph shows!). So, from the display, I would need to quick change 2 things: my average pedal power + assist level ramp up.

...
Heart rate was popular before we had the power meters (they are still expensive!) but now for running, for instance, just recently we got running power directly on the watch without the need for any extra sensor. For activities like swimming, there are no power meter sensors so we still need to use the heart rate, but for cycling and running, using power is way better than heart rate.

Just had quite interesting discussion with my former swimming coach. Now he is training runners from endurance point of view.
So... :
For every average human (including me of course ;)) it is normal that our power output is decreasing over hours of higher effort. At the same time as we get tired our heart rate is slightly increasing :!:
It needs regular dedicated training to be able to keep power output and hear-rate constant for longer time.
So my view is ideal would be to track two trends: the human power output trend over time and heart-rate trend over time. When the heart-rate is increasing but power is decreasing then the assist level shall be corrected with some value like +20 to 40%.

Is it possible with Bafang M500/600 torque sensor characteristics saturating at 40kg ?

BTW hope have seen those graphs about max torque and power generated by athlete cyclist:

IMG_20220220_211025.jpg

The torque is going down with cadence increasing.
The power output has its peak at individual point depending on fitness level.

PS my individual hack for longer rides is to get proper heart warm-up by using low assistant level (seems contradictory but it works) also i try to not race by first 30-40minutes.
 
ornias said:
...
That being said:
The Pro BESST software has been taken offline.
If ANYONE can send me a copy of the Pro BESST software, we can at least get it into the repo to give people the option of looking into if and how-much it works on m500/m600

I've uploaded it to this thread at least a couple different times.
 
casainho said:
...
No, no one is doing development, at least in an OpenSource way.

Yes, we definitely seem to be in a "black hole" here where everything is developed except M600.

Seems like Bafang has done some work and released a little bit for other motors.... BESST Pro and some firmware with configurable options...just not for the M600.

Luna Cycle has the VESC "V2" controller which is programmable and works with M600, but I've contacted them multiple times over the past (nearly) year and they don't seem like they will sell the controller as a retrofit. I started some sketches and basic layout for a DIY/open source VESC style M600 controller which would use the (supposedly) open source Luna firmware. But then chip shortages hit / inflation / extra costs and it looked like either Bafang or Luna might be moving toward releasing something - but then that never came to pass, so back to square one!
 
4πr^2 said:
ornias said:
...
That being said:
The Pro BESST software has been taken offline.
If ANYONE can send me a copy of the Pro BESST software, we can at least get it into the repo to give people the option of looking into if and how-much it works on m500/m600

I've uploaded it to this thread at least a couple different times.

Found it! :)

Anyway: I've added it to the Github Repo as well :)
 
szkuba said:
Just had quite interesting discussion with my former swimming coach. Now he is training runners from endurance point of view.
So... :
For every average human (including me of course ;)) it is normal that our power output is decreasing over hours of higher effort. At the same time as we get tired our heart rate is slightly increasing :!:
It needs regular dedicated training to be able to keep power output and hear-rate constant for longer time.
So my view is ideal would be to track two trends: the human power output trend over time and heart-rate trend over time. When the heart-rate is increasing but power is decreasing then the assist level shall be corrected with some value like +20 to 40%.
With my Bafang M500 motor, I just wish to have fine control of the motor power. I can look at my GPS cycling display and check my pedal power and heart rate. I would avoid to try implement any automatic control of the motor based on this.

And yes, I just feel the same as you describe and here is my pedal power curve from last year:


And with a zoom to show that I can withstand 200W on the first hour, 150W for next hour and then about 100W for next 3 hours (total of 5 hours ride):


szkuba said:
Is it possible with Bafang M500/600 torque sensor characteristics saturating at 40kg ?
Maybe, but the very first and most important thing is to be able to fine control the motor current / torque. For the pedal power, or the original torque sensor is enough or I would use my pedals, since the DIY display can receive the pedals data by ANT+ or by Bluetooth and would forward that data to the motor controller by the CAN.
 
4πr^2 said:
casainho said:
...
No, no one is doing development, at least in an OpenSource way.

Yes, we definitely seem to be in a "black hole" here where everything is developed except M600.

Seems like Bafang has done some work and released a little bit for other motors.... BESST Pro and some firmware with configurable options...just not for the M600.

Luna Cycle has the VESC "V2" controller which is programmable and works with M600, but I've contacted them multiple times over the past (nearly) year and they don't seem like they will sell the controller as a retrofit. I started some sketches and basic layout for a DIY/open source VESC style M600 controller which would use the (supposedly) open source Luna firmware. But then chip shortages hit / inflation / extra costs and it looked like either Bafang or Luna might be moving toward releasing something - but then that never came to pass, so back to square one!
BESST Pro does not work both for M500 and M600, it just works for their new motors.

I wish we could use a more generic controller to avoid doing something that will work on current motor versions but suddenly stop working because Bafang will for sure keep launching new different motors in the future.
 
casainho said:
4πr^2 said:
casainho said:
...
No, no one is doing development, at least in an OpenSource way.

Yes, we definitely seem to be in a "black hole" here where everything is developed except M600.

Seems like Bafang has done some work and released a little bit for other motors.... BESST Pro and some firmware with configurable options...just not for the M600.

Luna Cycle has the VESC "V2" controller which is programmable and works with M600, but I've contacted them multiple times over the past (nearly) year and they don't seem like they will sell the controller as a retrofit. I started some sketches and basic layout for a DIY/open source VESC style M600 controller which would use the (supposedly) open source Luna firmware. But then chip shortages hit / inflation / extra costs and it looked like either Bafang or Luna might be moving toward releasing something - but then that never came to pass, so back to square one!
BESST Pro does not work both for M500 and M600, it just works for their new motors.

I wish we could use a more generic controller to avoid doing something that will work on current motor versions but suddenly stop working because Bafang will for sure keep launching new different motors in the future.

Can someone confirm the controller differences between m500 and m510 though?
 
Casainho, for the amount of work and cost involved to totally rewrite the firmware, you could simply sell the M500 motor and purchase the latest M510 which will program via the BEEST Pro.

But I selfishly would like you to solve the M500 issue which would then solve the M600 problem :) On the other hand you have two parts of a system that’s being under utilised, the Garmin and your DIY display. If you were to add a third device, that of a current limiting device between the battery and motor, you could set max battery current to the motor via the Garmin and DIY Display Can commands.
 
Waynemarlow said:
Casainho, for the amount of work and cost involved to totally rewrite the firmware, you could simply sell the M500 motor and purchase the latest M510 which will program via the BEEST Pro.

But I selfishly would like you to solve the M500 issue which would then solve the M600 problem :) On the other hand you have two parts of a system that’s being under utilised, the Garmin and your DIY display. If you were to add a third device, that of a current limiting device between the battery and motor, you could set max battery current to the motor via the Garmin and DIY Display Can commands.
Buying the M510 would only a little improvement. I do not know if after 1 year Bafang will launch the M520 with new firmware features. Also, I am looking for a M800 frame, to use the M800 motor.

The only way to cut the volatility, avoid this dependency from the manufacturer, is to have a more generic motor controller. The same I did with the display - now I build it easily for any motor manufacturer / version / EBike.
 
Casainho, I agree a common controller would be ideal but did you consider switching in a Current Limiting Diode into the battery line at say only Level 1 ?

The M820 is being looked at and a Light Carbon frame is being designed as we speak.
https://www.emtbforums.com/threads/a-new-model-of-emtb-frame-with-bosch-shimano-yamaha-motor.28410/page-2#post-431342
 
Waynemarlow said:
Casainho, I agree a common controller would be ideal but did you consider switching in a Current Limiting Diode into the battery line at say only Level 1 ?
I don't think that is possible to work.

Waynemarlow said:
The M820 is being looked at and a Light Carbon frame is being designed as we speak.
https://www.emtbforums.com/threads/a-new-model-of-emtb-frame-with-bosch-shimano-yamaha-motor.28410/page-2#post-431342
Yes!! We just can expect that kind of new things in future. And yes, I wish to have a small light MTB ebike like the one with Light Carbon frame for the M820 motor!! This is the reason we why we should not only focus developing for one specific motor.

I would say Bafang offers at least this type of motors:
1. BIG motor: M6xx
2. Medium motor: M5xx
3. Small motor: M8xx

Yes, there are even others from Bafang...
 
Waynemarlow said:
casainho said:
I don't think that is possible to work.

Does the LTC4415 controlled by a spare port on your Display not do want you want ? It will step up from 0.5 - 4A ?
Sorry, seems a I really did not understand your suggestion. Can you please explain in more detail?
 
casainho said:
Sorry, seems a I really did not understand your suggestion. Can you please explain in more detail?
LT.jpg

Basically a switch controlled by level 1 on your display spare micro port directs the 48v battery current directly to the motor or through the chip. That same port / ports would pull EN1 or EN2 to control what current set by the resistors on Clim 1 / 2 now to the motor.

Max 4A so approx 200W's or less could be pulled by the motor.
 
Waynemarlow said:
casainho said:
Sorry, seems a I really did not understand your suggestion. Can you please explain in more detail?
LT.jpg

Basically a switch controlled by level 1 on your display spare micro port directs the 48v battery current directly to the motor or through the chip. That same port / ports would pull EN1 or EN2 to control what current set by the resistors on Clim 1 / 2 now to the motor.

Max 4A so approx 200W's or less could be pulled by the motor.
Even if I am not good at electronics, I am pretty sure it will not work. This IC was not developed for this kind of application. I am almost sure the only way to control the motor current is actuating on the motor controller, reading the motor phase currents and then adapt the PWM off the power mosfets.
 
For the above discussion, also see Waynemarlowe's thread on the topic here:

https://endless-sphere.com/forums/viewtopic.php?f=30&t=118174
 
Since the Bafang is keep launching new motor models and not updating the firmware of previous recent models, like M500 and M600, I really think the best route is to go with VESC and forget about developing firmware for their original motor controllers!! For now I will try to go DIY, using VESC outside of my M500, but later maybe someone want to design, build, test and sell custom motor controllers based on VESC and for this Bafang motors.

Example of VESC EBike motor controller: Flipsky VESC 75100 EBike controller: 100€, 75V 100A, CAN and UART communication.

Advantages:
- BEST motor controller out there, OpenSource, small and powerful
- only 1 minute to make the inital motor auto detection setup, resulting in the best motor performance and silence out there!!
- VESC EBike application can be developed in high level scripting language
- powerful mobile app (also for PC and RaspberryPI), with high level scripting language for custom application
- display available to buy on shops, OpenSource (although for ESkates but easy to adapt for EBikes)
- there are A LOT of experienced users / developers of VESC
- powerful advanced algorithm for sensorless at motor 0 speed meaning no hall sensors needed
- cheaper than a Bafang original motor controller

Disadvantages:
- DIY solution

Video:

[youtube]H-6qzmeCNtw[/youtube]

image.png


image.png


image.png


image.png
 
I connected an old VESC controller to the 48V TSDZ2 motor (I do not have yet a Bafang motor for development). VESC software were able to detect the motor characteristics:



I was tweaking the sensorless HFI silent mode and it seems to work well. I tried to block with pliers the motor shaft and I could feel the torque, although I did not tested it on the real EBike. I also did not connect the hall sensors as I am only interested on the sensorless mode, as I plan to run the Bafang motor in sensorless mode.



On this short video, you can see the motor running. Note that the motor is very silent but because it was attached on the metal vice, the noise was kind of amplified:

[youtube]-gTcE93ApKA[/youtube]

 
I need a M500 motor for development. Does anyone have a used one to sell?
 
Back
Top