New "TSDZ2 Torque Sensor Central Motor"

@jbalat
if you just want to go with a "overdrive" setup.
which means more volts to the controller you just have to change the volt settings in the eeprom.
however 15s on 36v motor seems to be quit high ;)

info for setting voltage using STLinkV2 clone:
https://opensourceebikefirmware.bitbucket.io/kunteng_lcd3/TSDZ2_configure_battery_voltage_and_motor_current.html
and
https://opensourceebikefirmware.bitbucket.io/development_tsdz2/Various--2018.04.18_-_original_firmware_and_debug_session_using_OpenOCD.html

so connect STLinkV2 and use
stm8flash -c stlinkvz -p stm8s105?4 -s eeprom -r TSDZZ_original_firmware_eeprom.bin
to read eeprom

edit TSDZZ_original_firmware_eeprom.bin using eg. ghex to your liking

write new eeprom.
stm8flash -c stlinkvz -p stm8s105?4 -s eeprom -w TSDZZ_original_firmware_eeprom.bin

@casainho
hope thats correct ;)
 
jbalat said:
if 42v gives 90 rpm then 63v should give 135rpm right ?
Can the motor controller PWM handle this ? Sorry my bad but I couldnt figure out what ERPS's are.....

Casainho just to be clear are you saying your firmware only works with throttle ? since I don't have a throttle and don't intend to use one on this bike..
Motor should not rotate more than 550 ERPS (ERPM=Mechanical RPM*Pole pairs; ERPS = ERPM / 60), on original firmware and our OpenSource firmware.

I just bought a new bicycle that I will also use for development. I also got a new TSDZ2 and now this has torque sensor works. I just tested the torque sensor as a "throttle" and it works well. Still, I now think that still are a lot of to improve: send information to LCD3 and implement the motor control with the torque sensor signal. After having this, then I think will be good for testing.

upload pictures
 
As far as I know nobody has tested a 15s battery yet, as I too am interested in using a 15s battery with a 45-63v range but with the 48v motor.

One issue that I can think of regarding a very high max engine rpm (135+/-) is that when running at a cruising speed you will be running the engine at lower rpms. I think that may be why the cadence is set lower, so when pedaling at a leisurely rate you are not too low in the engine rpms. It is a shame we cannot control the voltage on the fly, so when in race mode cadence could be 140 but in cruise mode cadence could be 70.

My motor does not seem to like being run at lower rpms in high gear. If I am cruising at 20mph 6th gear works great but 7th does not seem right at that speed. I can feel that the motor does not like pushing that much torque (750w) outside of it's upper rpm range. If I were doing 24mph 7th gear feels fine.
 
Hi all, first post here.

I've been running a BBS02 and a 52V luna shark on my Trek 8.4DS since last November, and love it.
I was intrigued by the tsdz2 and after reading this entire thread (100 pages as of this writing) I bought a 52v unit from Ebird on amazon.

I've got it on the bike now but motor does not seem to work. The display works, the satellite button array works, speedometer function works, included light works, but no throttle or torque-sensing action.

I've made sure battery is charged, no pins bent in any of the connectors, etc. I am not using the brake levers with the switches.
No change if I unplug the throttle.

Before I begin dealing with the seller, is there some magical incantation I can perform to get this working?
 
pedalTex said:
Hi all, first post here.

I've been running a BBS02 and a 52V luna shark on my Trek 8.4DS since last November, and love it.
I was intrigued by the tsdz2 and after reading this entire thread (100 pages as of this writing) I bought a 52v unit from Ebird on amazon.

I've got it on the bike now but motor does not seem to work. The display works, the satellite button array works, speedometer function works, included light works, but no throttle or torque-sensing action.

I've made sure battery is charged, no pins bent in any of the connectors, etc. I am not using the brake levers with the switches.
No change if I unplug the throttle.

Before I begin dealing with the seller, is there some magical incantation I can perform to get this working?

Try draining the battery under 55.5v or so and see if that works. Perhaps they sent you a 48v version.

You can also try disconnecting the speed sensor, it is not necessary for motor operation.
 
Just to confirm that TSDZ2 works well with a 24V battery. I will be running the 36V with a 24V battery (until I install a 48V battery) and the EEPROM is this one:

 
casainho said:
angusinalberta said:
Casainho replied to my query about adding a datalogger:
Technically is very easy to implement that with our improved original firmware, because all of that data is already sent to the LCD3 by the serial line.
Anyway, I think that best idea is just to connect in parallel to the wire that comes from TSDZ2 motor controller to the LCD3, that that means no need to open or wire anything inside LCD3.
Fantastic! This becomes much easier than I imagined.
What is the baud rate parity etc of the stream?
3.3V or 5V?
What is the word size? 2 bytes?
Are there any control characters in the stream for synching? For example I'd expect something like:
cc A B C D E cc A B C D E... rather than A B C D E A B C D E...

Anything else I should know?
I can help you but I am only interested in doing it if you promise you will share some notes, photos and the Arduino code, on github as OpenSource.

No problem with sharing notes. In fact I had 2 papers published in "Human Power" many years ago. http://ihpva.org/hparchive.htm
I can't promise any Arduino-specific code, at least at first. I'll start with whatever micro-controllers and compilers I still have on hand. Photos are no problem.

Cheers,
Angus
 
casainho said:
Just to confirm that TSDZ2 works well with a 24V battery. I will be running the 36V with a 24V battery (until I install a 48V battery) .....
Have you measured the max cadence on 24 v ? ...
...im guessing it should be around 60 rpm ?
Boy, i wish it was just a program change (via the Display menus) to alter the operating voltage settings ! :evil:
 
pedalTex said:
Hi all, first post here.

I've been running a BBS02 and a 52V luna shark on my Trek 8.4DS since last November, and love it.
I was intrigued by the tsdz2 and after reading this entire thread (100 pages as of this writing) I bought a 52v unit from Ebird on amazon.

I've got it on the bike now but motor does not seem to work. The display works, the satellite button array works, speedometer function works, included light works, but no throttle or torque-sensing action.

I've made sure battery is charged, no pins bent in any of the connectors, etc. I am not using the brake levers with the switches.
No change if I unplug the throttle.

Before I begin dealing with the seller, is there some magical incantation I can perform to get this working?

Fwiw I bought the same unit from ebird on amazon and am using a 52v pack from recycles-ebike without any issues.

Should be a sticker on the bottom of the unit that gives details about which motor you got, in case something got switched accidently.

Does everything spin freely? Is the crank under any load when you power it on?
 
angusinalberta said:
casainho said:
angusinalberta said:
Casainho replied to my query about adding a datalogger:
Technically is very easy to implement that with our improved original firmware, because all of that data is already sent to the LCD3 by the serial line.
Anyway, I think that best idea is just to connect in parallel to the wire that comes from TSDZ2 motor controller to the LCD3, that that means no need to open or wire anything inside LCD3.
Fantastic! This becomes much easier than I imagined.
What is the baud rate parity etc of the stream?
3.3V or 5V?
What is the word size? 2 bytes?
Are there any control characters in the stream for synching? For example I'd expect something like:
cc A B C D E cc A B C D E... rather than A B C D E A B C D E...

Anything else I should know?
I can help you but I am only interested in doing it if you promise you will share some notes, photos and the Arduino code, on github as OpenSource.
No problem with sharing notes. In fact I had 2 papers published in "Human Power" many years ago. http://ihpva.org/hparchive.htm
I can't promise any Arduino-specific code, at least at first. I'll start with whatever micro-controllers and compilers I still have on hand. Photos are no problem.
Ok, let's go!!

So, you will be reading what the original firmware sends over UART TX + the extra information that we added. Original firmware send 1 package and we just send another right after. Each package has it own checksum.

You can see here the details about baudrate (and signals are 5V): https://opensourceebikefirmware.bitbucket.io/development_tsdz2/About_Tongsheng_TSDZ2_mid_drive_motors--Motor_controller.html

The code for LCD3 that receive that both packages, verify checksum and process all the data seen on LCD3:
https://github.com/OpenSource-EBike-firmware/Kunteng_LCD3_firmware/blob/LCD3_firmware_for_TSDZ2_original_improved_firmware/uart.c

Code:
void clock_uart_data (void)
{
  struct_motor_controller_data *p_motor_controller_data;

  if (ui8_received_package_flag)
  {
    // validation of the 1st package data
    // last byte is the checksum
    ui8_checksum = 0;
    for (ui8_i = 0; ui8_i <= 7; ui8_i++)
    {
      ui8_checksum += ui8_rx_buffer[ui8_i];
    }
    ui8_checksum_1st_package = ui8_checksum % 256;
    if (ui8_checksum_1st_package == ui8_rx_buffer [8]) { ui8_checksum_1st_package = 1; }
    else { ui8_checksum_1st_package = 0; }

    // validation of the 2nd package data
    // last byte is the checksum
    ui8_checksum = 0;
    for (ui8_i = 9; ui8_i <= 19; ui8_i++)
    {
      ui8_checksum += ui8_rx_buffer[ui8_i];
    }
    ui8_checksum_2nd_package = ui8_checksum % 256;
    if (ui8_checksum_2nd_package == ui8_rx_buffer [20]) { ui8_checksum_2nd_package = 1; }
    else { ui8_checksum_2nd_package = 0; }

    // see if both checksum are ok...
    if (ui8_checksum_1st_package && ui8_checksum_2nd_package)
    {
      p_motor_controller_data = lcd_get_motor_controller_data ();

      p_motor_controller_data->ui8_battery_level = ui8_rx_buffer[1]; // a value between 0 and 24
      p_motor_controller_data->ui8_motor_controller_state_1 = ui8_rx_buffer[2];
      p_motor_controller_data->ui8_pedal_torque_sensor_offset = ui8_rx_buffer[3];
      p_motor_controller_data->ui8_pedal_torque_sensor = ui8_rx_buffer[4];
      p_motor_controller_data->ui8_error_code = ui8_rx_buffer[5];
      p_motor_controller_data->ui16_wheel_inverse_rps = ((ui8_rx_buffer[7] << 6) & 192) + ((ui8_rx_buffer[6] >> 3) & 31);
      p_motor_controller_data->ui8_battery_current = ui8_rx_buffer[10];
      p_motor_controller_data->ui8_motor_controller_state_2 = ui8_rx_buffer[11];
      p_motor_controller_data->ui8_pedal_cadence = ui8_rx_buffer[12] << 1; // ui8_rx_buffer[12] is cadence in RPM / 2

      // ui8_rx_buffer[7] & 4 set means wheel is stopped
      if (ui8_rx_buffer[7] & 4) { p_motor_controller_data->ui8_motor_controller_state_2 |= 128; }
      else { p_motor_controller_data->ui8_motor_controller_state_2 &= ~128; }
 
m3lonbr3ad said:
pedalTex said:
Hi all, first post here.

I've been running a BBS02 and a 52V luna shark on my Trek 8.4DS since last November, and love it.
I was intrigued by the tsdz2 and after reading this entire thread (100 pages as of this writing) I bought a 52v unit from Ebird on amazon.

I've got it on the bike now but motor does not seem to work. The display works, the satellite button array works, speedometer function works, included light works, but no throttle or torque-sensing action.

I've made sure battery is charged, no pins bent in any of the connectors, etc. I am not using the brake levers with the switches.
No change if I unplug the throttle.

Before I begin dealing with the seller, is there some magical incantation I can perform to get this working?

Fwiw I bought the same unit from ebird on amazon and am using a 52v pack from recycles-ebike without any issues.

Should be a sticker on the bottom of the unit that gives details about which motor you got, in case something got switched accidently.

Does everything spin freely? Is the crank under any load when you power it on?

The sticker says 52V / 4000 rpm. I have been contacted by the seller who thinks it’s merely mis-programmed, so with his help, a fix is in sight.

Thanks for your help.
 
pedalTex said:
m3lonbr3ad said:
pedalTex said:
Hi all, first post here.

I've been running a BBS02 and a 52V luna shark on my Trek 8.4DS since last November, and love it.
I was intrigued by the tsdz2 and after reading this entire thread (100 pages as of this writing) I bought a 52v unit from Ebird on amazon.

I've got it on the bike now but motor does not seem to work. The display works, the satellite button array works, speedometer function works, included light works, but no throttle or torque-sensing action.

I've made sure battery is charged, no pins bent in any of the connectors, etc. I am not using the brake levers with the switches.
No change if I unplug the throttle.

Before I begin dealing with the seller, is there some magical incantation I can perform to get this working?

Fwiw I bought the same unit from ebird on amazon and am using a 52v pack from recycles-ebike without any issues.

Should be a sticker on the bottom of the unit that gives details about which motor you got, in case something got switched accidently.

Does everything spin freely? Is the crank under any load when you power it on?

The sticker says 52V / 4000 rpm. I have been contacted by the seller who thinks it’s merely mis-programmed, so with his help, a fix is in sight.

Thanks for your help.
Reprogram by yourself, see to here how to do it: https://opensourceebikefirmware.bitbucket.io/kunteng_lcd3/
 
pedalTex said:
The sticker says 52V / 4000 rpm. I have been contacted by the seller who thinks it’s merely mis-programmed, so with his help, a fix is in sight.

Thanks for your help.

It would be nice if the manufacturer hooked them up to batteries to ensure they actually work before shipping them out...
 
I just tested my 48V battery on the TSDZ2 36V motor (yes, I had to write the EEPROM with the contents of a 48V motor).

Seems to me the motor has less torque at startup (as expected) but gives well high speed. On my new MTB ebike, got 45km/h at flat and on a little descend, 50km/h (strange that I didn't felt much the motor cutting the power due to the 45km/h limit). I looked at the LCD3 and at ~45km/h I was pedaling with a cadence of about 120RPMs.
 
I am thinking about trying 3x power tool 20v 5ah batteries hooked up in a series to make one 56v (15s2p) 5ah battery. They are stamped 90wh each so they should be ok for flying and shipping. I should have bought them yesterday with the ebay coupon though. I haven't figured out how to make the wire or use the software to edit the firmware though, but I would really like to try a 15s battery and 5ah should give us 10-15 mile range :)

I am not finding much for a cheap 15s battery charger. If I was to try this I think I would prefer to charge them all at once with one 15s charger rather than individually with a 5s charger.
 
casainho said:
I just tested my 48V battery on the TSDZ2 36V motor (yes, I had to write the EEPROM with the contents of a 48V motor).

Seems to me the motor has less torque at startup (as expected) but gives well high speed. On my new MTB ebike, got 45km/h at flat and on a little descend, 50km/h (strange that I didn't felt much the motor cutting the power due to the 45km/h limit). I looked at the LCD3 and at ~45km/h I was pedaling with a cadence of about 120RPMs.

Somebody told me there is no speed limit anymore. He told me there is a video but I can´t find it. Maybe eyebyesickle knows how to do it.
 
John and Cecil said:
I haven't figured out how to make the wire or use the software to edit the firmware though, but I would really like to try a 15s battery and 5ah should give us 10-15 mile range :)
I can prepare the EEPROM file for 14 and 15S and put on github. Right now, there I have files for 7S 24V, 10S 36V and 13S 48V.

The wire is very simple, you just need to cut the wire that goes to speed sensor and that way access to the needed wires - follow ny notes. In the wire, you wire back the wires for the speed sensor.
Or you can ask to some friend or family member with more experience with electric wiring.
 
AZUR said:
Somebody told me there is no speed limit anymore. He told me there is a video but I can´t find it. Maybe eyebyesickle knows how to do it.
I used our improved original firnware + EEPROM file, that I am sharing, both, on github. I am also using LCD3.
 
Thank you Casainho! Switching the wires at your suggestion works *perfectly*! The LCD3 is a *huge* upgrade with all the information. Cleaner and tidier setup...this motor is a dream :)

I have a curious situation I'm trying to solve. With the speed sensor hooked up: I'm getting a cut-out of the motor (throttle and torque-sensor triggered). Perhaps it's the position of my magnet? With it disconnected, I don't have this issue. It's like a speed limit of 15km/h! Will look at the code too. (LCD3 set to 99km/h max on new firmware). Wiring looks good, and speed seems right. Will update as I figure it out.

It's so cool to have motor watts *and* calculated human power at the same time. Love it!
 
casainho said:
I can prepare the EEPROM file for 14 and 15S and put on github. Right now, there I have files for 7S 24V, 10S 36V and 13S 48V.

The wire is very simple, you just need to cut the wire that goes to speed sensor and that way access to the needed wires - follow ny notes. In the wire, you wire back the wires for the speed sensor.
Or you can ask to some friend or family member with more experience with electric wiring.

That is a good idea. I guess the speed sensor wire can be cut and then connectors put on so it can be disconnected and reconnected easily. Then wire a usb wire to the same connector so it can be interchanged with the speed sensor.

I did find an inexpensive charger on aliexpress. I should have bought the batteries yesterday when the coupon was still valid though. I could have gotten a 15s 5ah battery for about $60 and another $20-25 for the charger, and the batteries can be taken on an airplane and the charger comes with a european adapter.
 
pawepie said:
I have a curious situation I'm trying to solve. With the speed sensor hooked up: I'm getting a cut-out of the motor (throttle and torque-sensor triggered). Perhaps it's the position of my magnet? With it disconnected, I don't have this issue. It's like a speed limit of 15km/h! Will look at the code too. (LCD3 set to 99km/h max on new firmware). Wiring looks good, and speed seems right. Will update as I figure it out.

It's so cool to have motor watts *and* calculated human power at the same time. Love it!

I think someone else had the same issue back maybe 10 pages or so. If I remember correctly they moved the magnet closer to the sensor to fix the problem, at least I think that is what the did. I removed the screw and put a spacer between the bracket and sensor on my speed sensor to move it closer to the magnet on the spokes. Mine would not read the speed at all until I moved it.
 
casainho said:
I can prepare the EEPROM file for 14 and 15S and put on github. Right now, there I have files for 7S 24V, 10S 36V and 13S 48V.

Thank you, very much appreciated. I would not worry about it now, it could be a month or so before I have all the supplies here. Hopefully another coupon will show up on ebay soon. I like the idea of being able to be able to travel with the individual batteries and if the controller can handle all the power I think a 15s battery and 48v motor should have lots of torque and also be good for speed (well, if 20-25mph can be considered "speed").
 
Important note to everyone

How to unlock your TSDZ2 max speed, over the 45 km/h and get higher pedal cadence

If you use LCD3 with your TSDZ2, you can set any speed up to 99km/h unlike on TSDZ2 original LCD that limits to 45km/h.

Higher speed also means higher pedals cadence. This may be particular important if you are using a TSDZ2 36V motor with a 48V battery (or more).
 
John and Cecil said:
pawepie said:
I have a curious situation I'm trying to solve. With the speed sensor hooked up: I'm getting a cut-out of the motor (throttle and torque-sensor triggered). Perhaps it's the position of my magnet? With it disconnected, I don't have this issue. It's like a speed limit of 15km/h! Will look at the code too. (LCD3 set to 99km/h max on new firmware). Wiring looks good, and speed seems right. Will update as I figure it out.

It's so cool to have motor watts *and* calculated human power at the same time. Love it!

I think someone else had the same issue back maybe 10 pages or so. If I remember correctly they moved the magnet closer to the sensor to fix the problem, at least I think that is what the did. I removed the screw and put a spacer between the bracket and sensor on my speed sensor to move it closer to the magnet on the spokes. Mine would not read the speed at all until I moved it.

I think its the opposite, the problem appears if the magnet is too close as it passes. By memory I think you need a minimum of at least 5 - 7mm gap.
 
Waynemarlow said:
I think its the opposite, the problem appears if the magnet is too close as it passes. By memory I think you need a minimum of at least 5 - 7mm gap.

The tsdz2 installation instruction pdf states that the distance should be less than 5mm. Well at least I interpreted it to state that, the person who wrote the manual apparently had only a very basic understanding of English...

"The distance between the sensor and the magnet steal should below 5mm".
 
Back
Top