TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

andyme said:
haha...all this i knew...my question came from the fact that i do not know how to download it.... :lol:

what do i need to do? with the other releases, you klick on them and they download automatically. when i click here, the file opens...and i do not see how to download...so this is why i am asking...

Oh sorry! I think the best way for now, until it is an official version and release, is to download my whole repo on GitHub as zip. Then go to the release folder and pick the correct hex.
 
What incredible work! I'd gotten frustrated with my TSDZ2 and now thanks to your hard work and generosity, it'll be like a new motor.
The fact that these folks post a manual and the ease of working on these motors makes it a major competitor for BBS01B and 02B.

Bafang STILL hasn't released a proper parts list and breakdown for users, much less to resellers. I've never felt so unsupported. But I digress. This may be the competitor that snatches more of a market share.

Again, thanks all for the advancements!
 
buba said:
andyme said:
haha...all this i knew...my question came from the fact that i do not know how to download it.... :lol:

what do i need to do? with the other releases, you klick on them and they download automatically. when i click here, the file opens...and i do not see how to download...so this is why i am asking...

Oh sorry! I think the best way for now, until it is an official version and release, is to download my whole repo on GitHub as zip. Then go to the release folder and pick the correct hex.

up and running...so cool! now i just need to get rid of my cold and the rain needs to stop... :thumb:
 
buba said:
casainho said:
On 850C firmware, I went a bit further:

Code:
struct_var_number lcd_var_number =
  {
    .p_var_number = &p_configuration_variables->ui8_wheel_max_speed,
    .ui8_size = 8,
    .ui8_number_digits = 2,
    .ui8_decimal_digit = 0,
    .ui32_max_value = 99,
    .ui32_min_value = 1,
    .ui32_increment_step = 1
  };

  item_var_set_number(&lcd_var_number, p_menu_data);

I created a function that increases or decreases a specific variable, with a min and max values, and with a specific step rate. Maybe this can be ported to KT-LDC3 to improve current code and maybe I should add that feature of increase/decrease automatically x10 with a button long press. If I do it, I will use the same code for LCD3 and 850C.

I like that modular setup. Having every variable clearly defined (min/max/increment/decimal and so on) would make the code so much simpler, better and easier to debug. Good way to start with the 850C!
I am now waiting for your pull request to follow next steps.

Here, I just developed the automatic fast increment/decrement of configuration variables with button long click event:

[youtube]Yzm15G8m048[/youtube]
 
casainho said:
buba said:
casainho said:
On 850C firmware, I went a bit further:

Code:
struct_var_number lcd_var_number =
  {
    .p_var_number = &p_configuration_variables->ui8_wheel_max_speed,
    .ui8_size = 8,
    .ui8_number_digits = 2,
    .ui8_decimal_digit = 0,
    .ui32_max_value = 99,
    .ui32_min_value = 1,
    .ui32_increment_step = 1
  };

  item_var_set_number(&lcd_var_number, p_menu_data);

I created a function that increases or decreases a specific variable, with a min and max values, and with a specific step rate. Maybe this can be ported to KT-LDC3 to improve current code and maybe I should add that feature of increase/decrease automatically x10 with a button long press. If I do it, I will use the same code for LCD3 and 850C.

I like that modular setup. Having every variable clearly defined (min/max/increment/decimal and so on) would make the code so much simpler, better and easier to debug. Good way to start with the 850C!
I am now waiting for your pull request to follow next steps.

Here, I just developed the automatic fast increment/decrement of configuration variables with button long click event:

[youtube]Yzm15G8m048[/youtube]

so cool... must have been "userfriendliness weekend".. :bigthumb: :lol:

casainho: what 4 of the 5 soldering pads of the 850 C do you need for the ST-LINK and what are they to be connected to on the dongle? starting from the one that is labeled "GND" as number "1" and "5" being the one in the outer right corner...i would love to prepare my 850C and then close it.
 
I developed the automatic fast increment/decrement of configuration variables with button long click event, for KT-LCD3:

[youtube]cnrkp1wmjEA[/youtube]

andyme said:
casainho: what 4 of the 5 soldering pads of the 850 C do you need for the ST-LINK and what are they to be connected to on the dongle? starting from the one that is labeled "GND" as number "1" and "5" being the one in the outer right corner...i would love to prepare my 850C and then close it.
Wiki need to be updated with info for 850C, meanwhile see here: https://github.com/OpenSource-EBike-firmware/Color_LCD/wiki/Bafang-850C#Flash_and_debug
 
casainho said:
I developed the automatic fast increment/decrement of configuration variables with button long click event, for KT-LCD3:

[youtube]cnrkp1wmjEA[/youtube]

andyme said:
casainho: what 4 of the 5 soldering pads of the 850 C do you need for the ST-LINK and what are they to be connected to on the dongle? starting from the one that is labeled "GND" as number "1" and "5" being the one in the outer right corner...i would love to prepare my 850C and then close it.
Wiki need to be updated with info for 850C, meanwhile see here: https://github.com/OpenSource-EBike-firmware/Color_LCD/wiki/Bafang-850C#Flash_and_debug

thank you!

2 things: video cannot be seen "video not available" the 850 video works
and: is NRST same as RST?
 
casainho said:
The LCD model research phase already ended for me -- I had in consideration opinion of others, like professionals that had being selling ebikes with Bafang motors.

Since unfortunately I am being almost alone in development, I guess we will stick with the 850C model. If there were other developers helping, then all this could be different.

I invested a lot of money and time already for researching the LCD model, I will not be back and do it again. I hope that I will do it again when start to be common on the market models with Bluetooth included.

Just an update on the 750C. As you know this display is the same architecture as the 850C but with horizontal orientation and better buttons. It also has 4 buttons instead of 3 but is lacking the USB port of the 850C. I just wanted update you that the Bluetooth version of this display is now shipping. It is about $25 more than the regular 750C.
 
andyme said:
2 things: video cannot be seen "video not available" the 850 video works
and: is NRST same as RST?
Yes, NRST = RST.

Here video video:
[youtube]cnrkp1wmjEA[/youtube]
 
casainho said:
andyme said:
2 things: video cannot be seen "video not available" the 850 video works
and: is NRST same as RST?
Yes, NRST = RST.

Here video video:
[youtube]cnrkp1wmjEA[/youtube]

Maybe of Interest for some people: what is the plan: keep lcd3 alive like 850c or will updates not follow once 850 is released
 
andyme said:
Maybe of Interest for some people: what is the plan: keep lcd3 alive like 850c or will updates not follow once 850 is released
I will focus on 850C but I still have ebikes with LCD3 so I still have interest on LCD3. I think firmware on LCD3 is mostly complete and would be great if other developers can improve, just like Buba did. I think LCD3 is nice because is cheaper than 850C and is enough for some users/applications.
 
linklemming said:
1. I can now build my own software so Im willing to try stuff for 48V motor if someone could let me know what parameters to try. Im also literate in software/firmware as its my profession and I spend all day analyzing and testing code (spent 20 years prior in coding/development).

2. The high human power values, still confuse me, I have been thru all the code/calculations and all looks good. Basically it just seems twice as high as it should. Just out of curiosity...from researching torques sensors like those available thru grin technologies, it appears that some only measure one pedals force and some measure from both pedals. Could this somehow be the issue?

In the end, I dont think it really matters as the power calculation is measuring work, if its off by a factor of x, thats fine. The possible issue is that the default assist multipliers seem to try be very close to those of the bosch unit but could be off if the actual power is not the same as what the bosch is measuring. From todays ride analysis, I think I am going to try lower assist multipliers like jbalat has recommended. Im basically going to just cut them(defaults) in half and see how that works. The default values just seem too 'all or nothing'. I can definately feel difference between assist 1(0.5) and 2(1.0) but 3-5(1.5,2.0,2.5) seem the same unless I intentionally barely use the pedals (low cadence, low pressure). Some might like that but it seems off to me and nothing like my brose equipped bike.
Thanks for looking at the code and help improve.

1. See here, would be great if we could implement proper magnetic field weakening control of the motor: https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/issues/11

2. This is real measures of another torque sensor, that has not a low pass filter (unlike TSDZ2 hardware that includes a low pass filter and smooths the signal):
index.php

See here: https://endless-sphere.com/forums/viewtopic.php?t=87870&start=150

At each cadence 1RPM, there should be 2 equal peak values of torque signal (not like on that picture, as that sensor outputs a lower value on the peak from left pedal). The low pass filter should smooth the peaks and make like a kind of continuous line, maybe the low pass filter gives the average of the signal??

Here is static torque sensor signal... I wish I had put bicycle on a stand and pedal continuous so we could see the signal... on the video we can see a kind of delay on the signal due to the low pass filter:
[youtube]1xiMbCerRKw[/youtube]
 
Rydon said:
Just an update on the 750C. As you know this display is the same architecture as the 850C but with horizontal orientation and better buttons. It also has 4 buttons instead of 3 but is lacking the USB port of the 850C. I just wanted update you that the Bluetooth version of this display is now shipping. It is about $25 more than the regular 750C.
Ok thanks. When you have a link for an online shop selling it, please share.
 
casainho said:
Rydon said:
Just an update on the 750C. As you know this display is the same architecture as the 850C but with horizontal orientation and better buttons. It also has 4 buttons instead of 3 but is lacking the USB port of the 850C. I just wanted update you that the Bluetooth version of this display is now shipping. It is about $25 more than the regular 750C.
Ok thanks. When you have a link for an online shop selling it, please share.

https://shop.gutrad.com/tft-farbdisplay-750c-navigation-bafang#Beschreibung

Maybe you use Google translate
 
andyme said:
https://shop.gutrad.com/tft-farbdisplay-750c-navigation-bafang#Beschreibung
Thanks. That is very expensive!!

Until someone is ready to full develop the mobile app, I think there is no advantage to go with the model.
 
casainho said:
andyme said:
https://shop.gutrad.com/tft-farbdisplay-750c-navigation-bafang#Beschreibung
Thanks. That is very expensive!!

Until someone is ready to full develop the mobile app, I think there is no advantage to go with the model.

this is the shop i purchased the DPC 18 . these goods are generally more expensive when purchased from german resellers. he says he is the first one to have it, but i don't know from when this statement is.

I think the main feature in this case is to integrate a navigation so that you can allocate your effort to the route.

when you spoke about bluetooth: did you think along such lines or was it more the intention to replace the dedicated display by a phone?
 
I implemented the clock time on Bafang 850C color LCD. The hours and minutes are setup on LCD configurations menu, on the Display section.

Now everything is working, all the data that is shown on KT-LCD3 + the clock time are working. What is missing is design so the final main screen can be developed.

[youtube]idfb1XvqRuY[/youtube]

andyme said:
when you spoke about bluetooth: 1. did you think along such lines or 2. was it more the intention to replace the dedicated display by a phone?
EndlessCadence was working on a hardware + firmware for 2.

I prefer to follow the market on hardware side, so I would try to use some popular LCD that includes Bluetooth.
 
casainho said:
I developed the automatic fast increment/decrement of configuration variables with button long click event, for KT-LCD3:

Very, very, nice! Looks and works so much better!

Off topic:

Just throwing ideas out here but has there been any thought to connecting a bluetooth module to the UART in the motor controller, like the HM-10 with BLE, and sending data to the display everyone already has: a smartphone?

You could have real time, elevation distance, navigation (API Google Maps/Apple Maps), GPS-speed for calibration and many more features. The HM-10 could fit inside the motor unit making it really compact. If you make a PCB with the HM-10 and a small power inverter for a USB-connection you could power the smartphone from the ebike battery on long trips. Cost for HM-10 is approximately 10 Euros or 10 dollars.

I know that there needs to be both an iOS and Android app developed but if there is interest I might be able to manage that. I have not looked at the entire source code and only just started to get involved into the Flexible Open Source Firmware the last couple of days. Therefore I would like to hear some thoughts about this.
 
casainho said:
I implemented the clock time on Bafang 850C color LCD. The hours and minutes are setup on LCD configurations menu, on the Display section.

Now everything is working, all the data that is shown on KT-LCD3 + the clock time are working. What is missing is design so the final main screen can be developed.

[youtube]idfb1XvqRuY[/youtube]

andyme said:
when you spoke about bluetooth: 1. did you think along such lines or 2. was it more the intention to replace the dedicated display by a phone?
EndlessCadence was working on a hardware + firmware for 2.

I prefer to follow the market on hardware side, so I would try to use some popular LCD that includes Bluetooth.

Have you guys just hacked the 850c display to work with the tsdz2 while I was a away (moving to a new place)?
Just found my new hero....
 
buba

Thank you for the much needed addition of Miles :) And also the trip distances. I didn't realise at first you had added two trips but once over the confusion it all became clear. Two things I would like to request though is that the trips are identified as 1 and 2 or a,b or something and also that both of them are re-set by short-long press down rather than one of them which resets when the display turns off which is frustrating if taking a short break.


I've now put a hundred miles on your beta and it seems to be working fine. Seriously thinking if it is worth modding my 850 c now as LCD 3 is all one needs with your impovements really. But no clock though.

Thanks again.
 
casainho said:
I implemented the clock time on Bafang 850C color LCD. The hours and minutes are setup on LCD configurations menu, on the Display section.

Hello Casainho,
Great work as usual :D :bigthumb:

I wonder IF you have seen they are selling TSDZ2 with 850C as display. Check the link

https://s.click.aliexpress.com/e/b5hbEKCD
 
That's a confusing spec though Bash as they are also calling it the DPC 18 and the 850c is a DPC14
 
Rafe said:
That's a confusing spec though Bash as they are also calling it the DPC 18 and the 850c is a DPC14

You are right it is confusing. But in their text and photos it is the 850c (DPC14)
 
andyme said:
casainho said:
andyme said:
2 things: video cannot be seen "video not available" the 850 video works
and: is NRST same as RST?
Yes, NRST = RST.

Here video video:
[youtube]cnrkp1wmjEA[/youtube]

Maybe of Interest for some people: what is the plan: keep lcd3 alive like 850c or will updates not follow once 850 is released

Hello, everyone. It’s been some weeks since my last visit. And now it is winter time, cold and rainy :-(

Nice to see the firmware is still improving as the 0.16 version was already awesome.

Casainho, is it already possible to download the version with your implementation of long click show in the video above ?

I’m also setting up a new bike for my wife with a 48v tsdz2. I have a 36v one, if I want to use the 48v battery on mine, do i only have to change the battery options (number of cells, cut off voltage, capacity) or also the motor type 1 or 0 for 36 or 48v ?

Thank you.

If you need some help for the wiki, and for a french translation i’m Still willing to help.
 
Hi gurus,

is anyone in a position to release v17 with the buba distance code and casainhos fast click stuff ?

I'm doing an install on my friends bike tomorrow and I would love to not have to flash it twice

Appreciate your help
JB :mrgreen:
 
Back
Top