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

skestans said:
izeman said:
Could you please stop QUOTING WHOLE POSTS?

Someone is fussy today.

Let me tell you about this formidable invention that is the scroll wheel! Any mouse has it nowadays, starting at 2$. I hope you figure it out.
https://endless-sphere.com/forums/viewtopic.php?f=1&t=152
Forum Etiquette Dos and Don'ts

DO respect other people's time and bandwidth, you are not the center of cyberspace


DON'T abuse the quote button; include only as much as is necessary for context. This includes pictures
 
Guess what, next firmware version will have 20 assist levels and not 9 as current version!!

There is a reason for me to do this, it is because with my ebike I drive on the city at motor max power and so I need hight assist levels AND I also do MTB and there I need fine control and low assist levels -- now I will have enough levels to be in the range of assist value I need on both very different usages.

ALSO, the UP and DOWN buttons code is now really fast responsive and predictive as everyone expects (I had to remove the click + long click detection on this buttons and anyway, seems this type of click is hard for users to understand and do).

image.png
 
Powerhour said:
So.. since I stupidly modded my shunt, is there anyway to change the resistance value of it in the firmware? Or would the best thing for me to do would be to pick the hotglue off it and soldersuck off what I’ve done?
Thanks

Anyone?
 
New firmware for TSDZ2 motor, 850C and SW012 displays

Version: 850C_SW102_v0.6.8, download here.

Videos showing 850C display and SW012 display:

[youtube]eDENZS4pHvo[/youtube]

[youtube]q0N5W3Fgyjk[/youtube]

Changelog:
- No more motor unwanted startup at power on or when leaving the configurations menu (the motor initialization is now much more robust).
- Now user get errors if TSDZ2 firmware version is incorrect, if brakes are pressed at startup or if RX or TX communication is missing - this will help a lot when users by mistake exchange the TX and RX wires or some bad contact of that wires.
- Assist levels are now 20 (previous were 9). I ride on the city at motor max power and so I need hight assist levels AND I also do MTB and there I need fine control and low assist levels, now I will be able to use for instance the assist levels from 1 to 10 for MTB and the 10 to 20 for riding on the city.
- added 3 main screens were each screen have his own customized numeric fields and on 850C has also his own customized graph.
- UP and DOWN buttons are now really fast responsive and predictive as everyone expects (I had to remove the click + long click detection on this buttons and anyway, seems this type of click is hard for users to understand and do).
- SW102: the assist level value is now shown on the wheel speed field by override his value during 2 seconds when changing assist level (this means assist level is now hidden). Also at startup it is shown for a few seconds.
- SW102: changed battery symbol to be similar with the design specification as also the 850C battery symbol.
- Improved the Colomb counting based SOC by considering the amount of power loss on the battery internal resistance and cables.
- The amount of power loss value on the battery internal resistance and cables can now be seen on configurations.
- Removed battery voltage SOC based on voltage and so the focus will be on the much better Colomb counting based SOC.
- SW102: corrected the numbers where the "." and ":" were not being shown.
- Motor PWM value is now shown from 0 to 100 instead of the previous 0 to 255.
 
Nice work!
Just to confirm: is it "Enter configurations screen: ON/OFF and UP and DOWN, long press", the three buttons at the same time? UP/DOWN buttons of my SW102 are not very reliable after opening the case.
 
- Now user get errors if TSDZ2 firmware version is incorrect, if brakes are pressed at startup or if RX or TX communication is missing - this will help a lot when users by mistake exchange the TX and RX wires or some bad contact of that wires.
Highly welcome. It costed my some time the first time i was staring at the initial screen waiting and waiting, until I found out the BRAKE was activated. :bigthumb:
 
Flashed latest v0.6.8
works with 0.54.0 on the motor, with 0.55.0 reports "e: firmware". Flashed two times.

For 0.55.0 when flashing with stm8flash getting:
Determine FLASH area
Due to its file extension (or lack thereof), "TSDZ2-v0.55.0.hex" is considered as INTEL HEX format!
21057 bytes at 0x8000... OK
Bytes written: 21057

For 0.54.0 getting:
Determine FLASH area
Due to its file extension (or lack thereof), "TSDZ2-v0.54.0.hex" is considered as INTEL HEX format!
29922 bytes at 0x8000... OK
Bytes written: 29922

Jiggle is not gone, at least in 0.54 0 and 0.6.8 combination, it's a bit worse.
On entering the configuration menu there was no jiggle anymore, but going through sub-menus it freezed randomly and after few seconds went to main screen with two really hard pulls of the motor. If would have knocked the bike over of the kickstand if I wasn't holding it.

Lost all the settings on flash.
 
hefest said:
Flashed latest v0.6.8
works with 0.54.0 on the motor, with 0.55.0 reports "e: firmware". Flashed two times.

For 0.55.0 when flashing with stm8flash getting:
Determine FLASH area
Due to its file extension (or lack thereof), "TSDZ2-v0.55.0.hex" is considered as INTEL HEX format!
21057 bytes at 0x8000... OK
Bytes written: 21057

For 0.54.0 getting:
Determine FLASH area
Due to its file extension (or lack thereof), "TSDZ2-v0.54.0.hex" is considered as INTEL HEX format!
29922 bytes at 0x8000... OK
Bytes written: 29922

Jiggle is not gone, at least in 0.54 0 and 0.6.8 combination, it's a bit worse.
On entering the configuration menu there was no jiggle anymore, but going through sub-menus it freezed randomly and after few seconds went to main screen with two really hard pulls of the motor. If would have knocked the bike over of the kickstand if I wasn't holding it.

Lost all the settings on flash.
This is the reason why different firmware versions should not be used, even if they somehow work it can go very wrong. I am happy that I finally implemented this check of firmware version on the recent previous firmware versions.

I corrected the file sw102-otaupdate-0.6.8.zip and now it should work only with the TSDZ2-v0.55.0.hex.

Yes, TSDZ2-v0.55.0.hex is smaller just because I updated my very old version of SDCC compiler - this was something I knew of the improvement of code side but that was not an issue and I even updated for other reasons.
 
Casainho, using the latest links in your post for 0.6.8 and 0.55 I get the 'e: firmwa' error.

This motor was previously flashed with the code fork that supported the original displays, but I've just switched out to an SW102 and perhaps the motor is not being totally erased?

Any idea what I'm doing wrong? Flashed from Linux...
 
HughF said:
Casainho, using the latest links in your post for 0.6.8 and 0.55 I get the 'e: firmwa' error.

This motor was previously flashed with the code fork that supported the original displays, but I've just switched out to an SW102 and perhaps the motor is not being totally erased?

Any idea what I'm doing wrong? Flashed from Linux...
Can you please test again the firmware for SW102? I updated it 10 minutes ago to correct that issue you mention.
 
Yep, that's fixed it. Cheers. Now to figure out how to get into the settings and change stuff. :)
 
ezrider1199 said:
Anyone having issue with the latest firmware? my 850c says "waiting for tsd2" and then "firmware error"

I would try the latest files linked in Casainho's post up above... I think you need to flash the 850 and the motor with the new firmware pair.
 
HughF said:
Yep, that's fixed it. Cheers. Now to figure out how to get into the settings and change stuff. :)
No matter how hard I try to get into the config menu with short-press, long-press I can't get it to work. What am I doing wrong?
 
Yes I did. Hopefuly someone with a 850c can confirm

HughF said:
ezrider1199 said:
Anyone having issue with the latest firmware? my 850c says "waiting for tsd2" and then "firmware error"

I would try the latest files linked in Casainho's post up above... I think you need to flash the 850 and the motor with the new firmware pair.
 
HughF said:
HughF said:
Yep, that's fixed it. Cheers. Now to figure out how to get into the settings and change stuff. :)
No matter how hard I try to get into the config menu with short-press, long-press I can't get it to work. What am I doing wrong?

You need to press and hold 3 buttons at the same time, ON/OFF + UP + DOWN
 
casainho said:
hefest said:
Flashed latest v0.6.8
works with 0.54.0 on the motor, with 0.55.0 reports "e: firmware". Flashed two times.

For 0.55.0 when flashing with stm8flash getting:
Determine FLASH area
Due to its file extension (or lack thereof), "TSDZ2-v0.55.0.hex" is considered as INTEL HEX format!
21057 bytes at 0x8000... OK
Bytes written: 21057

For 0.54.0 getting:
Determine FLASH area
Due to its file extension (or lack thereof), "TSDZ2-v0.54.0.hex" is considered as INTEL HEX format!
29922 bytes at 0x8000... OK
Bytes written: 29922

Jiggle is not gone, at least in 0.54 0 and 0.6.8 combination, it's a bit worse.
On entering the configuration menu there was no jiggle anymore, but going through sub-menus it freezed randomly and after few seconds went to main screen with two really hard pulls of the motor. If would have knocked the bike over of the kickstand if I wasn't holding it.

Lost all the settings on flash.
This is the reason why different firmware versions should not be used, even if they somehow work it can go very wrong. I am happy that I finally implemented this check of firmware version on the recent previous firmware versions.

I corrected the file sw102-otaupdate-0.6.8.zip and now it should work only with the TSDZ2-v0.55.0.hex.

Yes, TSDZ2-v0.55.0.hex is smaller just because I updated my very old version of SDCC compiler - this was something I knew of the improvement of code side but that was not an issue and I even updated for other reasons.

I flashed 0.55.0 initially but it didn't work, so I went back to 0.54.0 to try it out with 0.6.8, obviously a mistake.

Is there any plan to keep to old configuration after flashing?
 
skestans said:
Did you manage after all? I received a new 850C and with the same cable that worked for my other one, I can't flash this one. It won't power on while the flashing software is open and waiting, but it turns on fine when connected to power.

It also shows crazy numbers with the stock firmware when connected to the stock TSDZ2, like over 6200W power usage when the motor is idle sitting on the table on my bench.

What are the numbers engraved behind your display?

That's what it looks like: https://streamable.com/wafxa

EDIT: Nevermind, I'm an idiot... The GND wire got disconnected again and I didn't notice. When I plugged it back, it was able to flash. The 6200W usage was because the firmware loaded from the factory was for Bafang, not the TSDZ2. With the appropriate firmware image, it works properly.


Hi, glad you solved your problem. If its intrest someone else, I also succeded. I bought third TTL adapter with CP2102 chip, and wired 850c and adapter to my ebike battery. And lo and behold it worked. I guess I got bad adapters and transformer.

One more question. I do not want to splice the display cable on VLCD 5 but want to use cable like 1t4 sold by
https://www.electrifybike.com/store/p116/1_to_4__Female_Cable_for_TSDZ2_Open_Source_Firmware_%28OSF%29__Upgrade.html#/
but he does not deliver to my country, Slovenia. Is there an alternative source.

Regards.
 
hefest said:
You need to press and hold 3 buttons at the same time, ON/OFF + UP + DOWN

Yep, that sorted it out - cheers
 
OK, got a few settings changed (wheel circumference, battery size and cell count etc)... Took it for a quick spin around my office carpark area. A couple of things:

1. Is there an assists level that I can program to be a street legal mode?
2. How do I setup and enable eMTB mode?
3. I couldn't go above assistance level 12, it seemed like the top 8 levels were not accessible.
 
ezrider1199 said:
Yes I did. Hopefuly someone with a 850c can confirm

HughF said:
ezrider1199 said:
Anyone having issue with the latest firmware? my 850c says "waiting for tsd2" and then "firmware error"

I would try the latest files linked in Casainho's post up above... I think you need to flash the 850 and the motor with the new firmware pair.
I just updated the firmware files as I did for SW102, it should work now for the 850C.
 
Flashed firmware 0.55.0, and 850C_0.6.8, and "firmware error". I flash motor and display couple times, and still the same.
 
Back
Top