Bafang M500 and M600 motors

Vsoria

Member
Feb 12, 2022
20
30
Zaragoza
Hello, I have a new m500 and although it seems strange to some, I have a lot of power at levels 1 (150-180w), 2(200-280w) and 3( +300w) constant power are not power peaks
I have not reached levels 4 and 5.
I don't know if it's normal, I asked the seller and he tells me that I have a good engine.
I can climb trails at 10% on level 1 almost effortlessly and if I put level 2 it's like 1% on the non-powered bike. I bought the bafang bft04 motor and battery and when I got the seller I contacted to tell me that the motor was 48v not 43v like bafang batteries and he gave me the 43v firmware Now I have the motor at 43v the same as the battery.
I have this firmware CRX10NC4313i142012.9-28-2230-20220415.bin

Screenshot_20230104_155909_VivaVideo.jpg
Screenshot_20230104_161120_VivaVideo.jpg Screenshot_20230104_161158_VivaVideo.jpg
Screenshot_20230104_161611_VivaVideo.jpg
 

patdam

Well-known member
Jan 17, 2019
896
598
france
Hello, I have a new m500 and although it seems strange to some, I have a lot of power at levels 1 (150-180w), 2(200-280w) and 3( +300w) constant power are not power peaks
I have not reached levels 4 and 5.
I don't know if it's normal, I asked the seller and he tells me that I have a good engine.
I can climb trails at 10% on level 1 almost effortlessly and if I put level 2 it's like 1% on the non-powered bike. I bought the bafang bft04 motor and battery and when I got the seller I contacted to tell me that the motor was 48v not 43v like bafang batteries and he gave me the 43v firmware Now I have the motor at 43v the same as the battery.
I have this firmware CRX10NC4313i142012.9-28-2230-20220415.bin

View attachment 103964 View attachment 103965 View attachment 103966 View attachment 103967
Hi, great it seem functioning alike (good) M510. How many D+ you can do with the BTF04 at these pas 1 and 2 ? how many weight you have ? you ride sometime at biescas / jaca ?
 

Vsoria

Member
Feb 12, 2022
20
30
Zaragoza
Hi, great it seem functioning alike (good) M510. How many D+ you can do with the BTF04 at these pas 1 and 2 ? how many weight you have ? you ride sometime at biescas / jaca ?
It will be about 23kg +74kg.
I went up to test it in the Paniza area and got 32 km +1300m spending 90%.
When I go with the bicycle I stay for Guara, Arguis....
But I like to go to new places every time and the Pyrenees are close to my house.
 

temon10

Well-known member
Feb 8, 2022
673
562
Malang, Indonesia
I have 2 M500 motor and both had torque sensor error.
One no assist on all level and another can't turn on the motor. already swap each other but still no sign of working
Maybe someone have cheaper solution replacing torque sensor without buying from Bafang at $140 :)
 

casainho

Active member
May 27, 2022
44
142
Portugal
I have 2 M500 motor and both had torque sensor error.
One no assist on all level and another can't turn on the motor. already swap each other but still no sign of working
Maybe someone have cheaper solution replacing torque sensor without buying from Bafang at $140 :)
Maybe you could build the ESP32 EBike board and run the torque sensor testing code, that will output the torque sensor values and so you will be able to check if the problem is in fact on the torque sensor (as the problem may be on the motor controller on any other thing).

Testing torque sensor (Pyhton code) and see the raw torque sensor and cadence values - here is on the repository: firmware/testing_firmwares



ESP32 EBike board + CANBUS module to connect to torque sensor connector:






EBike board schematic (for torque sensor testing, is only needed the ESP32-S3 board + the CANBUS module):


And the torque sensor connector pins:
 
Last edited:

temon10

Well-known member
Feb 8, 2022
673
562
Malang, Indonesia
Maybe you could build the ESP32 EBike board and run the torque sensor testing code, that will output the torque sensor values and so you will be able to check if the problem is in fact on the torque sensor (as the problem may be on the motor controller on any other thing).

Testing torque sensor (Pyhton code) and see the raw torque sensor and cadence values - here is on the repository: firmware/testing_firmwares



ESP32 EBike board + CANBUS module to connect to torque sensor connector:






EBike board schematic (for torque sensor testing, is only needed the ESP32-S3 board + the CANBUS module):


And the torque sensor connector pins:
too complicated for me hahaha
 

casainho

Active member
May 27, 2022
44
142
Portugal
Yes. He lost me since long time. But i'm admire the work of casainho
We currently have access as DIY to much more advanced technology than what the Ebike manufactures put inside.

If you tell me 3 years ago that I would have an EBike with electronics that runs firmware in Python, and have Wifi and Bluetooth that let me develop and program instantaneously with my phone, I would call you crazy!!

As EBike DIYers, we have many advanced technology because we decided to develop it for our own interests, so let's take advantage of it!!

For the ones that lack the knowledge or time to do his own builds, at least can try to go ask to a friend or bicycle shop and show them this project information and ask for them to build for yourself.
 

casainho

Active member
May 27, 2022
44
142
Portugal
The EBike board is ready and attached on the 3D printed motor cover.





And here is the EBike board alone (including the magnetic encoder sensor green board):





I wish to make the board robust to vibrations and water. Since I can program the board by wireless, maybe I will cover the board and wires with silicone, like potting the electronics, here an example:

 

casainho

Active member
May 27, 2022
44
142
Portugal
So, after the night, the silicone got hard as expected. Note that I also protected the connectors with silicone:



And here is the very first test. I had to increase the length of the battery and motor phase wires, doing extensions. With that, all seems good:


And now testing if everything works well - I have the display connected where I can see for instance that brakes are working:


And the throttle code, I added it for the first time. There is not specific throttle curve yet:


Next step is to put the final black silicon to make sure everything is water prof. Soon I will be riding :bolt: :thumb:

And now the best news!!

I received the VESC Flipsky Mini FSESC6.7. It is small enough to be placed inside the motor case, as seen here:


With the experience I now have, I am pretty sure I can build a smaller EBike board to put on top on that VESC, and put everything inside the motor case!!
But my current battery is a 14S / 52V, so I would need to build another battery as 13S / 48V, to work with this VESC as max battery for it is 13S.
So for now I will keep my current build, with VESC Flipsky 75100 placed outside of the motor case. I will also ride and have fun, and if everything goes well, then I can do this improvement. Meanwhile, I will also be building the display, mainly developing the firmware for it -- previous version, the firmware was developed in C and on this new version, will be in Python.
 

casainho

Active member
May 27, 2022
44
142
Portugal
Detail of the squished silicone, after tightening the engine cover:


I went for a test ride - it works very well: pedal very sensitive, fast response and high torque:


I am not very happy the way that cables come to outside - I can improve that a lot. But, why bother if soon I may jump to have the new version with both VESC + EBike board inside the motor case?? For now I will just put there silicone on hole and wires, to make sure it gets water prof and then I will be riding 8)
 

casainho

Active member
May 27, 2022
44
142
Portugal
Display

And I did finish the display. The schematic is so simple!! Only 11 wires to solder:



I already tested and it works. Early tests showing the state of POWER, UP and DOWN buttons:



It is not yet fully assembled because currently is waiting for the silicone to harden:


When installed on my handle bard, will be like this, and fully water prof:
build-2.png


08.png


02.png


Details of the build.
One connector is the display connector to the original Bafang M500 harness cable. The other round connector is to connect to the 860C display remote keypad I bought on Aliexpress:




Very clean and simple:


And now there are two wireless devices connected to my home wifi router, one device is the ESP32-S3 from the EBike board and other device is the ESP32-S2 from this display. I can select which one I want to edit the Pyhton firmware or simple open a second window to select the other board and so have access to both Python firmwares at the same time -- that screenshot is from my phone! I am really amazed to have such advanced technology!!
 
Last edited:

Vsoria

Member
Feb 12, 2022
20
30
Zaragoza
hello I have a btf04 battery, I go out with a charge over 98% and after a few km over 7km with +200m but the screen I see that I have 75% left. Then I do not see that the battery level drops so much, I can get to do 30km + 1200m.
The seller tells me that this is because of the cold weather, I go out above 10 degrees Celsius with the sun.
 

casainho

Active member
May 27, 2022
44
142
Portugal
I did finalize the installation of the small VESC motor controller + EBike board, inside my Bafang M500. It works well as I expected, just like it did on my previous version with the external VESC FLIPSKY 75100.

The final result is this one:




And how is it inside?? Here it is, without that black plastic 3D printed cover:


And more details. Here is the DIY EBike board + the VESC FLIPSKY Mini FSESC6.7:


That DIY EBike board is based on ESP32-S3, that is running the Pyhton EBike firmware and that I program wireless by Wifi. I am sharing the firmware, schematics, photos, etc, here: GitHub - OpenSourceEBike/EBike_EScooter_app_pyhton: EBike / EScooter app developed in CircuitPython, to control a motor by sending commands to VESC motor controller

Here is the schematic:


After testing that every EBike sensor reading were working, I put silicone to make all that wires robust, including the connectors. The idea is to make everything robust and avoid breaking due to the vibrations while I am riding on the mountains:




And finally, I used kapton tape that is very robust and resists to high temperatures:


BUT, there is also some not good news. With all that wires and tight space, it is not possible to have the magnetic encoder sensor working. So, in the end I configured VESC to run sensorless and it works well as I tested before on my previous version with the external VESC FLIPSKY 75100.

Here is picture of the magnetic encoder sensor board. From my tests, I found that no wires can be near and between the magnetic encoder board and the round part of the motor case. But as you can see, I could not do it. Maybe someone can improve the wire routing but I decided to stop here. And a picture of the 3D printed cover with the magnetic encoder board, that I tried to make working:


Conclusions

Build with VESC FLIPSKY Mini FSESC6.7:

This build with VESC FLIPSKY Mini FSESC6.7 is the most clean possible. I think no one will understand that VESC is inside, that your EBike is running Pyhton firmware and that you can program / develop / debug your motor firmware directly by wifi wireless using your phone or PC.
But there are two disadvantages:
1. this FLIPSKY Mini FSESC6.7 supports only 48V / 13S batteries
2. due to the space limitations, motor is running sensorless and while the motor startup is good, it is not as good as on the original motor controller

Build with VESC FLIPSKY 75100:

This build with VESC FLIPSKY 75100 is the most powerful possible, because this VESC can handle batteries up to 75V and 100Amps currents, so theoretically can handle 7.5kw!! Also, as this VESC is placed outside, there is space to install the magnetic encoder board and so the motor startup is the best possible.

But there is one disadvantage: this VESC FLIPSKY 75100, although small, there is not space available inside for it and so it must be placed outside, attached to your EBike frame.


Next steps: I am yet to decide if I will use the most clean build or the other. My best battery is a 52V / 14S battery and I would need to rework to make it to 48V / 13S, to work on this most clean build.

I need to improve the display firmware, as currently it displays very basic information.
 

Dart

New Member
Jan 20, 2023
4
2
Poland
I did finalize the installation of the small VESC motor controller + EBike board, inside my Bafang M500. It works well as I expected, just like it did on my previous version with the external VESC FLIPSKY 75100.

The final result is this one:




And how is it inside?? Here it is, without that black plastic 3D printed cover:


And more details. Here is the DIY EBike board + the VESC FLIPSKY Mini FSESC6.7:


That DIY EBike board is based on ESP32-S3, that is running the Pyhton EBike firmware and that I program wireless by Wifi. I am sharing the firmware, schematics, photos, etc, here: GitHub - OpenSourceEBike/EBike_EScooter_app_pyhton: EBike / EScooter app developed in CircuitPython, to control a motor by sending commands to VESC motor controller

Here is the schematic:


After testing that every EBike sensor reading were working, I put silicone to make all that wires robust, including the connectors. The idea is to make everything robust and avoid breaking due to the vibrations while I am riding on the mountains:




And finally, I used kapton tape that is very robust and resists to high temperatures:


BUT, there is also some not good news. With all that wires and tight space, it is not possible to have the magnetic encoder sensor working. So, in the end I configured VESC to run sensorless and it works well as I tested before on my previous version with the external VESC FLIPSKY 75100.

Here is picture of the magnetic encoder sensor board. From my tests, I found that no wires can be near and between the magnetic encoder board and the round part of the motor case. But as you can see, I could not do it. Maybe someone can improve the wire routing but I decided to stop here. And a picture of the 3D printed cover with the magnetic encoder board, that I tried to make working:


Conclusions

Build with VESC FLIPSKY Mini FSESC6.7:

This build with VESC FLIPSKY Mini FSESC6.7 is the most clean possible. I think no one will understand that VESC is inside, that your EBike is running Pyhton firmware and that you can program / develop / debug your motor firmware directly by wifi wireless using your phone or PC.
But there are two disadvantages:
1. this FLIPSKY Mini FSESC6.7 supports only 48V / 13S batteries
2. due to the space limitations, motor is running sensorless and while the motor startup is good, it is not as good as on the original motor controller

Build with VESC FLIPSKY 75100:

This build with VESC FLIPSKY 75100 is the most powerful possible, because this VESC can handle batteries up to 75V and 100Amps currents, so theoretically can handle 7.5kw!! Also, as this VESC is placed outside, there is space to install the magnetic encoder board and so the motor startup is the best possible.

But there is one disadvantage: this VESC FLIPSKY 75100, although small, there is not space available inside for it and so it must be placed outside, attached to your EBike frame.


Next steps: I am yet to decide if I will use the most clean build or the other. My best battery is a 52V / 14S battery and I would need to rework to make it to 48V / 13S, to work on this most clean build.

I need to improve the display firmware, as currently it displays very basic information.
This is amazing. would it be possible to create a kit for a dead shimano motor? Shimano is dying from electronic errors, especially the torque sensor, but I don't think the sensor itself is faulty. Think about it, there are a lot of people willing to revive a shimano motor, even if it's worse than from the factory. better than none.
 

casainho

Active member
May 27, 2022
44
142
Portugal
This is amazing. would it be possible to create a kit for a dead shimano motor? Shimano is dying from electronic errors, especially the torque sensor, but I don't think the sensor itself is faulty. Think about it, there are a lot of people willing to revive a shimano motor, even if it's worse than from the factory. better than none.
I do not plan to sell anything. The options are:
- user is able to DIY his own solution
- user asks to an electric engineer friend to do it
- user asks on an electronics / EBike shop to do it
 

prolink

Member
Nov 26, 2022
13
3
Austria
Have the same display
Unfortunately the Battery display is not correct
I have an 48v 840W battery on M600
The last bar flashes at 650W (Measured by charging)
That can't fit
 

vikino1

Active member
Oct 14, 2021
74
102
Slovakia Topoľčany
Today I tried the new display for the first time, my battery is 36V 630WH. The first part disappeared at 39V, the second at 37V and the third at 36V. I didn't get lower at 42km and 373 meters climbed. Tomorrow I will try it until it shuts down, I measured with the DPC 18 Bafang controller. So the voltage should be taken with a margin. And when I connected the new display again after the measurement, the part was ready. But as a guide, it could be suitable.
 

vikino1

Active member
Oct 14, 2021
74
102
Slovakia Topoľčany
Today I finished measuring the new display, after the 4th part disappeared it was 35V, with the 5th part 34V. The last part started flashing. After 30 km I could not turn off the engine. The rest in the battery after stabilization in the heat is 33.5V. The last part is not visible because of the flashing.

IMG_20230129_141714.jpg PANO_20230129_141748.jpg
 
Last edited:

casainho

Active member
May 27, 2022
44
142
Portugal
I 3D printed the motor cover in ABS plastic - here it is, and just before I screwed it, I did put a fair amount of silicone to make sure it will keep the water prof:


---------------


Yesterday I did a ride for 4h and it was a good test. Everything is working as expected.

I was looking at the VESC temperature at it was never over 42º Celsius (but ambient temperature were low at around 10ºC), while I think the max for VESC would be 100ºC. So, this small VESC seems very good for the task!!

Also about the sensorless motor startup instead of magnetic encoder as on original motor controller, I did not notice anything.

There was some mud, but not to much:


Detail of the motor 3D printed cover in ABS plastic:


In the end, I cleaned the EBike with pressurized water, as I am confident that 3D printed motor cover, with the silicone I used on it, is water prof enough to handle all this water:




So, the hardware is working as expected. Now I will focus on improving the firmware, as currently this is just driving the motor based on the pedal torque value and choosing the assist level on the display. There are missing features on the firmware, as measuring the wheel speed to show on the display as also the important walk assist. I will also focus on the final documentation for How to Build.
 

guashh

Member
Feb 19, 2023
6
1
Spain
Hi! I have one bafang m500 with problem.

The fact is that the bike is going well, until I go down a hill with stones, roots, etc., and I take a small jump or simply from the potholes, I look at the display and it is turned off. At first after 5 - 10 minutes it turned on and so normal.

now it can take up to 30 minutes until it comes back on.

I have tried several things:

1.- Clean the connectors that are on the motor and those on the display with contact cleaner

2.- When it happens to me, I have tried to remove the battery and put it back, and it still does not work until almost 30 minutes have passed.

3.- when it happens to me, I tried to connect another lcd in case it was the screen but nothing.

Logic tells me that it could be a cable, but what cable? something from the controller? It's just that it's something so rare that until a few minutes have passed I don't turn it back on because I'm lost.
This started to happen to me as a result of one day when I got into a brutal quagmire, from which I had to get out with the bike on my shoulders. Then I cleaned it but without kacher, with a hose and being careful.

can you think of anything that could be happening to me?
 

temon10

Well-known member
Feb 8, 2022
673
562
Malang, Indonesia
Hi! I have one bafang m500 with problem.

The fact is that the bike is going well, until I go down a hill with stones, roots, etc., and I take a small jump or simply from the potholes, I look at the display and it is turned off. At first after 5 - 10 minutes it turned on and so normal.

now it can take up to 30 minutes until it comes back on.

I have tried several things:

1.- Clean the connectors that are on the motor and those on the display with contact cleaner

2.- When it happens to me, I have tried to remove the battery and put it back, and it still does not work until almost 30 minutes have passed.

3.- when it happens to me, I tried to connect another lcd in case it was the screen but nothing.

Logic tells me that it could be a cable, but what cable? something from the controller? It's just that it's something so rare that until a few minutes have passed I don't turn it back on because I'm lost.
This started to happen to me as a result of one day when I got into a brutal quagmire, from which I had to get out with the bike on my shoulders. Then I cleaned it but without kacher, with a hose and being careful.

can you think of anything that could be happening to me?
try open the controller and re check cable connection inside.
 

Dado

Active member
Jun 28, 2022
688
459
Bratislava
Hello M600 fans.

Just found out, latest M600 has option to change MAX power levels. And again default is high. ;) So now also possible low power on PASS1 and have good range...

1677633615848.png
 

EMTB Forums

Since 2018

The World's largest electric mountain bike community.

554K
Messages
28,017
Members
Join Our Community

Latest articles


Top