TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Electric Motors and Controllers
Post Reply
User avatar
jbalat   10 kW

10 kW
Posts: 531
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jbalat » Jul 27 2018 3:05am

nieles wrote:
Jul 27 2018 2:32am
Jbalat,
Also keep the power button pressed on the lcd3 in order to flash the firmware. Otherwise it won't work.
Funny mine worked but im not connected to the motor power yet, im running 5v from the stlink to j7

btw how does everyone get to the header on the lcd ? I was thinking of soldering the header pins from the back and making a square hole for access then using the rubber usb grommets from the old display to seal it up ?
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware https://endless-sphere.com/forums/viewt ... &start=150
Opensource TSDZ2 Wiki https://github.com/OpenSource-EBike-fir ... _wiki/wiki

trek988   1 µW

1 µW
Posts: 4
Joined: Aug 06 2018 3:07pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by trek988 » Aug 06 2018 3:21pm

I need help. I read through the messages hoping to find my answer but I didn't. I have one of these mid drive motors. When I ordered it I went all out an got it in 52v. Mine wouldn't work and the seller determined that it was from a batch that couldn't handle a fully charged 52v battery, but would be able to handle 48v. I was sent a replacement battery and it worked but the controller still thinks there should be a 52v battery hooked up to and will shut off when the battery still has plenty of charge.
The seller was aware of this issue and had a device sent to me an interface with it and to enable me to change the 52v to 48v. The weather turned and I didn't get around to it. The problem I have now is that I don't have the instructions or a clue on how to do it.
Could someone please show/tell me how to do this. I'm willing to pay if it comes to it. I've been tempted to order another motor in 48v but I really don't want to spend the money. When I requested replacement instructions the seller at first said he would get them to me but then stopped responding to my emails. I'm not a computer guy, so please try to keep it simple.

casainho   100 MW

100 MW
Posts: 2791
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Aug 06 2018 4:31pm

trek988 wrote:
Aug 06 2018 3:21pm
The problem I have now is that I don't have the instructions or a clue on how to do it.
Could someone please show/tell me how to do this. I'm willing to pay if it comes to it.
I hope you get help in this forum other way I would contact some local ebike shop.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

casainho   100 MW

100 MW
Posts: 2791
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Aug 06 2018 4:38pm

bruwie wrote:
Aug 06 2018 1:35pm
Hello,
my name is Hergen and I come from Germany. I have the 36 volt motor with a 36 volt battery pack.
I flashed the LCD3 with 0.2.hex.
Then I flashed the controller with 0.2.hex. The display starts and I can zap and configure through the menus.
I set the battery pack to 10 cells, 16 Amp, 30 Volt. What else do I have to adjust?
At the moment I have no support from the engine and pushing backwards has a high resistance.
I have no throttle and no brake sensor.
I had this text translated with Deepl.
I'm at a loss for the moment.
Many greetings
Hi bruwie.

Please follow here to see all the things you need to configure: https://github.com/OpenSource-EBike-fir ... -firmwares
bruwie wrote:
Aug 06 2018 1:35pm
At the moment I have no support from the engine and pushing backwards has a high resistance.
Yes, pushing backwards has a high resistance when firmware is running.

So, to have support from the motor, you need to configure correctly:
1: battery
0: battery cells number: this value is used only to calculate battery state of charge to indicate on LCD battery bars symbols. For 48V battery, use value of 13.
1: battery max current: in amps. Motor controller will use no more than this value. Motor controller firmware limits this value to a safe one, like 18 amps (but this can be configured on motor controller firmware, like for use 24 amps).
2: battery low cut-off voltage: in volts. The motor controller firmware will limit battery discharge when the battery discharge down to this value. For a 48V battery, if each cells low cut-off voltage is 3.0V, you can use the value of 39.0 (3.0 * 13 = 39.0).
Also assist level must be higher than 0 and the torque sensor must be working, can you please verify what are the values of:
3: advanced technical data
2: adc pedal torque sensor
3: pedal torque sensor
4: pedal cadence
6: PWM duty_cycle
7: motor speed in ERPs
With assist level = 5, please rotate the pedals as also make force on the pedals to torque sensor value is higher than 0.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

trek988   1 µW

1 µW
Posts: 4
Joined: Aug 06 2018 3:07pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by trek988 » Aug 06 2018 6:32pm

casainho wrote:
Aug 06 2018 4:31pm
trek988 wrote:
Aug 06 2018 3:21pm
The problem I have now is that I don't have the instructions or a clue on how to do it.
Could someone please show/tell me how to do this. I'm willing to pay if it comes to it.
I hope you get help in this forum other way I would contact some local ebike shop.
That is part of the problem I don't have a local ebike shop to turn to. I'm almost tempted to try plugging into and trying to see if I can just replace anything that says 52 with 48 but I'm clueless.

casainho   100 MW

100 MW
Posts: 2791
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Aug 06 2018 6:36pm

trek988 wrote:
Aug 06 2018 6:32pm
casainho wrote:
Aug 06 2018 4:31pm
trek988 wrote:
Aug 06 2018 3:21pm
The problem I have now is that I don't have the instructions or a clue on how to do it.
Could someone please show/tell me how to do this. I'm willing to pay if it comes to it.
I hope you get help in this forum other way I would contact some local ebike shop.
That is part of the problem I don't have a local ebike shop to turn to. I'm almost tempted to try plugging into and trying to see if I can just replace anything that says 52 with 48 but I'm clueless.
Maybe you can get help from online shops that sell TSDZ2, the European or USA shops.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

User avatar
jbalat   10 kW

10 kW
Posts: 531
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jbalat » Aug 06 2018 11:43pm

Are you able to flash the 52v firmware yourself ?
eyebyesickle wrote:
Jul 28 2018 1:11pm
Short video showing the half programmed 52v problem, and how to upload and save the profile for the fix...

https://drive.google.com/file/d/10OLNCz ... p=drivesdk

Here is a link to the 52v Program memory file:

https://drive.google.com/file/d/11ftlg1 ... p=drivesdk

And then the Data memory file:

https://drive.google.com/file/d/1Yo2AqW ... p=drivesdk
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware https://endless-sphere.com/forums/viewt ... &start=150
Opensource TSDZ2 Wiki https://github.com/OpenSource-EBike-fir ... _wiki/wiki

User avatar
eyebyesickle   10 kW

10 kW
Posts: 597
Joined: Apr 07 2015 9:28pm
Location: Nashville

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by eyebyesickle » Aug 07 2018 5:10am

jbalat wrote:
Aug 06 2018 11:43pm
Are you able to flash the 52v firmware yourself ?
eyebyesickle wrote:
Jul 28 2018 1:11pm
Short video showing the half programmed 52v problem, and how to upload and save the profile for the fix...

https://drive.google.com/file/d/10OLNCz ... p=drivesdk

Here is a link to the 52v Program memory file:

https://drive.google.com/file/d/11ftlg1 ... p=drivesdk

And then the Data memory file:

https://drive.google.com/file/d/1Yo2AqW ... p=drivesdk
Yes of course, I am doing it in the video - I have been doing it to all models (excluding coaster brake model! ha), including 6 pin models :D

User avatar
jbalat   10 kW

10 kW
Posts: 531
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jbalat » Aug 07 2018 6:43pm

eyebyesickle wrote:
Aug 07 2018 5:10am
Yes of course, I am doing it in the video - I have been doing it to all models (excluding coaster brake model! ha), including 6 pin models :D
LOL
I was talking to Trek988 :D
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware https://endless-sphere.com/forums/viewt ... &start=150
Opensource TSDZ2 Wiki https://github.com/OpenSource-EBike-fir ... _wiki/wiki

trek988   1 µW

1 µW
Posts: 4
Joined: Aug 06 2018 3:07pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by trek988 » Aug 07 2018 9:09pm

I have a device that looks like the ones I've seen in other post but I have no clue what to do with it. When it was sent to me it, I was told it was what I needed. I'm afraid of hooking it up to it and loosing what function I have now. I can get about 30 miles before it decides the battery is dead and shuts down. The battery is still 3/4 charged but since it thinks its supposed to be a 52v it shuts down. I've made several attempts to contact biktrix but I get ignored. I've reach out to what I think is the manufacturer and others and I can get no help. I'm considering ordering another one that comes set for 48v and be done with it. I just hate to waste the money on another one when this one could work if it was reprogrammed.

User avatar
eyebyesickle   10 kW

10 kW
Posts: 597
Joined: Apr 07 2015 9:28pm
Location: Nashville

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by eyebyesickle » Aug 08 2018 6:29am

jbalat wrote:
Aug 07 2018 6:43pm
eyebyesickle wrote:
Aug 07 2018 5:10am
Yes of course, I am doing it in the video - I have been doing it to all models (excluding coaster brake model! ha), including 6 pin models :D
LOL
I was talking to Trek988 :D

Haha I was wondering. It tagged me and was a little loopy laid up with an injury over here hahah

User avatar
jbalat   10 kW

10 kW
Posts: 531
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jbalat » Aug 10 2018 8:30pm

Hey guys I'm back on eclipse using windows in order to fix my minimum torque value

I run start_compile as an external process without stlink connected

it creates main.ihx

do i rename this to a bin file or hex file ?

If its a bin, I noticed that casainho has added a bin to hex utility under tools, tsdz2 original... does anyone know how to use this utility ?
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware https://endless-sphere.com/forums/viewt ... &start=150
Opensource TSDZ2 Wiki https://github.com/OpenSource-EBike-fir ... _wiki/wiki

User avatar
eyebyesickle   10 kW

10 kW
Posts: 597
Joined: Apr 07 2015 9:28pm
Location: Nashville

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by eyebyesickle » Aug 10 2018 10:42pm

Hi guys...

So, my knowledge is very hit or miss... sometimes just miss! :oops: but I was wondering if anyone here could help me with something... I love what you all have going on, big thanks to casianho and everyone involved, but for several reasons, I am not particularly fond of the KT-LCD3... and also personally, I only need a couple modifications that I think should be easy and fast to implement due to the nature of the desired changed on my end. I am happy with most of the motors functioning personally. (well, maybe not - but you all are already doing a rework, more simple is where the bar is set for myself haha)

I have been talking to the manufacturer of the mini OLED display (same type EGGRIDER v2 uses)
closeuponcatalog.png
closeuponcatalog.png (74.48 KiB) Viewed 1109 times
and they have agreed to send me some units matched to the TSDZ2 if I can send them the TSDZ2 protocol.

I am not sure what to send them, and am trying to speed this up, as TS is not much help, and even if I get them to help, it won't be tomorrow... and I know we already have this info. So, if someone could show me what exactly I need to send (TSDZ2 Protocol), I would be forever grateful =).

I like the mini display because it is so low key, but also because it has bluetooth. This way, I can have the info I want on the little screen, then i can pull up the program on my phone (or even just the menu of the display, no phone) to switch voltage, and maybe another couple settings... All I really NEEED, is just to be able to switch/open voltage. I would like to see the human power output as well, and then have the bluetooth/app log all the ride data as well - but that is simple for my guy. A broke man like me though, needs to get the display in hand, programmed for the TSDZ2, prepped, so when I bring it to my guy there is less work and I can pay the minimal fee, instead of pointing him here, and giving him a 'blank slate' display to do all the work from scratch (well, not quite from scratch as the groundwork has been more than laid out).

Thanks for any help guys - and keep pushing on!!
Last edited by eyebyesickle on Aug 11 2018 12:15am, edited 2 times in total.

casainho   100 MW

100 MW
Posts: 2791
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Aug 10 2018 10:43pm

jbalat wrote:
Aug 10 2018 8:30pm
Hey guys I'm back on eclipse using windows in order to fix my minimum torque value

I run start_compile as an external process without stlink connected

it creates main.ihx

do i rename this to a bin file or hex file ?

If its a bin, I noticed that casainho has added a bin to hex utility under tools, tsdz2 original... does anyone know how to use this utility ?
That ihx is an hex file, I think. Try to rename to hex...

That tool is for Linux only and converts an bin file to hex file.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

-dg   1 kW

1 kW
Posts: 454
Joined: Jun 01 2012 4:38am
Location: Oakland, CA USA

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by -dg » Aug 11 2018 12:43am

casainho wrote:
Aug 10 2018 10:43pm
That ihx is an hex file, I think. Try to rename to hex...
The ihx file is an "intel hex file" and is a standard format and name for embedded toolchains. See: https://en.wikipedia.org/wiki/Intel_HEX
If simplicity worked, the world would be overrun with insects.

User avatar
jbalat   10 kW

10 kW
Posts: 531
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jbalat » Aug 13 2018 5:33am

Hi Casainho, you said you updated the firmware but I checked github and there is nothing new. I’m so confused ?
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware https://endless-sphere.com/forums/viewt ... &start=150
Opensource TSDZ2 Wiki https://github.com/OpenSource-EBike-fir ... _wiki/wiki

casainho   100 MW

100 MW
Posts: 2791
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Aug 13 2018 5:56am

jbalat wrote:
Aug 13 2018 5:33am
Hi Casainho, you said you updated the firmware but I checked github and there is nothing new. I’m so confused ?
You are correct, I did some mistake but I did push the code now!! :-)
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

User avatar
jbalat   10 kW

10 kW
Posts: 531
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jbalat » Aug 15 2018 2:31am

Ok I had a small runaway I accidentally pressed the pedals and bike started moving. I was able to arrest the bike with the brakes but it kept going even after I took my feet off. I had to peddle backwards to stop it moving.

I am compiling your new version and have disabled the start with torque sensor only flag. Hopefully this works well.

Ok my bike tops out at 80 cadence.. how accurate is this ??? I was pedalling at 60 cadence on the lcd but I counted close to 75 pedals in one minute ?
If I wanted to force it to go faster can I change the erps up from I think it was 525 to 575 ??
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware https://endless-sphere.com/forums/viewt ... &start=150
Opensource TSDZ2 Wiki https://github.com/OpenSource-EBike-fir ... _wiki/wiki

User avatar
jbalat   10 kW

10 kW
Posts: 531
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jbalat » Aug 15 2018 2:50am

Sorry but this new feature does not work

I had to do 3 or more peddle turns before the motor would cut in.

You need to just stop the motor turning when the cadence is zero and torque is applied. I’m not sure what you did ?

#define MOTOR_ASSISTANCE_CAN_START_WITHOUT_PEDAL_ROTATION 0
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware https://endless-sphere.com/forums/viewt ... &start=150
Opensource TSDZ2 Wiki https://github.com/OpenSource-EBike-fir ... _wiki/wiki

User avatar
jbalat   10 kW

10 kW
Posts: 531
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jbalat » Aug 16 2018 2:05am

Casainho do you have time to make any changes ??
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware https://endless-sphere.com/forums/viewt ... &start=150
Opensource TSDZ2 Wiki https://github.com/OpenSource-EBike-fir ... _wiki/wiki

casainho   100 MW

100 MW
Posts: 2791
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Aug 16 2018 2:20am

jbalat wrote:
Aug 16 2018 2:05am
Casainho do you have time to make any changes ??
I hope to answer today to your questions. I am away from home.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

User avatar
jbalat   10 kW

10 kW
Posts: 531
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jbalat » Aug 16 2018 3:24am

casainho wrote:
Aug 16 2018 2:20am
I hope to answer today to your questions. I am away from home.
No worries I thought you abondoned us ha ha ;)

I tried fixing the cadence in ebike app.c by changing the 0.000064 to 0.000083 but now I get no power at all :(
No stress I flashed back at 0.2 and all good again
I am not very good at c++ but I’m ok at vb6
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware https://endless-sphere.com/forums/viewt ... &start=150
Opensource TSDZ2 Wiki https://github.com/OpenSource-EBike-fir ... _wiki/wiki

User avatar
feketehegyi   1 W

1 W
Posts: 53
Joined: Jul 11 2018 6:18am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by feketehegyi » Aug 16 2018 5:26am

I've started to investigate the code. I use a Mac, so I started to figure out how to compile it on macOS.
I've found SDCC - Small Device C Compiler http://sdcc.sourceforge.net which works under macOS as well.
I've made the following script to compile it with SDCC: https://github.com/wptm/TSDZ2/blob/mast ... ttocompile
When I was creating it, I've discovered that "eeprom.c" is probably not anymore the part of the firmware. It was erroring out during compile and did not find mention in Makefile_linux as well.
My script has created the following ihx: https://github.com/wptm/TSDZ2/blob/master/main.ihx .
It is different from https://github.com/OpenSource-EBike-fir ... e-v0.2.hex, but I can find some alike structure.

Am I on a good track or dead end?

casainho   100 MW

100 MW
Posts: 2791
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Aug 16 2018 6:15am

feketehegyi wrote:
Aug 16 2018 5:26am
I've started to investigate the code. I use a Mac, so I started to figure out how to compile it on macOS.
I've found SDCC - Small Device C Compiler http://sdcc.sourceforge.net which works under macOS as well.
I've made the following script to compile it with SDCC: https://github.com/wptm/TSDZ2/blob/mast ... ttocompile
When I was creating it, I've discovered that "eeprom.c" is probably not anymore the part of the firmware. It was erroring out during compile and did not find mention in Makefile_linux as well.
My script has created the following ihx: https://github.com/wptm/TSDZ2/blob/master/main.ihx .
It is different from https://github.com/OpenSource-EBike-fir ... e-v0.2.hex, but I can find some alike structure.

Am I on a good track or dead end?
If you can build, that is good!!
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

User avatar
jbalat   10 kW

10 kW
Posts: 531
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jbalat » Aug 16 2018 7:05am

Oh well my theory is down the tubes. I bumped the voltage up from 10s to 14s and cadence is still limited to 80 (which is really 104)
Bugger hopefully I can bump up the ERPS limit in the code ?
Attachments
IMG_20180816_48554.jpg
IMG_20180816_48554.jpg (32.69 KiB) Viewed 915 times
IMG_20180816_2466.jpg
IMG_20180816_2466.jpg (73.21 KiB) Viewed 915 times
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware https://endless-sphere.com/forums/viewt ... &start=150
Opensource TSDZ2 Wiki https://github.com/OpenSource-EBike-fir ... _wiki/wiki

Post Reply