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

nieles said:
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 ?
 
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.
 
trek988 said:
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.
 
bruwie said:
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-firmware/TSDZ2_wiki/wiki/TSDZ2-and-KT-LCD3-advanced-features-with-Flexible-OpenSource-firmwares

bruwie said:
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.
 
casainho said:
trek988 said:
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.
 
trek988 said:
casainho said:
trek988 said:
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.
 
Are you able to flash the 52v firmware yourself ?

eyebyesickle said:
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/10OLNCz4eGUjbEXojD1PfjVeCQTPgOnVe/view?usp=drivesdk

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

https://drive.google.com/file/d/11ftlg1ApGYq3AmzagL9M4wpY4c71sizK/view?usp=drivesdk

And then the Data memory file:

https://drive.google.com/file/d/1Yo2AqWrd7Adg2vV8HC5S5Zcgi53pwkcl/view?usp=drivesdk
 
jbalat said:
Are you able to flash the 52v firmware yourself ?

eyebyesickle said:
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/10OLNCz4eGUjbEXojD1PfjVeCQTPgOnVe/view?usp=drivesdk

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

https://drive.google.com/file/d/11ftlg1ApGYq3AmzagL9M4wpY4c71sizK/view?usp=drivesdk

And then the Data memory file:

https://drive.google.com/file/d/1Yo2AqWrd7Adg2vV8HC5S5Zcgi53pwkcl/view?usp=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
 
eyebyesickle said:
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
 
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.
 
jbalat said:
eyebyesickle said:
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
 
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 ?
 
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)

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!!
 
jbalat said:
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.
 
Hi Casainho, you said you updated the firmware but I checked github and there is nothing new. I’m so confused ?
 
jbalat said:
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!! :)
 
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 ??
 
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
 
Casainho do you have time to make any changes ??
 
jbalat said:
Casainho do you have time to make any changes ??
I hope to answer today to your questions. I am away from home.
 
casainho said:
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
 
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/master/starttocompile
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...s/TSDZ2_flexible_opensource_firmware-v0.2.hex, but I can find some alike structure.

Am I on a good track or dead end?
 
feketehegyi said:
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/master/starttocompile
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...s/TSDZ2_flexible_opensource_firmware-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!!
 
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.7 KB · Views: 4,308
  • IMG_20180816_2466.jpg
    IMG_20180816_2466.jpg
    73.2 KB · Views: 4,308
Back
Top