Bafang 850C color LCD -- Flexible OpenSource firmware

Get all your technical information about electric bikes here.
casainho   1.21 GW

1.21 GW
Posts: 3826
Joined: Feb 14 2011 2:43pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by casainho » Aug 20 2019 10:00am

Eggybert wrote:
Aug 20 2019 9:58am
You can get the micro controller to start running after flashing?
What do you use for flashing the firmware?
Follow the wiki instructions to flash the firmware.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

Eggybert   1 mW

1 mW
Posts: 14
Joined: Aug 18 2019 3:20pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by Eggybert » Aug 20 2019 10:07am

I see you released 0.4.0.
Do I use the for bootloader or without?

casainho   1.21 GW

1.21 GW
Posts: 3826
Joined: Feb 14 2011 2:43pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by casainho » Aug 20 2019 10:11am

Eggybert wrote:
Aug 20 2019 10:07am
I see you released 0.4.0.
Do I use the for bootloader or without?
I you already erased the original firmware, then use the Bafang_LCD_850C_firmware-v0.4.0.bin
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

Eggybert   1 mW

1 mW
Posts: 14
Joined: Aug 18 2019 3:20pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by Eggybert » Aug 20 2019 10:36am

For some reason I still cannot get the MCU to startup. Only when I use ST link to run the program I get the main screen.

casainho   1.21 GW

1.21 GW
Posts: 3826
Joined: Feb 14 2011 2:43pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by casainho » Aug 20 2019 11:23am

Eggybert wrote:
Aug 20 2019 9:58am
You can get the micro controller to start running after flashing?
What do you use for flashing the firmware?

my lcd syas HJ3218-01FPC-A2 on the flat ribbon cable
Follow this process to understand if the firmware is running and if the issue is on the LCD:

viewtopic.php?f=2&t=97083#p1489403
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

Eggybert   1 mW

1 mW
Posts: 14
Joined: Aug 18 2019 3:20pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by Eggybert » Aug 20 2019 11:35am

casainho wrote:
Aug 20 2019 11:23am
Eggybert wrote:
Aug 20 2019 9:58am
You can get the micro controller to start running after flashing?
What do you use for flashing the firmware?

my lcd syas HJ3218-01FPC-A2 on the flat ribbon cable
Follow this process to understand if the firmware is running and if the issue is on the LCD:

viewtopic.php?f=2&t=97083#p1489403
Then it still is strange that when I use st-link to start the MCU the screen works fine. Only mirrored

casainho   1.21 GW

1.21 GW
Posts: 3826
Joined: Feb 14 2011 2:43pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by casainho » Aug 20 2019 11:39am

Eggybert wrote:
Aug 20 2019 11:35am
casainho wrote:
Aug 20 2019 11:23am
Eggybert wrote:
Aug 20 2019 9:58am
You can get the micro controller to start running after flashing?
What do you use for flashing the firmware?

my lcd syas HJ3218-01FPC-A2 on the flat ribbon cable
Follow this process to understand if the firmware is running and if the issue is on the LCD:

viewtopic.php?f=2&t=97083#p1489403
Then it still is strange that when I use st-link to start the MCU the screen works fine. Only mirrored
Can't help more while you don't answer clear to my suggestions.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

Eggybert   1 mW

1 mW
Posts: 14
Joined: Aug 18 2019 3:20pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by Eggybert » Aug 20 2019 11:41am

Ok tests so far:
When I press short power on the screen goes white.
When I hold the power the screen goes dimmed and off.
I also looks like when the screen is white and when I press + and power I have to hold the power button long twice to shut down (tested multiple times).
I reinstalled the flat cable with no change.

There is no power assist from the motor in any way.

I think the motor is flashed, when I check with STVP the firmware was the same as the bin file.
I checked the wiring. This is how the wiki told me to splice the cable.

LCD - > motor (6 pin version)
Bown -> Green
Orange -> White
Black - Black
Green -> Brown
White -> Orange

There is no brake sensor
No temperature sensor (yet)
And the torque sensor is not calibrated

immu   1 µW

1 µW
Posts: 1
Joined: Aug 19 2019 2:06pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by immu » Aug 23 2019 11:30am

Eggybert wrote:
Aug 20 2019 11:41am
Ok tests so far:
When I press short power on the screen goes white.
When I hold the power the screen goes dimmed and off.
I also looks like when the screen is white and when I press + and power I have to hold the power button long twice to shut down (tested multiple times).
I reinstalled the flat cable with no change.

There is no power assist from the motor in any way.

I think the motor is flashed, when I check with STVP the firmware was the same as the bin file.
I checked the wiring. This is how the wiki told me to splice the cable.

LCD - > motor (6 pin version)
Bown -> Green
Orange -> White
Black - Black
Green -> Brown
White -> Orange

There is no brake sensor
No temperature sensor (yet)
And the torque sensor is not calibrated
I have just ended up in an exacltly similar situation. The only difference is that I have an 8 pin version of the motor, wiring as instructed in the wiki. 850c firmware version 0.4.0 (tried 030 too but same with that). Motor firmware version 0.19. Both flashed ok I think (redid many times.)

My motor is not on a bike yet so can't check whether it assists or not, with the instructions mentioned above. Tried to unplug/replug the orange wire too. Any suggestions on how to find out whether the problem is on the motor or lcd with the motor on my table...?

Thanks!

User avatar
eyebyesickle   10 kW

10 kW
Posts: 697
Joined: Apr 07 2015 9:28pm
Location: Nashville

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by eyebyesickle » Aug 25 2019 7:28pm

Hi,

Little bit of input, as petty as it may be.

Can we change the quick adjust buttons in the future? since we already have this:

LONG UP - is already lights
LONG DOWN - is already walk

and considering one has to be careful not to make a long press on accident while rapidly adjusting assist level maybe we can change to:

SHORT UP + LONG UP - max power configuration
SHORT DOWN + LONG DOWN - graph data
LONG UP+DOWN - full menu

this way there is no chance to accidentally turn off. just power to leave the options once you pick. it is also A LOT EASIER to short+long press the same button, then try to hit two - especially on the fly.

Also, was thinking for the configuration menu, a couple suggestions

1) LOOP (up on top option brings to bottom of menu, while down on bottom option brings back to top of menu)
2) SHORT UP + LONG UP - quick scroll up ||| SHORT DOWN + LONG DOWN - quick scroll down
3) instead of looping the menu (1) and quick scroll (2), you also could create a HEADER MENU with the titles - WHEEL SPEED/BATTERY/BATTERY SOC/ASSIST LEVEL/WALK ASSIST LEVEL/ ETCETC all being SUB MENUS. Of course i don't know the work or space in code this takes, but just seems like a natural evolution of menu options... This might be best if possible - since you may want to add more menu options going forward, and it already is very long and takes a while to scroll through. ok thats my pretext for suggesting more menu options below (hehe sorry)
3) Add 'GRAPH MODE' - with SIMPLE/ADVANCED option - where simple mode leaves off the more advanced motor ERPS/FOC/FUTY CYCLE etc...
3a) consider GRAPH MENU instead - where you go through each graph and turn on or off... it can still calculate in background, but will not take user time to cycle through, as many wont need this
4) add 'GRAPH VIEW' - with MANUAL/SLIDE - where manual is what you set it, and SLIDE switches graphs every few seconds...
5) I see you can choose under TEMP SENSOR - disable,temperature sensor,throttle - so why not just have throttle enabled is temp sensor is disabled? is this for safety to prevent haywire throttle reading propelling the bike? just curious, no big deal here
6) now I am being super super petty, but since 'experimental high candence' is too long to show when you pick motor type(i.e. 36v/48v/exper) maybe consider changing the name to 'O/D' for overdrive? hehehe you may know I am fond of that phrase.

i know I am late to the game and might be a nuisance with all this, I am sure it is considered, so let me know if I should zip it with my big ideas :lol: you know I am a fan! just putting in some two cents! I don't really have any expertise but from what I think I understand, I hope those suggestions would not be toooo hard to implement, and put a bit of thought into field usage.

Thanks! and great work!!!!

casainho   1.21 GW

1.21 GW
Posts: 3826
Joined: Feb 14 2011 2:43pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by casainho » Aug 25 2019 11:11pm

Eggybert wrote:
Aug 20 2019 11:41am
Ok tests so far:
When I press short power on the screen goes white.
When I hold the power the screen goes dimmed and off.
I also looks like when the screen is white and when I press + and power I have to hold the power button long twice to shut down (tested multiple times).
I reinstalled the flat cable with no change.

There is no power assist from the motor in any way.

I think the motor is flashed, when I check with STVP the firmware was the same as the bin file.
I checked the wiring. This is how the wiki told me to splice the cable.

LCD - > motor (6 pin version)
Bown -> Green
Orange -> White
Black - Black
Green -> Brown
White -> Orange

There is no brake sensor
No temperature sensor (yet)
And the torque sensor is not calibrated
So, do you see any time the screen working as expected? Do you see anytime the image on screen as expected?

When the screen is white, is the motor working as expected if you pedal?
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

Eggybert   1 mW

1 mW
Posts: 14
Joined: Aug 18 2019 3:20pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by Eggybert » Aug 25 2019 11:25pm

casainho wrote:
Aug 25 2019 11:11pm

So, do you see any time the screen working as expected? Do you see anytime the image on screen as expected?

When the screen is white, is the motor working as expected if you pedal?
This is the first time I tried to use the openSource firmware so I'm not really sure how the screen should work.
Pressing the buttons seems to do something like it want to go in settings and switch on and off normally but not sure.

The screen never has any image, just plain white.

The motor never worked, but also this is the first time with the new firmware.

I will try to go to the openSource firmware for the LCD5 and check if everything is working as it should.

casainho   1.21 GW

1.21 GW
Posts: 3826
Joined: Feb 14 2011 2:43pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by casainho » Aug 26 2019 1:48am

Eggybert wrote:
Aug 25 2019 11:25pm
casainho wrote:
Aug 25 2019 11:11pm

So, do you see any time the screen working as expected? Do you see anytime the image on screen as expected?

When the screen is white, is the motor working as expected if you pedal?
This is the first time I tried to use the openSource firmware so I'm not really sure how the screen should work.
Pressing the buttons seems to do something like it want to go in settings and switch on and off normally but not sure.

The screen never has any image, just plain white.

The motor never worked, but also this is the first time with the new firmware.

I will try to go to the openSource firmware for the LCD5 and check if everything is working as it should.
Just turn on the 850C, let the screen be all white and try ride. See if you feel you have motor assistance. Try click up and down buttons to see if the assistant power increases/decreases.

The idea is to find if the motor and the 850C is working even if the display is all white.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

Eggybert   1 mW

1 mW
Posts: 14
Joined: Aug 18 2019 3:20pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by Eggybert » Aug 26 2019 9:41am

There was no assist from the motor. Even when I pressed + multiple time.

Eggybert   1 mW

1 mW
Posts: 14
Joined: Aug 18 2019 3:20pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by Eggybert » Aug 26 2019 12:16pm

I just flashed the motor with the stancecoke version and original LCD5 display and the motor is working as normal again.

casainho   1.21 GW

1.21 GW
Posts: 3826
Joined: Feb 14 2011 2:43pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by casainho » Aug 26 2019 12:19pm

Exactly which firmware file did you flash on 850C?
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

Eggybert   1 mW

1 mW
Posts: 14
Joined: Aug 18 2019 3:20pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by Eggybert » Aug 26 2019 12:28pm

From this page: https://github.com/OpenSource-EBike-fir ... D/releases
Version: Bafang_LCD_850C_firmware-v0.4.0.bin
Aslo tried: Bafang_LCD_850C_firmware-v0.3.0.bin

I already erased the bootloader just before the bootloader version came out.

casainho   1.21 GW

1.21 GW
Posts: 3826
Joined: Feb 14 2011 2:43pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by casainho » Aug 26 2019 1:24pm

Eggybert wrote:
Aug 26 2019 12:28pm
From this page: https://github.com/OpenSource-EBike-fir ... D/releases
Version: Bafang_LCD_850C_firmware-v0.4.0.bin
Aslo tried: Bafang_LCD_850C_firmware-v0.3.0.bin

I already erased the bootloader just before the bootloader version came out.
Ok, that is good.

Is the clock ok after you turn on the power again?

I wounder why is the 850C rebooting. Can you try to increase the automatic turn of time to some very high value??
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

Eggybert   1 mW

1 mW
Posts: 14
Joined: Aug 18 2019 3:20pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by Eggybert » Aug 26 2019 1:34pm

Sorry I read you post wrong.
At the moment the motor is flashed with https://github.com/stancecoke/TSDZ2-Sma ... splay/wiki

And the orginal lcd5 screen is mounted back and the motor work normal.

Depp   1 µW

1 µW
Posts: 1
Joined: Sep 02 2019 10:57am

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by Depp » Sep 02 2019 11:11am

Hi. Can I perform this procedure with my display? I have a Bafang HD motor. The display board is a little different. I disassembled the display due to a problem with the DY transistor.
Attachments
1.jpeg
1.jpeg (103.17 KiB) Viewed 1084 times
2.jpeg
2.jpeg (107.86 KiB) Viewed 1084 times

casainho   1.21 GW

1.21 GW
Posts: 3826
Joined: Feb 14 2011 2:43pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by casainho » Sep 02 2019 12:20pm

Depp wrote:
Sep 02 2019 11:11am
Hi. Can I perform this procedure with my display? I have a Bafang HD motor. The display board is a little different. I disassembled the display due to a problem with the DY transistor.
I don't know.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

James Broadhurst   10 W

10 W
Posts: 73
Joined: Nov 10 2016 3:29pm
Location: Oxford, England

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by James Broadhurst » Sep 05 2019 4:28am

Is there a wiki which explains how to configure 0.4.0? I pressed simultaneously both down and up buttons and that got me into the configuration but, for example, I can’t find how to set the 36v motor up with a 48v battery.

Everything appears to be working fine. I built the 850C display connector so it uses the same as the LCD3 and I wondered if the configuration data stored for the LCD3 was picked up by the 850C?

I thought the 850C was just the portrait version of the LCD3’s landscape display until I tried it! The graph isn’t a gimmick, it is really useful.

The throttle doesn’t work and I can’t get more than 250w power on the configuration menu but that might be the on-road value; the off-road must be the previous LCD3 value of 500watts because that is what the motor operates at. Also I couldn’t flash the 850C with the .bin software using the ST software I used for the LCD3; by accident I came across a comment in a post here that another ST programme, STM32 ST-Link Utility, should be used which worked.

I’ve now travelled 1,800 miles with the LCD3 and it’s fantastic. (Versions 18.2 and 19.0) If the same logic has been applied to boost as to the general power applied on start up which I think is subtle, then it’s no surprise that the blue gear “problems” have gone. The other bike with a 48v battery driving an old 36v motor has done 600 miles and is brilliant. You really have turned pigs ears into silk purses!

arka   1 mW

1 mW
Posts: 10
Joined: May 19 2018 11:27am

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by arka » Sep 08 2019 3:00am

IMG_0438.jpg
IMG_0438.jpg (479.56 KiB) Viewed 998 times
- Felt redemption 3 HUB:
Sabvoton SVMC72100 (M)
Mxus v3 3K-Turbo 16x4T
67V 16s16p Sanio GA
EV Computer
- Giant Yukon FX 2 MID:
TSDZ2 750W
13s5p 48V 17,5Ah 840Wh Sanyo NCR18650GA

casainho   1.21 GW

1.21 GW
Posts: 3826
Joined: Feb 14 2011 2:43pm

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by casainho » Sep 08 2019 12:27pm

The information shown on main screen is fixed but only the variables in graph can be changed and on this way, you can see the motor temperature there. I hope you did read the wiki page that says this:

https://github.com/OpenSource-EBike-fir ... figuration

Keys combinations:
on main screen:
UP + DOWN buttons click to enter configurations screen. ON/OFF long click to leave.
ON/OFF + UP buttons click to enter max power configuration (motor power field will blink). ON/OFF long click to leave.
ON/OFF button click + long click to select graph data variable (graph title will blink) and UP or DOWN buttons to choose new graph data variable. ON/OFF long click to leave.
on configurations screen:
UP or DOWN buttons click to scroll. ON/OFF click to edit field and ON/OFF long click to leave.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

arka   1 mW

1 mW
Posts: 10
Joined: May 19 2018 11:27am

Re: Bafang 850C color LCD -- Flexible OpenSource firmware

Post by arka » Sep 08 2019 12:44pm

thank you. I didn't notice this topic in wikipedia. I have another more serious problem with the temperature sensor installed. On LCD3 it works very well, but on 850C the temperature is not shown, I showed it in the video below:
https://youtu.be/Jg81CbfcDCc
- Felt redemption 3 HUB:
Sabvoton SVMC72100 (M)
Mxus v3 3K-Turbo 16x4T
67V 16s16p Sanio GA
EV Computer
- Giant Yukon FX 2 MID:
TSDZ2 750W
13s5p 48V 17,5Ah 840Wh Sanyo NCR18650GA

Post Reply