Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

I think I have found the problem with my wife's bike.
I now understand that when new firmware is used the VLCD5 does not work like before the upgrade. Some variables can only be changed by directly modifying Data Memory values.
On wife's bike I was using 2 magnets for the speed sensor, after installing firmware I checked VLCD5 was set to "cc=2" but I think firmware was expecting 1 magnet so was reading "Max Wheel Speed" too soon?? Is my logic correct?

I have removed one magnet, set VLCD5 to "cc=1" so that the speedometer is correct, quick road test and it feels OK :)

Now I have noticed this problem with both bikes, the battery indicator on VLCD5 is reading low. I am using 36v so I think the value at line 00400E "0A" is correct.
Any ideas please??

I will try to read actual battery voltage and report later.
 
I have problems with the firmware and the XH18 display. Firstly I couldn't use to program the java configurator because the walk assist function didn't work, then I used the svtp to program and I programmed only the program memory. I started the motor and it generated the data memory.
Anotaci-n-2019-01-27-144937.jpg

DM that the engine created when I installed the PM firmware, and in the DM tab I overwrote everything with zeros. I installed only the PM and the DM was generated on power up. The walk assist worked with this method.

I tested this morning. suffered continuous engines shutdowns during the test.

The last value written in the DM is 0x004027

Configuration of the DM tab that I will try to use to eliminate the dull ones.

Captura.png

I have a 15amp battery and my engine version is 350W, 36v.

What do you think? What do I set wrong to turn off the engine?
 
Ashrambo
You may want to try these values?

After reading the marco default values document and using the Hex converter that elem shared with me (thanks elem :thumb: ), I decided on these values for my two bikes: They are both 36v 350w motor.

00 01 02 03 04 05 06 07 08 09 A B C D E F
4000 AA 08 00 10 19 1D 01 23 08 2D 01 00 23 19 0A C4
4010 00 3B 01 08 10 1E 32 00 01 04 0C 14 1C 14 23 01
4020 00 00 4B 55 0A 0C 12 1A 20 28 14 00 00 00 00 00

There are some of the values that I do not understand and when I have studies them more I will will document what I did and ask for comments.

My wife and I have just tested the bikes, about 7 miles total riding on road with a few hills and all was excellent with much improvement on original firmware. :bigthumb:
 
I did an excell with the parameter of data memory, I'm trying to understand the meaning of each field. I didn't undestand this fields:

https://drive.google.com/open?id=1EkGts46C1Ao6WVPyuLsvCc9pxqIZPNSB

0x004001 ASSIST_LEVEL_FACTOR_X10 5 (0x05) // 0.5 = 10%
0x004005 BATTERY_LOW_VOLTAGE_CUT_OFF_X10_0 34 (0x22) // Battery low voltage cut-off LSB: 36v battery, LVC = 29.0 (2.9 *10): (34 + (1 << 8))
0x004006 BATTERY_LOW_VOLTAGE_CUT_OFF_X10_1 1 (0x01) // Battery low voltage cut-off MSB
0x00400B OFFROAD_CONFIG 0 (0x00) // bit0: enable offroad, bit1: enable offroad on startup, bit2: enable offroad power limit
0x00400F BATTERY_PACK_RESISTANCE_0 196 (0xC4) // Battery pack resistance LSB 196 milli ohms, battery pack 36V 10S5P
0x004010 BATTERY_PACK_RESISTANCE_1 0 (0x00) // Battery pack resistance MSB
0x004020 TARGET_MAX_BATTERY_POWER_DIV25 25 (0x19) // 25 = 625 watts (25 * 25), 0 is disabled

And the walk assist function, How can I change the power to increase the speed?
0x004024 WALK_ASSIST_PERCENTAGE_CURRENT 10 (0x0A) // 10% of max battery current (max = 100%)
0x004025 WALK_ASSIST_PWM_DUTY_CYCLE_LEVEL_0 12 (0x0C) // 0...255
0x004026 WALK_ASSIST_PWM_DUTY_CYCLE_LEVEL_1 17 (0x11) // 0...255
0x004027 WALK_ASSIST_PWM_DUTY_CYCLE_LEVEL_2 25 (0x19) // 0...255
0x004028 WALK_ASSIST_PWM_DUTY_CYCLE_LEVEL_3 33 (0x21) // 0...255
0x004029 WALK_ASSIST_PWM_DUTY_CYCLE_LEVEL_4 40 (0x28) // 0...255
0x00402A WALK_ASSIST_MAX_RAMP_TIME 20 (0x14) // 2.0 seconds
 
ashrambo

0x004001 Is the lowest battery voltage when the system will stop working so as to protect battery from over discharge. But the Default value 34 (34v) I think is too high. When I tried this my system stopped working with 3 bars on battery indicator. I have changed this to 29 (29v) as shown in the example and the Hex value for 29 is 1D. The battery management system inside my battery will actually turn off the battery at 30v so 29v should never be reached. You can set this value to suit your requirements, some people like to be extra careful with their batteries.
00x004002 I do not understand why this battery voltage is? - I used Default value
00x004006 I do not understand which parts are bit0 bit1 bit2? - I used Default value
I would be very happy for someone to explain bit0 bit1 bi2......?
00x00400F Each battery pack will have an internal resistance, measuring this can show the health of the battery pack. I do not know how the software uses this data but marco has given a general value for a 36v pack. I used Default value.
00x004010 I do not understand why this resistance? - I used Default value
00x004020 I do not understand this line. I used "00" Disabled
I am not really interested in the Walk Assist so I used all Default values

My 2 bikes are working well at the moment but there are other values I do not understand but it is too late for me now so will post another day.........
 
@marcoq
Hi Marcoq

I like the work you have done with the firmware from Casainho and others so that it can be used with stock LCD.
I have 2x TSDZ2 36v 350w with VLCD5 display and was a little disappointed with performance (sometimes erratic power delivery) from original firmware, but I do not really need all the advanced features of LCD3 and when I get my setting OK I will not want to adjust them when out riding.
Unfortunately I can not get your configerator to work, I am not a programmer but am happy to load Hex file and edit values using StLink and this is what I have done.

I have uploaded your latest Hex file and have needed to edit the Data Memory in order for it to work correctly. It was difficult for me to understand all of the data values in your document, so I guessed some items and used Default for most and now my bikes are working.
There are some problems with speed indication, I have 2 bikes one 26inch wheel and one 29inch wheel. I set the VLCD5 on each bike to 26inch and 29inch. 26inch speed I think is OK but 29inch is 1.5mph higher than 26inch?? I have now set 29inch bike to 27inch on VLCD5 and both bikes show same speed. I know this is not correct fix but is working for now. Is this because I have VLCD5 display and need to change value at 0x004008 and/or 0x004009? How do the data values relate to wheel perimeter? After changing the value on VLCD5 I have looked at the Data Memory but the values do not change, is this correct?

Do you have a document that explains in more detail what each line of the Data Memory is for, example, why are there 2 lines for Battery Low Voltage, Wheel perimeter and Battery resistance, how does the program use battery resistance? What do you mean by bit0 bit1 bit2??

I apologise if I have too many questions :oops:

But I find your work very interesting and want to understand more.

Thank you for your work on this project :bigthumb:
 
grecoa said:
@marcoq
Hi Marcoq

I like the work you have done with the firmware from Casainho and others so that it can be used with stock LCD.
I have 2x TSDZ2 36v 350w with VLCD5 display and was a little disappointed with performance (sometimes erratic power delivery) from original firmware, but I do not really need all the advanced features of LCD3 and when I get my setting OK I will not want to adjust them when out riding.
Unfortunately I can not get your configerator to work, I am not a programmer but am happy to load Hex file and edit values using StLink and this is what I have done.

I have uploaded your latest Hex file and have needed to edit the Data Memory in order for it to work correctly. It was difficult for me to understand all of the data values in your document, so I guessed some items and used Default for most and now my bikes are working.
There are some problems with speed indication, I have 2 bikes one 26inch wheel and one 29inch wheel. I set the VLCD5 on each bike to 26inch and 29inch. 26inch speed I think is OK but 29inch is 1.5mph higher than 26inch?? I have now set 29inch bike to 27inch on VLCD5 and both bikes show same speed. I know this is not correct fix but is working for now. Is this because I have VLCD5 display and need to change value at 0x004008 and/or 0x004009? How do the data values relate to wheel perimeter? After changing the value on VLCD5 I have looked at the Data Memory but the values do not change, is this correct?

Do you have a document that explains in more detail what each line of the Data Memory is for, example, why are there 2 lines for Battery Low Voltage, Wheel perimeter and Battery resistance, how does the program use battery resistance? What do you mean by bit0 bit1 bit2??

I apologise if I have too many questions :oops:

But I find your work very interesting and want to understand more.

Thank you for your work on this project :bigthumb:
Look my excel, I have calculated the wheel circumference in milimeters and I put into the data memory. (DEC TO HEX)

Enviado desde mi SM-G950 mediante Tapatalk


 
Sorry if I'm hijacking this thread. Please delete or move if this is the wrong spot. I have two questions:

1) Is it possible to set up the OS firmware to increase amps as motor load approaches 100%?

Example: Start at a baseline amps level of 10A with pedal assist. The software can monitor the signal from the torque sensor and as the load on the system approaches 100% (for instance, going uphill), automatically increase amps until, say, 15A, to get more watts. Then gradually reduce amps to baseline as they are not needed.

2) Would such a system result in lower average temperature than running 15A at all times? (even when not needed)

These questions may well make no sense cause this is my first build. Thanks in advance.
 
ashrambo

Thank you, I have looked at your excel. My wheel perimeter is 2170mm can you tell me how to convert 2170 to the correct Hex code?
Also, do I need to change lines 0x004011 and 0x004012 Default Value VLCD6 Wheel Speed Factor ??? It may be Wheel Speed Factor that is used to convert the signal from the wheel speed sensor to the correct speed ??? VLCD5 may not be same as VLCD6 ?
 
Look at my excel. cell E17: row 17 column E. Put your diameter there and the cells F17 and the cell F18 will show you the numbers to put in stvp.

I calculated my circumference: 2114, because my wheel is 26x2.35 (ERTRO 57-559) and it has a circumference of 2114mm (559+2x57x3,1416). This number in hex is 0842, I put 0x004007 WHEEL_PERIMETER_0=42 and 0x004008 WHEEL_PERIMETER_1=08

2179 in hex is 0883 0x004007=83 and 0x004008=08


 
ashrambo
Thank you for your help. :thumb:
I know you are from Spain and English is not your first language. Your English is very good (much better than my Spanish :oops: )

Please do not be offended if I try to correct something.
The perimeter of the wheel is called the "Circumference"
The Diameter is the distance across the center of the wheel.

To calculate the circumference of my wheel I start with the valve at the bottom and mark the position with chalk on the floor, then I move forward one turn of the wheel and mark the floor again. When I measure the distance it is 2170mm. I find that this method works well for all different tyres that can be on the wheel. When I convert 2170 to Hex I get 087A. So in line 0x004007 I should put "7A" ? Is this correct?

I will give it a try.
 
grecoa said:
ashrambo
Thank you for your help. :thumb:
I know you are from Spain and English is not your first language. Your English is very good (much better than my Spanish :oops: )

Please do not be offended if I try to correct something.
The perimeter of the wheel is called the "Circumference"
The Diameter is the distance across the center of the wheel.

To calculate the circumference of my wheel I start with the valve at the bottom and mark the position with chalk on the floor, then I move forward one turn of the wheel and mark the floor again. When I measure the distance it is 2170mm. I find that this method works well for all different tyres that can be on the wheel. When I convert 2170 to Hex I get 087A. So in line 0x004007 I should put "7A" ? Is this correct?

I will give it a try.
You are right. 4007=7A 4008=08

Enviado desde mi SM-G950 mediante Tapatalk


 
Hello grecoa, to change the diameter of the wheel I report what was said by Marcoq to my question to configure with STVP in the Data Memory the values of a wheel 27.5:
Hi Zappan.
The circumference of a 27.5 corresponds to 2200mm, translated in hexadecimal equals 0x0898, ie 0x08 (dec 8) for the high byte and 0x98 (dec 152) for the low byte .... therefore in the location 0x004007 of the eeprom you have to write 98 and in the location 0x004008 you have to write 08 (it should already be so)
 
We have just done 26 mile ride and have noticed some slight issues.
Sometimes (doesn't feel like it does it always), when pedaling under light load it feels like there is a slight resistance coming from the motor? If I increase the pressure on the pedals I can feel the motor cut in and give assistance. It may be that under light pedal force the motor is not assisting but is adding some resistance to pedaling?
Is this normal?
Also the battery capacity indicator first dropped 1 bar at a time until 3 bars then changed between 3 and 1 bar for rest of journey?
is this to be expected??

Have others had these issues?
 
If you have the VLCD5 is normal, the code was written for the VLCD6 which has less bars in the indicator, therefore to keep the same code (marcoq does not have the VLCD5 and he can't try it out) he sorted by dropping 2 bars at the second and third drop.
You will see (full - lose 1 bar - lose 2 bars - lose 2 bars - empty).
Perhaps marcoq will receive a VLCD5 from another user to try to fix the (minor) issue.
 
thineight said:
If you have the VLCD5 is normal, the code was written for the VLCD6 which has less bars in the indicator, therefore to keep the same code (marcoq does not have the VLCD5 and he can't try it out) he sorted by dropping 2 bars at the second and third drop.
You will see (full - lose 1 bar - lose 2 bars - lose 2 bars - empty).
Perhaps marcoq will receive a VLCD5 from another user to try to fix the (minor) issue.

Thank you
Makes sense
 
grecoa said:
We have just done 26 mile ride and have noticed some slight issues.
Sometimes (doesn't feel like it does it always), when pedaling under light load it feels like there is a slight resistance coming from the motor? If I increase the pressure on the pedals I can feel the motor cut in and give assistance. It may be that under light pedal force the motor is not assisting but is adding some resistance to pedaling?
Is this normal?
Also the battery capacity indicator first dropped 1 bar at a time until 3 bars then changed between 3 and 1 bar for rest of journey?
is this to be expected??

Have others had these issues?

I had same issues and also hard pedalling motor give back some resistance when I was riding with stock firmware. It was wery annoying.
All was gone when I installed new firmware and KT-LCD3.
 
dameri said:
grecoa said:
We have just done 26 mile ride and have noticed some slight issues.
Sometimes (doesn't feel like it does it always), when pedaling under light load it feels like there is a slight resistance coming from the motor? If I increase the pressure on the pedals I can feel the motor cut in and give assistance. It may be that under light pedal force the motor is not assisting but is adding some resistance to pedaling?
Is this normal?
Also the battery capacity indicator first dropped 1 bar at a time until 3 bars then changed between 3 and 1 bar for rest of journey?
is this to be expected??

Have others had these issues?

I had same issues and also hard pedalling motor give back some resistance when I was riding with stock firmware. It was wery annoying.
All was gone when I installed new firmware and KT-LCD3.

Is anyone having similar issue with marcoq software and VLCD5?
 
Back
Top