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

Is walk mode working in v.16 or planed for v.17 ? Over Xmas I’m planning on buying a frame and building a Surly Big Fat Dummy cargo bike for bikepacking and it will probably need walk mode.
 
Bartman said:
Is walk mode working in v.16 or planed for v.17 ? Over Xmas I’m planning on buying a frame and building a Surly Big Fat Dummy cargo bike for bikepacking and it will probably need walk mode.

I'm afraid not.. walk mode is, as far as I understood, a bit complicated to implement but it's definitely in the gurus 2do list once other major stuff is completed.
We need to be patient a bit..
 
I just installed version 16 on my friends bike and he wanted a high cadence version like mine.
His motor is 48v, so this version below will work on both motor types
He tested it for a minute or so and was quite happy. All I did was changed increased the motor speed cutoff limit and multiplied the normal FOC by about 1.4 to bring it in line with the 36v settings.
 

Attachments

  • tsdz2_016_high_cadence.zip
    16.3 KB · Views: 73
jbalat said:
I just installed version 16 on my friends bike and he wanted a high cadence version like mine.
His motor is 48v, so this version below will work on both motor types
He tested it for a minute or so and was quite happy. All I did was changed increased the motor speed cutoff limit and multiplied the normal FOC by about 1.4 to bring it in line with the 36v settings.


Can you not just use section 8(various) in the setup menu, Submenu 0 , Option 2 experimental high cadence mode ?
 
casainho: i would love to check if i did everything right with my 850C. so i thought i could just read out the content with st-link VP .

what configuration settings do i need in VP?
 
andyme said:
casainho: i would love to check if i did everything right with my 850C. so i thought i could just read out the content with st-link VP .

what configuration settings do i need in VP?
I am in Linux using OpenOCD to flash and debug, can't help with other tools.

You can't read nothing because it is protected. You will need to erase and unlock first, as the microcontroller is read protected -- that is the only way to write new firmware.
 
casainho said:
andyme said:
casainho: i would love to check if i did everything right with my 850C. so i thought i could just read out the content with st-link VP .

what configuration settings do i need in VP?
I am in Linux using OpenOCD to flash and debug, can't help with other tools.

You can't read nothing because it is protected. You will need to erase and unlock first, as the microcontroller is read protected -- that is the only way to write new firmware.

i understand. in st-link vp there are 2 values that can be changed: programming mode: 3options: jtag, swd, swim and device: long list... what to select?
 
andyme said:
casainho said:
andyme said:
casainho: i would love to check if i did everything right with my 850C. so i thought i could just read out the content with st-link VP .

what configuration settings do i need in VP?
I am in Linux using OpenOCD to flash and debug, can't help with other tools.

You can't read nothing because it is protected. You will need to erase and unlock first, as the microcontroller is read protected -- that is the only way to write new firmware.

i understand. in st-link vp there are 2 values that can be changed: programming mode: 3options: jtag, swd, swim and device: long list... what to select?
The microcontroller is based on STM32F103, search on Google on how to do it.

Takes notes and write an wiki page for the next other users that will do it.
 
casainho said:
andyme said:
casainho said:
andyme said:
casainho: i would love to check if i did everything right with my 850C. so i thought i could just read out the content with st-link VP .

what configuration settings do i need in VP?
I am in Linux using OpenOCD to flash and debug, can't help with other tools.

You can't read nothing because it is protected. You will need to erase and unlock first, as the microcontroller is read protected -- that is the only way to write new firmware.

i understand. in st-link vp there are 2 values that can be changed: programming mode: 3options: jtag, swd, swim and device: long list... what to select?
The microcontroller is based on STM32F103, search on Google on how to do it.

Takes notes and write an wiki page for the next other users that will do it.

oh-oh...so far out of luck...i am getting connection errors....i will need to restart all over with the second 850C that i have in order to be able to doublecheck but i will have to order a new st-link cable. so i will most probably have to postpone until 2019...
 
andyme said:
oh-oh...so far out of luck...i am getting connection errors....i will need to restart all over with the second 850C that i have in order to be able to doublecheck but i will have to order a new st-link cable. so i will most probably have to postpone until 2019...
That should be a similar process at for LCD3. Double check your connections.

Also make sure you did unlock erase, that must be the first step and you may get errors while you don't do that successfully.
 
casainho said:
andyme said:
oh-oh...so far out of luck...i am getting connection errors....i will need to restart all over with the second 850C that i have in order to be able to doublecheck but i will have to order a new st-link cable. so i will most probably have to postpone until 2019...
Double check your connections.

that is exactly my problem right now...it is beautifully sealed with silicone in the DCP-18 case.... :lol: i probably was too optimistic/naive..but i will be able to secure the jumper cables tomorrow and so i will be able to test everything with the "unmodded" 850C and then i will take it from there, before i start disassembling this one....

 
andyme said:
casainho said:
andyme said:
oh-oh...so far out of luck...i am getting connection errors....i will need to restart all over with the second 850C that i have in order to be able to doublecheck but i will have to order a new st-link cable. so i will most probably have to postpone until 2019...
Double check your connections.

that is exactly my problem right now...it is beautifully sealed with silicone in the DCP-18 case.... :lol: i probably was too optimistic/naive..but i will be able to secure the jumper cables tomorrow and so i will be able to test everything with the "unmodded" 850C and then i will take it from there, before i start disassembling this one....

20181216_151514.jpg

oh...wow....it seems to be working...just tried again....yeah!!! haha...sometimes you can save your afternoon with very little...



so all i need now is a hex-file, or two.. :wink:
 
andyme said:
so all i need now is a hex-file, or two.. :wink:
This next step will be hard, because I simple do not have tome to provid hex files (I wish I could finish LCD3 new firmware version).

You will need to build the code by yourself. 1. And to build on Linux Ubuntu but I guess should be hard for you to instal Ubuntu on a virtual machine and being able to use it (because it is a new thing).
2. Other option would be to install on Windows, install binutils, etc and adapt the Makefile that builds the firmware to work on Windows (EndlessCadence did that for LCD3 and TSDZ2).

After all, I think 2. will be harder the 1., because once you have Linux running, installing GCC compiler and the binutils is straight forward and the Makefile just works.
 
casainho said:
andyme said:
so all i need now is a hex-file, or two.. :wink:
This next step will be hard, because I simple do not have tome to provid hex files (I wish I could finish LCD3 new firmware version).

You will need to build the code by yourself. 1. And to build on Linux Ubuntu but I guess should be hard for you to instal Ubuntu on a virtual machine and being able to use it (because it is a new thing).
2. Other option would be to install on Windows, install binutils, etc and adapt the Makefile that builds the firmware to work on Windows (EndlessCadence did that for LCD3 and TSDZ2).

After all, I think 2. will be harder the 1., because once you have Linux running, installing GCC compiler and the binutils is straight forward and the Makefile just works.

omg....you are challenging me.....let's see....i have no clue of all that so far...never done anything of the kind before...well...but thanks for the general directions... :thumb:
 
andyme said:
casainho said:
andyme said:
so all i need now is a hex-file, or two.. :wink:
This next step will be hard, because I simple do not have tome to provid hex files (I wish I could finish LCD3 new firmware version).

You will need to build the code by yourself. 1. And to build on Linux Ubuntu but I guess should be hard for you to instal Ubuntu on a virtual machine and being able to use it (because it is a new thing).
2. Other option would be to install on Windows, install binutils, etc and adapt the Makefile that builds the firmware to work on Windows (EndlessCadence did that for LCD3 and TSDZ2).

After all, I think 2. will be harder the 1., because once you have Linux running, installing GCC compiler and the binutils is straight forward and the Makefile just works.

omg....you are challenging me.....let's see....i have no clue of all that so far...never done anything of the kind before...well...but thanks for the general directions... :thumb:

two more questions pls:

where are your last files? and i will need to build 2 hex files obviously. are your files divided in 2 groups? rest i will try to figure out...ubuntu is running and binutils is installing...

Screenshot (4).png
 
andyme said:
where are your last files? and i will need to build 2 hex files obviously. are your files divided in 2 groups? rest i will try to figure out...ubuntu is running and binutils is installing...
You need to build only the 850C firmware hex, as the firmware for TSDZ2 is just the same V0.16.

On Ubuntu software package manager (or synaptic), you need to search and install "gcc arm none eabi". Then, on a terminal (search on google), navigate to firmware folder an execute "make" that will build the firmware and output on the same folder the main.hex file that you need to flash on 850C.

Firmware is here, you need to run make on src folder:

https://github.com/OpenSource-EBike-firmware/Color_LCD/tree/master/Bafang_LCD_850C/Bafang_LCD_850C_firmware
 
Five miles into a ride today, my motor quit. The LCD3 screen went blank except for a flashing '25' (in the motor watts field, IIRC). I powered the LCD3 down and up again, and the display appears normal. Battery is fine at 75%, 53.4 volts (Ping 48v LiFePO4 20AH). All wiring/connections appear fine. It was an easy going ride, motor was under minimal stress. Outdoor temp was 50f degrees. But Motor watts are at zero, and there is no assist. I've got 16.0 installed.

Any suggestions as to where to start to diagnose this? I think I'll check the torque sensor output in the setup menu first.

Anybody know what the flashing 25 meant?

Thanks,

Neil

PS The bike got pretty wet in light rain the last time I rode it, the first time it's really gotten wet at all. I also rinsed it off lightly after the ride, trying to keep the wetting of the motor to a minimum. Don't know if this had anything to do with the problem.
 
You did enter on the max power menu and set to 25W that will probably keep motor disable until you set 50W or more. Or keep 0 value to disable max power limit.
 
spiked said:
Five miles into a ride today, my motor quit. The LCD3 screen went blank except for a flashing '25' (in the motor watts field, IIRC). I powered the LCD3 down and up again, and the display appears normal. Battery is fine at 75%, 53.4 volts (Ping 48v LiFePO4 20AH). All wiring/connections appear fine. It was an easy going ride, motor was under minimal stress. Outdoor temp was 50f degrees. But Motor watts are at zero, and there is no assist. I've got 16.0 installed.

Any suggestions as to where to start to diagnose this? I think I'll check the torque sensor output in the setup menu first.

Anybody know what the flashing 25 meant?

Thanks,

Neil

PS The bike got pretty wet in light rain the last time I rode it, the first time it's really gotten wet at all. I also rinsed it off lightly after the ride, trying to keep the wetting of the motor to a minimum. Don't know if this had anything to do with the problem.


I did that once on a ride spiked and it caught me out too and now it is winter and I'm wearing thick gloves I do it quite often and it's a flipping nuisance.. all that you have done is inadvertently limited the max power to 25watts which is too low for pedal assist to work.


If you press up and enter together (easily done thick gloves) it takes you into set maximum power mode and quite often because you don't realise soon enough the up button moves it from the default 0 value ( which is off) to the first setting of 25watts (flashing) and when that happens you lose pedal assist. Just press the down button to get the value back to 0 (maxpower off) and then long press of enter (middle button) and it takes you back into normal mode with everything working properly. You could of course raise the value to set a genuine maximum if you wish then long press enter to get back to normal.
 
Rafe said:
jbalat said:
I just installed version 16 on my friends bike and he wanted a high cadence version like mine.
His motor is 48v, so this version below will work on both motor types
He tested it for a minute or so and was quite happy. All I did was changed increased the motor speed cutoff limit and multiplied the normal FOC by about 1.4 to bring it in line with the 36v settings.


Can you not just use section 8(various) in the setup menu, Submenu 0 , Option 2 experimental high cadence mode ?

Nope experimental mode is only for a 36v motor... This firmware will run high cadence for a 48v motor (ie. set to submenu 0) It would be nice to add option 3 experimental high cadence for 48v but I dont know how to do this.
 
jbalat said:
I just installed version 16 on my friends bike and he wanted a high cadence version like mine.
His motor is 48v, so this version below will work on both motor types
He tested it for a minute or so and was quite happy. All I did was changed increased the motor speed cutoff limit and multiplied the normal FOC by about 1.4 to bring it in line with the 36v settings.

Thanks for supplying that

Im assuming these changes would work well for a 48V motor with a 52V battery?

It turns out the hailong 48V 10AH battery I bought to save a few $$(and grams) is a POS. After 10 or so rides the BMS shuts off at 43V and closer inspection shows that one of the parallel banks is bad.

So Im upgrading to a luna 52V pack, same weight but 50% more capacity.

Lesson learned, dont skimp on the battery
 
linklemming said:
Im assuming these changes would work well for a 48V motor with a 52V battery?

Why don't you test it and let us know ?

linklemming said:
It turns out the hailong 48V 10AH battery I bought to save a few $$(and grams) is a POS. After 10 or so rides the BMS shuts off at 43V and closer inspection shows that one of the parallel banks is bad.

Maybe dump the bad cells and see if you can reconfigure a smaller 52v pack you can carry with you for longer rides ?
Try to pull around 5Amps across each cell and test start voltage and voltage under load. You will immediately see which ones are bad. Obviously the ones that drop the least are the ones to keep.
 
Everyone might already know this, but if you have the 6pin motor controller, the perfect sacrificial cable to buy is the speed sensor extension cable:

https://www.eco-ebike.com/collections/tsdz2-accessories-parts/products/extension-cable-for-tsdz2-speed-sensor

You can use the male end to make the programming cable, and the female end to solder onto the display cable and you're all set, that's all you need. The one I bought from the site above has all six conductors.

Has anyone looked at how hard it'd be to add support for the VLCD6? It's what came with my motor and I like the form factor a lot. Really small and out of the way.
 
Rafe said:
I did that once on a ride spiked and it caught me out too and now it is winter and I'm wearing thick gloves I do it quite often and it's a flipping nuisance.. all that you have done is inadvertently limited the max power to 25watts which is too low for pedal assist to work.

Another thing you could do is simply setup/use offroad mode. When you do that the simultaneous 'up-power' will simply toggle offroad mode. You can then setup offroad mode to be the same as normal mode. Note that speed limit is in km/h even if you setup dispaly for mi/h

I originally setup offroad mode with speed limit for normal mode and due to the annoying keypress issue just settled on a really high speed limit so being in offroad mode really doesnt matter.
 
Hi guys.
I am Italian and I am new in this forum.
a few months ago I bought a TSDZ2 electric motor from PSWPOWER to be installed on my full-suspension bike. I must say that casainho and all the contributors present in this forum have done a great job for the development of the firmware for this engine. I have a display type VLCD6 also called "race", very small and compact, so I decided to implement the firmware 0.16, compatible with the VLCD6 display, but I think it is also compatible with the VLCD5 and the XH18. I implemented the communication protocol to dialogue with the display, many parameters present in the KT-LCD3 project I added them in the eeprom of the Controller project. I added the walk assist function because for me it is very important when I have to climb non-cycling paths. However, the firmware remains compatible with the KT-LCD3 just configure some "# define" that allow you to enable or disable parts of the code, some functions or settings.
The default settings are for a 36V system, of course they can be changed according to your needs.
That said tell me please if I have to attach my project in this forum.
Ciao.
 
Back
Top