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

Electric Motors and Controllers
HrKlev   100 W

100 W
Posts: 205
Joined: Dec 06 2019 10:24am

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

Post by HrKlev » May 01 2020 1:28am

So - does this mean I can increase the assist up to ~120rpm on a 36V motor running on a 36V battery (switching to a 48V or 52V not an option for me)? Might have to try this if that is the case, the ~90rpm limit is the biggest issue with the stock firmware for me...
DIY lightweight mid drive with torque sensing build thread: viewtopic.php?f=6&t=107622

casainho   100 GW

100 GW
Posts: 5022
Joined: Feb 14 2011 2:43pm

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

Post by casainho » May 01 2020 2:11am

HrKlev wrote:
May 01 2020 1:28am
So - does this mean I can increase the assist up to ~120rpm on a 36V motor running on a 36V battery (switching to a 48V or 52V not an option for me)? Might have to try this if that is the case, the ~90rpm limit is the biggest issue with the stock firmware for me...
See this feedback:
Martin555 wrote:
Apr 27 2020 2:53pm
First of all, I want to say thank you to Casainho and all contributors!! Your firmware doubled the value of my TSDZ2!
After the fix I were now able to install 1.0.0 on my SW102 and I have to admit, it put my motor on a new level. I found no issues yet at all. I use the motor with a 24v battery, which I removed from an electric skateboard, hence until now the motor only supported up to a cadence of 50. But the update destroyed this large disadvantage. So if you need feedback or testing of particular features with this voltage, I'd be pleased to help.
- EBike wireless standard: wireless motor, wireless cycling GPS display Garmin Edge and wireless remote with wireless brake sensor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

Please consider a donation to help developments: paypal.me/jorgecasa

rcx194   10 mW

10 mW
Posts: 28
Joined: Mar 18 2020 5:29pm

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

Post by rcx194 » May 01 2020 12:30pm

Hi there, I've just finished making up my cable to flash an 860C for use with my TSDZ2. I just want to ask about how the new 860C display will be powered once I've wired it to my TSDZ2 which uses a 52v battery. According to the TSDZ2 Opensource firmware Github wiki, the 860C uses voltage 27v - 35v. But my bicycle is using a 52v battery. Will I therefore need to do some sort of voltage reduction to the 860C display ?

casainho   100 GW

100 GW
Posts: 5022
Joined: Feb 14 2011 2:43pm

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

Post by casainho » May 01 2020 12:37pm

rcx194 wrote:
May 01 2020 12:30pm
Hi there, I've just finished making up my cable to flash an 860C for use with my TSDZ2. I just want to ask about how the new 860C display will be powered once I've wired it to my TSDZ2 which uses a 52v battery. According to the TSDZ2 Opensource firmware Github wiki, the 860C uses voltage 27v - 35v. But my bicycle is using a 52v battery. Will I therefore need to do some sort of voltage reduction to the 860C display ?
Please give details how you did your cable - will you power the display from your battery or from the power booster board?

If is from your battery, no problem as the display works for a battery up to 60V.
- EBike wireless standard: wireless motor, wireless cycling GPS display Garmin Edge and wireless remote with wireless brake sensor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

Please consider a donation to help developments: paypal.me/jorgecasa

rcx194   10 mW

10 mW
Posts: 28
Joined: Mar 18 2020 5:29pm

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

Post by rcx194 » May 01 2020 1:45pm

Hi, I wired up as follows:
Image

Ok, I think I understand my confusion now, the Wiki refers to the max power of the booster board and not the 860C:

Image

rcx194   10 mW

10 mW
Posts: 28
Joined: Mar 18 2020 5:29pm

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

Post by rcx194 » May 01 2020 2:07pm

Another question. Once I have flashed the 860C display, will it work with motor that has stock firmware? Or do I have to flash the display and motor together ?

skestans   100 W

100 W
Posts: 167
Joined: Jul 12 2019 12:42am
Location: Switzerland

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

Post by skestans » May 01 2020 3:11pm

rcx194 wrote:Another question. Once I have flashed the 860C display, will it work with motor that has stock firmware? Or do I have to flash the display and motor together ?
You have to go OSF all the way. Make sure to match the display version with the right motor version of the osf

rcx194   10 mW

10 mW
Posts: 28
Joined: Mar 18 2020 5:29pm

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

Post by rcx194 » May 01 2020 5:13pm

I've got an 860C display and two USB-UARTs with the DIY cable all wired up correctly. I can switch on the display and see that it has power. When I boot APT Burn Tools, select port 3, open port, openFirmware, start update. The RX and TX counters start going up and waiting appears in the status window. When I press the power button on display pad the RX counter stops, but the display window keeps showing Waiting.

I tried my other USB-UART. On that one the RX counter stays at zero.
Display is off when I do all this.

I've tried doing the same from another computer, but same result.

Any ideas on what to try next?

skestans   100 W

100 W
Posts: 167
Joined: Jul 12 2019 12:42am
Location: Switzerland

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

Post by skestans » May 02 2020 2:19am

rcx194 wrote:I've got an 860C display and two USB-UARTs with the DIY cable all wired up correctly. I can switch on the display and see that it has power. When I boot APT Burn Tools, select port 3, open port, openFirmware, start update. The RX and TX counters start going up and waiting appears in the status window. When I press the power button on display pad the RX counter stops, but the display window keeps showing Waiting.

I tried my other USB-UART. On that one the RX counter stays at zero.
Display is off when I do all this.

I've tried doing the same from another computer, but same result.

Any ideas on what to try next?
Don’t forget to connect GND to the display and to your usb ttl, that was my issue. Also you could try swapping RX and tx, maybe they’re inverted.

rcx194   10 mW

10 mW
Posts: 28
Joined: Mar 18 2020 5:29pm

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

Post by rcx194 » May 02 2020 5:12am

Thank you, you were right, ground was not connected as I didn't think it was needed. My display has now been flashed.
I've now gone to do my motor. Is it normal to see all those funky charactors in the STVisual software? And when I opened the TSDZ2 OpenSource 0.057.0 hex file I also got lots of out of range errors. Maybe my cable is too long, currently it's 30cm, I'll shorten it.

Image

rcx194   10 mW

10 mW
Posts: 28
Joined: Mar 18 2020 5:29pm

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

Post by rcx194 » May 02 2020 5:37am

Sorry I was in the wrong tab, I was in PROGRAM MEMORY instead of DATA MEMORY. The funky charactors are now gone. But I still get the "out of range" errors when loading the TSDZ2 Open Source .hex file.

Image

rcx194   10 mW

10 mW
Posts: 28
Joined: Mar 18 2020 5:29pm

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

Post by rcx194 » May 02 2020 5:49am

Sorry, again ignore my silly mistake. Had to set the processor to STM8S105x6. It was still set to x4 from when I flashed it with 52v firmware. Ok, now time to make the new wiring loom.

casainho   100 GW

100 GW
Posts: 5022
Joined: Feb 14 2011 2:43pm

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

Post by casainho » May 02 2020 6:27am

rcx194 wrote:
May 02 2020 5:49am
Sorry, again ignore my silly mistake. Had to set the processor to STM8S105x6. It was still set to x4 from when I flashed it with 52v firmware. Ok, now time to make the new wiring loom.
You should install the latest version: 1.0.0-alpha.4.
- EBike wireless standard: wireless motor, wireless cycling GPS display Garmin Edge and wireless remote with wireless brake sensor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

Please consider a donation to help developments: paypal.me/jorgecasa

rcx194   10 mW

10 mW
Posts: 28
Joined: Mar 18 2020 5:29pm

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

Post by rcx194 » May 02 2020 7:28am

I'll do as you say, but are you sure I should install an Alpha version?

casainho   100 GW

100 GW
Posts: 5022
Joined: Feb 14 2011 2:43pm

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

Post by casainho » May 02 2020 7:56am

rcx194 wrote:
May 02 2020 7:28am
I'll do as you say, but are you sure I should install an Alpha version?
That was me that gave the name as alpha, because I am still developing it a bit before final release. Still, there is great feedback from users, there are no big issues at all.
- EBike wireless standard: wireless motor, wireless cycling GPS display Garmin Edge and wireless remote with wireless brake sensor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

Please consider a donation to help developments: paypal.me/jorgecasa

rcx194   10 mW

10 mW
Posts: 28
Joined: Mar 18 2020 5:29pm

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

Post by rcx194 » May 02 2020 8:25am

Ok, I'll update the software tonight. I've just finished the new loom and everything works, the bike rides much better, thank you, excellent work, it's really nice to see such a strong community here. The install was very easy with the wiki. I've just sent you a Paypal donation.

A few questions:
1. Why is the motor current and battery current different?
2. My motor is new but I've already noticed there is some slight "play", wobble, in the main shaft. Is this normal? Can I adjust this out when I take the motor apart? I need to fit the temp sensor so I can do it then.

casainho   100 GW

100 GW
Posts: 5022
Joined: Feb 14 2011 2:43pm

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

Post by casainho » May 03 2020 3:31am

rcx194 wrote:
May 02 2020 8:25am
Ok, I'll update the software tonight. I've just finished the new loom and everything works, the bike rides much better, thank you, excellent work, it's really nice to see such a strong community here. The install was very easy with the wiki. I've just sent you a Paypal donation.

A few questions:
1. Why is the motor current and battery current different?
2. My motor is new but I've already noticed there is some slight "play", wobble, in the main shaft. Is this normal? Can I adjust this out when I take the motor apart? I need to fit the temp sensor so I can do it then.
Thanks.

And see this:
1. The power that is pulled from the battery is the same power used by the motor.
2. Let's say the power being draw from the battery is 100 watts.
3. On the motor controller we only direct control the voltage we apply to the motor coils, by the amount of PWM duty-cycle. A 100% value means we are applying full battery voltage and 50%, half.
4. As the power on both sides is equal, let's say we are applying 25% PWM duty-cycle. Battery voltage of 50V, 100W, battery current = 100 / 50 = 2 amps. Now for motor: motor current = 100 / (50 * 0.25) = 8 amps. So, on the motor side, the voltage is 1/4 and the current is x4.

See that at startup, we start to apply low PWM so the motor current is very high but voltage very low, but the motor current is what gives torque.

See that you can think as on pedals, cadence value being the voltage and torque as current. You start with low cadence and high torque and then they shift over increasing cadence, even if you maintain the same power.
- EBike wireless standard: wireless motor, wireless cycling GPS display Garmin Edge and wireless remote with wireless brake sensor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

Please consider a donation to help developments: paypal.me/jorgecasa

john61ct   100 GW

100 GW
Posts: 7262
Joined: Dec 18 2018 2:06pm

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

Post by john61ct » May 03 2020 6:15am

Does "motor current" and "phase current" mean the same?

casainho   100 GW

100 GW
Posts: 5022
Joined: Feb 14 2011 2:43pm

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

Post by casainho » May 03 2020 6:31am

john61ct wrote:
May 03 2020 6:15am
Does "motor current" and "phase current" mean the same?
Yes, motor current means the phase motor current. The hardware only measures average of battery current and motor current is calculated as battery current / PWM duty-cycle.
- EBike wireless standard: wireless motor, wireless cycling GPS display Garmin Edge and wireless remote with wireless brake sensor
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

Please consider a donation to help developments: paypal.me/jorgecasa

raw   1 W

1 W
Posts: 50
Joined: Apr 24 2020 3:51pm

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

Post by raw » May 03 2020 9:44am

@casainho would it be possible to use the usb port of the 860c for communication with an smartphone? Or is it power only?

Nfer   10 W

10 W
Posts: 84
Joined: Sep 17 2019 6:51am

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

Post by Nfer » May 03 2020 4:46pm

Great job Casainho!!!
Just finished my test ride of the 1.0.0.Alpha4 with SW102. Noticed higher power than V0.20 with which I never reached 450watts.
Everything worked fine including the lights. My only observation is for the boost configuration. I expected a multiplier factor per level, not the 0.00X. Can we come back to a factor instead of the total power? Or even better, can you add an overall factor for all the levels? My SW102 display up and down buttons are in terrible condition after flash the display.

To the guys that use the SW102, do you have any waterproof problem after open the case?

navasjm   100 µW

100 µW
Posts: 8
Joined: Jun 11 2019 7:12pm

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

Post by navasjm » May 04 2020 9:16am

Hi

Sorry if this topic has been treated before in the forum but I’ve looking and i don’t have an answer yet


I have a tongsheng TSDZ2 in my bike and now I’m gonna upgrade to the 860c display; I want to buy the cable to connect the motor with the 860c display, my motor has a male connector and the only cable that I found that is female is 1to4 but I’m not gonna need the throttle cable since I’m gonna install de temperature sensor, so I need a 1to3 cable (only for the display and brakes) but the one that I find has a male connection and it’s not compatible with my motor.

Then I’d like to know which one of the next options do you recommend:

1. Buy the 1to4 cable with female connector, in which case the throttle connection would remain disconnected/unused all the time.

https://www.eco-ebike.com/collections/t ... -connector

2. Buy the 1to3 cable (which has a male connector) and get an adaptor/extension cable male to female to connect the motor.

https://www.eco-ebike.com/collections/t ... bbs-motors


US $8.99 | E-bike 1T4 8Pin Extension Cable for 8fun/bafang BBS BBSHD Mid Drive Motor Kit
https://a.aliexpress.com/_dVdnn0h


Personally I prefer the 2nd option BUT I’d have to cut both the adapter/extension cable and the 1to3 cable since they’re too long, and I really don’t know if this is recommended.

What I don’t like about the first option is that one connector will remain unused/disconnected I don’t know if this could present any problem.

Thanks in advance for your help.

navasjm   100 µW

100 µW
Posts: 8
Joined: Jun 11 2019 7:12pm

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

Post by navasjm » May 04 2020 9:16am

Hi

Sorry if this topic has been treated before in the forum but I’ve looking and i don’t have an answer yet


I have a tongsheng TSDZ2 in my bike and now I’m gonna upgrade to the 860c display; I want to buy the cable to connect the motor with the 860c display, my motor has a male connector and the only cable that I found that is female is 1to4 but I’m not gonna need the throttle cable since I’m gonna install de temperature sensor, so I need a 1to3 cable (only for the display and brakes) but the one that I find has a male connection and it’s not compatible with my motor.

Then I’d like to know which one of the next options do you recommend:

1. Buy the 1to4 cable with female connector, in which case the throttle connection would remain disconnected/unused all the time.

https://www.eco-ebike.com/collections/t ... -connector

2. Buy the 1to3 cable (which has a male connector) and get an adaptor/extension cable male to female to connect the motor.

https://www.eco-ebike.com/collections/t ... bbs-motors


US $8.99 | E-bike 1T4 8Pin Extension Cable for 8fun/bafang BBS BBSHD Mid Drive Motor Kit
https://a.aliexpress.com/_dVdnn0h


Personally I prefer the 2nd option BUT I’d have to cut both the adapter/extension cable and the 1to3 cable since they’re too long, and I really don’t know if this is recommended.

What I don’t like about the first option is that one connector will remain unused/disconnected I don’t know if this could present any problem.

Thanks in advance for your help.

zillap   100 µW

100 µW
Posts: 8
Joined: May 04 2020 10:01am

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

Post by zillap » May 04 2020 10:20am

1.0.0 alpha4 Light testing

First of all hudge thanks to all you guys for incredible work that is made on this software.
Here I decided to report on my test regarding Light issue, also I am able to do further tests and report if needed.

Motor 36V, Battery 36V. Firmware version 1.0.0 alpha4.
Light - 1pcs LED 6V 2,5W
ADC value with Light on fluctuates from 0 to 1
Light ON
With ADC offset 0 - no motor power
With ADC offset from 1 to 4 the same issue (also check on video):
After start of pedaling - no motor power.
After some time of pedaling motor kicks in suddenly.
I was unable to determine any relation on pedaling duration or power before motor starts working.

Hope it helps.

[youtube]https://youtu.be/lvhxy4NHH0A[/youtube]

ilu   100 W

100 W
Posts: 121
Joined: Oct 18 2019 10:51am

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

Post by ilu » May 04 2020 10:21am

navasjm wrote:
May 04 2020 9:16am
Personally I prefer the 2nd option BUT I’d have to cut both the adapter/extension cable and the 1to3 cable since they’re too long, and I really don’t know if this is recommended.

What I don’t like about the first option is that one connector will remain unused/disconnected I don’t know if this could present any problem.

Thanks in advance for your help.
I would buy the 1to4 cable and just cut the throttle and seal it with a bit of heat shrink tube and glue. Unused connector won't be a problem but if you know you are not going to use it, cutting it off gives a slightly cleaner look.

Post Reply