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

Marco if your project is compatible with the stock displays then you have saved everyone lots of effort maybe you can make another fork on the smart ebike github and send us a link :bigthumb:
 
:bigthumb: :bigthumb: :bigthumb:
jbalat said:
Marco if your project is compatible with the stock displays then you have saved everyone lots of effort maybe you can make another fork on the smart ebike github and send us a link :bigthumb:
 
andrea_104kg said:
Marco Can You speak of The Project in The jobike italian forum?
Is it necessary to reflash The vldc5 ?

I will try to describe the project on jobike forum.... I have not tested with VLCD5, but I think it work, is not necessary reflash the display.
 
Rafe said:
I did that once on a ride spiked and it caught me out too and now it is winter and I'm wearing thick gloves I do it quite often and it's a flipping nuisance.. all that you have done is inadvertently limited the max power to 25watts which is too low for pedal assist to work.

Thanks Rafe and casainho!
 
Certainly the project can be modified and optimized.
I unfortunately in this period I have little time to devote to development, however I hope it is useful as a starting point for any improvements. :D :D :D

This is the link where I shared the project:
https://github.com/qmarco/TSDZ2-Smart-EBike-compatible-with-original-VlCD6-display
 
Hello Marcoq, I wait to follow your project on the Italian forum but in the meantime I would like to try your SW, just to understand since you have not released documentation, I just install your version 0.16.hex on the Tsdz2 and connect the VLCD6 and already it would work without further settings? then it will display: battery, speed, distance-ode with the possibility to configure the wheel circumference, 4 levels of assistance and then 6Km (up key) light on-off (down key). Let me know if I have it installed and I try.
 
marcoq said:
Certainly the project can be modified and optimized.
I unfortunately in this period I have little time to devote to development, however I hope it is useful as a starting point for any improvements. :D :D :D

This is the link where I shared the project:
https://github.com/qmarco/TSDZ2-Smart-EBike-compatible-with-original-VlCD6-display

Marcoq,

Many thanks for doing this effort :bigthumb: I just bought a bafang 850C display (havnt flashed it yet) but might just go this route instead. I really like a minimal cockpit and the huge displays in the center interfere with my lights and GPS unit.

What did you use to figure out the serial protocol?

I have a scope (RIGOL DS1054) and a logic analyzer, would that work.
 
zappan said:
Hello Marcoq, I wait to follow your project on the Italian forum but in the meantime I would like to try your SW, just to understand since you have not released documentation, I just install your version 0.16.hex on the Tsdz2 and connect the VLCD6 and already it would work without further settings? then it will display: battery, speed, distance-ode with the possibility to configure the wheel circumference, 4 levels of assistance and then 6Km (up key) light on-off (down key). Let me know if I have it installed and I try.

This project manages all the features of the motor as in version 0.16.0 of the firmware published by casainho, it is also compatible with the original VLCD6 display.
  - The monitoring of the battery level has been optimized as for the KT-LCD3.
  - The odometer is managed directly from the display.
  - Assistance levels are 5 (0..4 as in the original firmware).
  - Hold pressed down button switch on/off the lights.
  - Hold pressed up button activates the walk assist function "6km", but the speed can be changed according to the assistance level
set (the operating parameters can be changed in source code).
  - The wheel diameter is set by the display.
  - The firmware of the Controller is also compatible with the KT-LCD3 (to be verified because I do not have the KT-LCD3 display),
you must set in the source code "#define ENABLE_VLCD6_COMPATIBILITY 0" :D :D :D
 
Thanks for the information Marcoq, I am not a programmer so I will use the software as it is, as soon as I can install it and let you know.
:flame: :flame: :flame:
 
Here is the beta1 version for future v0.17.0. Please test and give feedback. On the next days I want to improve the wiki page for this version, as there are a lot of changes on the odometer field and they must be documented or users will not understand how to use it.

Download: https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/releases/tag/v0.17.0-beta1

Changes:
- implemented automatic fast increase/decrease of variables on configuration menus
- settable odometer
- trip distance function
- imperial units throughout the system
- saved menu state for all menus when power down
- flashing time on menu number and variables is now short -- it is easier to see the values

This beta release of firmware for KT-LCD3 works with the same previous TSDZ2 v0.16.0 firmware version:

TSDZ2-throttle-v0.16.0.hex
TSDZ2-v0.16.0.hex
 
marcoq said:
Certainly the project can be modified and optimized.
I unfortunately in this period I have little time to devote to development, however I hope it is useful as a starting point for any improvements. :D :D :D

This is the link where I shared the project:
https://github.com/qmarco/TSDZ2-Smart-EBike-compatible-with-original-VlCD6-display

Grazie Marcoq :bigthumb:
I flash and it works
I have not tried on the road but the engine runs, all the options provided by the VLCD6 including the walk assistant, the software is definitely that opensurce because the bike brakes the wheel backwards.
For the road test I will let you know in the meantime a huge thank you to Marcoq who released him.
some questions: you can indicate which settings you used in the wiki page settings, like power multiplier, off-road boost, cut off battery etc.
if you have set and then if you can use the high experimental cadence option of the menu 8 0 2, and if you have set for safety without cutt off brakes in the menu 8 1 0, thanks again.
 
casainho said:
Here is the beta1 version for future v0.17.0. Please test and give feedback. On the next days I want to improve the wiki page for this version, as there are a lot of changes on the odometer field and they must be documented or users will not understand how to use it.

Hi casainho. Will the new firmware 0.17 include a high cadence option for a 48 volt engine? Which did jbalat.
 
Kisazul said:
casainho said:
Here is the beta1 version for future v0.17.0. Please test and give feedback. On the next days I want to improve the wiki page for this version, as there are a lot of changes on the odometer field and they must be documented or users will not understand how to use it.

Hi casainho. Will the new firmware 0.17 include a high cadence option for a 48 volt engine? Which did jbalat.
No unless someone do that implementation and submit as a pull request.
 
The VLCD6 display is very essential.
You can change the assistance level while driving, walk assist level, turn the lights on or off, change the wheel diameter and finally change the maximum speed.
All other parameters (found on the KT-LCD3) can be changed directly in the microcontroller's eeprom.
To change the parameters in eeprom you must use the ST Visual Programmer program that you already know, and read the data by the DATA MEMORY tab.
For example, if you want to change the number of cells of the the battery, you will have to change the value contained in the address 0x00400E (DEFAULT_VALUE_BATTERY_CELLS_NUMBER) which by default is 10 (0x0A in hex).
To change the cutt off value of the battery, the parameters must be changed in the address 0x004005 and 0x004006, which by default will be 290 (29.0V), DEFAULT_VALUE_BATTERY_LOW_VOLTAGE_CUT_OFF_X10_1 = 1 (256) + DEFAULT_VALUE_BATTERY_LOW_VOLTAGE_CUT_OFF_X10_0 = 34.
To change the type of motor, the parameter must be changed in the address 0x00400A (DEFAULT_VALUE_CONFIG_1) which by default is set to 1 (36V).
To change the assistance levels factor, you need to change the parameters from the address 0x004013 (DEFAULT_VALUE_ASSIST_LEVEL_FACTOR_1) to address 0x004016 (DEFAULT_VALUE_ASSIST_LEVEL_FACTOR_4).
To change the walk assist (PWM Duty Cycle) factor, you need to change the parameters from address 0x004025 (DEFAULT_VALUE_WALK_ASSIST_PWM_DUTY_CYCLE_LEVEL_0) to address 0x004029 (DEFAULT_VALUE_WALK_ASSIST_PWM_DUTY_CYCLE_LEVEL_4).
These are just some examples .... attached you will find the mapping of the parameters resident in the eeprom, remember that they must be written in hexadecimal ..... also be very careful what you do !!!! :D :D :D

 
Marcoq thanks for the explanations, now I compare my hypostations and verify, but because as also said Andrea 104KG do not come to the Italian forum to give us a hand ... http://www.jobike.it/forum/topic.asp?TOPIC_ID=76426 Ciao
 
jbalat said:
I just installed version 16 on my friends bike and he wanted a high cadence version like mine.
His motor is 48v, so this version below will work on both motor types
He tested it for a minute or so and was quite happy. All I did was changed increased the motor speed cutoff limit and multiplied the normal FOC by about 1.4 to bring it in line with the 36v settings.

So changing the Normal FOC for 48V is easy enough to understand, you just changed ui32_l_x1048576 from 142 to 199

Im assuming for motor speed cutoff you just changed MOTOR_OVER_SPEED_ERPS_EXPERIMENTAL from 700 to ?

Is changing this overspeed necessary, I dont see anything in the code that implies its specific to the 36V motor.

Perhaps you just want even higher cadence?

Assuming this overspeed change isnt necessary, its super simple to add a experimental 48V high cadence motor type to the menus

In lcd.h line 1274 change
if (configuration_variables.ui8_motor_type > 2) { configuration_variables.ui8_motor_type = 2; }
to
if (configuration_variables.ui8_motor_type > 3) { configuration_variables.ui8_motor_type = 3; }

To add the new motor_type to thru the menu system

in motor.c line add the following lines after the 'case 2' statement on lines 1072 to 1075

case 3: // experimental high cadence mode for 48V motor
ui32_l_x1048576 = 149; // not confirmed yet for 48V motor
experimental_high_cadence_mode = 1;
break;

To use the new 48V high cadence motor type

I will be testing this on friday when I get my new 52V battery
 
marcoq said:
Hi guys.
I am Italian and I am new in this forum.
a few months ago I bought a TSDZ2 electric motor from PSWPOWER to be installed on my full-suspension bike. I must say that casainho and all the contributors present in this forum have done a great job for the development of the firmware for this engine. I have a display type VLCD6 also called "race", very small and compact, so I decided to implement the firmware 0.16, compatible with the VLCD6 display, but I think it is also compatible with the VLCD5 and the XH18. I implemented the communication protocol to dialogue with the display, many parameters present in the KT-LCD3 project I added them in the eeprom of the Controller project. I added the walk assist function because for me it is very important when I have to climb non-cycling paths. However, the firmware remains compatible with the KT-LCD3 just configure some "# define" that allow you to enable or disable parts of the code, some functions or settings.
The default settings are for a 36V system, of course they can be changed according to your needs.
That said tell me please if I have to attach my project in this forum.
Ciao.
Hi marcoq.

I understand the path you took and I do not agree with it because OEMs/shops are being asking me that and I understand they are kind of like TongSheng/other ebike producers that want final users locked/not able to change configurations of the system (I understand that limiting final user is part of a business model of an OEM/shop, so final user depends of them and will be back to shop when need any adjustment/configuration). My philosophy is different: give the final user power/flexibility and knowledge, so they can easily configure and choose for their needs. OEMs prefer that path you did follow were they configure the system and then is very hard for final user to change the options: quick change on LCD VS building some hardware do connect and use a software to configure.

Because adding more options to project bring even more complexity and so more risk in the quality and work to maintain, I prefer to keep current project as it is now, only for LCDs KT-LCD3 and Bafang color LCD 850C.
 
zappan said:
Marcoq thanks for the explanations, now I compare my hypostations and verify, but because as also said Andrea 104KG do not come to the Italian forum to give us a hand ... http://www.jobike.it/forum/topic.asp?TOPIC_ID=76426 Ciao

Hi zappan.
Three days ago I created an account in giobike.it, but the administrator has not activated it yet. :cry: :cry: :cry:
 
casainho said:
marcoq said:
Hi guys.
I am Italian and I am new in this forum.
a few months ago I bought a TSDZ2 electric motor from PSWPOWER to be installed on my full-suspension bike. I must say that casainho and all the contributors present in this forum have done a great job for the development of the firmware for this engine. I have a display type VLCD6 also called "race", very small and compact, so I decided to implement the firmware 0.16, compatible with the VLCD6 display, but I think it is also compatible with the VLCD5 and the XH18. I implemented the communication protocol to dialogue with the display, many parameters present in the KT-LCD3 project I added them in the eeprom of the Controller project. I added the walk assist function because for me it is very important when I have to climb non-cycling paths. However, the firmware remains compatible with the KT-LCD3 just configure some "# define" that allow you to enable or disable parts of the code, some functions or settings.
The default settings are for a 36V system, of course they can be changed according to your needs.
That said tell me please if I have to attach my project in this forum.
Ciao.
Hi marcoq.

I understand the path you took and I do not agree with it because OEMs/shops are being asking me that and I understand they are kind of like TongSheng/other ebike producers that want final users locked/not able to change configurations of the system (I understand that limiting final user is part of a business model of an OEM/shop, so final user depends of them and will be back to shop when need any adjustment/configuration). My philosophy is different: give the final user power/flexibility and knowledge, so they can easily configure and choose for their needs. OEMs prefer that path you did follow were they configure the system and then is very hard for final user to change the options: quick change on LCD VS building some hardware do connect and use a software to configure.

Because adding more options to project bring even more complexity and so more risk in the quality and work to maintain, I prefer to keep current project as it is now, only for LCDs KT-LCD3 and Bafang color LCD 850C.

Hi casainho.
Your work together with the other collaborators was excellent, my project was born for my need, I did not want to replace the original display because I did not need all the information like on the KT-LCD3.
For this reason I decided to make compatible the beautiful work you did on the motor with the original display, a need that I read by many members of the forum.
I believe that this project will not foresee major future developments, if not integrate any yours improvements to the motor management.
It is true that the system is not completely configurable from the display, but some parameters can only be modified using the ST Visual programmer software, I think this job can do even those who are not an experienced programmer, of course it will have to waste some time and have a little patience.
I simply wanted to share my need that I could have just for myself, but instead I decided to share with the "ecologist" community.
Forgive me for my english but I got help from the goole translator :) :) :)
 
Hi Marco, I think some users would be willing to try your version because they don't need to change the display. However if there were some app to change the settings then that would make it more user friendly.
I think the 2 versions can co-exist since some people want to see the data on the screen and change it in real time while others are happy to set and forget and rely on basic data.
BTW if your version is based on 16 then I assume the temperature sensor is also supported ?

Marco if you have some programming skills then appreciate if you can help close off some of the outstanding issues with the current firmware.
 
marcoq said:
zappan said:
Marcoq thanks for the explanations, now I compare my hypostations and verify, but because as also said Andrea 104KG do not come to the Italian forum to give us a hand ... http://www.jobike.it/forum/topic.asp?TOPIC_ID=76426 Ciao

Hi zappan.
Three days ago I created an account in giobike.it, but the administrator has not activated it yet. :cry: :cry: :cry:

Damn now I send him a private message :oops:
 
jbalat said:
Hi Marco, I think some users would be willing to try your version because they don't need to change the display. However if there were some app to change the settings then that would make it more user friendly.
I think the 2 versions can co-exist since some people want to see the data on the screen and change it in real time while others are happy to set and forget and rely on basic data.
BTW if your version is based on 16 then I assume the temperature sensor is also supported ?

Marco if you have some programming skills then appreciate if you can help close off some of the outstanding issues with the current firmware.

Hi jbalat.
I agree to that the two versions can coexist, I am a firmware programmer and I work in an electronics company, unfortunately I do not have much free time to develop firmware after work, however, without hurry I will try to create a software interface to program the parameters allocated in eeprom. :) :) :)
 
jbalat said:
Hi Marco, I think some users would be willing to try your version because they don't need to change the display. However if there were some app to change the settings then that would make it more user friendly.
I think the 2 versions can co-exist since some people want to see the data on the screen and change it in real time while others are happy to set and forget and rely on basic data.
BTW if your version is based on 16 then I assume the temperature sensor is also supported ?

Marco if you have some programming skills then appreciate if you can help close off some of the outstanding issues with the current firmware.

Hi jbalat
The temperature sensor should work, because it is managed directly by the casainho firmware, of course is not showed on VLCD6 display. :) :) :)
 
Back
Top