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

benno said:
Watchdog Reset / Motor Runaway

I am running a modified version of the opensource ebike firmware OSEF.
When I enable the watchdog, the controller resets every now and then.
It happens every 10 to 100 km and is therefore very difficult to debug.
When i disable the watchdog, i experienced that the motor suddenly keeps
running despite no pedal action takes place.
This implies that the main pwm interrupt is running ok, but the code hangs somewhere.
I remember this was an issue with the OSEF in the past, where the watchdog was deactivated.
Was there a specific commit that got rid of this problem? Does anyone experience restarts with the current
version of the OSEF ?

Just out of curiosity: do you have any news about the new infenion controller that seems to be
on the new TSDZ2 electronics board ?
I am not getting watch dog reset on the 4 ebike I have, that I am aware of.

Could that be missing communications packages on your case, because that may depends on the hardware like wirings, connectors, motor controller hardware, display hardware...

And is your battery in good health? I can imagine a weak battery or weak condition connectors giving drops of power...

I have no news, I am waiting for shops to selling it but I guess we simple can't buy it.
 
Can you tell me the compiler version you are using?
I was always using sdcc 3.9, now i moved to sdcc 4.0 but i keep getting the restarts.
 
benno said:
Can you tell me the compiler version you are using?
I was always using sdcc 3.9, now i moved to sdcc 4.0 but i keep getting the restarts.
sdcc --version
SDCC : stm8 3.6.0 #9615 (Linux)
published under GNU General Public License (GPL)
 
It would be useful to have this info on the brake page in wiki.
Thanks for the clear answer!

perryscope said:
maximusdm said:
I need some help from users with e-brakes. I did not find the info on wiki.
I had to buy a new controller since mine is dead. I bought a 8 pin controller now that has throttle and ebrakes support.
I use the custom firmware with temperature sensor connected to the throttle, so I will use the throttle wires to solder the temp sensor. I do not use ebrakes.

My question is what I can do so the software does not cut the motor power due to missing ebrakes? Is it enough to cut and isolate the wires?

I also have the 8 pin driver and using throttle pin for the temp sensor. I have insulated the brake wire in the wire loom and left it disconnected. It's active-low so as long as it's floating and not grounded the controller should not think the brakes are applied and work as usual. Mine does.
 
Hi guys,

My TSDZ2 is dead 🙁. I opened a separate thread, maybe you could help me diagnosing why my motor suddenly doesn't work anymore after adding a temperature sensor ? (Display oddly shows : Error 3 : Torque Fault)

Would you be kind enough to have a look at it ? https://endless-sphere.com/forums/viewtopic.php?f=30&t=107538#p1574314

Thank you very much 😊
 
pagaille said:
Hi guys,

My TSDZ2 is dead 🙁. I opened a separate thread, maybe you could help me diagnosing why my motor suddenly doesn't work anymore after adding a temperature sensor ? (Display oddly shows : Error 3 : Torque Fault)

Would you be kind enough to have a look at it ? https://endless-sphere.com/forums/viewtopic.php?f=30&t=107538#p1574314

Thank you very much 😊
I did answer there.
 
Thanks @casainho.

Turns out one of the inner hall sensors is not working anymore. Finding the assembly as a spare part looks difficult. Anybody having a fried motor with working hall sensors wanting to sell it to me ?
 
Like @hosekk, I am experiencing the motor not stopping assistance quickly enough when I stop pedaling at higher assist levels. It is taking ~1 second to stop adding motor power after human power is stopped and this makes shifting effectively very difficult.

At lower assist levels such as 6 or 7 it is not a problem but at assist levels >10 it becomes problematic. I typically keep my cadence up and use my gears.

I am a 52V battery and 860C user. My system is new, acquired in the US, and was shipped with Firmware 1.0.0 mid July. The torque sensor has been calibrated per the Wiki and Cadence Fast Stop is disabled. The application is on an ICE recumbent trike (i.e. heavy load).

Any suggestions ref. settings or areas for investigation would be very much appreciated. I have attached a shot of my motor settings just in case they're applicable.

Thx
Capture.JPG
 
Please, please, please, Will someone help me!

I have changed a lot of different settings one at a time. With the torque sensor calibrated and enabled it does work as good but different than it did with it disabled. I have it set up so my maximum output is 850 watts.
To start from a dead stop the crank has to rotate a half a turn and then it shutters for another half or full turn and then it goes.

If I enable startup boost or, and assist without pedal rotation. I have to pedal 2 to 3 rotations for the power assist to turn on. The settings are backward so disable means enable, and enable means disable.
I find myself shifting a lot more than I use to and in a lot of lower gears at the same speed at a lot higher cadence than I used to.

One thing that I notice no matter what I did with the setting, is that the watts can only go as high as the current cadence.

Example in rounded numbers pedaling as hard as you can in a high gear, 10 cadence has a maximum of only 100 watts, 20 cadence has a maximum of 200 watts, 30 cadence has a maximum of 300 watts, 40 cadence has a maximum of 400 watts, 50 cadence has a maximum of 500 watts, 60 cadence has a maximum of 600 watts, then 70-100 cadence has a maximum of 850 watts. It does this in both power and torque modes and with torque sensor calibration enabled and disabled.

The only thing I can think of is that this version 1.0.0 of firmware was set up to be safe on the blue gear. To me this is the way a Bafang’s or cadence power assist works, the faster you pedal the more power it has.

Todays Ride,
I only changed 2 settings, I tried both torque and power along with torque sensor calibration, enable and disable.
Each of the 4 possible settings had their own personality but none was better than the other.

I didn’t do all the stop and starts that I did last time, I just tried to enjoy my ride.

Here Is what I discovered,
From a stop to 30 cadence it has less power than version 20 for sure.
From 30 to 40 cadence it has a small amount less power than version 20.
From 40 to 60 it has almost the same amount of power as version 20.
From 60 to 100 it has a lot more power than version 20.

Version 20 for the LCD3 works much better at lower cadence, you get much more torque at a much lower cadence.
It takes off from the dead stop better. This is the way a torque sensor power assist is designed to work!
Does anyone out there know of a setting that will change this so you get more torque & power at a lower cadence and not only at higher cadence???
And to take off without rotation???

If it’s not possible to get more torque and power at a lower cadence and take off without rotation with version 1.0.0?
Then will someone rewrite the code to offer more torque and power at a lower cadence and add take off without rotation and make a new version?

I have attached my CHEAT SHEET with some of my settings and also photos of my screen at the end of the ride.
Please, please, please, Will someone help me!



Thanks,
Jeff

View attachment SHORT Handcycle, Basic TSDZ2 motor controller firmware version 1.0.0.rtf07-29-20_06_1.jpg07-29-20_05_1.jpg07-29-20_04_1.jpg07-29-20_03_1.jpg07-29-20_02_1.jpg07-29-20_01_1.jpg
 
jeff.page.rides said:
Please, please, please, Will someone help me!
I can´t help because I don't have a handcycle like you to test. For me, on my bicycles, the current firmware version work very well (although is not perfect!).
 
I'm trying to flash my TSDZ2 and 860C display and I'm struggling to get the firmware on the display, wondering if there are any tips.

I am using a FT232RL device as I couldn't find the one mentioned on the wiki. For power I'm using a table top power supply set at 30 volts. I've managed to power on the display using this power supply. When I try and flash the firmware it just stays at "waiting". I short press the power button on the display but nothing.

The wiki doesn't have a guide for how to connect using a different power supply and I was wondering if simply having two wires from the FT232RL (just RX and TX) is enough? will this device not need a ground or something connected to the display to transmit / receive data? I've connected RX to TX of display and TX to RX on display.

I did also at first connect the power to vin rather than p+ but it doesn't seem to have harmed the display as it still switches on.

Many thanks

[Update]

I've seen in another post that you do need to connect the grounds from the power supply and the TTL device which I've done now. I found that in the "Waiting" state when trying to flash that both the RX and TX counts were flying up, even with the screen without power. I changed the TTL device to 3.3v from 5V and now when it's in "waiting" the TX number rolls up but the RX number does not. Short holding the power button does nothing but long holding the power button increased the RX by 1 but no update starts and the display just switches on.

[Update]

Flashed! On my weird TTL adaptor I had to go RX to RX and TX to TX. I've triple checked that I've not got them backwards as they are marked. On to the main motor next.

Can I suggest adding at least the ground to ground thing on the wiki and perhaps checking the direction of RX as it appears to be printed backwards on my device. If you agree I'm happy to make a pull request. I'm now not sure if I needed to be 3.3v or 5v but 3.3v worked for me.
 
casainho said:
jeff.page.rides said:
Please, please, please, Will someone help me!
I can´t help because I don't have a handcycle like you to test. For me, on my bicycles, the current firmware version work very well (although is not perfect!).
Jeff, the only other option left for you to try is to grab a copy of the torque only code fork that user 'r0mko' made, back in April. He set a very aggressive current ramp hardcoded in the firmware. You can find a link to this code fork if you search the main forum.

You will need to downgrade your display firmware, but I cannot remember to what version.
 
HughF said:
casainho said:
jeff.page.rides said:
Please, please, please, Will someone help me!
I can´t help because I don't have a handcycle like you to test. For me, on my bicycles, the current firmware version work very well (although is not perfect!).
Jeff, the only other option left for you to try is to grab a copy of the torque only code fork that user 'r0mko' made, back in April. He set a very aggressive current ramp hardcoded in the firmware. You can find a link to this code fork if you search the main forum.

You will need to downgrade your display firmware, but I cannot remember to what version.

FIXED,FIXED,FIXED!!!
UNDER MOTOR, I CHANGED MAX CURRENT FROM 20 TO 30
What this did is now it has low end torque at low Cadence!
Above 60 cadance it's is the same as when the setting is at 20, but with the setting at 30 from 20 - 60 cadance now has the same assist as v20!!

NOW!!!
I need help with assistant without pedal rotation and with start up boost!
With either one or both enabled I have to pedal several rotations before the power comes on.
What this means to me is that enable and disable are backwards.
With both disabled, it starts to turn on after a half rotation and then shutters for another full rotation and then starts to give assist.

Has anyone had success with getting either one of these to give assist from a dead stop???

Thanks,
Jeff

TSDZ2 V1 MOTOR 08-01-2020_1.jpg
 
maxwe789 said:
Can I suggest adding at least the ground to ground thing on the wiki and perhaps checking the direction of RX as it appears to be printed backwards on my device. If you agree I'm happy to make a pull request. I'm now not sure if I needed to be 3.3v or 5v but 3.3v worked for me.
Nice that you did it! Yes, please make the pull request with your contribution to improve the wiki instructions.
 
jeff.page.rides said:
FIXED,FIXED,FIXED!!!
UNDER MOTOR, I CHANGED MAX CURRENT FROM 20 TO 30
What this did is now it has low end torque at low Cadence!
Above 60 cadance it's is the same as when the setting is at 20, but with the setting at 30 from 20 - 60 cadance now has the same assist as v20!!

NOW!!!
I need help with assistant without pedal rotation and with start up boost!
With either one or both enabled I have to pedal several rotations before the power comes on.
What this means to me is that enable and disable are backwards.
With both disabled, it starts to turn on after a half rotation and then shutters for another full rotation and then starts to give assist.

Has anyone had success with getting either one of these to give assist from a dead stop???
Yes, but I set assist without pedal to enabled and set startup boost to disabled. I think the logic behind startup boost is reversed.

I find that if you want real performance from this motor from a standstill, you need to use a high assist level, such as 13/15/20. On assist level 20, I can get full 650w of power from the motor just by placing very slight pedal pressure, which is good fun, but can be a bit too much fun without brake sensors.
 
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?
 
HughF said:
jeff.page.rides said:
FIXED,FIXED,FIXED!!!
UNDER MOTOR, I CHANGED MAX CURRENT FROM 20 TO 30
What this did is now it has low end torque at low Cadence!
Above 60 cadance it's is the same as when the setting is at 20, but with the setting at 30 from 20 - 60 cadance now has the same assist as v20!!

NOW!!!
I need help with assistant without pedal rotation and with start up boost!
With either one or both enabled I have to pedal several rotations before the power comes on.
What this means to me is that enable and disable are backwards.
With both disabled, it starts to turn on after a half rotation and then shutters for another full rotation and then starts to give assist.

Has anyone had success with getting either one of these to give assist from a dead stop???
Yes, but I set assist without pedal to enabled and set startup boost to disabled. I think the logic behind startup boost is reversed.

I find that if you want real performance from this motor from a standstill, you need to use a high assist level, such as 13/15/20. On assist level 20, I can get full 650w of power from the motor just by placing very slight pedal pressure, which is good fun, but can be a bit too much fun without brake sensors.

Be careful with riding with high assist level. I usually ride in 8-9 levels. With 10-11 the motor gets really hot to touch after a 30 minutes ride.
 
Nfer said:
HughF said:
jeff.page.rides said:
FIXED,FIXED,FIXED!!!
UNDER MOTOR, I CHANGED MAX CURRENT FROM 20 TO 30
What this did is now it has low end torque at low Cadence!
Above 60 cadance it's is the same as when the setting is at 20, but with the setting at 30 from 20 - 60 cadance now has the same assist as v20!!

NOW!!!
I need help with assistant without pedal rotation and with start up boost!
With either one or both enabled I have to pedal several rotations before the power comes on.
What this means to me is that enable and disable are backwards.
With both disabled, it starts to turn on after a half rotation and then shutters for another full rotation and then starts to give assist.

Has anyone had success with getting either one of these to give assist from a dead stop???
Yes, but I set assist without pedal to enabled and set startup boost to disabled. I think the logic behind startup boost is reversed.

I find that if you want real performance from this motor from a standstill, you need to use a high assist level, such as 13/15/20. On assist level 20, I can get full 650w of power from the motor just by placing very slight pedal pressure, which is good fun, but can be a bit too much fun without brake sensors.

Be careful with riding with high assist level. I usually ride in 8-9 levels. With 10-11 the motor gets really hot to touch after a 30 minutes ride.

Thanks for the warning, but I have my TSDZ2 oil cooled.
I can run 850 Watts all day with no over heating.
I will share how I did it after I perfect the process.
 
jeff.page.rides said:
......oil cooled.
I can run 850 Watts all day with no over heating.
I will share how I did it after I perfect the process.
That is interesting, I'm curious how you have managed this.
I will wait patiently for your report.
 
Elinx said:
jeff.page.rides said:
......oil cooled.
I can run 850 Watts all day with no over heating.
I will share how I did it after I perfect the process.
That is interesting, I'm curious how you have managed this.
I will wait patiently for your report.

Me too!
 
Nfer said:
Be careful with riding with high assist level. I usually ride in 8-9 levels. With 10-11 the motor gets really hot to touch after a 30 minutes ride.

I am so over caring about motor heat and/or my blue gear. If it burns out or destroys itself, I will just buy another and fix mine.
 
Veko said:
I encountered error message "Error Brakes" on the first boot. I searched the forums and found casainho's post earlier this year indicating it might also be related to TX error as well as to brakes. This leads me to think that my harness wiring might be wrong, but looking at it, I can't really find error on my end. My TSDZ2 has a 8 pin male connector, so I wired 1T4 bafang 8 pin cable to a female 8 pin connector according to a post I found on another thread. I checked Bafang wiring diagram and the wiki wiring diagram and couldn't find errors in the wiring shown below in the image. Any idea what might be the problem?

EC5zbo2.jpg

NMk675h.jpg


The display and motor firmware updates were successfull on the first round. I tried to flash both again for the second time, but same error persists.

During the display flashing process, at first it didn't work when CP2102 was wired according to the picture as shown in wiki (TX to RX, RX to TX), so I reversed it and the update process worked after that. Could it be that TX and RX wires are somehow reversed in my 860C cable?

Hello! This is me. Did you get a resolution here? What colour mapping worked for you between the 860C and the 8 wire TSDZ2 loom? Many thanks to you!
 
bejam said:
Veko said:
I encountered error message "Error Brakes" on the first boot. I searched the forums and found casainho's post earlier this year indicating it might also be related to TX error as well as to brakes. This leads me to think that my harness wiring might be wrong, but looking at it, I can't really find error on my end. My TSDZ2 has a 8 pin male connector, so I wired 1T4 bafang 8 pin cable to a female 8 pin connector according to a post I found on another thread. I checked Bafang wiring diagram and the wiki wiring diagram and couldn't find errors in the wiring shown below in the image. Any idea what might be the problem?

EC5zbo2.jpg

NMk675h.jpg


The display and motor firmware updates were successfull on the first round. I tried to flash both again for the second time, but same error persists.

During the display flashing process, at first it didn't work when CP2102 was wired according to the picture as shown in wiki (TX to RX, RX to TX), so I reversed it and the update process worked after that. Could it be that TX and RX wires are somehow reversed in my 860C cable?

Thanks for this very useful post on the wiring for the 8-pin TSDZ2 with 860C and the 1T4 cable with a male end. I think I have exactly the same setup as you. I have been struggling finding consistent info. There seem to various different cables and versions out there.

I have the throttle version of TSDZ2 with 8-pin male connector. bought the 1T4 bafang cable which has a male 8 pin one end. The 4 ends have a green 5 pin lead and 3 yellow 3 pin leads (one male, two female). I separately bought a higo 8 pin extension lead (so one end female, the other male) with the intention of cutting off the female end and wiring it to the 1T4. I like you am worried about blowing something up if the connections are wrong! But I came to the exact same wiring mapping as you. I also found that when I wired the 860c programming cable with the USB device that I had to reverse TX and RX.

My question is whether you ended up reversing TX/RX in the main 8 pin cable (so different from the diagram you posted)? That would mean HIGO Yellow to 1T4 Yellow (RX), and HIGO Brown to 1T4 Green (TX). Also I am assuming the pin layout for the higo given in the wiki for 8 pin here is the correct pin order to match to the motor 8-pin male: https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/Wire-860C-850C-to-TSDZ2

Any help much appreciated!

Hello Bejam - did you get a result here - we have the same problem we think. I think that Veko has the same also.
 
Hi Jeff.page.rides

I tried a few of the settings you suggested, to help with starting from a dead stop. Here is what I found.

1. Motor/Max Current = 30, Current Ramp = 10
Torque Sensor/ Assist w/o pedal rotation = Disabled, Boost = disabled (which is enabled), Min ADC = 10
Result: pressure on the pedals do nothing (no rotation), rotating pedals almost 2 rotations begins assist from motor
initial motor current will jump to 18 amps, then drop quickly

2. Same as #1, Torque Sensor/ Assist w/o pedal rotation = Enabled, Boost = disabled (which is enabled), Min ADC = 10
Result: Very hard pressure on the pedals (no rotation) will start the assist. 1/4 rotation of the pedals begins assist from motor

3. Motor/Max Current = 13, Current Ramp = 5
Torque Sensor/ Assist w/o pedal rotation = Enabled, Boost = disabled (which is enabled), Min ADC = 10
Result: Very hard pressure on the pedals (no rotation) will start the assist. 1/4 rotation of the pedals begins assist from motor
initial motor current will jump to 12 amps, then drop quickly

#3 is what I have left my motor set to for the time being. I did not really feel a startup difference between Max Current = 30 vs 13.

I think the torque sensor calibration has some effect on the setting: "Torque Sensor/ Assist w/o pedal rotation". Right now my pedal weights are fairly high, based on some other posts about the torque sensor not really working well unless you max out that pedal pressure/weights. Not completely sure about this but I am experimenting. I will say that for my prior OSF version motor firmware: 0.5.2 and 850c display firmware: 0.6.3 , this "Assist w/o pedal rotation" was much more sensitive and reacted with very little pedal pressure (I have e-brakes installed so this is easy to control). Not true with OSF version 1.0, for me anyway.

I agree with you about the 'Boost' setting, it appears to be backwards (disabled = boost activated), and I have it set that way.
Not a fan of the high startup motor current when setting. I have the temperature sensor installed and configured.
 
fireflyer451 said:
Hi Jeff.page.rides

I tried a few of the settings you suggested, to help with starting from a dead stop. Here is what I found.

1. Motor/Max Current = 30, Current Ramp = 10
Torque Sensor/ Assist w/o pedal rotation = Disabled, Boost = disabled (which is enabled), Min ADC = 10
Result: pressure on the pedals do nothing (no rotation), rotating pedals almost 2 rotations begins assist from motor
initial motor current will jump to 18 amps, then drop quickly

2. Same as #1, Torque Sensor/ Assist w/o pedal rotation = Enabled, Boost = disabled (which is enabled), Min ADC = 10
Result: Very hard pressure on the pedals (no rotation) will start the assist. 1/4 rotation of the pedals begins assist from motor

3. Motor/Max Current = 13, Current Ramp = 5
Torque Sensor/ Assist w/o pedal rotation = Enabled, Boost = disabled (which is enabled), Min ADC = 10
Result: Very hard pressure on the pedals (no rotation) will start the assist. 1/4 rotation of the pedals begins assist from motor
initial motor current will jump to 12 amps, then drop quickly

#3 is what I have left my motor set to for the time being. I did not really feel a startup difference between Max Current = 30 vs 13.

I think the torque sensor calibration has some effect on the setting: "Torque Sensor/ Assist w/o pedal rotation". Right now my pedal weights are fairly high, based on some other posts about the torque sensor not really working well unless you max out that pedal pressure/weights. Not completely sure about this but I am experimenting. I will say that for my prior OSF version motor firmware: 0.5.2 and 850c display firmware: 0.6.3 , this "Assist w/o pedal rotation" was much more sensitive and reacted with very little pedal pressure (I have e-brakes installed so this is easy to control). Not true with OSF version 1.0, for me anyway.

I agree with you about the 'Boost' setting, it appears to be backwards (disabled = boost activated), and I have it set that way.
Not a fan of the high startup motor current when setting. I have the temperature sensor installed and configured.

Thanks for your input, I will try again on Tuesday.
 
Back
Top