Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

I have had a problem with TSDZ2 for months. At first he noticed that the power had decreased, he was pushing less and less. Later it began to happen that from time to time it would go off, especially after a while pedaling and more likely on a steep hill. To try to find the problem I have flashed the software compatible with the original VLCD5 screen, and installed the temperature sensor and now what happens is that due to heating it gradually decreases the intensity until it turns off, but it also does sometimes without the warning of temperature and also it is suddenly, without previous warning. I don't know what the problem is, it's like it disconnects and after a while it reconnects. I guess there are only 3 pieces that could be: the motor controller, the motor itself, and the battery controller. I have opened the engine and it looks like it doesn't look bad, like one that showed casainho overheated and demagnetized. Any ideas what it might be or how to go about finding what causes the crash? Or maybe I will have to buy pieces to discard the one that fails.
 
josafrik said:
I have had a problem with TSDZ2 for months. At first he noticed that the power had decreased, he was pushing less and less. ....
How have you used the bike before you changed to OSF?
I ask because the tsdz2 has a bad reputation with heat dissipation.
You can't feel the motortemperature on the case, but If you can, then the motor is serious overheated.
If that is the case from time to time, then demagnetizing could be the cause.
The temperature sensor is a safety sensor and setdown the motor power if the temperature rises above a certain level.
To prevent this you can improve the heat dissipation with heat conductive material between motor and case.
If you have done this right you can feel the heat of the motor on the case too and judge if that is too much heating.
Other reason for a bad behaviour could be the torquesensor. Have you checked the minimum and maximum value of it ?
With PAS only mode you can check also the motor
 
The use I give it is on a MTB with steep slopes and descents. I have thought about the demagnetization but since it does not have that dark color that was shown in any photo, I was not sure. The engine warms up long before cutting by the temperature sensor, but those sudden cuts occur even with the engine not too hot. I have to check the torque sensor, and try the PAS only mode. Thanks
 
josafrik said:
.... it does not have that dark color that was shown in any photo,.....
On the photo's you have seen, I think they are about extreme demagnetization and burned motor.
But demagnatization by high temperatures could lead to powerloss before burning.
That is why it is adviceable to install temperature regulation additions if you go often to the limits.
 
Well, that is probably my problem, because again I pushed a lot and climbed very steep slopes in turbo mode
 
josafrik said:
Well, that is probably my problem, because again I pushed a lot and climbed very steep slopes in turbo mode
A bare motor isn't that expensive, but try first if the torque sensor could be the problem that is about the same price.
It would be a pity if you replace something without result.
With your use of the motor I think too that adding thermo conductive material would be better too.
 
I'm a complete noob and having a 48v/750w motor and 48v/17.5ah with VLCD5 display delivered next week. I'd like to attempt to update the firmware but not sure where to start. Which post is the best to follow for the latest instructions?
 
Didcot said:
..... follow for the latest instructions?
The latest OSF is the v0.20 build of mbrusa and besides the software he has on github links to the wiki and for the very first start to the main wiki and manuals to work with the configurator and display.

github of mbrusa

In short:

- Buy a cheap ST link v2
- Download and install (in the main C: directory), STVP, SDCC and Java software
- Download v.0.20 OSF
- Connect ST link v2 with poor man solution

If you flash for the first time, I advice to make a complete backup of your stock firmware with STVP (program memory, data memory and optionbyte)

- Run Java configurator.jar
- Set basic settings (and/or optional other settings)
- Hit Compile & Flash

done
 
Elinx said:
Didcot said:
.....
I'll take a look at that...
:thumb: FYI
Because you ask for a topic post, in my last answer, I add a {very) shortened guide too.

Thank you so much, I've ordered an st link and will hopefully give it a go sometime this coming week.. :thumb:
 
Patoruzusos said:
New user here.
Just compiled the firmware as explained here:
https://github.com/emmebrusa/TSDZ2-Smart-EBike-1/wiki/OS-X-and-Linux-installation
All went fine (main.ihx was created)
I used git version: 17a3649, is that correct? Are newer versions unstable?
...
TNX

Hi Patoruzusos,
From what you read, I can deduce that you successfully used the OS/X and Linux installation procedure explained on this wiki. We haven't so many feedbacks on this procedure, because most people here are on Windows, and we would be happy if you (or any user of this procedure) could say some words on it:
  • Are you on OS/X or Linux?
  • Does the wiki describe correctly the procedures?
  • Did you know how to use git?
  • Did you use the "$ git clone ..." command or download directly the .zip file?
  • When you said that you used the git version 17a364, was it to rapidly test the Open source firmware, with the minimum number of parameters to be set? (version 17a364 is the latest state of stancecoke's configurator)
  • Was it easy to install sdcc and stm8flash?
  • Was it easy to compile and link in order to get the main.ihx firmware?
  • Did you backup the original firmwares in order to test the connection and your wiring with the ST-LINK V2? Was the photo useful?
  • Was it sufficient to flash only the main.ihx firmware?
  • Did you create a branch on your git repository before upgrading to latest mbrusa's version B or did you download the latest zip on github?
  • Was it easy to get latest mbrusa's version B and to flash it.
  • Any additional comments?

I spent a lot of time on this wiki, trying to make it as simple as possible. The procedure is working on Windows too, without the use of ST Visual Development but you need the cygwin command shell or any equivalent. I will appreciate any feedback.

Revher
 
revher said:
We haven't so many feedbacks on this procedure, because most people here are on Windows, and we would be happy if you (or any user of this procedure) could say some words on it:

Happy if I can be of any help.
The wiki for me was very clear. Too verbose for my taste, maybe shorter could be even cleaner. But I am a dev and a linux user since last millennium, maybe the verbosity could help less experienced user. On the other hand, if someone is using linux, one can assume some level of expertise. No idea about OS/X users though. Let me go through your questions in detail.


  • Are you on OS/X or Linux
    Linux, Open SuSE (rpm based)
  • Does the wiki describe correctly the procedures?
    Yes, every step I took was correct and required. Pretty much as running a list of commands. Maybe verbosity is also not good for newbies, which may get too much information to swallow. In my writings and documentation I live by a quote from Mark Twain, he wrote once "I apologize for such a long letter - I didn't have time to write a short one.” :)
  • Did you know how to use git?
    Yes.
  • Did you use the "$ git clone ..." command or download directly the .zip file?
    I use clone. I like to stay up-to-date when I tinker around with somebody's else tinkering. Also useful If want to modify something myself. But it is a good idea to have the zip, for those who deem it sufficient.
  • When you said that you used the git version 17a364, was it to rapidly test the Open source firmware, with the minimum number of parameters to be set? (version 17a364 is the latest state of stancecoke's configurator)
    I ignore what is the stancecoke's configurator.
    I came to the other Open Source project, and realised I needed a new display for that, but I liked the compactness of my xh18. Very fast I found mbrusa's variation, and proceeded to see if I could create a binary. The wiki said version 17a364 was recommended, and that it was simple. My understanding was that after 17a364 the development continued and for testing purposes 1001 config options became exposed. If 17a364 was the most stable and all what I needed, I had no need for other version. This was maybe the only non clear point in the wiki. Luckily it felt wrong, and I asked for an expanded explanation about here.
  • Was it easy to install sdcc and stm8flash?
    It was already installed. Not sure if it came with the base system, or it was installed automatically by something else I installed in the past. But being part of the standard system repo, I was one command away, it it was not installed.
  • Was it easy to compile and link in order to get the main.ihx firmwahttps://endless-sphere.com/forums/posting.php?mode=quote&f=30&p=1568764#re?
    Very simple, but there was one more step required. Let me check my repos...
    stm8flash was missing. I cloned the repo, compiled it and installed it.
  • Did you backup the original firmwares in ord`er to test the connection and your wiring with the ST-LINK V2? Was the photo useful?
    I will backup the original firmware. And the photo was very useful, in fact I still have it open in a tab and still need it :)
    My cable connectors were too thick, and postponed it. My motor is open, waiting still for the nylon gear replacement, when the gear arrives I will continue with the motor project. But all is ready.
  • Did you create a branch on your git repository before upgrading to latest mbrusa's version B or did you download the latest zip on github?
  • Was it easy to get latest mbrusa's version B and to flash it.
    I am not user what is version B.
    I cloned it and switched it back to 17a364
    When I learned it was outdated, switched it back to latest.
    very easy, just git commands.
    Why would I need to create a branch?
  • Any additional comments?
    Nothing linux related, I got my first firmware (17a364) within 15 minutes, and if the second took longer was because there were many more options to read about and set :)
    Maybe, going back to my comment about verbosity, it is always nice to educate the user (but not all of them need to, or want to), a concise step by step (copy and paste) list could be better, and some side notes, clearly marked as "extra informative / could be ignored" for those who want to flash the firmware as fast as possible and forget.

    Non linux related (so, not for that page) there is a lot of knowledge on this forum. Some answers I got here assumed prior knowledge (ie. version b?). Not being lazy, I went back and educated myself, trying to find some clue somewhere in the forums, and some other on google. There is definitely some "common knowledge" that could find its way into the wiki.

I hope this helps, come back to me anytime.
 
Patoruzusos said:
revher said:
We haven't so many feedbacks on this procedure, because most people here are on Windows, and we would be happy if you (or any user of this procedure) could say some words on it:

Happy if I can be of any help.
The wiki for me was very clear....

I hope this helps, come back to me anytime.

Thank you very much for answering this short questionnaire so well. As you have probably noticed, the history of this open source software is quite long and sometimes very debated.

It started with Casainho who is still developing his own branch but borrows part of the mbrusa code, for example the "overrun" which is almost nonexistent now. On my wife's Winora (Nexus 7-speed Internal Gear Hub) bike, recently fitted with a TSDZ2 coaster brake, I did not install the gear sensor and apparently she does not need to have it until present.

I am very new on this subject too (October 2019?). And I do not know most of the basics of this brushless motor. But I'm not new on Linux and OS / X (and Windows). And when Stancecoke started putting the Italian code (zip) of Marcoq, Mbrusa and others on Github, creating a fork for Casainho's work, I was very happy because I knew that the project would have an Open Source future (under GPL license).

I tried to understand the origin and the history of the tree (files and sub-directories) of the Stancecoke branch (I know most of them). Some people have already explained on this forum that Makefile.windows should be used on Linux and OS / X (?) It was strange and it is still strange for me. But like Stancecoke, I am not proposing a new branch which I will not follow.

Stancecoke didn't change the tree structure, it just added a very nice and concise Java configurator which I really liked. Then he helped mbrusa build his own branch. Unfortunately, the version numbers are defined at the beginning and not at the end of a development! Therefore and unfortunately, there is no tag yet since Casainho's tags. Things are more confusing because mbrusa directly proposed a more complete but more complex configurator.

I think there's room for an easy Stancecoke configurator branch with mbrusa's continuous motor development.

As I was able to compile on OS/X, Linux and Windows with the same procedure using the command lines, I asked Stancecoke if I could develop an "OS/X and Linux installation" wiki page and he agreed (he already opened the editing to any Github user and asked for contribution).
When Stancecoke closed his branch, the wiki was partly lost and I asked mbrusa if I could make a new one and here it is. Still open for editing by any GitHub user.

I will answer some of your questions or give some comments. Your text is in italics:
  • When you said that you used the git version 17a364, was it to rapidly test the Open source firmware, with the minimum number of parameters to be set? (version 17a364 is the latest state of stancecoke's configurator)
    I ignore what is the stancecoke's configurator.

    I already explained above the history. I call version 17a364 the latest A version with stancecoke configurator (was it already B?).

    I came to the other Open Source project, and realised I needed a new display for that, but I liked the compactness of my xh18.
    I agree that the xh18 is very very nice (I can't find any equivalent on the Bafang series).

    Very fast I found mbrusa's variation, and proceeded to see if I could create a binary.
    The wiki said version 17a364 was recommended (are you sure?), and that it was simple (yes).

    My understanding was that after 17a364 the development continued and for testing purposes 1001 config options became exposed. If 17a364 was the most stable (is it on the wiki? no) and all what I needed, I had no need for other version (me too, that is the reason why I think it is easier to promote 17a364). This was maybe the only non clear point in the wiki. Luckily it felt wrong, and I asked for an expanded explanation about here. (I would have been even more verbose by giving explanations...)
  • Was it easy to get latest mbrusa's version B and to flash it.
    I am not user what is version B.
    I cloned it and switched it back to 17a364
    When I learned it was outdated, switched it back to latest.
    very easy, just git commands.

    Version B is current version. As I said a tag on a stable version has to be set.

    Why would I need to create a branch?
    Already answered, if you want to keep a configurator very simple but including new developments on the motor.
  • Was it sufficient to flash only the main.ihx firmware?
    This is a crucial question that you have not answered. There is a debate as to whether the other 2 firmwares (memory, eprom) should also be flashed. One of the firmware is empty and for the other, I asked for its origin and I never received a response.
    In my own experience, only the main.ihx is required. In addition, I noticed that with my ST-LINK V2, when I backup the firmware from the TSDZ2 controller just before flashing a new one, it works very well. If I do not initiate the connection (the light must change from blue to orange), I must flash the main.ihx file twice.
  • Any additional comments?
    Nothing linux related, I got my first firmware (17a364) within 15 minutes, and if the second took longer was because there were many more options to read about and set :)
    For me, I really appreciate that you got the firmware within 15 minutes. Did you include the time to read the wiki...?

    Maybe, going back to my comment about verbosity, it is always nice to educate the user (but not all of them need to, or want to), a concise step by step (copy and paste) list could be better, and some side notes, clearly marked as "extra informative / could be ignored" for those who want to flash the firmware as fast as possible and forget.
    It is true that the current wiki is verbose and pretends to educate the user on the functioning of git, compilation and link and executable (I am myself a former CVS user but I am new to git).

    Non linux related (so, not for that page) there is a lot of knowledge on this forum. Some answers I got here assumed prior knowledge (ie. version b?). Not being lazy, I went back and educated myself, trying to find some clue somewhere in the forums, and some other on google. There is definitely some "common knowledge" that could find its way into the wiki.
Thank you again for taking the time to answer this questionnaire. As already said, do not hesitate to improve the wiki, I am currently working on an old car (Citroën 5HP from 1924) and on another forum. I use my bikes in town only and I find that the "warm up" takes a long time and I don't want to have a 20% increase with version B, therefore I currently flashed the firmware (17a364) on 3 different bikes and I am very happy with the joint work done by all of you.

Revher
 
Hi Revher,
I am a little confused with the forks and branches.

what goes where, on which repo and on which branch, and who is backporting what to which repos and branches?
I am (gladly) surprised to hear casahino is backporting things from mbrusa. This is a question I asked here before but is so far not addressed. Do you have an overview?

My nylon gear has been 20 days "in transit" :(. As soon as it arrives, I will try to see how the flashing works for me.
I am also waiting for two new Bluetooth BMS's with charge/discharge coulombmeter (so far I have been using a V/A/W/Ah/Wh meter attached externally to the discharged connector, to help me better estimate how many KM I can still do assisted (I aim at >100KM). If it works, I will be relying probably less on the firmware for consumption calculation, but I could use it to provide feedback to mbrusa

Better experience was the main reason to try this firmware, since it claimed to run more efficiently (more distance less heath less battery for me). That and because I cannot avoid replacing firmwares to opensource ones and add new fetures wherever possible :)

Regarding the wiki, if it is open, I will try to improve some things, if I feel my knowledge is up to the task.

I did a lot of reading on the different wikis and in the forum. Time that I did not include. But once I found the Linux page, I went on to to test it immediately and it worked straight forward. I came with prior knowledge, the 15 minutes included reading the linux page and bypassing what I did not need. Of course, this was just on my desk, without any contact to my bike. But it would have taken me not only hours to make it work without that page, but it would have probably taken me many weeks to decide taking the first step instead of seconds :)

I will provide more feedback once I start flashing.
 
Okay, I'm slightly starting to panic now.

A few days ago I flashed my motor with the OSF for the first time. Everything seemed to look good the only thing I noticed was that the speed was not correct. I have a recumbent with 20" wheels so I changed the cicumference to 1510mm.
After the update the bike responded very erratic. I noticed that the computer registered the speed wrong as if 10 times to fast. And then nothing Which probably caused the motor to stop after it started.
I flashed it again with the original setting but that would n't help. From there it went worse, speed is no longer registered. The battery which supposed to be full shows up empty on the display and the motor no longer works.

Thinking is would be the firmware I flashed it again with the original firmware. But that did n't change a thing.
Anyone got an idea what could have gone wrong? Maybe a cable issue? Hopefully some tips how to troubleshoot this.

Update: I'm starting to think I damaged the cable/connector that comes from the motor. Since I could go back to the original firmware and still have issues. As I understand the connector from the motor would be a Higo mini A male connector. But I can't find a shop that sells them. Would that be the same connector that's on the speeds sensor extension cable? (https://www.aliexpress.com/item/4000680034215.html?spm=a2g0s.9042311.0.0.27424c4dV67EQc). So I could replace the current cable with half of the extension cable.
Am I right on this?
 
psl2806 said:
....
Anyone got an idea what could have gone wrong? Maybe a cable issue? Hopefully some tips how to troubleshoot this.
My first thought: Speedsensor not right mounted.
The speedsensor is a reed contact, and very sensitive for right mounting of the magnet.
You have to mount the spoke magnet in front of the arrow at a distance of about 3mm
 
Elinx said:
psl2806 said:
....
Anyone got an idea what could have gone wrong? Maybe a cable issue? Hopefully some tips how to troubleshoot this.
My first thought: Speedsensor not right mounted.
The speedsensor is a reed contact, and very sensitive for right mounting of the magnet.
You have to mount the spoke magnet in front of the arrow at a distance of about 3mm

I thought about that but and i did have issues with that because of the distance, but thats not the issues now. And it does not explain why the motor does nothing and the display can't show the battery status. I was more thinking about the cable connector. When I had to reconnect the cable to the speedsensor/lights it was difficult to reattach. Maybe I damaged it somehow.
 
Waynemarlow said:
On the OSF V20 you can disconnect the speed sensor all together, try and run the motor without it and see if the engine performs the same.

I tried this, but it makes no difference. The display cannot show the battery status and the motor no longer responds. So do the lights, but the display still functions.
 
There was some talk back some ways that if the lights draw to much current it will also disable the motor, try disconnecting any unneeded wiring back to bare basic and disable the light setting on start up .
 
Hello Guys,
I have been lurking in the forums for some time reading about the Tsdz2 and gonna buy one (i want to commute in a ebike to lessen my carbon footprint that i mess up alot with my enduro bike :mrgreen: ).
I will try to go first the way of the osf via the stock vlcdX while i wait and play with the 860c.
Like a good newbie altough i have read alot i will ask the gurus for some help is possible.
So :)

1) Can i use a 52V Battery this way or should i stay with the 48v (i know stock firmware wont let me use the full 52v)
2) Can i use the temp sensor mod with the stock vlcd? will it give me a reading or just the "protection" (i will put some thermal pads right from the beggining)
3) In the first rides if i dont have the sensor installed how can i protect the motor? should i limit it someway in the firmware?

Thanx.
 
vass said:
....
1) Can i use a 52V Battery ...
2) Can i use the temp sensor mod with the stock vlcd? ...
3) In the first rides if i dont have the sensor installed how can i protect the motor? ....
1. Yes, but setup the right cellnumber
2. Yes, protection is working, but the combination with thermopads is more comfortable
3. Limit Power max and Current max and Power in Streetmode, but still adviceable to ad thermopads too.
 
Elinx said:
vass said:
....
1) Can i use a 52V Battery ...
2) Can i use the temp sensor mod with the stock vlcd? ...
3) In the first rides if i dont have the sensor installed how can i protect the motor? ....
1. Yes, but setup the right cellnumber
2. Yes, protection is working, but the combination with thermopads is more comfortable
3. Limit Power max and Current max and Power in Streetmode, but still adviceable to ad thermopads too.

:bigthumb: Thanx Elinx, i will do the wiki thermal mod (i dont think i will open the electric motor to put thermal paste but will do the others even the cutting of the case) and if i am able i will put the sensor for the first ride (but its going to be hard not to ride the new toy :) )
 
Back
Top