danielnilsson9 / bbs-fw

Open source firmware for multiple electric bike motor controllers.
GNU General Public License v3.0
189 stars 38 forks source link

unable to find MCU on BBS02 controller #162

Open jonaslechot opened 1 year ago

jonaslechot commented 1 year ago

Hello, I'm trying to install your firmware onto the bbs02 controller (new controller from this year). however Following the instructions, I'm unable to even find the mcu. after unpotting I can confirm that it is an STC 15F2KS60S2 which should be compatible. can you give me some advice on how to proceed? best regards Jonas

naldoxable commented 1 year ago

Check the display cable connection, double check the pinout with a multimeter and be sure that the power enable pins are shorted. Do not forget to plug the battery in!

jonaslechot commented 1 year ago

the cable works fine for the bafang config tool, so I don't see where the issue could be on the cable level. obviously battery power is there too.

On Sat, 12 Aug 2023, 18:33 Matteo Naldoni, @.***> wrote:

Check the display cable connection, double check the pinout with a multimeter and be sure that the power enable pins are shorted. Do not forget to plug the battery in!

— Reply to this email directly, view it on GitHub https://github.com/danielnilsson9/bbs-fw/issues/162#issuecomment-1675993180, or unsubscribe https://github.com/notifications/unsubscribe-auth/BB4GEFMFWQXZ455O53FNRVDXU6V5NANCNFSM6AAAAAA3OAPQNQ . You are receiving this because you authored the thread.Message ID: @.***>

naldoxable commented 1 year ago

Ok so the connection should be ok. Try to disconnect the battery, then click on Check MCU and only then plug the battery in. I'm assuming that you set the baudrate as shown in the picture and the correct serial port. Other settings should be useless for this step.

jonaslechot commented 1 year ago

i did everything exactly according to zthe instructions. do you have experience with bbs02 controllers?

On Sat, 12 Aug 2023, 18:48 Matteo Naldoni, @.***> wrote:

Ok so the connection should be ok. Try to disconnect the battery, then click on Check MCU and only then plug the battery in. I'm assuming that you set the baudrate as shown in the picture and the correct serial port. Other settings should be useless for this step.

— Reply to this email directly, view it on GitHub https://github.com/danielnilsson9/bbs-fw/issues/162#issuecomment-1676000594, or unsubscribe https://github.com/notifications/unsubscribe-auth/BB4GEFLIUVSIMRKHPYP2MKLXU6XWXANCNFSM6AAAAAA3OAPQNQ . You are receiving this because you authored the thread.Message ID: @.***>

naldoxable commented 1 year ago

I have a bbs02 controller, not so experienced but I'm developing a custom display, esp32 based, with more features :) Hope to publish the project soon.

jonaslechot commented 1 year ago

i installed a dozen of bbs02 motors so far, but recently a bug has found its way into the controller, after configuration writing pas gets disabled and only reactivates after a couple of restarts with a bit of luck. therefore I wanted to see if I can install the open source firmware, but so far I'm not even able to find the mcu with the stc isp 6.86 ....

On Sat, 12 Aug 2023, 19:07 Matteo Naldoni, @.***> wrote:

I have a bbs02 controller, not so experienced but I'm developing a custom display, esp32 based, with more features :) Hope to publish the project soon.

— Reply to this email directly, view it on GitHub https://github.com/danielnilsson9/bbs-fw/issues/162#issuecomment-1676009390, or unsubscribe https://github.com/notifications/unsubscribe-auth/BB4GEFMZOROLVH2OGQHZZBTXU6Z4PANCNFSM6AAAAAA3OAPQNQ . You are receiving this because you authored the thread.Message ID: @.***>

naldoxable commented 1 year ago

Oh.. so you're trying to replace the original firmware and you have never clicked on Download/Program button? This eliminate any fault by you.. It seems a defective unit. I suggest to you, if you're in time, to use the warranty.

BTW, try to use stc 6.88 instead of 6.86

jonaslechot commented 1 year ago

i tried it on 3 controllers, none of them is recognized by the software, but they all work fine otherwise

On Sat, 12 Aug 2023, 19:22 Matteo Naldoni, @.***> wrote:

Oh.. so you're trying to replace the original firmware and you have never clicked on Download/Program button? This eliminate any fault by you.. It seems a defective unit. I suggest to you, if you're in time, to use the warranty.

BTW, try to use stc 6.88 instead of 6.86

— Reply to this email directly, view it on GitHub https://github.com/danielnilsson9/bbs-fw/issues/162#issuecomment-1676016441, or unsubscribe https://github.com/notifications/unsubscribe-auth/BB4GEFJY7CTSKX47OOJF6YLXU63ULANCNFSM6AAAAAA3OAPQNQ . You are receiving this because you authored the thread.Message ID: @.***>

naldoxable commented 1 year ago

Last chance, try a different usb-serial adapter, maybe an FTDI. I know that it works for the configurator but the firmware programming occurs at an higher baudrate which may cause problems if you do not have the correct TTL voltages

jonaslechot commented 1 year ago

thanks for the tip, I'll get another adapter and try. the one I have now is from pswpower (see picture)

On Sat, 12 Aug 2023, 20:02 Matteo Naldoni, @.***> wrote:

Last chance, try a different usb-serial adapter, maybe an FTDI. I know that it works for the configurator but the firmware programming occurs at an higher baudrate which may cause problems if you do not have the correct TTL voltages

— Reply to this email directly, view it on GitHub https://github.com/danielnilsson9/bbs-fw/issues/162#issuecomment-1676033507, or unsubscribe https://github.com/notifications/unsubscribe-auth/BB4GEFOAA6D3TRXDWRDUL7TXU7ALNANCNFSM6AAAAAA3OAPQNQ . You are receiving this because you authored the thread.Message ID: @.***>

danielnilsson9 commented 1 year ago

You probably have done this correctly but I just want to confirm you are power cycling the controller after clicking flash button, some people forgot this step.

I do it with my switch one the battery, if you don't have a battery switch you will have to disconnect the battery or the programming cable.

Leave disconnected for at least 5 seconds

jonaslechot commented 1 year ago

yes i know that I need to drain the leftover capacitor charge before restarting. i can switch off through the smart bms app. but first I need to qaot for the new module. I saw that the components on the pcb look different

On Sun, 13 Aug 2023, 08:53 Daniel Nilsson, @.***> wrote:

You probably have done this correctly but I just want to confirm you are power cycling the controller after clicking flash button, some people forgot this step.

I do it with my switch one the battery, if you don't have a battery switch you will have to disconnect the battery or the programming cable.

Leave disconnected for at least 5 seconds

— Reply to this email directly, view it on GitHub https://github.com/danielnilsson9/bbs-fw/issues/162#issuecomment-1676254834, or unsubscribe https://github.com/notifications/unsubscribe-auth/BB4GEFOQNX25YKNCHPUIWXDXVB2V5ANCNFSM6AAAAAA3OAPQNQ . You are receiving this because you authored the thread.Message ID: @.***>

danielnilsson9 commented 1 year ago

Alright yes that wierd, I have flash with many USB serial chips, CH340, CP2102 and FTDI. I hope Bafang haven't decided to make some changes...

aalm commented 1 year ago

thanks for the tip, I'll get another adapter and try. the one I have now is from pswpower (see picture)

I received BBS02 controller(750w 48v, fwiw.) last week from pswpower, and got no issues flashing it.

Does the stc-isp just keep looping with "Checking target MCU ...", when you press "Check MCU". or what does it actually do ? A simple switch you can flip does work well, while "too smart" BMS might cause issues with flashing I guess.

btw., as you replied via email, we don't actually see the picture here on github.

jonaslechot commented 1 year ago

it keeps checking mcu without success. i really think it's the usb adapter which is not good enough for flashing. since you ordered a controller from pswpower recently: have you also experienced pas disabling after modifying parameters through the configuration app or eggrider app ? i've configured bbs02 controllers for over 2 years now and never had any problems until now.

On Sun, 13 Aug 2023, 16:02 aalm, @.***> wrote:

thanks for the tip, I'll get another adapter and try. the one I have now is from pswpower (see picture)

I received BBS02 controller(750w 48v, fwiw.) last week from pswpower, and got no issues flashing it.

Does the stc-isp just keep looping with "Checking target MCU ...", when you press "Check MCU". or what does it actually do ? A simple switch you can flip does work for well, while "too smart" BMS might cause issues with flashing I guess.

btw., as you replied via email, we don't actually see the picture here on github.

— Reply to this email directly, view it on GitHub https://github.com/danielnilsson9/bbs-fw/issues/162#issuecomment-1676369490, or unsubscribe https://github.com/notifications/unsubscribe-auth/BB4GEFPMFPGOZV2PYLQMMILXVDNAZANCNFSM6AAAAAA3OAPQNQ . You are receiving this because you authored the thread.Message ID: @.***>

aalm commented 1 year ago

have you also experienced pas disabling after modifying parameters through the configuration app or eggrider app ?

No, I didn't try configuring it at all, and didn't even drive it before flashing bbs-fw, because throttle wasn't working with it. Flashing naturally didn't solve anything, as I found out with multimeter that my throttle was actually also broken, and I'm still waiting for replacement.