Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Electric Motors and Controllers
Chewy   10 mW

10 mW
Posts: 29
Joined: Jun 03 2015 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5

Post by Chewy » Jan 08 2020 6:01am

Elinx wrote:
Jan 07 2020 4:51pm
.


About the battery cutoff, you can set this in the Java Gui, but the real cutoff depends of the specs. of the used li-ion cells and the cut-off setting of the BMS too. Maybe 29V isn't possible.
You were correct, I ran the battery on a light globe until the bms shut it off at 35v.

Do you know if it is possible to change the LVC on a battery bms?

Elinx   100 W

100 W
Posts: 188
Joined: Aug 09 2019 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5

Post by Elinx » Jan 08 2020 6:13am

Chewy wrote:
Jan 08 2020 6:01am
.......
Do you know if it is possible to change the LVC on a battery bms?
No, I have no experience with that.

obcd   100 W

100 W
Posts: 143
Joined: Jul 16 2019 3:45pm

Re: Tsdz2 firmware open source adapted to vlcd5

Post by obcd » Jan 08 2020 3:47pm

You need to look at what BMS you are having. The more intellegent ones have a serial interface or a bluetooth interface that permits to monitor the cell groups and allows to adjust some of the parameters. IMHO it's a feature that shouldn't be optional for a BMS board.

User avatar
amberwolf   100 GW

100 GW
Posts: 29129
Joined: Aug 17 2009 6:43am
Location: Phoenix, AZ, USA, Earth, Sol, Local Bubble, Orion Arm, Milky Way, Local Group
Contact:

Re: Tsdz2 firmware open source adapted to vlcd5

Post by amberwolf » Jan 08 2020 5:23pm

Chewy wrote:
Jan 07 2020 6:18pm
The problem is I only get half range out of my battery as the motor turns off at 35.5v.
this is probably a problem with a cell or cells in the battery not being equal to the others, in capacity, resistance, etc., so they run low before the others do.

you can often fix them temporarily by leaving them on the charger for a few hours, days, or weeks, depending on how bad teh imbalance between cells is, while the bms does it's job of rebalancing cells, draining high ones while low ones charge up to match.

but if a pack has a balance problem, then it does mean the cells no longer match each other, and some will always run out before others, reducing pack total capacity and system range. the only permanent fix is to replace teh problem cells with ones that match or exceed the better cells in the pack. or replace the entire pack with one that has matched good quality cells that won't become imbalanced until they age enough to begin drifting apart in resistance / capacity.


but you don't want to lower the overall bms lvc; it should already be set to match the cells' lowest safe voltage.

lowering the bms lvc will simply invite permanent damage to your cells that increases risk of fire that can happen at any moment, charging, discharging, or just sitting there.

Demion   10 mW

10 mW
Posts: 27
Joined: Jun 10 2018 3:42am

Re: Tsdz2 firmware open source adapted to vlcd5

Post by Demion » Jan 09 2020 1:57am

I have same problem with battery. One cell row (series) was always ~0.5V lower. So it hit LVC (<3.0V) faster then other series and BMS cut off whole battery. I was only getting half of capacity.
I left on charger for few days, but it was balancing too slowly, almost no effect at all.
Then I disconnected BMS red (and black) balancing wires and manually connected RC charger to problematic cell row (series) and charged it up to ~4.2V with 1A current. It helped, but after a while these exact problematic cells start to get lower again.
Probably need replacement. When I was building battery year ago all cells where exactly same voltage though.
First of all check with multimeter each cell row in series if one or more are out of balance (more than 0.1V) this is your problem.
Btw when measuring series, + will be cell row red wire, ground (-) will be next cell row red wire (next cell +).

User avatar
amberwolf   100 GW

100 GW
Posts: 29129
Joined: Aug 17 2009 6:43am
Location: Phoenix, AZ, USA, Earth, Sol, Local Bubble, Orion Arm, Milky Way, Local Group
Contact:

Re: Tsdz2 firmware open source adapted to vlcd5

Post by amberwolf » Jan 09 2020 4:04am

wehn a bank of cells keeps dropping, *and* it won't rebalance or takes forever to rebalance, even though it is not that far off from other cells, it can be the bms itself that's broken, rather than the cells.

what happens is the bms balancer shunt gets stuck on, so it never stops draining that group, ever. when all it should do is turn on to drain it whenever the bms detects it's higher in voltage than other cell groups, and hsould never turn it on when it's lower than others.

it's easy to test for, by either:

-- disconnecting the cell groups from the bms balance port, balancing them with that rc charger, and letting them sit for a few days disconnected. if they don't unbalance, then plug them into the bms and let them sit for the same amount of time. if they then unbalance, teh bms is draining the low one(s).

or

disconnecting the cells from teh bms balance port, then use a multimeter to check the resistance from the cell balance input pin on the bms itself, to the pads of the relatively large (usually flat) approximately in line with it, usually with traces taht go thru a transistor to it. sometimes these are covered in goo so can't see them, making this difficult. it should read "ol" or blank, or whatever a really high resistance is for that meter. if instead it reads very low, in the dozens or hundreds of ohms, compared to other channels that previously had higher voltage readings for the cells than this one, then this channel is stuck on and will always drain that cell group.




if a channel is stuck on, it's tpically eaier to repalce teh bms than repair it, but if it's just the transistor itself thats failed, you can try to find a similar one from electronics parts distrubutors. or if the bms has more channels than you are using (probably not) you cna take a transistor from an unused channel and move it to the broken one.

someitmes it's not the transistor itself that's bad, but the comparator chip or other driving electronics, and thats harder to replace without damaging it or the board.

the resistance should

Chewy   10 mW

10 mW
Posts: 29
Joined: Jun 03 2015 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5

Post by Chewy » Jan 09 2020 5:31am

Thanks everyone, looks like I probably have a bad cell. I have cut into the battery and am charging each group of cells individually with an RC charger as suggested.
received_2918618908189086.jpeg
received_2918618908189086.jpeg (166.06 KiB) Viewed 2453 times
These are the voltages I measured when fully charged

1. 3.97
2. 4.08
3. 4.08
4. 3.97
5. 3.97
6. 4.19
7. 3.97
8. 3.97
9. 3.97
10. 3.97


This is a new battery I bought 6 months ago off aliExpress. The motor was shutting off early and I mistook it for the LVC in the motor programming.

I could not get the configurator to work on my laptop and gave up for 6 months. I did end up flashing v19.hex file yesterday and the motor still cut out early anyway which pointed to the battery.

Thank you all for being patient and helping 😊

Demion   10 mW

10 mW
Posts: 27
Joined: Jun 10 2018 3:42am

Re: Tsdz2 firmware open source adapted to vlcd5

Post by Demion » Jan 09 2020 6:00am

Mine was unbalanced more, if I remember right ( but only one row, something like 1 - 4.21, 2 - 3.8, rest - 4.19).
Maybe leaving on 36V charger for a long time (even after charger led shows fully charged and turns off fans) BMS might be able balance it.
When it cuts off can you replug and turn on display again when voltage recovers?
In my case only way to turn it on was to set charger again, so it was BMS for sure.
I compiled marcoq vM0.19.C with default settings (which seems to be VLCD6, 36v), you can give it a try. I have not tested it though, use on your own risk.
https://drive.google.com/file/d/1qtPNDg ... g2-I8/view

Thanks for info amberwolf, I will test leaving it with BMS balance wires unplugged to see if it unbalances.

famichiki   100 W

100 W
Posts: 130
Joined: Jul 12 2019 9:00am

Re: Tsdz2 firmware open source adapted to vlcd5

Post by famichiki » Jan 09 2020 11:13pm

famichiki wrote:
Jan 02 2020 3:52am
I have learnt that official Tong Sheng torque signal values are 50-105 when viewed using stock firmware on a VLCD5 display. I described how to access the service viewing menu in my previous post.
I saw my previous post about the torque sensor range was quoted on Jobike. I tried registering there but something is wrong with my account, so I am replying here.

Using Mbrusa's firmware, you can try changing the hardcoded value of 32 to match your match your sensor's measured range. (Measure using his firmware, don't use the VLCD5's service viewing menu.)

If your sensor is not too bad it might improve performance without needing to do the physical calibration.

/src/controller/adc.c

Code: Select all

line 88: ui8_adc_torque_sensor_max_value = ui8_adc_torque_sensor_min_value + 32;

thineight   100 W

100 W
Posts: 228
Joined: Oct 05 2018 3:53am

Re: Tsdz2 firmware open source adapted to vlcd5

Post by thineight » Jan 11 2020 5:36pm

famichiki wrote:
Jan 09 2020 11:13pm
famichiki wrote:
Jan 02 2020 3:52am
I have learnt that official Tong Sheng torque signal values are 50-105 when viewed using stock firmware on a VLCD5 display. I described how to access the service viewing menu in my previous post.
I saw my previous post about the torque sensor range was quoted on Jobike. I tried registering there but something is wrong with my account, so I am replying here.

Using Mbrusa's firmware, you can try changing the hardcoded value of 32 to match your match your sensor's measured range. (Measure using his firmware, don't use the VLCD5's service viewing menu.)

If your sensor is not too bad it might improve performance without needing to do the physical calibration.

/src/controller/adc.c

Code: Select all

line 88: ui8_adc_torque_sensor_max_value = ui8_adc_torque_sensor_min_value + 32;
:thumb: :thumb:
According to jobike forum output, this trick works and it's useful to adjust low range sensors that produce underpowered response of the TSDZ2.
MTB KTM Ultra 29" - City bike DAYTONA 28"

zappan   10 W

10 W
Posts: 68
Joined: Sep 27 2018 3:00am
Location: Sicilia

Re: Tsdz2 firmware open source adapted to vlcd5

Post by zappan » Jan 12 2020 10:18am

famichiki wrote:
Jan 09 2020 11:13pm
famichiki wrote:
Jan 02 2020 3:52am
I have learnt that official Tong Sheng torque signal values are 50-105 when viewed using stock firmware on a VLCD5 display. I described how to access the service viewing menu in my previous post.
I saw my previous post about the torque sensor range was quoted on Jobike. I tried registering there but something is wrong with my account, so I am replying here.

Using Mbrusa's firmware, you can try changing the hardcoded value of 32 to match your match your sensor's measured range. (Measure using his firmware, don't use the VLCD5's service viewing menu.)

If your sensor is not too bad it might improve performance without needing to do the physical calibration.

/src/controller/adc.c

Code: Select all

line 88: ui8_adc_torque_sensor_max_value = ui8_adc_torque_sensor_min_value + 32;
Hi Famichiki I tried to change the value as recommended by you and I got excellent results, I reported my experience on jobike, also because I use 152mm short cranks and with the calibration of the force applied on the torque sensor everything works much better

volcamin   1 µW

1 µW
Posts: 3
Joined: Sep 30 2019 9:34am

Re: Tsdz2 firmware open source adapted to vlcd5

Post by volcamin » Jan 12 2020 1:14pm

Hello, i flashed my tsdz2 today with 0.19c version.
Works very well but the motor cuts off at 35.0 volts??
I have 36v version and i set low cut off voltage to 30volts and i also chose the 36v version and 10s battery.
Any ideas how to use the remaining 5volts?

Elinx   100 W

100 W
Posts: 188
Joined: Aug 09 2019 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5

Post by Elinx » Jan 12 2020 2:09pm

volcamin wrote:
Jan 12 2020 1:14pm
......
Works very well but the motor cuts off at 35.0 volts??..............
If you read some posts back you see Chewy has the same problem.
In his case it was problably a bad cell or cellblok, so the bms did cutoff at 35V

Chewy   10 mW

10 mW
Posts: 29
Joined: Jun 03 2015 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5

Post by Chewy » Jan 13 2020 7:43am

Yes my issue is a bad cell in the battery. It hits 3.0v while all other cells are still at 3.6v.
When it hits 3.0v it triggers the BMS and shuts off the battery while the the battery voltage is still 35.5v.

obcd   100 W

100 W
Posts: 143
Joined: Jul 16 2019 3:45pm

Re: Tsdz2 firmware open source adapted to vlcd5

Post by obcd » Jan 13 2020 7:47am

This makes sense as it's the task of the bms to protect every individual cell group.
So if one of those groups reaches the low voltage treshold, the BMS will turn the battery off to prevent further discharge of it.

Michael B   1 mW

1 mW
Posts: 11
Joined: Oct 03 2019 10:56pm

Re: Tsdz2 firmware open source adapted to vlcd5

Post by Michael B » Jan 15 2020 5:13am

famichiki wrote:
Jan 09 2020 11:13pm
famichiki wrote:
Jan 02 2020 3:52am
I have learnt that official Tong Sheng torque signal values are 50-105 when viewed using stock firmware on a VLCD5 display. I described how to access the service viewing menu in my previous post.
I saw my previous post about the torque sensor range was quoted on Jobike. I tried registering there but something is wrong with my account, so I am replying here.

Using Mbrusa's firmware, you can try changing the hardcoded value of 32 to match your match your sensor's measured range. (Measure using his firmware, don't use the VLCD5's service viewing menu.)

If your sensor is not too bad it might improve performance without needing to do the physical calibration.

/src/controller/adc.c

Code: Select all

line 88: ui8_adc_torque_sensor_max_value = ui8_adc_torque_sensor_min_value + 32;
famichiki

I saw your video. The amount of over run you are getting seems excessive

I am using the Ackmaniac version on VLCD5 and I get about half a turn (180 degrees) of over run when I stop pedalling.

famichiki   100 W

100 W
Posts: 130
Joined: Jul 12 2019 9:00am

Re: Tsdz2 firmware open source adapted to vlcd5

Post by famichiki » Jan 15 2020 5:20am

Michael B wrote:
Jan 15 2020 5:13am
famichiki

I saw your video. The amount of over run you are getting seems excessive

I am using the Ackmaniac version on VLCD5 and I get about half a turn (180 degrees) of over run when I stop pedalling.
Thanks for the info :thumb:

User avatar
jbalat   10 kW

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

Re: Tsdz2 firmware open source adapted to vlcd5

Post by jbalat » Jan 16 2020 2:39am

Hi Andrea_104 I wonder if you could add links to the latest Marco firmware and configurator in your first post..

From what I can tell the configurator is at version 3.7 and the firmware is 19c and there is also a 19c version from ackmaniak ?

Anyway would be nice to have some links if you get the time. A few of my friends have been asking me about this firmware.

Thanks
JB
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

Elinx   100 W

100 W
Posts: 188
Joined: Aug 09 2019 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5

Post by Elinx » Jan 16 2020 2:46am

jbalat wrote:
Jan 16 2020 2:39am
Hi Andrea_104 I wonder if you could add links to the latest Marco firmware and configurator in your first post....
That should be a good idea, because marcoq and stancecoke have removed their github links to this software.
Also editing the topic name a bit, to mention all stock displays would provide more clarity, with the fragmentation of OSF for different displays.

Michael B   1 mW

1 mW
Posts: 11
Joined: Oct 03 2019 10:56pm

Re: Tsdz2 firmware open source adapted to vlcd5

Post by Michael B » Jan 16 2020 3:39am

This? Ackmaniacs version uses motor current rather than battery current.

https://github.com/AckmaniacSoftware/TS ... rk/members

I'm using it with original VLCD5 display. I like it but I'm using only on the road, not extreme mountain biking.

Michael B   1 mW

1 mW
Posts: 11
Joined: Oct 03 2019 10:56pm

Re: Tsdz2 firmware open source adapted to vlcd5

Post by Michael B » Jan 16 2020 3:56am

famichiki wrote:
Jan 15 2020 5:20am
Michael B wrote:
Jan 15 2020 5:13am
famichiki

I saw your video. The amount of over run you are getting seems excessive

I am using the Ackmaniac version on VLCD5 and I get about half a turn (180 degrees) of over run when I stop pedalling.
Thanks for the info :thumb:
Actually I rechecked this today and I need to correct that.

At 35-40 kph at moderate cadence and assist I get more like one full rotation. Yours looks more than that. I'm using a 54T narrow wide chainring.
When changing down and slowing to a stop I get virtually no over run.
The other day I must have been somewhere in between when I randomly look down and just happened to notice the half rotation over run.

Maybe the over run is 'increased' with high motor assist and high cadence?

famichiki   100 W

100 W
Posts: 130
Joined: Jul 12 2019 9:00am

Re: Tsdz2 firmware open source adapted to vlcd5

Post by famichiki » Jan 16 2020 7:11am

Michael B wrote:
Jan 16 2020 3:56am
Actually I rechecked this today and I need to correct that.

At 35-40 kph at moderate cadence and assist I get more like one full rotation. Yours looks more than that. I'm using a 54T narrow wide chainring.
When changing down and slowing to a stop I get virtually no over run.
The other day I must have been somewhere in between when I randomly look down and just happened to notice the half rotation over run.

Maybe the over run is 'increased' with high motor assist and high cadence?
How was the operation when you were running the stock firmware? I do suspect the problem is increased at higher assist levels and/or higher torque or cadence but I haven't had any luck determining exactly what.

thineight   100 W

100 W
Posts: 228
Joined: Oct 05 2018 3:53am

Re: Tsdz2 firmware open source adapted to vlcd5

Post by thineight » Jan 16 2020 11:15am

jbalat wrote:
Jan 16 2020 2:39am
Hi Andrea_104 I wonder if you could add links to the latest Marco firmware and configurator in your first post..

From what I can tell the configurator is at version 3.7 and the firmware is 19c and there is also a 19c version from ackmaniak ?

Anyway would be nice to have some links if you get the time. A few of my friends have been asking me about this firmware.

Thanks
JB
Hello jbalat,
Please ref to this forum
http://www.jobike.it/forum/topic.asp?TO ... ichpage=60
There is a translation for the v.20 to stock displays ongoing (and nearly completed).
Mbrusa is the active developer for it and it will release on the Italian forum in the meantime he better understand the GitHub system... :wink:
Marcoq took a break and we all hope he will pop sooner than later with his precious contribute.

For the actual firmware (marcoq + mbrusa mods to display advanced data on stock displays) you have to go few pages back on that forum.
If you need I can zip my folder and attach it here for easier reference.
MTB KTM Ultra 29" - City bike DAYTONA 28"

Elinx   100 W

100 W
Posts: 188
Joined: Aug 09 2019 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5

Post by Elinx » Jan 16 2020 1:20pm

jbalat wrote:
Jan 16 2020 2:39am
....the configurator is at version 3.7 and the firmware is 19c and there is also a 19c version from ackmaniak ?

Anyway would be nice to have some links .....
Latest releases all based on v0.19 Stable

marcoq fork - configuration, compiling and programming with Java configurator

demion fork - configuration by edit config.h without Java configurator

ackmaniac mods - control motorcurrent instead of batterycurrent

mbrusa additions
- torque and other data readings on stock display

Configurator manual - by DarkRider81 (also links to guide of Ashrambo and Elem)
Last edited by Elinx on Jan 18 2020 8:46am, edited 3 times in total.

User avatar
jbalat   10 kW

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

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by jbalat » Jan 17 2020 4:47am

Thank you so much Elinx, I was able to install the original marco version on a friend's bike and he was pretty happy with it. The configurator didn't like the default location of stvp because of the spaces so I copied it over to the c drive and it works.
Thanks again JB
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