New "TSDZ2 Torque Sensor Central Motor"

jbalat said:
Using stm32 cube programmer in Windows with 5v from the stlink to j7
It would not connect to the lcd but recognised the stlink.
I pressed erase. The lcd3 power has gone off and it's been thinking for 10 minutes.. should I leave it ?

Actually nothing happened.. it won't connect. Any ideas gurus ?
You need to keep pressing on/off button while programming LCD3 - this note is written on the documentation I wrote.
 
casainho said:
You need to keep pressing on/off button while programming LCD3 - this note is written on the documentation I wrote.

I managed to change the protect option to zero and write it back to the lcd.
Now the display is blank, it shows nothing but I can still connect to it

The problem is that the windows ST Visual Programmer tool does not import bin files only hex

I tried to convert a file over to hex using the ST Link 32 Utility using Save As. But it would not load properly.
 
jbalat said:
casainho said:
You need to keep pressing on/off button while programming LCD3 - this note is written on the documentation I wrote.

I managed to change the protect option to zero and write it back to the lcd.
Now the display is blank, it shows nothing but I can still connect to it

The problem is that the windows ST Visual Programmer tool does not import bin files only hex

I tried to convert a file over to hex using the ST Link 32 Utility using Save As. But it would not load properly.
Then I will try to upload an hex file. Let's see if I can do it today.
 
Thanks casainho :)
I am installing eclipse and maybe I might be able to help out when I get my head around it ?
 
feketehegyi said:
Thanks! My ST-Link V2 Programming Unit is ordered already, so it takes some time till I can play with OpenSource Firmware. I can also imagine that the app will be capable to deal with both original and casainho's firmware.
I'll try out if data can be sent via Bluetooth, however it's a relative frequent communication between Display and Motor.
I've not heard about nodemcu yet. It seems to be an Arduino like board.
Regarding to your question, I've used hurzhurz's documentation. Take care this is the female one going to LCD. Pin out:
https://github.com/hurzhurz/tsdz2/blob/master/pinout.md
Serial communication:
https://github.com/hurzhurz/tsdz2/blob/master/serial-communication.md

thx for the infos!!!
 
feketehegyi said:
Thanks! My ST-Link V2 Programming Unit is ordered already, so it takes some time till I can play with OpenSource Firmware. I can also imagine that the app will be capable to deal with both original and casainho's firmware.
I'll try out if data can be sent via Bluetooth, however it's a relative frequent communication between Display and Motor.
I've not heard about nodemcu yet. It seems to be an Arduino like board.
Regarding to your question, I've used hurzhurz's documentation. Take care this is the female one going to LCD. Pin out:
https://github.com/hurzhurz/tsdz2/blob/master/pinout.md
Serial communication:
https://github.com/hurzhurz/tsdz2/blob/master/serial-communication.md
There is a new experienced developer on KT thread discussing an idea for an interface between the motor controllers and LCDs, PC and mobile apps. From my side, I feel the need to improve an interface -- may be a worth of reading for you:

-dg said:
One idea that has come up several times in this thread is to have the configuration adjustable without reflashing. I am thinking we could use the serial interface that connects the LCD to set parameters in both the controller and in the LCD by connecting a serial line. I'm also thinking of building something like a headless Cycle Analyst that could handle things like cruise control or different types of throttle.

To make this useful we would need a protocol to communicate settings that would be more general than the current protocol between the LCD display and the controller. Looking around, I found Modbus https://www.lammertbies.nl/comm/info/modbus.html which is used to send state info and settings between different industrial controllers. It is very simple and would not require much code. The idea is that we could use any serial device like a bluetooth dongle or a USB serial and change settings, or read data back from eiher the controller and the LCD. Since it is addressable we could also use Modbus to handle the LCD to controller communication so if we wanted to provide new displays on the LCD it would be easy to do so in a structured way instead of just taking another byte onto the existing protocol.

Since Modbus has been around since 1979, there are lots of interoperable implementations for Linux and Windows in a variety of languages and for various micro controllers. There are at least a dozen AVR or Arduino packages on github and even a couple for STM8 that could be adapted.

Specifically I am interested in making a multi button throttle for drop bars that would support multiple hand positions and cruise control and power settings without requiring a display. This might be based on one of the $1 STM8S breakout boards connected via the LCD serial to the controller. It would read speed and cadence etc from the controller and the buttons state and then send throttle either via the throttle wire, or even better via Modbus over the serial line. Ideally this device could live on the bars with the brake lever sensors and the throttle buttons and only have the 4 wire serial+power interface to the controller so that it would be fly-by-wire and there would not be such a mess of cable all over the bike.

Is this of any interest? Do I need to explain it better?
 
Hopefully I will be able to test the 15s battery in about 2-3 weeks when the rest of the parts arrive. I am going to charge the batteries individually at first and then discharge them down to 62v and make sure everything works, and if so I will order a 63v battery charger. I have seen some chargers that can be taken apart and they have adjustment screws inside that can adjust the voltage output so I will try to get one of those and set the charging voltage between 61.5-62v.

The 3 batteries already arrived and I am quite happy with them. I bought 3 Harbor Freight Hercules 20v 5ah tool batteries. I took one apart and they each have 10 Samsung INR18650-25R M (2.5 ah 20a discharge) cells in them. The first 2 were $15 each and the 3rd was $20, so $50 for 30 samsung 2500mah 20a discharge cells! After we move and I no longer need to travel with them I will buy a 15s bms and rewire the cells to that bms instead of the 3 individual tool pack bms's. I wish I could risk carrying more on a plane, then I would try to buy 3 more of them to make a 15s 10ah battery.
 
John and Cecil said:
Hopefully I will be able to test the 15s battery in about 2-3 weeks when the rest of the parts arrive. I am going to charge the batteries individually at first and then discharge them down to 62v and make sure everything works, and if so I will order a 63v battery charger. I have seen some chargers that can be taken apart and they have adjustment screws inside that can adjust the voltage output so I will try to get one of those and set the charging voltage between 61.5-62v.

The 3 batteries already arrived and I am quite happy with them. I bought 3 Harbor Freight Hercules 20v 5ah tool batteries. I took one apart and they each have 10 Samsung INR18650-25R M (2.5 ah 20a discharge) cells in them. The first 2 were $15 each and the 3rd was $20, so $50 for 30 samsung 2500mah 20a discharge cells! After we move and I no longer need to travel with them I will buy a 15s bms and rewire the cells to that bms instead of the 3 individual tool pack bms's. I wish I could risk carrying more on a plane, then I would try to buy 3 more of them to make a 15s 10ah battery.
Seems that changing battery low voltage value on LCD could help you a lot, so you could drive with any cell/battery pack voltage combination.
 
casainho said:
Seems that changing battery low voltage value on LCD could help you a lot, so you could drive with any cell/battery pack voltage combination.

Yes, I ordered the kt-lcd already as well as the st-link but I suspect they will take a couple more weeks to arrive. :) I am going to first try the 56v battery combo charged to 62v max and see how it works. If it gives me issues or roasts the controller I can use just 2 battery packs in a series to make a 10s 36v battery and I will order a 36v charger instead (or another 21v charger). If the 3 work together though I think 62v would be great with lots of power, I may even drop the max amps down to 14. I can also carry my 52v 2ah battery as a spare, although once I get the new battery going I will probably just sell the ego battery and charger to someone else (since it cannot be taken on a plane at 112wh). The HF batteries are marked 90wh so they are aircraft friendly.
 
Hi Wayne,
For the 36V motor, try Aliexpress:
Okfeet sell them:
https://www.aliexpress.com/item/Okfeet-eBIKE-tongsheng-inside-motor-for-TSDZ2-electric-bicycle-central-mid-motor-for-replacement-of-36V/32865525984.html?spm=2114.search0104.3.100.7c452cdesMeWMR&ws_ab_test=searchweb0_0,searchweb201602_2_10152_10151_10065_10344_10068_10547_10342_10343_10340_10548_10341_10696_10084_10083_10618_10307_10869_10868_10059_100031_10103_10624_10623_10622_10621_10620,searchweb201603_13,ppcSwitch_4&algo_expid=d98a58f7-c8d6-4f8a-849f-f6e19383c649-12&algo_pvid=d98a58f7-c8d6-4f8a-849f-f6e19383c649&priceBeautifyAB=0

And PSW Power:
https://www.aliexpress.com/item/Bare-motor-for-TSDZ2-electric-bicycle-central-mid-motor/32702216780.html?spm=2114.search0104.3.300.7c452cdesMeWMR&ws_ab_test=searchweb0_0,searchweb201602_2_10152_10151_10065_10344_10068_10547_10342_10343_10340_10548_10341_10696_10084_10083_10618_10307_10869_10868_10059_100031_10103_10624_10623_10622_10621_10620,searchweb201603_13,ppcSwitch_4&algo_expid=d98a58f7-c8d6-4f8a-849f-f6e19383c649-38&algo_pvid=d98a58f7-c8d6-4f8a-849f-f6e19383c649&priceBeautifyAB=0

And probably a few other sellers in China. I don't know about any suppliers outside China.

You have to choose your Voltage (and power on Okfeet) when ordering as they sell both.
At first I was a bit skeptical about buying from China, but I have bought many items through Aliexpress now, and everything has arrived as specified and undamaged, so fairly confident when ordering now.
 
casainho said:
John and Cecil said:
Hopefully I will be able to test the 15s battery in about 2-3 weeks when the rest of the parts arrive. I am going to charge the batteries individually at first and then discharge them down to 62v and make sure everything works,
Seems that changing battery low voltage value on LCD could help you a lot, so you could drive with any cell/battery pack voltage combination.
Adjustment for the pack voltage fron the LCD would be ideal,...
Or even "open" voltage range ..30-60v would suit me fine...
......but can we do that with the new software yet ?
John, .....i assume you are refering to trying 60v after you have reprogrammed the controller ?
You (and others) have already established the standard 48v system does not function above 57/58 v .
 
Hillhater said:
Adjustment for the pack voltage fron the LCD would be ideal,...
Or even "open" voltage range ..30-60v would suit me fine...
......but can we do that with the new software yet ?
John, .....i assume you are refering to trying 60v after you have reprogrammed the controller ?
You (and others) have already established the standard 48v system does not function above 57/58 v .

Casainho has a new firmware written from scratch for the motor and kt-lcd3 display. I ordered the kt-lcd display a few days ago. If I understood him correctly that firmware and the aftermarket lcd display (after they are flashed with his firmware) will allow the user to completely remove the max voltage battery setting and also set the low voltage setting (and also the max amp setting too) on the fly right on the lcd display (not through a computer connected to the motor).

The capacitors on the controller are rated for 63v from what I have read. And yes my 48v motor maxes out at around 56.5v but 52v motors can use a full 52v battery (58.8v plus headroom, so possibly close to 60/61v I assume).


i.e - after i flash the firmware for the motor controller and the display i can get on my bike and turn on the unit and press some buttons on the display and then change the voltage settings and the amp settings right on the bike's new lcd display. If I wanted to I can set the min voltage at 30 like you suggest and have the max at the capacitor max (63v). No one has tried a 56v 15s battery yet so we are not sure if the controller is up to it.
 
Guys just finished a video on the TSDZ2 after 5000km (well almost). I wanted to get it out of the way before I start tinkering with the motor. Enjoy
[youtube]YMQGmuYA6Vg[/youtube]
 
Features implemented in motor controller + LCD3 firmware, about battery:

- define on LCD3 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 however original firmware uses the max value of 18 so be warned!!).

- max battery power: motor controller will automatically choose a battery current in a way to limit the max battery power usage. The battery current value will never be higher than the max battery current setup on the configurations screen.
This feature is important if you want to ride at a constant motor electric power even when battery voltage gets lower because if discharge.

About the high and low voltage limits, high voltage limit is simple not implemented at all (I don't see a reason for it exist). Low voltage limit for now is configured on firmware config.h file but in future should be on LCD3.
 
jbalat said:
Guys just finished a video on the TSDZ2 after 5000km (well almost). I wanted to get it out of the way before I start tinkering with the motor. Enjoy
[youtube]YMQGmuYA6Vg[/youtube]
Great value your are giving us with your videos!! I am looking forward to your next videos about our OpenSource firmware.

Any thing you need to understand, just ask. I really need to put a version number on firmware files and also share the hex files....
 
Thanks Casainho
I have much to learn. Without the hex files I don’t think there is an EASY way to flash in windows. (By easy I mean no command line stuff)

Eclipse is not easy to understand, I loaded up the lcd3 firmware project but I’m getting all kinds of errors.

I’m wondering whether I will be able to resolve these errors going from your Linux code to windows. Google is my friend so spending lots of time getting nowhere but hopefully will make some progress soon

Just a few to start.
The debug configuration says it is orphaned.. no build options are available.
Also it can’t find include stdint.h even though I have pointed it to the gnu arm folder.
 
I have the same problem with rotating motor and no place to get a fixture because of my "fully" bike.
Yesterday i had an idea and wanted to share with you. It replaces the factory-provided piece of metal and locks down
with the screw of the rear swing...

Any comments on this?
WhatsApp Image 2018-07-24 at 21.40.57.jpeg
 
shaddi said:
I have the same problem with rotating motor and no place to get a fixture because of my "fully" bike.
Yesterday i had an idea and wanted to share with you. It replaces the factory-provided piece of metal and locks down
with the screw of the rear swing...

Any comments on this?
WhatsApp Image 2018-07-24 at 21.40.57.jpeg

looks like a smart idea!
 
+1 from me too, would like to see it from 2.5mm carbon
 
shaddi said:
I have the same problem with rotating motor and no place to get a fixture because of my "fully" bike.
Yesterday i had an idea and wanted to share with you. It replaces the factory-provided piece of metal and locks down
with the screw of the rear swing...
Any comments on this?
I mentioned this a rew posts back, but i guess a picture says a thousand words..
Specialised Myka Expert FSR.... 16 kg complete with motor.
I used the original support bracket with a link bar to the suspension pivot pin ( hollow pin , so bolted through)
StctqG.jpg

JBzlMr.jpg
 
jbalat said:
Eclipse is not easy to understand, I loaded up the lcd3 firmware project but I’m getting all kinds of errors.

Have you read the windows tutorial for the KT-open source firmware (see my signature)?
We have a batch file that is called by eclipse to start compiling and flashing. There's need to do the command-line actions manually.
Perhaps we should adapt that for casainhos new projects for TSDZ2 and LCD3 firmware :)

regards
stancecoke
 
Finally I uploaded the LCD3 and motor controller original improved firmware as hex files -- get them here, you want the v5:
https://github.com/OpenSource-EBike-firmware/TongSheng_TSDZ2_motor_controller_firmware/tree/master/TSDZ2_original_improved_and_KT_LCD3_firmwares
 
Trying to add a thumb throttle to my TDSZ2 / VLCD-5 set up 48V/500W. The thumb throttle from ebay says specifically for the set up?
My VLCD display is "6 pin". I have the throttle plugged into the middle port. Nothing!
Is this only workable with the "8 pin" display? Any work around.

Thanks
 
Back
Top