Bafang M500/M600 thread

ok i undestand now . my point was to pursue ultra robustness and you want to go into lightness .
 
Finally 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:


Then I went to my battery of 14S / 52V and removed a group of 2 21700 cells, to make a 13S / 48V battery because this VESC FLIPSKY Mini FSESC6.7 can only handle up to this voltage battery:


And for the power off all the EBike electronics (VESC, EBike board and display), I am using a button on my EBike frame that is specifically to turn on/off the EBike. Since I am using the JDB Xiaoxiang BMS, I just connected the 2 wires it have specifically for this function - even better, this EBike frame Dengfu E10 + battery case, has 2 specific pins that connect this on/off button to the internal of the battery, that I then connect to this BMS on/off switch pins.

So, this JDB Xiaoxiang BMS is great for power on/off the EBike electronics, but it also can be easily configured for a 13, 14 or 15S battery, so I just did it, configured from a 14S to this "new" 13S battery.

As the electronics are tested and are final, now I do not need to get my hands dirty anymore. Now I am just improving the firmware and as I do it wireless, it is a very clean phase of the project :D

I also started the final documentation but I will take some more days to finalize it.
 

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.
 
sorry to ot but i assume you know - m500 / m600 works with ANY battery ? no special canbus bms required? i was told they need to communicate with battery, not like m620
 
pxl666 said:
sorry to ot but i assume you know - m500 / m600 works with ANY battery ? no special canbus bms required? i was told they need to communicate with battery, not like m620
I only own M500. M500 motor I bought, worked with ANY battery.
 
Waynemarlow said:
The outer cover to the motor, could we not get a CNC'd aluminium cover made.

Casianho if you ever need the likes of the smaller Flipsky module to proceed do ask, I'm sure a few of us would contribute to the development cost.
So, in the end seems your idea to use a small VESC, did work!! At begin, I really did not believe on it. And I just did it thanks to your donation to my Paypal account - I also got other donation, but the sum of both, were enough for me to buy this small VESC.

A lot of others did other contributions, thank you to everyone.

I do not plan to make other changes to the hardware, as it seems to work well for me.

I do understand that if in future I change to another motor like the latest smaller and lighter Bafang M820 (both for MTB or gravel), this same VESC will probably not fit, so every EBike motor will need a creative solution where putting the electronics on the outside is always an option.
 
Casainho, we should all be thanking you for all the efforts you put into these sort of things.

So the next stage would be to get an App that we could all use that sits over the Python program to simplify things for us programming numpties :D
 
I finalized the documentation / How to Build, I hope it can help others to replicate and learn how EBikes / EScooters works: https://opensourceebike.github.io/
 
so because you have built electronics from the ground - its safe to assume there is still no way that user could change something in the motor behaviour ? so m500 m600 and possibly m800 remain closed to adjustment for rider ? the only good thing is they accept custom battery ? the only fully customizable bafang integrated motor is uart g510 ?
 
pxl666 said:
so because you have built electronics from the ground - its safe to assume there is still no way that user could change something in the motor behaviour ? so m500 m600 and possibly m800 remain closed to adjustment for rider ? the only good thing is they accept custom battery ? the only fully customizable bafang integrated motor is uart g510 ?
Every motor / EBike system is locked by the manufacturer. Even if they let you change some parameters, there will always be something you want to change that is not possible because of their design.

The modular DIY electronics I develop should work for any EBike / EScooter, that is the beauty, you do not need to care anymore from the unique obscure tools that manufacturer may or many not provide to do some costumization.
 
I bought a controller on aliexpress for the M600 motor, connected it to the BESST interface and with BESSTPRO software, it amazingly reads and writes parameters like in the new M510.
Strangely the controller has no serial number.
 

Attachments

  • Immagine 2023-02-04 172301.jpg
    Immagine 2023-02-04 172301.jpg
    107.2 KB · Views: 344
  • Immagine 2023-02-04 172343.jpg
    Immagine 2023-02-04 172343.jpg
    107 KB · Views: 342
  • Immagine 2023-02-04 172601.jpg
    Immagine 2023-02-04 172601.jpg
    149.1 KB · Views: 344
  • ReadParameters.txt
    47.7 KB · Views: 20
  • WriteParameters.txt
    77.2 KB · Views: 18
are you going to put it in the motor ? does that mean that OEM controllers are locked and spare parts are not ?
 
NoFanBoiz said:
pxl666 said:
are you going to put it in the motor ? does that mean that OEM controllers are locked and spare parts are not ?

Wonder if it's an aftermarket/copy/non genuine part. Seems possible given no serial number.

I checked the card, it's original.
 
I can confirm what CiDi has posted. I have managed to change the parameters on my M600 with 46.2 firmware with Besst pro. My controller does have a serial No and I know of at least one other M600 owner with factory 46.2 firmware. Interestingly it is not possible to change this firmware to another version with Besst pro or the other 12.18. It would also not accept the parameter changes until the speed was changed back to a lower limit. But it was possible to change speed back afterwards using Besst 1.2.18
 
The EBike modular DIY electronics (https://opensourceebike.github.io/), is featured as the Project of the Week on the Python on Microcontrollers Newsletter.

This newsletter is written by the Adafruit Industries, an open-source hardware company based in New York City, that is popular among makers.



 
casainho said:
The EBike modular DIY electronics (https://opensourceebike.github.io/), is featured as the Project of the Week on the Python on Microcontrollers Newsletter.

That is so cool casainho, I have been watching your work for years, awesome!
 
jrhnz said:
I can confirm what CiDi has posted. I have managed to change the parameters on my M600 with 46.2 firmware with Besst pro. My controller does have a serial No and I know of at least one other M600 owner with factory 46.2 firmware. Interestingly it is not possible to change this firmware to another version with Besst pro or the other 12.18. It would also not accept the parameter changes until the speed was changed back to a lower limit. But it was possible to change speed back afterwards using Besst 1.2.18

There are also other parameters that you can theoretically change, but you can't do it with BESSTPro.
I'm trying to do it via can analyzer, if anyone wants to try these are the messages to use.
First you perform a reading, then you write, modifying only those involved.

Read Parameter 6011 Send message 05116011 0

022D0000 8 30 12 3B D8 0E 68 10 10
0-Nominal voltage DCV 36/43/48
1-Maximum current limit when the battery is full A
2-Overvoltage DCV
3-undervoltage DCV
4-Dynamic driving undervoltage DCV
5-Undervoltage recovery voltage DCV
6-
7-Battery capacity mAh (Byte low)

022D0001 8 27 05 0A 32 2C 00 00 0D
0-Battery capacity mAh (Byte hight)
1-Maximum current limit when battery is low A
2-Battery value threshold when the current begins to decrease %
3-Percentage coefficient of power when the current begins to decay %
4-Display of the complete mileage of the battery Km
5-Sensor type 0/1/2
6-Reverse brake function 0/1
7-Speed Code Disc Teeth

022D0002 8 01 08 01 05 01 02 C8 01
0-Number of speed signal channels 1/2
1-Anti-heel pair controls the number of teeth
2-Motor type 0/1/2
3-Number of pole pairs
4-Number of speed magnets
5-Temperature sensor signal 0/1/2
6-Reduction ratio (Byte low)
7-Reduction ratio (Byte hight)

022D0003 8 C8 00 50 46 80 BB 03 00
0-Maximum speed of rail movement RPM (Byte low)
1-Maximum speed of rail movement RPM (Byte hight)
2-Inductance of the D axis uH (Byte low)
3-Inductance of the D axis uH (Byte hight)
4-Inductance of the Q axis uH (Byte low)
5-Inductance of the Q axis uH (Byte hight)
6-Phase limit resistance mΩ (Byte low)
7-Phase limit resistance mΩ (Byte hight)

022D0004 8 60 00 0C 27 01 28 05 03
0-Rear EMF coefficient 0.001V/RPM (Byte low)
1-Rear EMF coefficient 0.001V/RPM (Byte hight)
2-Start voltage 0.1DCV
3-End voltage 0.1DCV
4-Speed limited
5-Dinamic current %
6-Current loading time 100ms
7-Current load shedding time 100ms

022D0005 8 05 0A 14 1E 28 32 3E 4B
0-Level 1-#-# - Current Limit %
1-Level 2-1-# - Current Limit %
2-Level 3-#-1 - Current Limit %
3-Level 4-2-# - Current Limit %
4-Level 5-#-2 - Current Limit %
5-Level 6-3-# - Current Limit %
6-Level 7-#-# - Current Limit %
7-Level 8-4-# - Current Limit %

022D0006 8 64 64 64 64 64 64 64 64
0-Level 9-5-3 - Current Limit %
1-Level 1-#-# - Speed Limit %
2-Level 2-1-# - Speed Limit %
3-Level 3-#-1 - Speed Limit %
4-Level 4-2-# - Speed Limit %
5-Level 5-#-2 - Speed Limit %
6-Level 6-3-# - Speed Limit %
7-Level 7-#-# - Speed Limit %

022E0007 8 64 64 00 00 14 00 FF B4
0-Level 8-4-# - Speed Limit %
1-Level 9-5-3 - Speed Limit %
2-With or without display 0/1
3-The headlights are always on 0/1
4-Boost speed (Byte low)
5-Boost speed (Byte hight)
6-
7-

Read Parameter 6012 Send message 05116012 0

022D0000 8 0D 04 02 01 01 01 0A 0A
0-Starting torque value - 0 Kg
1-Starting torque value - 1 Kg
2-Starting torque value - 2 Kg
3-Starting torque value - 3 Kg
4-Starting torque value - 4 Kg
5-Starting torque value - 5 Kg
6-Torque value at full load - 0 Kg
7-Torque value at full load - 1 Kg

022D0001 8 09 08 07 06 0D 04 02 01
0-Torque value at full load - 2 Kg
1-Torque value at full load - 3 Kg
2-Torque value at full load - 4 Kg
3-Torque value at full load - 5 Kg
4-Return torque value - 0 Kg
5-Return torque value - 1 Kg
6-Return torque value - 2 Kg
7-Return torque value - 3 Kg

022D0002 8 01 01 64 64 64 64 64 64
0-Return torque value - 4 Kg
1-Return torque value - 5 Kg
2-Maximum current - 0 %
3-Maximum current - 1 %
4-Maximum current - 2 %
5-Maximum current - 3 %
6-Maximum current - 4 %
7-Maximum current - 5 %

022D0003 8 04 04 04 04 04 04 08 08
0-Minimum current - 0 %
1-Minimum current - 1 %
2-Minimum current - 2 %
3-Minimum current - 3 %
4-Minimum current - 4 %
5-Minimum current - 5 %
6-Decay time of the torque - 0 10ms
7-Decay time of the torque - 1 10ms

022D0004 8 08 08 08 08 01 00 00 00
0-Decay time of the torque - 2 10ms
1-Decay time of the torque - 3 10ms
2-Decay time of the torque - 4 10ms
3-Decay time of the torque - 5 10ms
4-Start pulse number - 0
5-Start pulse number - 1
6-Start pulse number - 2
7-Start pulse number - 3

022D0005 8 00 00 02 02 02 02 02 02
0-Start pulse number - 4
1-Start pulse number - 5
2-Current decay time - 0 5ms
3-Current decay time - 1 5ms
4-Current decay time - 2 5ms
5-Current decay time - 3 5ms
6-Current decay time - 4 5ms
7-Current decay time - 5 5ms

022D0006 8 FA FA FA FA FA FA 07 FF
0-Maximum pulse Width of pedal speed - 0 2ms
1-Maximum pulse Width of pedal speed - 1 2ms
2-Maximum pulse Width of pedal speed - 2 2ms
3-Maximum pulse Width of pedal speed - 3 2ms
4-Maximum pulse Width of pedal speed - 4 2ms
5-Maximum pulse Width of pedal speed - 5 2ms
6-Motor derating temperature °C
7-Motor overheating temperature °C

022E0007 8 FF FF FF FF FF FF FF E6
0-
1-
2-
3-
4-
5-
6-
7-

Write Parameter 6011

05106011 1 40
022A6011 0
05146011 8 30 12 3B D8 0E 68 10 10
022A6011 0
05150000 8 27 05 0A 32 2C 00 00 0D
022A6011 0
05150001 8 01 08 01 05 01 02 C8 01
022A6011 0
05150002 8 C8 00 50 46 80 BB 03 00
022A6011 0
05150003 8 60 00 0C 27 01 28 05 03
022A6011 0
05150004 8 05 0A 14 1E 28 32 3E 4B
022A6011 0
05150005 8 64 64 64 64 64 64 64 64
022A6011 0
05160006 8 64 64 00 00 14 00 FF B4
022A6011 0


Write Parameter 6012

05106012 1 40
022A6012 0
05146012 8 0D 04 02 01 01 01 0A 0A
022A6012 0
05150000 8 09 08 07 06 0D 04 02 01
022A6012 0
05150001 8 01 01 64 64 64 64 64 64
022A6012 0
05150002 8 04 04 04 04 04 04 08 08
022A6012 0
05150003 8 08 08 08 08 01 00 00 00
022A6012 0
05150004 8 00 00 02 02 02 02 02 02
022A6012 0
05150005 8 FA FA FA FA FA FA 07 FF
022A6012 0
05160006 8 FF FF FF FF FF FF FF E6
022A6012 0
 
jrhnz said:
I can confirm what CiDi has posted. I have managed to change the parameters on my M600 with 46.2 firmware with Besst pro. My controller does have a serial No and I know of at least one other M600 owner with factory 46.2 firmware. Interestingly it is not possible to change this firmware to another version with Besst pro or the other 12.18. It would also not accept the parameter changes until the speed was changed back to a lower limit. But it was possible to change speed back afterwards using Besst 1.2.18
Hi, we're looking for the 46.2 firmware for the M600, is that actually anywhere on say the Github site, it would be pity if this is another locked version again much like the series in the M510 where only the very late motors seem to be able to handle the BEEST Pro. Bit of a minefield one thinks sadly.

Cidi where did you get your controller from ?
 
I checked the Alliexpress link from CiDi and messaged them but they say the firmware has now been upgrades to 46.3
https://www.aliexpress.com/item/1005004809504341.html?gatewayAdapt=4itemAdapt
 
There are also other parameters that you can theoretically change, but you can't do it with BESSTPro.
I'm trying to do it via can analyzer, if anyone wants to try these are the messages to use.
First you perform a reading, then you write, modifying only those involved.
I don't have a can analyzer at the moment but would be very interested in your findings with any changes you make.
Hopefully the 46.3 firmware will have the same ability to change parameters. Maybe Bafang is reacting to feedback. It would
be nice if they would release the new firmware to flash to existing controllers.
 
About a year ago, I purchased a second controller, too. It wasn't from Alibaba, but believe I ordered from FLX:

https://flx.bike/products/m600-motor-controller-version-3-2

It is cheaper than the one listed on Alibaba, but the label seems like it might have 46.7 firmware, so not sure if this is a good replacement or not. I don't have BESST to see what firmware is actually on it... though guess I could plug it in and see what shows up on the display?

controller ID.jpg
 
CiDi said:
jrhnz said:
I can confirm what CiDi has posted. I have managed to change the parameters on my M600 with 46.2 firmware with Besst pro. My controller does have a serial No and I know of at least one other M600 owner with factory 46.2 firmware. Interestingly it is not possible to change this firmware to another version with Besst pro or the other 12.18. It would also not accept the parameter changes until the speed was changed back to a lower limit. But it was possible to change speed back afterwards using Besst 1.2.18

There are also other parameters that you can theoretically change, but you can't do it with BESSTPro.
I'm trying to do it via can analyzer, if anyone wants to try these are the messages to use.
First you perform a reading, then you write, modifying only those involved.

Read Parameter 6011 Send message 05116011 0

022D0000 8 30 12 3B D8 0E 68 10 10
0-Nominal voltage DCV 36/43/48
1-Maximum current limit when the battery is full A
2-Overvoltage DCV
3-undervoltage DCV
4-Dynamic driving undervoltage DCV
5-Undervoltage recovery voltage DCV
6-
7-Battery capacity mAh (Byte low)

Hi CiDi, I am triying this, but when I send the 05116011 0 Read Parameter, I get an Innomaker message saying "Frame Data Not Right". I think it is because the Data field, can't be empty.

Any suggestions on what to do?

PadreParada
 
PadreParada said:
CiDi said:
jrhnz said:
I can confirm what CiDi has posted. I have managed to change the parameters on my M600 with 46.2 firmware with Besst pro. My controller does have a serial No and I know of at least one other M600 owner with factory 46.2 firmware. Interestingly it is not possible to change this firmware to another version with Besst pro or the other 12.18. It would also not accept the parameter changes until the speed was changed back to a lower limit. But it was possible to change speed back afterwards using Besst 1.2.18

There are also other parameters that you can theoretically change, but you can't do it with BESSTPro.
I'm trying to do it via can analyzer, if anyone wants to try these are the messages to use.
First you perform a reading, then you write, modifying only those involved.

Read Parameter 6011 Send message 05116011 0

022D0000 8 30 12 3B D8 0E 68 10 10
0-Nominal voltage DCV 36/43/48
1-Maximum current limit when the battery is full A
2-Overvoltage DCV
3-undervoltage DCV
4-Dynamic driving undervoltage DCV
5-Undervoltage recovery voltage DCV
6-
7-Battery capacity mAh (Byte low)

Hi CiDi, I am triying this, but when I send the 05116011 0 Read Parameter, I get an Innomaker message saying "Frame Data Not Right". I think it is because the Data field, can't be empty.

Any suggestions on what to do?

PadreParada

If you use innomaker you must enter 85116011
 

Attachments

  • InnomakerRead6011.jpg
    InnomakerRead6011.jpg
    124.4 KB · Views: 77
Back
Top