How To, 50A BBSHD Controller Mod

General Discussion about electric bicycles.
BotoXbz   10 W

10 W
Posts: 91
Joined: May 20 2018 7:00am

Re: How To, 50A BBSHD Controller Mod

Post by BotoXbz » Aug 31 2019 8:13pm

casainho wrote:
Aug 31 2019 5:07pm
Hi.

Can you guys please tell me what is the microcontroller on the motor controller board?? I saw that there are connections for 3 halls sensors from the motor + the connections of the 3 phases.
The controller on the BBSHD is garbage, it's using a Chinese STC15W4K32S4 series MCU
There is a second MCU, I think that one does the motor control and the STC probably only tells it how much current it wants
Original firmware is here: viewtopic.php?t=100064
A much better idea would be to design a good VESC controller that'd fit into the original enclosure.
And then you could do whatever you want.

casainho   100 GW

100 GW
Posts: 5030
Joined: Feb 14 2011 2:43pm

Re: How To, 50A BBSHD Controller Mod

Post by casainho » Aug 31 2019 9:39pm

BotoXbz wrote:
Aug 31 2019 8:13pm
casainho wrote:
Aug 31 2019 5:07pm
Hi.

Can you guys please tell me what is the microcontroller on the motor controller board?? I saw that there are connections for 3 halls sensors from the motor + the connections of the 3 phases.
The controller on the BBSHD is garbage, it's using a Chinese STC15W4K32S4 series MCU
There is a second MCU, I think that one does the motor control and the STC probably only tells it how much current it wants
Original firmware is here: viewtopic.php?t=100064
A much better idea would be to design a good VESC controller that'd fit into the original enclosure.
And then you could do whatever you want.
Thanks for the information.

That STC15W4K32S4 is from ST, there is an English datasheet available as also a c compiler and some examples projects on github.

The c compiler is SDCC, the same we use for the TSDZ2 motor controller, which is also a microcontroller from ST.

So, even if there is other IC that specifically do the motor controller, than should be easy to understand the schematic of the motor controller and then develop the firmware, probably even more easy than the TSDZ2 or the KT Kunteng motor controllers firmware that we also developed.

Can you please tell me the me reference of the motor controller IC??
- EBike wireless standard: wireless motor, wireless cycling GPS display Garmin Edge and wireless remote with wireless brake sensor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

Please consider a donation to help developments: paypal.me/jorgecasa

User avatar
fechter   100 GW

100 GW
Posts: 15179
Joined: Dec 31 2006 3:23pm
Location: California Bay Area, USA

Re: How To, 50A BBSHD Controller Mod

Post by fechter » Aug 31 2019 10:16pm

Here is the datasheet for the MCU:
Attachments
STC15W4K32S4-en.pdf
(5.4 MiB) Downloaded 79 times
"One test is worth a thousand opinions"

casainho   100 GW

100 GW
Posts: 5030
Joined: Feb 14 2011 2:43pm

Re: How To, 50A BBSHD Controller Mod

Post by casainho » Aug 31 2019 11:07pm

fechter wrote:
Aug 31 2019 10:16pm
Here is the datasheet for the MCU:
Thanks. I found on AliExpress cheap development boards with that microcontroller, which would be need at start as the motor controller is very expensive!!

There are OpenSource firmware on github for this microcontroller, to take as a first example.

Please tell me the reference of the other big IC on the board.

My guess is that it is an IC for enable/disable the power mosfets as the 3 hall sensors signals from the motor goes to the microcontroller and this is capable to drive 6 PWM channels typically used for motor controllers.
- EBike wireless standard: wireless motor, wireless cycling GPS display Garmin Edge and wireless remote with wireless brake sensor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

Please consider a donation to help developments: paypal.me/jorgecasa

casainho   100 GW

100 GW
Posts: 5030
Joined: Feb 14 2011 2:43pm

Re: How To, 50A BBSHD Controller Mod

Post by casainho » Aug 31 2019 11:16pm

This microcontroller has 32 kbytes of flash memory.

I would say the hardware of motor controller is about the same as TSDZ2 except that it uses better power mosfets hardware and so handles maybe 3x more current than TSDZ2.

Since TSDZ2 microcontroller has also 32 kbytes flash memory, I would say we could develop the same firmware and with FOC as we did for TSDZ2.
- EBike wireless standard: wireless motor, wireless cycling GPS display Garmin Edge and wireless remote with wireless brake sensor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

Please consider a donation to help developments: paypal.me/jorgecasa

casainho   100 GW

100 GW
Posts: 5030
Joined: Feb 14 2011 2:43pm

Re: How To, 50A BBSHD Controller Mod

Post by casainho » Sep 01 2019 7:00am

I started a thread specifically for firmware development:

Bafang BBSHD BBS02 mid drive -- Flexible OpenSource firmware
- EBike wireless standard: wireless motor, wireless cycling GPS display Garmin Edge and wireless remote with wireless brake sensor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

Please consider a donation to help developments: paypal.me/jorgecasa

Cbisbaf   10 mW

10 mW
Posts: 24
Joined: May 04 2019 3:26pm

Re: How To, 50A BBSHD Controller Mod

Post by Cbisbaf » Sep 06 2019 11:35am

quick one could anyone reference old photos and tell me the orientation and value of these 2 components please. the board was already broken so rushed unpotting it but i am going to try save it as a spare. thankyou in advance
Attachments
Inkedim1_LI.jpg
Inkedim1_LI.jpg (469.41 KiB) Viewed 2897 times
Inkedim2_LI.jpg
Inkedim2_LI.jpg (489.87 KiB) Viewed 2897 times

casainho   100 GW

100 GW
Posts: 5030
Joined: Feb 14 2011 2:43pm

Re: How To, 50A BBSHD Controller Mod

Post by casainho » Sep 06 2019 12:33pm

Sorry I can't help you. Could you please take pictures of the chips so we can know their references??

I am writing a wiki page to resume the motor controller and I need that information to put there:

https://github.com/OpenSource-EBike-fir ... BBSHB/wiki

Thank you.
- EBike wireless standard: wireless motor, wireless cycling GPS display Garmin Edge and wireless remote with wireless brake sensor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

Please consider a donation to help developments: paypal.me/jorgecasa

Cbisbaf   10 mW

10 mW
Posts: 24
Joined: May 04 2019 3:26pm

Re: How To, 50A BBSHD Controller Mod

Post by Cbisbaf » Sep 06 2019 1:52pm

hope these are ok no filter for my scope
Attachments
WIN_20190906_19_47_34_Pro.jpg
WIN_20190906_19_47_34_Pro.jpg (331.63 KiB) Viewed 2888 times
WIN_20190906_19_48_25_Pro.jpg
WIN_20190906_19_48_25_Pro.jpg (219.88 KiB) Viewed 2888 times
WIN_20190906_19_48_39_Pro.jpg
WIN_20190906_19_48_39_Pro.jpg (290.72 KiB) Viewed 2888 times
WIN_20190906_19_48_54_Pro.jpg
WIN_20190906_19_48_54_Pro.jpg (302.74 KiB) Viewed 2888 times
WIN_20190906_19_49_35_Pro.jpg
WIN_20190906_19_49_35_Pro.jpg (269.27 KiB) Viewed 2888 times

User avatar
fechter   100 GW

100 GW
Posts: 15179
Joined: Dec 31 2006 3:23pm
Location: California Bay Area, USA

Re: How To, 50A BBSHD Controller Mod

Post by fechter » Sep 06 2019 2:04pm

Cbisbaf wrote:
Sep 06 2019 11:35am
quick one could anyone reference old photos and tell me the orientation and value of these 2 components please. the board was already broken so rushed unpotting it but i am going to try save it as a spare. thankyou in advance
The diode in the top picture is the same as the one on the next FET bank. All those parts are duplicated 3x on the banks.

The bottom pic I don't know what that is. I won't have access to a board for a while, but if you wait, I can probably see what it is.
"One test is worth a thousand opinions"

casainho   100 GW

100 GW
Posts: 5030
Joined: Feb 14 2011 2:43pm

Re: How To, 50A BBSHD Controller Mod

Post by casainho » Sep 06 2019 3:25pm

Cbisbaf wrote:
Sep 06 2019 1:52pm
hope these are ok no filter for my scope
So one is the STC15W4K32S4,

The other is the FAN7388.

The last one is the 79F9211 ?? Can you please confirm this one?
On Google I find reference to something "79F9211 180 ebike". Seems it is a microcontroller used on ebike motor controllers.
- EBike wireless standard: wireless motor, wireless cycling GPS display Garmin Edge and wireless remote with wireless brake sensor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

Please consider a donation to help developments: paypal.me/jorgecasa

Cbisbaf   10 mW

10 mW
Posts: 24
Joined: May 04 2019 3:26pm

Re: How To, 50A BBSHD Controller Mod

Post by Cbisbaf » Sep 06 2019 4:06pm

i think its an nec chip i know they make micro controllers

casainho   100 GW

100 GW
Posts: 5030
Joined: Feb 14 2011 2:43pm

Re: How To, 50A BBSHD Controller Mod

Post by casainho » Sep 06 2019 4:11pm

Cbisbaf wrote:
Sep 06 2019 4:06pm
i think its an nec chip i know they make micro controllers
You are correct!! It is the D79F9211:
stancecoke wrote:
Dec 13 2017 4:50am
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.
https://de.aliexpress.com/item/Electric ... 50022.html

https://github.com/stancecoke/Parameter ... 11-NEC.pdf

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 ... Controller

regards
stancecoke
- EBike wireless standard: wireless motor, wireless cycling GPS display Garmin Edge and wireless remote with wireless brake sensor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

Please consider a donation to help developments: paypal.me/jorgecasa

User avatar
jpacadd   100 mW

100 mW
Posts: 38
Joined: Dec 27 2019 7:10pm

Re: How To, 50A BBSHD Controller Mod

Post by jpacadd » Jan 20 2020 12:15am

furcifer wrote:
Aug 28 2019 2:33pm
I upped one of my controllers to 45A using the shunt mod and I've been running it for a month now with no issues. Pulled board, soldered another 5 MOHM resistor and added some thermal paste between the mosfets and the cover plate.

The controller does seem to run a bit hotter but nothing crazy. The motor as well but even less so. This seems like a very stable modification.
Hello furcifer,

I'm looking to do the shunt mod on my stock BBSHD controller. Is yours still running? Any advice?

I have bought a spare parts controller for investigation and have picked out the potting. I also have a 2nd bike and intend to build a 2nd BBSHD, so will have a few controllers to mess with total.

I ordered a pack of sample shunt resistors including R005 which looks to be correct, to solder on, and it looks easy to get at that with minimal potting removal.

Is yours working fine and you recommend or not?

Also I suspect my BMS to be my next bottleneck, what do you have for a battery and BMS? I'm leaning toward disconnecting my BMS and just using the wires for balancing. Do you think this makes sense? It does to me, but I'm pretty new to this (not so advanced) level of electrical engineering.

Any else about your build would be interesting too.

Thank you,

Jay
July 2019 first build: 2009 Giant Trance X3 with stock BBSHD 52V
Next build: Just bought used 2009 Giant Trance X4, likely BBSHD also, maybe hotter controller/battery, undecided
Lots of other fun toys: Wildcat X, Xtrainer, 1978 KE100, Hypermotard 1100

Cobain Windsurfer   1 mW

1 mW
Posts: 13
Joined: Feb 28 2018 6:41pm

Re: How To, 50A BBSHD Controller Mod

Post by Cobain Windsurfer » Feb 16 2020 3:51pm

Until U get an answer from furcifer..... I did the shunt mod on the BBSHD a long time ago by soldering a R005 (5 mOhm shunt) on top of the two R005 shunts on the board. It works a charm! I have the EM3ev 52V (14S7P) hard case battery pack, with ~33A burstlimit and ~43A continious limit. (Beside BMS it has a 40A fuse built in) Only thing that has happend is that if I go full trottle up a hill for 100 meters or so, the fuse get hot and blow, and I have to replace it. This was the old stock bbshd controller that let trottle overriding pas without any modding. On another bike I aslo tried to switch out the two R005 shunts with two WSLF
3 mOhm shunts instead to get 50A, but it didn't work out well, jerky trottle like on or off, but superpower...wheelies or nothing..... Never got pas and trottle to work together either. Has someone used this shunts with luck? https://www.mouser.se/ProductDetail/Vis ... 252bxy7w==

User avatar
jpacadd   100 mW

100 mW
Posts: 38
Joined: Dec 27 2019 7:10pm

Re: How To, 50A BBSHD Controller Mod

Post by jpacadd » Feb 16 2020 4:12pm

Cobain Windsurfer wrote:
Feb 16 2020 3:51pm
Until U get an answer from furcifer..... I did the shunt mod...
Thanks for the encouragement. I did order a junk controller off of ebay to dissect and it looks fairly simple, so I ordered some long lead time shunts a while back, should arrive any day now.

I suspect I may have to remove my bms, and maybe I'll add a fuse if not already one there.
July 2019 first build: 2009 Giant Trance X3 with stock BBSHD 52V
Next build: Just bought used 2009 Giant Trance X4, likely BBSHD also, maybe hotter controller/battery, undecided
Lots of other fun toys: Wildcat X, Xtrainer, 1978 KE100, Hypermotard 1100

furcifer   10 kW

10 kW
Posts: 647
Joined: Dec 21 2018 12:36pm

Re: How To, 50A BBSHD Controller Mod

Post by furcifer » Apr 19 2020 12:59pm

My apologies for not getting back to you. My bike was stolen from campus and I haven't been on here for a while. Too depressing. Hope the mod is going well for you. I didn't experience any problems with this mod. Full disclosure I live in Southern Ontario so it's very flat, but we get our fair share of wind.

fja2   100 µW

100 µW
Posts: 9
Joined: Nov 07 2019 3:06pm

Re: How To, 50A BBSHD Controller Mod

Post by fja2 » Apr 23 2020 5:23pm

I did this mod and kindof broke my controller, you can read about how I fixed it here: viewtopic.php?f=2&t=105837&p=1548984#p1548984

Anyway! I now got two 2mOhm shunts, crazy small I know! But my motor still won't go over what would be about 30 amps. Anyone got any clues why that might be? I have replaced the BMS on my battery pack to a quite beefy one, that shouldn't be the issue... I do use a Eggrider.
During the modding I did manage to drill into the temperature sensor, could the lack of a temperature sensor be the issue? Could anyone measure theirs so we know what kind of resistance they have at different temperatures?

Brad777   10 µW

10 µW
Posts: 6
Joined: May 18 2020 2:48am
Location: North Wales

Re: How To, 50A BBSHD Controller Mod

Post by Brad777 » Jul 13 2020 7:12am

Hi
I'm thinking of doing the shunt mod.
Can anyone tell me please what the peak amps would be if I stacked a 3mOhm shunt on top of the the two existing 5mOhm instead of another 5mOhm.
Many thanks
Brad.

Fechter wrote
3 milliohm (would give you 50A if you replace both)
If you just replace one of the pair with 3mOhm, you would get 40A.
Another approach would be to leave the stock shunt resistors and place another one stacked on top. Less work, but I'm not sure about the heat dissipation.
If you stacked another 5mOhm on top, it would give you 45A.

User avatar
fechter   100 GW

100 GW
Posts: 15179
Joined: Dec 31 2006 3:23pm
Location: California Bay Area, USA

Re: How To, 50A BBSHD Controller Mod

Post by fechter » Jul 13 2020 8:10am

3mohm on top of the stock resistors would give you about 55A. Probably more than it can handle, but who knows...
"One test is worth a thousand opinions"

Brad777   10 µW

10 µW
Posts: 6
Joined: May 18 2020 2:48am
Location: North Wales

Re: How To, 50A BBSHD Controller Mod

Post by Brad777 » Jul 13 2020 12:11pm

Ok Fechter Thanks
55A..........that's too much. I don't want to push the limits but I do need a bit more torque in short bursts on the tight, hilly mountain trails I ride.
I have a fried controller that I can rob one of the shunts from so I could try the easier 45A set-up with three stacked.
I also ordered some Vishay CURRENT SENSE RES, 0R003, 1%, 4 W, 2512 WSLF25123L000FEA so not sure whether to just fit 2 of these and turn down the amps a bit in programming if I can manage with less than 50A.
Also should I use two soldering irons (one on each end) when removing the shunts.........not sure which is the easiest and safest way to de-solder and re-solder without over heating anything?

Many thanks.
Brad.

Magsy   1 mW

1 mW
Posts: 15
Joined: Jul 17 2016 5:30pm
Location: South Wales

Re: How To, 50A BBSHD Controller Mod

Post by Magsy » Jul 14 2020 10:06am

Brad777:

I replaced both 5 m0hm with 3 m0hm recently here

What you bought look fine. I used these from RS.

In terms of removing the existing shuts I wouldn't say it was particularly hard. I didn't need a lot of heat imo.

Remove as much solder as you can using wick/braid
Re-wet the joints with as low a melting point solder as you can (ie lots of lead)
Two irons works fine, make solder blobs so you have the best conductivity and just slide/flick the resistor off
You could probably do it with one iron and a massive solder blob but these are a bit bigger than where that trick normal works

I would say the tolerance for (excess) heat in this area is high plus these are passive components

Due to there being some thermal mass you could probably heat one end up, then quickly swap to the other and lift it a little. I really wouldn't recommend this tho..I'd go and buy a £10 second iron to be honest.

Putting them back is a more personal thing. I clean the pads completely of solder, add liquid flux to them and then rely on the solder on the iron to flow. Alternatively you create a blob on one pad and press the resistor into it.

You wont have enough hands to hold the resistor down (because it will move about a lot), hold the iron and hold the solder.

Mine is pulling roughly 45a without software limiting on a 52v pack (my controller was one of the locked 28a ones)

Brad777   10 µW

10 µW
Posts: 6
Joined: May 18 2020 2:48am
Location: North Wales

Re: How To, 50A BBSHD Controller Mod

Post by Brad777 » Jul 14 2020 3:54pm

Thanks for the advice Magsy.
I think i'll probably do the same and change both shunts to 3mOhm and use two soldering irons to remove them and refit them on clean pads as you suggested.
You got 45A and not 50A..........must be because of the 28A limit on the new locked controllers.
I also have one of those and not realising I got error30 when I tried to load my settings. The UK seller kindly re-flashed it for me but i'll keep it as back-up.
Not wanting to be stuck with the factory settings I just ordered another spare from Faster Bikes in Germany as they still have stock of programmable 30A controllers.
I also did the transistor fix for the throttle and it works great now.

E-mil   10 mW

10 mW
Posts: 23
Joined: Apr 23 2010 7:55pm

Re: How To, 50A BBSHD Controller Mod

Post by E-mil » Nov 29 2020 5:28pm

This old BBSHD controller is fulfilled. It is my fourth tuned controller and it got the full overhaul. Tuned to the max and ready for 22S 92V 55A.
BBSHD 22S 55A controller.jpg
BBSHD 22S 55A controller.jpg (411.76 KiB) Viewed 304 times
It will be an absolute beast and probably the most insane BBSHD with an original controller 😎 .

I somewhat expect the motor axle to snap but it doesn't matter. It was a journey to get there. Will I do another FET job? Hell no it took six hours.


All mods done:
- Vdrop of approx 30V on brown wire using LEDs. The controller allows and displays up to 61.4 V on dpc18 display.

- Shunt mod 60A using two extra 5 mOhm resistors.

- Caps replaced with 100V models, 1700uF in all inside controller. I might add an extra outside controller.

- Mosfets NF75NF replaced with IRFB4110.
from: DKK 37.26 | 10PCS-50PCS IRFB4110PBF TO220 IRFB4110 B4110 TO-220 MOS FET transistor Original disassembly
https://a.aliexpress.com/_m060L2t

- Stator/housing sides creamed with cooling paste (a real mess to do and a pain to reseat the axle and end bearing).

- Thermistor NTC 10kOhm from laptop battery pack inserted into stator windings, ready for external readout.

- All important traces on controller beefed up with copper wire.
Stator and house heatsinked.jpg
Stator and house heatsinked.jpg (394.35 KiB) Viewed 304 times
Stator with Thermistor inserted.jpg
Stator with Thermistor inserted.jpg (439.11 KiB) Viewed 304 times
Soldered IRFB4110 MOSFETs.jpg
Soldered IRFB4110 MOSFETs.jpg (343.33 KiB) Viewed 304 times
4110 FETs top side.jpg
4110 FETs top side.jpg (105.54 KiB) Viewed 304 times
Controller layout.jpg
Controller layout.jpg (369.55 KiB) Viewed 304 times

Vw2bugyou   100 µW

100 µW
Posts: 8
Joined: Dec 03 2020 11:02am
Location: Oregon

Re: How To, 50A BBSHD Controller Mod

Post by Vw2bugyou » Dec 04 2020 1:34am

New member here. I only have two builds under my belt. I've got some parts ordered for a DIY Super73 style mini mid drive using a 70's Yamaha Yz 80 with a bottom bracket welded on to keep "pedal assisted bicycle" status for the man.
Anyhow, the reason for my post is to thank all of you who's brain is so much bigger than mine and have the ability to present all this technical information in a fashion that I can (mostly) follow. I searched for video walkthroughs for this mod all through YouTube and found nothing. I went ahead and did the basic (not so basic to me) SMD current sense resistor double stack mod and made a YouTube video about halfway through my progress. Its my first info video so don't judge me too much. BTW, I just put it all back together and went for a test ride up the street...... OMG. best four bucks I've ever spent!
Thank you from southern Oregon!

youtube link is https://youtu.be/mjAZ9ix7tp0

Post Reply