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

Jeff and HughF

I am really interested in all of these starting power questions. Jeff what made you switch displays? I use my motor on a heavy cargo bike where I want a lot of torque off the line and a fast response, which I get right now from 0.20beta on the display [that shall not be mentioned in this thread]. I have both a 850c and 860c new in boxes, but am concerned about switching because of the issues I see you and others having.

Not to mention another wiring loom to make.

Just had the covid swizzle stick shoved into what felt like my brain, so maybe I'm not making much sense today :/

Steve
 
NexusG said:
casainho said:
About motor cooling :
I have filled up entirely one of my TSDZ2 with car engine oil for experience purpose

It runs well and much quieter, even if I have a brass gear !
The oil plays both the role of coolant and lubricant

There's a small leak on the right side of the motor but this is because I didn't add silicone in the casing to prevent oil going from the left to the right side of the motor

It doesn't avoid the increase of oil temperature at continuous high power (I was able to reach more than 80°C at 750W for long period)

But... the oil have a thermal inertia and it may prevent the winding to burn as there are in direct contact. The temperature of the different elements (magnets, casing, winding, etc... ) is way more homogenous


Anyway, just for the motor running very quietly, I think it's actually a good idea to fill the case with oil

What oil did you use, low viscosity? I was thinking of putting transformer oil in for cooling.
 
mctubster said:
Jeff and HughF

I am really interested in all of these starting power questions. Jeff what made you switch displays? I use my motor on a heavy cargo bike where I want a lot of torque off the line and a fast response, which I get right now from 0.20beta on the display [that shall not be mentioned in this thread]. I have both a 850c and 860c new in boxes, but am concerned about switching because of the issues I see you and others having.

Not to mention another wiring loom to make.

Just had the covid swizzle stick shoved into what felt like my brain, so maybe I'm not making much sense today :/

Steve
I switched to the SW102 because I liked the compact size, and wanted the better fuel gauge style battery level indicator with a % indication.

EDIT: Oh, and I wanted torque sensor calibration on the unit, rather than through the software, because I could never get the Java configurator to work well on Linux
 
mctubster said:
Jeff and HughF

I am really interested in all of these starting power questions. Jeff what made you switch displays? I use my motor on a heavy cargo bike where I want a lot of torque off the line and a fast response, which I get right now from 0.20beta on the display [that shall not be mentioned in this thread]. I have both a 850c and 860c new in boxes, but am concerned about switching because of the issues I see you and others having.

Not to mention another wiring loom to make.

Just had the covid swizzle stick shoved into what felt like my brain, so maybe I'm not making much sense today :/

Steve

The reason that I switched from the LCD3 version 20 to the 860C version 1 is that it's so hard to flash the LCD3. So that is all they are selling now is 850C or 860C. The pros and the cons of version 1 are the same there are so many setting which is good and bad. I have been helping https://www.electrifybike.com/ get this software figured out because we sell several systems a year for handcycles, and they have been struggling to get their handcycle systems useable. With so many settings and such vague descriptions of what each setting does it's very difficult to get things set up the way you want. If it's hard for me to get it set up and figure out what each setting does then it's going to be hard for others. We just don't want them to have to go through so much work and trouble to get their system working correctly. I really like the 860C display it is totally awesome and you can see so many different things at a time and it has 3 versions of display settings available that's what makes it so great!
If and when we can get the start-up without rotation working, then version 1 will be much better then version 20!
At that point we will be able to flash with all the default that I'm using. That way when someone gets a TSDZ2 from https://www.electrifybike.com it's very very close to what they need. And they don't have to go through hell like I and everyone else that have been trying to use version 1 on a handcycle.
 
Hello Bejam - did you get a result here - we have the same problem we think. I think that Veko has the same also.

Yes I did in the end. Is quite a faff making up the cable but I followed as per the diagram I posted. But I reversed rx and TX. So yellow to yellow and brown to green. Also used a multi meter and put 5v down various wires to see where it came out. There seem to be a number of different cables out there so it might be a good idea for checking.

When it finally worked the screen comes on to the open source splash screen for about 5 secs and then flicks to the main navigation screen with speed and other readings. From there you can just start cycling and the motor should work.

The only thing I haven't managed to get working is throttle. But I see a number of posts on this with others having issues. So I'm hoping it is a software issue rather than my wiring.
 
bejam said:
Hello Bejam - did you get a result here - we have the same problem we think. I think that Veko has the same also.

Yes I did in the end. Is quite a faff making up the cable but I followed as per the diagram I posted. But I reversed rx and TX. So yellow to yellow and brown to green. Also used a multi meter and put 5v down various wires to see where it came out. There seem to be a number of different cables out there so it might be a good idea for checking.

When it finally worked the screen comes on to the open source splash screen for about 5 secs and then flicks to the main navigation screen with speed and other readings. From there you can just start cycling and the motor should work.

The only thing I haven't managed to get working is throttle. But I see a number of posts on this with others having issues. So I'm hoping it is a software issue rather than my wiring.

I have found that there are different pinout for throttles, so best to make sure yours is as expected. A simple voltage divider between 0v and 5V will allow you feed a voltage into the throttle pin to simulate mid throttle input. Be careful to do this with the wheel able to spin or take the chain off so the motor can spin!

For example
5v-divider.png
should give you a 3.3v signal that is 2/3 throttle or thereabouts. You can play with the values or use a 10K potentiometer instead to make your own test throttle before wiring up a real one.

I hope that helps.

I used a similar circuit with a switch on the throttle pin to make a fixed mid throttle button rather than use a thumb throttle for quick boosts of power to keep it engaged.
 
In firmware version 1.0.0 is Boost actually enabled when "disabled" in settings?

I have seen several references to that being the case here in this thread. It that true or not?

The WIKI says not to not "enable" it due to Bugs.
 
>>In firmware version 1.0.0 is Boost actually enabled when "disabled" in settings?

This appears to be the case from my own testing. In OSF 1.0 , when 'Boost' is enabled (the setting value is actually 'disabled'), my startup increases the motor current quite a bit, like up to 12 amps or more (depending on the assist level selected), and the startup is smoother.

When I set it to 'enabled' I did not get that large increase in motor current, and the startup was more difficult: it took more of a pedal rotation to get assist actually helping, and the motor 'shudders' and is jerky during that startup.

It is simple to try your self, nothing seems to explode :)
 
Hey guys

I wonder if anyone can help me. I have already installed on my bicycle and trying to do the same on my SO's bicycle, however i am running into a problem.

After flashing and wiring SW102
The display is frozen on booting screen..

Display screen:
Fj6gEDv.png


cmd line after flashing:
tI9e9G8.png


wiring:
OilqDMR.png
 
I assume you have loaded the firmware over Bluetooth from your phone, using nrf toolbox?

You need to flash the bootloader using an stlink, then wirelessly load the program data.
 
HughF said:
I assume you have loaded the firmware over Bluetooth from your phone, using nrf toolbox?

You need to flash the bootloader using an stlink, then wirelessly load the program data.

That's what I did, soldered the wires onto the pads on the circuit board and used the stlink to flash the bootloader using "standalone flash method".

However i am not seeing a simulated motor as I saw when I flashed my first SW102, it is just booting screen as seen on my previous post.
 
HugoM said:
HughF said:
I assume you have loaded the firmware over Bluetooth from your phone, using nrf toolbox?

You need to flash the bootloader using an stlink, then wirelessly load the program data.

That's what I did, soldered the wires onto the pads on the circuit board and used the stlink to flash the bootloader using "standalone flash method".

However i am not seeing a simulated motor as I saw when I flashed my first SW102, it is just booting screen as seen on my previous post.
Can't help you any further, sorry. Mine 'just worked'... I flashed it with the bootloader, loaded the operating firmware via my phone, wired it to my motor and then powered it up.

I've got another two to program, so I'll see if I can document the procedure my end, to see what exact steps work for me.
 
I received the J-Link flasher and debugger for the TSDZ2 motor controller new hardware version:

image.png


Yes, this J-Link uses the same popular STM32F103 microcontroller as STLinkV2 - this is probably the same but with a different firmware on it.

I still don´t have any of this TSDZ2 motor controller new hardware version as seems it is impossible to buy them on the shops like PSWPower where I usually buy my TSDZ2 parts.
 
casainho said:
.....
I still don´t have any of this TSDZ2 motor controller new hardware version as seems it is impossible to buy them ....
Andibrainer from pedelecforum.de has his motor with new controller from Enerprof
He has already an older controller from PSWpower, for flashing OSF. So maybe there is a solution.
 
Elinx said:
casainho said:
.....
I still don´t have any of this TSDZ2 motor controller new hardware version as seems it is impossible to buy them ....
Andibrainer from pedelecforum.de has his motor with new controller from Enerprof
He has already an older controller from PSWpower, for flashing OSF. So maybe there is a solution.
Thanks.

I think that while is not generalized this new version, I will not try to develop the firmware. Maybe the wiki should mention PSWPower as a shop to buy the regular version.
 
Hi, used the Tsdz2 with the osf adapted to xh18 for a year but wanted to swith to the full osf so ordered a sw102 display.
This after checking the operation I opened up and flashed the bootloader, thereafter flashed it with the phone and the nrf app to the latest 1.0 casinho software.
Thereafter flashed the motor with the 1.0.0 as well, however after startup the display gives waiting for tsdz2 and after a couple of minutes e.brakes.

Any smart ideas what I did wrong?
flashed the latest software to the motor with xh18 and everthing works fine again.
Wiring problem, I have the 8 pin motorconnector?
Thanks...
 
Wimpy747 said:
Hi, used the Tsdz2 with the osf adapted to xh18 for a year but wanted to swith to the full osf so ordered a sw102 display.
This after checking the operation I opened up and flashed the bootloader, thereafter flashed it with the phone and the nrf app to the latest 1.0 casinho software.
Thereafter flashed the motor with the 1.0.0 as well, however after startup the display gives waiting for tsdz2 and after a couple of minutes e.brakes.

Any smart ideas what I did wrong?
flashed the latest software to the motor with xh18 and everthing works fine again.
Wiring problem, I have the 8 pin motorconnector?
Thanks...

I didn't know that the xh18 works with 8 pin controller. What are you doing with the ebrake cables when using the SW102?
 
Nevermind, I found out that I somehow reversed the RX and TX wires :-(

You are right the motor has a 8 pin connector but I never used the brakes and throttle so took them off.
I ordered a cable on ALI that runs from 8 pin to split 6 pin display and one connector for the throttle, to work with the xh18.
With the sw102 I used my old vlcd5 cable and spliced it with a bafang display extension cable. This is where despite numerous checks I reversed the RX and TX.
Sorry for the trouble, looking forward to the next casainho project though with the wireless bt connection and a Phone...
 
Nfer said:
Wimpy747 said:
Hi, used the Tsdz2 with the osf adapted to xh18 for a year but wanted to swith to the full osf so ordered a sw102 display.
This after checking the operation I opened up and flashed the bootloader, thereafter flashed it with the phone and the nrf app to the latest 1.0 casinho software.
Thereafter flashed the motor with the 1.0.0 as well, however after startup the display gives waiting for tsdz2 and after a couple of minutes e.brakes.

Any smart ideas what I did wrong?
flashed the latest software to the motor with xh18 and everthing works fine again.
Wiring problem, I have the 8 pin motorconnector?
Thanks...

I didn't know that the xh18 works with 8 pin controller. What are you doing with the ebrake cables when using the SW102?

Nevermind, I found out that I somehow reversed the RX and TX wires :-(

You are right the motor has a 8 pin connector but I never used the brakes and throttle so took them off.
I ordered a cable on ALI that runs from 8 pin to split 6 pin display and one connector for the throttle, to work with the xh18.
With the sw102 I used my old vlcd5 cable and spliced it with a bafang display extension cable. This is where despite numerous checks I reversed the RX and TX.
Sorry for the trouble, looking forward to the next casainho project though with the wireless bt connection and a Phone...
 
Alphonse said:
hosekk said:
Hello, I'm happy user TSDZ2 with opensource firmware.
I have just one problem.
The motor does not stop immediately when I stop pedaling, but after 0,5 - 1 sec.
There was no problem with the original software.

Do You have any idea where is the problem?
I tried many settings but nothing helps.

Display: 860C
firmware: 1.0.0
cadence fast stop mode: enable (no matter also the same when is disable)
(I have 2 bikes with this engine and software, and the same problem is with both)


Thanks for help
I have been working on this problem as well. A couple of questions for you on your settings:

Under "Assist Level" - are you using the default 20 assist levels? If so does the problem occur at all levels or above a certain level?

Under "Motor Control" - are you using Torque mode? Same screen, what maximum current are you using?

I have this issue too..........
High cadence and the motor over runs terribly, making it impossible to change gear without a loud bang.

My settings are standard.
 
Hi,

just received my TSDZ2 wih a 850C display.
I want to flash the OSF onto it. Motor shouldn´t be a problem.
But my display does not have the Bafang pinout.
Instead of this it has the Tongsheng 6 pin layout.
I have a 1T2 cable. It is an 8 pin to the motor, a 6 pin to the display (seems to be the normal Tongsheng plug) and a 3 pin for throttle.
Anybody knows if it´s possible to flash the display with OSF?
I didn´t find a pin layout for the 6 pin plug of other displays.

Thanks in advance.
 
Axl Rose said:
Hi,

just received my TSDZ2 wih a 850C display.
I want to flash the OSF onto it. Motor shouldn´t be a problem.
But my display does not have the Bafang pinout.
Instead of this it has the Tongsheng 6 pin layout.
I have a 1T2 cable. It is an 8 pin to the motor, a 6 pin to the display (seems to be the normal Tongsheng plug) and a 3 pin for throttle.
Anybody knows if it´s possible to flash the display with OSF?
I didn´t find a pin layout for the 6 pin plug of other displays.

Thanks in advance.

I haven't flashed an 860c screen with a 6 bin cable but i have been connecting a 850C (bafang cable) with a tsdz2 6pin using the following adapter cable.
sw102-tsdz26pin.jpg
More details here https://empoweredpeople.co.uk/2020/07/23/adding-a-tongsheng-tsdz2-mid-drive-motor-to-a-quickie-shark-rt-hand-trike-part2/ (I am using the sw102 on the trike now but also tested the 850C)

I guess your screen will be wired directly like the 6 pin plug on the right? and that pinout will help you work out the tx/rx GND and bat+ pins you need to program it.

I used the battery on the bike to power screen so P+ and GND are connected to the 6pin cable from the motor, TX, RX and GND only go to the programmer.

I made a inline cable adapter to allow me to use as an extension (jumpers left connected) or disconnect them to tap into the GND TX and RX on the screen to program it.

850-860c-programing adapter.jpg
Note how my bafang extension cable was a totally differnt colour scheme!

Here is a comparision table to convert to those colours if anyone else gets that type. (GND is on red!)
sw102-tsdz2-6pin-alt-colours.JPG

so check those pins before pluging in.
 
fireflyer451 said:
>>In firmware version 1.0.0 is Boost actually enabled when "disabled" in settings?

This appears to be the case from my own testing. In OSF 1.0 , when 'Boost' is enabled (the setting value is actually 'disabled'), my startup increases the motor current quite a bit, like up to 12 amps or more (depending on the assist level selected), and the startup is smoother.

When I set it to 'enabled' I did not get that large increase in motor current, and the startup was more difficult: it took more of a pedal rotation to get assist actually helping, and the motor 'shudders' and is jerky during that startup.

It is simple to try your self, nothing seems to explode :)
Fireflyer451, the WIKI says it has bugs and recommends not using it. Other than the Enable/Disable being reversed, have you noticed anything?
 
Mr.Flibble said:
Alphonse said:
hosekk said:
Hello, I'm happy user TSDZ2 with opensource firmware.
I have just one problem.
The motor does not stop immediately when I stop pedaling, but after 0,5 - 1 sec.
There was no problem with the original software.

Do You have any idea where is the problem?
I tried many settings but nothing helps.

Display: 860C
firmware: 1.0.0
cadence fast stop mode: enable (no matter also the same when is disable)
(I have 2 bikes with this engine and software, and the same problem is with both)


Thanks for help
I have been working on this problem as well. A couple of questions for you on your settings:

Under "Assist Level" - are you using the default 20 assist levels? If so does the problem occur at all levels or above a certain level?

Under "Motor Control" - are you using Torque mode? Same screen, what maximum current are you using?

I have this issue too..........
High cadence and the motor over runs terribly, making it impossible to change gear without a loud bang.
My settings are standard.

Mr.Flibble, are you using the default of 20 assist levels? Do they have these assist level factors in the settings?

1 - 0.007
2 - 0.009
3 - 0.012
4 - 0.016
5 - 0.021
6 - 0.028
7 - 0.037
8 - 0.049
9 - 0.065
10 - 0.087
11 - 0.115
12 - 0.153
13 - 0.204
14 - 0.271
15 - 0.36
16 - 0.479
17 - 0.637
18 - 0.848
19 - 1.128
20 - 1.5
 
Hello, I'm having a bit of a trouble flashing 860C display. First I tried to do it with cheap PL2303 UART adapters I had, but couldn't get the serial transmission working properly. Then I switched to Arduino Uno board as FTDI adapter, and now I get both RX and TX but nothing seems to be happening in the display.

The TX and RX counts are both increasing after pressing update, and both serial led's are blinking on the Arduino, but the display doesn't seem to respond to serial data, and APT Burn Tools is reporting 'waiting' repeatedly. Pressing power button shortly doesn't do anything. The display is turned off during the update as instructed. If I stop the update and turn on the display, the TX led starts blinking on the Arduino. Inverting TX and RX wires results RX staying at 0.

Here's the display hw information
860C V160 AKSM1.0
V5.2 202004120109

Any ideas, anyone? :)

-Niila
 
Back
Top