Bafang Canable Pro Master - discussion

This value in first row is calculated from Startup Angle & Cadence Signals (P1)

JavaScript:
        function calculateStartPulse(angle, signalsPerRotation) {
            if (angle === null || angle === undefined || signalsPerRotation === null || signalsPerRotation === undefined || signalsPerRotation <= 0 || angle < 0) {
                console.warn(`Cannot calculate Start Pulse: Invalid input (Angle: ${angle}, Signals: ${signalsPerRotation})`);
                return START_PULSE_MIN; // Return minimum valid value as default/fallback
            }
       
            // Calculate pulses per degree
            const pulsesPerDegree = signalsPerRotation / 360.0;
       
            // Calculate required pulses for the angle
            let calculatedPulses = Math.round(angle * pulsesPerDegree);
       
            // Clamp the result within the valid range (1-24)
            calculatedPulses = Math.max(START_PULSE_MIN, Math.min(START_PULSE_MAX, calculatedPulses));
       
            return calculatedPulses;
        }

No idea why.
How does it look compared to BESST ?
 
That column "start pulse" in the picture in my previous post has all "1" for all rows in that column which besst also showed months ago according to my notes.

With BBS01B canbus which has no torque sensor, in canable pro the torque table has the value's at "0" except for the position stancecoke mentioned, only that position shows "8" on my BBS01B for "start pulse". While the rest from that same column has zero's, so only the top position of that column "start pulse" has "8" in it.
I have not had connected the BBS01B canbus to old besst yet.
 
@mdi
I downloaded the changes you made to the program. For "assist limited" regarding the torque table, the value's are the same now like on my notes from besst. I also saved "assist limited" (without changing anything) and synced again, value's stayed the same so all seems ok. :bigthumb:
 
Last edited:
  • Like
Reactions: mdi
Last rls (v1.7) with:

  • speed limit enable param
  • error codes fix
  • controller state number preview
  • mechanical p1 params editable
  • spd table: bug fix, removed calculations, columns swap

Any option to increase the max amp (except physical shunt modding ofc 😅)?
 
Newbie here.
Bafang BBS01b 350w 36v on a Cube Analg 1x12 with VD618 display.
The conversion went well, a few tweaks needed to get motor to fit, and chainring spacing right.

But issues is the bike is too quick lol - it wants to keep pulling even in power 1 so wife ends up faster than me unless she stops pedalling or turning it to 0 and back up. Also I've seen 700w (!) being pulled which is a little more than I expected. So want to de-tune and expect it would just be limiting the current to lower values on the lower setting and setting max power to 15A as I expect its 18+ from the supplier.

I've ordered the varstrom cable and have that software but it looks quite limited. After finding you here, I've also ordered the can interface and cable and will see what I can tune!

I never realised the difference between the uart and can versions - doh.

Firstly, thanks to all for writing and updating this project - it is genuinely apprecaited.

Really, wanting to reduce the max current, and reduce the current per "level" so she can pedal at level 1 and not be pushed above, say, 12mph - but would rather not speed limit it per level. And also wanting the throttle to be able to smoothly apply plenty of power in any level so, say, if in level 1 at a junction and needs to pull out quick she can squeeze throttle and pedal and clear the junction. Not sure the best approach for this.

(Its to help with mobility as due to issues she can't always strain to accelarate or even pedal at all, so throttle is needed)

/joys of age lol
 
Last edited:
Sure, flashing the open source firmware ;)
There you can set currents that will let your motor melt within a minute :ROFLMAO:
I'm following your open source firmware theme. As I understand it, it's already ready, is there any instructions for installing it? I want to install it on my bafang M420
 
I'm following your open source firmware theme. As I understand it, it's already ready, is there any instructions for installing it? I want to install it on my bafang M420
 
Sadly the BB series is purely Cadence based and its all or nothing I'm afraid.

Its probably 10 years ago I had a BB motor and used Stefan Penhoff's suite of software to alter it and it could be subtly but not fully customised. I'm sure there maybe deriviatives of it if you follow the name.

We've got the same motor but uart rather than can and that works perfectly for her needs, so I'm sure it can be done.
As long as I can restrict amps per "level" and max amps then that'll be fine for the pedalling and is likely the config on the uart version.

That software is the one I'm familiar with and didn't realise the newer can motors were different until too late to swapuming
(I'm assuming the software on this thread will work for at least some of the bb params? The varstrom software looks v basic but would probably suffice I guess!)

Looking forward to my aliexpress deliveries to test out :)
 
Strange because i logged some months ago the besst calibration of a M400 position sensor:

82454892651 ID:85F83501 DLC:1 Data:00
82458867992 ID:85106200 DLC:0 Data:
82458868760 ID:82026200 DLC:0 Data: => (Operation: Acknowledge OK)
82468110554 ID:85F83501 DLC:1 Data:00 (Repeated 14 times)

according to github 0x6201 is "clear_Hmi_Total_Mileage".

For the torque sensor calibration done by besst:
82864641147 ID:85F83501 DLC:1 Data:00
82869269403 ID:85106101 DLC:0 Data:
82869372405 ID:85106101 DLC:0 Data: (Repeated 2 times)
82884976157 ID:85F83501 DLC:1 Data:00 (Repeated 21 times)
 
Last edited:
Last edited:
I briefly looked at the new changes. The "sniffer" tab is a great addition! I like it that you can add a "new filtered ID ". It then shows up in the "filters on" area.
Great if you have a can torque sensor that floods the sniffer log window every 10ms. And if i want to see it again in the sniffer log window i can just drag that ID from the "filters on" area in to the "filters off" area and it shows up again in the sniffer log window.
Also if in the log window is an ID that you do not want to see, you can just select it and copy it from the log window and past it in "new filtered ID".

I have a few ID's that i needed to add to be always in place so i added them to the filter list in main.js this way i do not have to reenter them with each new start from the program.

Under the "debug" tab, i left it at "controller" and i filled in 60 and 01 (softw vers.) and then clicked "sync custom". It reads the version correct but at the same time it shows "error". But after that error line it shows the softw version and below it, "ACK: read 96/1 successful. See picture below.
error read softwVers but read is ok.jpg
 
  • Like
Reactions: mdi
Under the "debug" tab, i left it at "controller" and i filled in 60 and 01 (softw vers.) and then clicked "sync custom". It reads the version correct but at the same time it shows "error". But after that error line it shows the softw version and below it, "ACK: read 96/1 successful. See picture below.
The main idea of that function was to use with frames that are not handled by main program. But ok it's now fixed in last commit.
 
Last edited:
I have a few ID's that i needed to add to be always in place so i added them to the filter list in main.js this way i do not have to reenter them with each new start from the program.
Maybe in the future i will store this filters in browser cookies.
 
The main idea of that function was to use with frames that are not handled by main program. But ok it's now fixed in last commit.
Works fine now and again thanks for all the additions!

i noticed a minor bug which is there from the beginning but i always forgot to mention. Under display tab, if you press display button "+" the "button status" changes to "pressed " with each "+" button click. But "button status" does not change when pressing minus button.

Small request, suggestion.
- Under the "display tab", maybe the "Set current time" can be moved to / under "Time settings".

- In the "debug window", adding 6011 and 6012 to the description in the -- Select parameter Block --. Which make it more easy for people who are accustomed to 6011 and 6012 block naming.

Set current time.jpgSelect parameter block.jpg
 
  • Like
Reactions: mdi
I sometimes search for the term bafang canable pro. And this showed up today (Aliexpress wiki) which is a module with that name but using 500kbps for bafang canbus and according to the article used with BBSxx canbus ?? I never heard of 500kbps and those weird ID's for bafang canbus. Or am i missing something?
 
i noticed a minor bug which is there from the beginning but i always forgot to mention. Under display tab, if you press display button "+" the "button status" changes to "pressed " with each "+" button click. But "button status" does not change when pressing minus button.
Frame 6300 have data only for hold of + button.
 
OK, added, but this is not working with DPC245.
So not with DPC245. And i checked, also NOT with DPC18 (checked 2 different hardw versions).
But it does work with DPC080 and 010.
Tested 2 DPC010 display's, one of them, the "button status down" stayed for second or 2 at "pressed" although i did release it. Nice check, now you can see if a button can cause problem in future, which is not uncommon for 010.
 
Last edited:
Back
Top