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

It s good to find this work
as i don t need all information, i ll try first this code with a VLCD5 asap .

that s a long time i see at this thread and it s true that the original tsdz2 firmware isn t good for me .

I actually use my TSDZ2 only for VTT at 14A ( it s suffisant for me and more mean you can t use all the potential of the motor because limitations of the original firmeware ) .

Sorry my english is soo bad that i can t explain all i would like .

For the future i ll probably buy a vlcd6 if all work because i only need a display as small as possible, the only thing i need but can t have whith this kind of display is the battery Volt "on the fly", it s the only information very usefull when you ride .
 
marcoq said:
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.

For easy configuration we have the Java tool in the Kunteng-Project. You don't have to bother with the ST Visual programmer software. Users without programming skills can use it easily, flashing is started with one mouse-click. The Java Tool creates the config.h, that contains all user relevant settings. The user-defined settings are used at startup, if no EEPROM-values are present. You can change the EEPROM values on the fly by the BluOsec-app (only for android), if you want.

It would be quite easy to make a Java Tool, that writes the settings directly to the EEPROM, but then the user would have to do two steps, flashing the firmware and flashing the EEPROM.

fetch.php


regards
stancecoke
 
stancecoke said:
marcoq said:
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.

For easy configuration we have the Java tool in the Kunteng-Project. You don't have to bother with the ST Visual programmer software. Users without programming skills can use it easly, flashing is started with one mouse-click. The Java Tool creates the config.h, that contains all user relevant settings. The user-defined settings are used at startup, if no EEPROM-values are present. You can change the EEPROM values on the fly by the BlueOsec-app (only for android), if you want.

68747470733a2f2f7777772e706564656c6563666f72756d2e64652f77696b692f6c69622f6578652f66657463682e7068703f773d38303026746f6b3d653461383939266d656469613d656c656b74726f746563686e696b3a63726f6d652d622e706e67


regards
stancecoke

Hi stancecoke.
Great job! thanks for your information! :bigthumb: :bigthumb: :bigthumb:
 
Hello guys!

I wonder IF the open source firmware Will still work IF i replace the inner motor of the TSDZ2 with a sensorless no hall motor?

Appreciate you input
Regards
 
marcoq said:
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 :) :) :)
I thought in improving TSDZ2 firmware to store all the variables in EEPROM so it could run without LCD, like you did. But that would be for when someone want to implement a mobile app and connect to TSDZ2 using an UART Bluetooth module.

If you want to submit small pull requests to add that functionality, I will accept on the project. But only if the final firmware works simultaneous with or without LCD, where a data can be sent to TSDZ2 firmware to change all the configuration variables.

And yes, anyone can develop a piece of software that edits the firmware hex file and change the default values of all the configuration variables.
 
casainho said:
marcoq said:
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 :) :) :)
I thought in improving TSDZ2 firmware to store all the variables in EEPROM so it could run without LCD, like you did. But that would be for when someone want to implement a mobile app and connect to TSDZ2 using an UART Bluetooth module.

If you want to submit small pull requests to add that functionality, I will accept on the project. But only if the final firmware works simultaneous with or without LCD, where a data can be sent to TSDZ2 firmware to change all the configuration variables.

And yes, anyone can develop a piece of software that edits the firmware hex file and change the default values of all the configuration variables.

I think changing the parameters allocated in eeprom even with a smartphone is a good idea. This would allow it to be independent of the display. of course there is a lot of work to do ... I do not know if any programmer in the forum has already done some apps for android or ios ... if there were he could give his contribution. For the moment ... when I have time I try to create a java interface for help user to read and write the parameters in eeprom ... this could be a starting point to achieve something more evolved. I believe that the collaboration of the various programmers of the forum can make an important contribution to the project. :) :) :)
 
marcoq said:
For the moment ... when I have time I try to create a java interface for help user to read and write the parameters in eeprom ...
You see, users do not need to flash EEPROM but only the firmware. Please implement in a way the software changes only the firmware HEX file, as the values that goes to EEPROM are the defaults values of the variables and are stored on the firmware file. This way is even simple to users.
 
casainho said:
marcoq said:
For the moment ... when I have time I try to create a java interface for help user to read and write the parameters in eeprom ...
You see, users do not need to flash EEPROM but only the firmware. Please implement in a way the software changes only the firmware HEX file, as the values that goes to EEPROM are the defaults values of the variables and are stored on the firmware file. This way is even simple to users.

Excuse me I probably expressed bad .... I meant that with the software will change the parameters in the program file .hex ..... and that may also correspond to the default parameters that the microcontroller writes in eeprom .... finally the user will flash the modified .hex file into microcontroller.
 
marcoq said:
casainho said:
marcoq said:
For the moment ... when I have time I try to create a java interface for help user to read and write the parameters in eeprom ...
You see, users do not need to flash EEPROM but only the firmware. Please implement in a way the software changes only the firmware HEX file, as the values that goes to EEPROM are the defaults values of the variables and are stored on the firmware file. This way is even simple to users.

Excuse me I probably expressed bad .... I meant that with the software will change the parameters in the program file .hex ..... and that may also correspond to the default parameters that the microcontroller writes in eeprom .... finally the user will flash the modified .hex file into microcontroller.
Ok. I never worked with HEX files, but the data should be there. I think you will have no problems.
 
marcoq said:
Hi jbalat
The temperature sensor should work, because it is managed directly by the casainho firmware, of course is not showed on VLCD6 display. :) :) :)

Cool !! Hey I saw a picture of a fan inside the motor housing. What if we we could also initiate the fan above 75 degrees so that the motor starts cooling down and prevents it reaching 85 degrees. We could hook the fan up to the light output ?
I will raise some change requests on github
Marco I hope you can help with some of these since you have already fixed the walk mode !!
 
elem said:
It s good to find this work
as i don t need all information, i ll try first this code with a VLCD5 asap .

Very interested in testing with VLCD5. Please let us know how it goes. :)
 
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.

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


I have hit a snag straight away in the configuration menu option 0. When MPH is selected the maximum speed and wheel circumference can not be increased, they can be lowered but not raised. Also the circumference reading is reduced (2050 to 1280) when MPH is selected by I assume a conversion ratio and there is no need for this.


The battery watt meter reads high by about a factor of 10. I haven't taken it out on the road but using it on throttle and kickstand with the 52v battery supplying about 1 amp the indicated motor watts is around 500w.


Before 17.0 beta I had it working perfectly on Buba's 16.1 beta except of course his version does not have the fast variable option. I have now reverted back to Buba's 16.1 and all working perfectly again including the motor watts reading but notice if the raise or lower button is pressed continuously for a time the variable can no longer be adjusted and is freed up by coming out and re-entering the configuration menu, so perhaps your beta has a legacy fault carried over from that . I must say though that the variable fast adjust you have introduced is a great improvement.

I hope this feedback is of some help to you Casainho.

Cheers
 
Rafe said:
I have hit a snag straight away in the configuration menu option 0. When MPH is selected the maximum speed and wheel circumference can not be increased, they can be lowered but not raised. Also the circumference reading is reduced (2050 to 1280) when MPH is selected by I assume a conversion ratio and there is no need for this.

The battery watt meter reads high by about a factor of 10. I haven't taken it out on the road but using it on throttle and kickstand with the 52v battery supplying about 1 amp the indicated motor watts is around 500w.

Before 17.0 beta I had it working perfectly on Buba's 16.1 beta except of course his version does not have the fast variable option. I have now reverted back to Buba's 16.1 and all working perfectly again including the motor watts reading but notice if the raise or lower button is pressed continuously for a time the variable can no longer be adjusted and is freed up by coming out and re-entering the configuration menu, so perhaps your beta has a legacy fault carried over from that . I must say though that the variable fast adjust you have introduced is a great improvement.

I hope this feedback is of some help to you Casainho.

Cheers

Hi Rafe,

Keeping it short: I am working on a version with minor bug fixes. Will be seen on GitHub soon. Planning to send a pull request to Casainho so he can look at the code. Can not promise anything but will look into the bugs you mentioned!

(Might add that I really like the new increment function!!)
 
buba said:
Keeping it short: I am working on a version with minor bug fixes. Will be seen on GitHub soon. Planning to send a pull request to Casainho so he can look at the code. Can not promise anything but will look into the bugs you mentioned!
Please make pull request for small changes -- try to solve one issue at a time and make a pull request with that.

Would be great if we could improve even more this firmware.
 
casainho said:
buba said:
Keeping it short: I am working on a version with minor bug fixes. Will be seen on GitHub soon. Planning to send a pull request to Casainho so he can look at the code. Can not promise anything but will look into the bugs you mentioned!
Please make pull request for small changes -- try to solve one issue at a time and make a pull request with that.

Would be great if we could improve even more this firmware.

The Pull Request is active now so waiting for your feedback and approval, Casainho. :)

Have not tried to reproduce this particular bug nor solve it in this Pull Request. Trying to keep the request simple:

Rafe said:
The battery watt meter reads high by about a factor of 10. I haven't taken it out on the road but using it on throttle and kickstand with the 52v battery supplying about 1 amp the indicated motor watts is around 500w.

But will look into it!
 
buba said:
The Pull Request is active now so waiting for your feedback and approval, Casainho. :)
Thanks, I will look at it tomorrow.
 
Casainho, I cant find the configuration howto for versions before v.17 on the wiki. It seems only .17 lcd configuration is there. Can you put the previous versions lcd configuration back in the wiki ? Or If on there can you point me to the url ? Thanks
 
Bartman said:
Casainho, I cant find the configuration howto for versions before v.17 on the wiki. It seems only .17 lcd configuration is there. Can you put the previous versions lcd configuration back in the wiki ? Or If on there can you point me to the url ? Thanks
There is no page for previous 0.16.
 
Is there one for 0.15 ? And are the parameters the same as .16 except for assist mulitiplier ?
 
buba said:
The Pull Request is active now so waiting for your feedback and approval, Casainho. :)
Thanks. I tested and seems to solve the other bugs noted before.

I did a release of v0.17.0-beta2 and I suggest everyone try and give feedback. There is no wiki page about previous v0.16.x version but there is for this new v0.17.x version.

Download: https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/releases/tag/v0.17.0-beta2
 
Hello !
Ok my STlink is working,
soo the only thing is writing the program memory with the hex file ?

Want to test marcoq improvment first before trying with LCD3 .

i don t know how modify "data memory " to make it usuable with stlink .

Sorry if my questions are " basique" but i never learn programing ...

have fun .
 
casainho said:
buba said:
The Pull Request is active now so waiting for your feedback and approval, Casainho. :)
Thanks. I tested and seems to solve the other bugs noted before.

I did a release of v0.17.0-beta2 and I suggest everyone try and give feedback. There is no wiki page about previous v0.16.x version but there is for this new v0.17.x version.

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

Hi

Nice. The previous faults on metric to imperial and fast variable set are all fixed. Setting up the configuration menu is now a doddle. :D

The fault I reported about the motor wattmeter reading high by a factor of 10 is still there though. I don't think I have made a mistake. I previously went back to Bubba's 16.1 from 17.0 Beta1 and took the bike on a 50 mile ride yesterday and the wattmeter was reading correctly but now I have flashed with 17.0 Beta2 it is reading 10x high again, the same as it did with 17.0 Beta1.


Thanks guys good stuff.
 
Rafe said:
Nice. The previous faults on metric to imperial and fast variable set are all fixed. Setting up the configuration menu is now a doddle. :D

The fault I reported about the motor wattmeter reading high by a factor of 10 is still there though. I don't think I have made a mistake. I previously went back to Bubba's 16.1 from 17.0 Beta1 and took the bike on a 50 mile ride yesterday and the wattmeter was reading correctly but now I have flashed with 17.0 Beta2 it is reading 10x high again, the same as it did with 17.0 Beta1.

Thanks guys good stuff.

I was not looking at that particular bug for the latest pull request but since it is Christmas we might have a fix in version 0.17 beta-3... :wink:

Will make another pull request if it seems to work after my tests.

On a side note, I took the liberty to help out with the wiki for 0.17.X. Updated some text and also the menu layout.
 
Back
Top