Bafang M500/M600 thread

Thanks for that info... I've written stuff with characteristics before so it's familiar territory (a bike computer to send speed/cadence to standard cycling apps, with a derestrictor sneaking in, on a Arduino 33BLE)

I did wonder if there was a restart command on the CAN bus that did what a power cycle would do.
 
@aegidius you may want to look at K1 EBikes who make virtually what you are trying to create. All the speed functions you wish for are already in practice and for the cost of their unit you could save a lot of time.
 
Regarding mechanical maintenance, are there recommendations for the M510 motor?
Like how often to change the lubrication, replace bearings, inspect gears etc.?

I searched a bit, but it seems like there is little maintenance information for those newer motors.
It seems there are some bearings with a non-standard size in the M510, which needs replacement some time, and some gears are available, but other than that I didn't find much.

Since I use my bike both for commuting and MTB, I've nearly driven 2000 km with it in a few months. I'm driving in all weather, while often going hard on the motor.
While everything still sounds and feels good, and I don't think I need to service it now, it would be good to have some estimation of what to expect.
 
What are the headers manufacturer and part numbers you used to connect the Bafang motor sensors? You said it is PHB 2.0mm 2x3P connector , is there compatible header I can purchase on Digikey for instance?


1739830469849.png
 
Last edited:
If you want to take a look yourself, I can recommend the nRF Connect app for BLE debugging: You can connect and see the services, characteristics etc., or monitor a running BLE connection
I looked a bit more into this now that my bike is running, and found I could log the messages coming from the display to Go+ with nRF Connect, but not the other way around! So I can't see what Go+ is sending to the display yet. To see the whole conversation I'll need to get the gear to make a proper BLE sniffer.

So far I've identified these fields in the periodic notification sent from the display (the one starting with 55 AA 27 10 11)
- range in km*100
- battery percentage (not the voltage, strangely, because it's shown in Go+)
- the PAS level (1-5)
- a flag saying whether the lights are on
- the speed in wheel RPM

but when I change, say, the PAS level in Go+, I get a short acknowledgement notification, but I can't see the command that Go+ sent. Will keep at it and report progress...
 
To see the whole conversation I'll need to get the gear to make a proper BLE sniffer.
!? Android has a build in BLE sniffer in the developer settings. It's called HCI Snoop.
There are tools like Wireshark that help to analyze the log file.
 
Guys, anyone had possibility to compare M560/M600 to TSDZ8? I am looking for such comparision and not found any.
 
I decided to update my Opensource DIY EBike, mainly because I am using a better display now, a monochromatic instead of an OLED. This new one is much better to see on outdoors as also is bigger - I am being using this display and firmware on my Fiido Q1S scooter, since one year ago.

A bit more details of the project: EBike Bafang M500 mide drive motor: VESC + DIY ESP32 board running Pyhton firmware | VESC Project

I am sharing the OpenSource schematics for this DIY EBike / ESCooter electronics and software, here on github: GitHub - OpenSourceEBike/EBike_EScooter_modular_DIY: EBike / EScooter app developed in CircuitPython, to control a motor by sending commands to VESC motor controller

I had to open the motor plastic 3D printed enclosure to have access to the VESC motor controller + ESP32 board. The plastic glue I used was great, no signs of water inside!!
1743777508768.png


I had to update the firmware, as for this new display communications I am using ESP32Now wireless instead of the previous UART wired communication. And while I was doing that, I also updated the VESC firmware and run again the motor parameters detection - everything went great!!
On the display, I am only showing 3 variables: Battery voltage (to mentally compute the battery SOC); Assist level and Motor Power.
I have configured the system to use max of 15 battery amps, so with my 48V battery, it is about max of 750W!!
1743777686563.png


Pictures of the old display, working perfectly, no water inside although with a lot of rust on the metallic screws:
1743777944712.png

1743778024578.png

1743778048879.png

1743778091149.png


On the new display I also now use the ESP32-C3 instead of ESP32-S2, because C3 uses about half the power which is important due to the nature of this DIY boards. Also this ESP32-C3 board is smaller:
1743778192274.png


The new display is bigger although uses the same 128x64 pixels, so I had nothing to change on the firmware:
1743778232281.png



I updated my seated scooter display firmware, I will probably follow the same design and improve for my EBike.
The current design of the main screen. Big numbers for the current wheel speed!! A graph bar to represent the current motor power, between 0 and 2000 watts. With smaller numbers, the current time. And I need to work the battery SOC value.

1744250433826.png
 
Back
Top