-
Notifications
You must be signed in to change notification settings - Fork 5
Home
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"
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: