-
Notifications
You must be signed in to change notification settings - Fork 5
Home
See BBSHD Open Source Firmware: https://github.com/danielnilsson9/bbshd-fw
WARNING: as there are not development tools for the microcontroller D79F921/X8M06, it is impossible to develop the firmware.
NOTE: this motor controllers seems to have 2 microcontrollers, one probably to deal with the display only and run the ebike logic and other specific to control the motor. There are no developing tools for the one that controls the motor so no possible to develop firmware.
I think this is a chinese clone of the Renesas (formerly NEC) D79F9211, sometimes branded as a X8M06, well known from the old KU63 controllers. 44 Pin LQFP package.
There is no cheap programmer available for this processor. I tried to build one on my own some month ago, but I stopped that project. https://github.com/stancecoke/Parameter-Setting-Tool-for-EBike-Controller
Motor controller (unpotted):
This motor controller hardware seems very similar to the TSDZ2 one, except that it has not the torque sensor part. There are power resistors to read the battery current and the microcontroller can control the 6 PWM channels that controls the power mosfets. Also there are the 3 motor hall sensors connections.
Since the microcontroller has only 32 kbytes of flash memory and the hardware is similar to the TSDZ2, the firmware for Bafang could be mostly based on our OpenSource firmware for TSDZ2 that implements FOC motor control. This would also mean that this Bafang motor would support the displays 850C color and SW102 Bluetooth, also running our OpenSource firmware.
Original firmware is available here.
Forum message on endless-sphere forum.
Microcontroller is the STC15W4K32S4, based on a 8051 CPU, runs at 35 MHz and has 32 kbytes of flash memory.
- Product page: https://www.stcmicro.com/STC/STC15W4K32S4.html
- Datasheet: STC15W4K32S4-en.pdf
- Available free OpenSource SDDC compiler and flasher stcgal, as also working firmware with makefile, see here: https://github.com/YaoFei509/stc_diyclock
- There is a cheap 3€ development board available on Aliexpress, search for "system board IAP15W4K58S4 core board STC15W4K56S4"
FAN7388: 625V, 3.3/5V input logic compatible, 0.65/0.35A sink/source current, 3-Phase Half-Bridge Gate-Drive IC.
This motor controller seems similar to BSSHD motor controller. Probably the firmware would be the same with minor differences.
Bafang DIY motors miss a torque sensor. Maybe a torque sensor could be added to the pedal cranks like this: