Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

famichiki said:
mbrusa said:
At 25km/h it's acceptable, but below 20 it's a continuous on/off, not what a PID tuning should do.


One other thing, in my own port I had a rare problem of the displayed speed freezing and the motor continuing running by itself at low power as if on cruise or walk. It would happen about once in every 100km of riding and the display speed was never the same. The only way to fix it is to power off. Have you had anything like that happen? I think I was using power assist mode. But I wonder if it's an underlying problem in Buba's code or something I'd done, although he did put a few fail safes into the code.

I've got the same problem sometimes, speedo is stuck at a certain speed and the powerassist is also set at a fixed level and very unresponsive at that moment. Keeps pushing when not moving the paddles. Solved by turning it on and off again. Happens every few 100km's I quess.
 
I had the same problem with cruise control as being described where it locked up at a particular speed and the only in-situ fix was to switch off and start up again. However, at home I reloaded the option byte with 20 and while the ST Programmer maintained it was now 20, a subsequent read said 28! No matter, it seemed to fix the problem (and others) anyway and both ebikes now perform flawlessly.
Ian
 
The option byte is a mystery ...
Kati-moa, are you sure the value remained 28?
From all the tests I have done, any value has changed to 20, impossible to keep 28.
Not only that, setting 28 (only possible if PROGRAM MEMORY is deleted), loading only the program file, also changes the option byte to 20, always with any OSF version.
In the next version I will remove the flashing of the option byte file, although I doubt it changes anything.
If your option byte stays at 28, maybe it depends on the microcontroller or a different version of ST Visual Programmer?
 
Thanks mbrusa, I will re-check what happens shortly. Suffice to say I did not delete the program memory before hand. My procedure was to reload/update with the Java configurator (changed variables etc to suit actual mode selected) and then use ST to update the Option Byte. After I noticed it seemed to not change I discontinued the practice and I have had no more strange and unpredictable operation.
Ian
 
Please help. Sorry about the translation, but it's automatic.
Hello, I am from Spain and I have an engine problem.
I have mbrusa software. 36 V motor, 36 V and 17.5 A battery.
It made a strange noise and I disassembled it thinking that it would be greasing, I cleaned and greased it, but now the engine does not work.
I have checked everything and it keeps giving me the E04 error.
In cadence mode the engine does not start either and gives error E04.
If I put on the walking aid, it also gives E04.

What can happen to him?
How can I check if the motor, torque sensor, controller, etc ... works?

Thank you very much to all
 
I had a similar problem when i didnt use the metal part that has 2 holes that bolts into the motor.
The motor "twisted" a little and was very hard to pedal and made strange noises. removed put it back and all good.

catile said:
Please help. Sorry about the translation, but it's automatic.
Hello, I am from Spain and I have an engine problem.
I have mbrusa software. 36 V motor, 36 V and 17.5 A battery.
It made a strange noise and I disassembled it thinking that it would be greasing, I cleaned and greased it, but now the engine does not work.
I have checked everything and it keeps giving me the E04 error.
In cadence mode the engine does not start either and gives error E04.
If I put on the walking aid, it also gives E04.

What can happen to him?
How can I check if the motor, torque sensor, controller, etc ... works?

Thank you very much to all
 
Hi,

I'd like to know if it's possible to set the speed limit over 45 km/h with the TSDZ2 Parameter Configurator.
I have a VLCD5 which limits the speed to 45km/h....

Have a good one.
 
sylvain_wm said:
.... if it's possible to set the speed limit over 45 km/h .....
I never tried this, but the speedlimit of OSF works independent of vlcd5 if you have unchecked "set max speed from display", so imho it should be possible if the motor has enough power.
 
sylvain_wm said:
Hi,

I'd like to know if it's possible to set the speed limit over 45 km/h with the TSDZ2 Parameter Configurator.
I have a VLCD5 which limits the speed to 45km/h....

Have a good one.

Yeah, thats easy. Uncheck max speed from display and set a maximum other speed. But it depends on the gearing u run, my normal streetbike hits 62km/h on highest setting with a good backwind.
The mbt has a little shorter gearing and does like 55km/h max. With another gearing it can go faster.
 
mbrusa said:
The option byte is a mystery ...
Kati-moa, are you sure the value remained 28?
From all the tests I have done, any value has changed to 20, impossible to keep 28.
Not only that, setting 28 (only possible if PROGRAM MEMORY is deleted), loading only the program file, also changes the option byte to 20, always with any OSF version.
In the next version I will remove the flashing of the option byte file, although I doubt it changes anything.
If your option byte stays at 28, maybe it depends on the microcontroller or a different version of ST Visual Programmer?

What exactly are the different values 20 & 28 supposed to represent? I find a lot of talk about the option byte but no good explanation. :(
 
famichiki said:
mbrusa said:
The option byte is a mystery .....

What exactly are the different values 20 & 28 supposed to represent? I find a lot of talk about the option byte but no good explanation. :(
There was a discussion here about the differences.
As I understand it had to do with the input settings for the controller.
 
Elinx said:
There was a discussion here about the differences.
As I understand it had to do with the input settings for the controller.

I somebody could please explain the issue into a single post and what we ideally need set for OSF that would be helpful. I am currently not altering the option byte when flashing with OSF, as per Buba's original release.

So far all I can figure out is that Option Byte 2 can somehow get changed and we need it to be 28 as per factory firmware. I vaguely remember I had a problem after running Marcoq's firmware and trying to revert to stock.

Also we need Read Out Protection OFF so we can verify the flashing was successful?

However I have Eco Bikes factory option byte data and it shows ROP as being ON when Option Byte 1 is 00. If I change it to OFF it stays 00, but if I change it back to ON it then becomes AA. Is that the issue that flashing the option byte at lease once solves?

After flashing OSF, is it best to then set ROP to ON?

And could any of this be related to the problems with the display lockups and non-stop running?
 
famichiki said:
So far all I can figure out is that Option Byte 2 can somehow get changed and we need it to be 28 as per factory firmware.

The meaning of the options bytes is explained in the datasheet.
Value 20: This "20" is a hex number and is 32 in decimal and 00100000 in binary. Says only bit 5 of Optionbyte 2(AFR5) is set.

AFR5 Alternate function remapping option 5
0: AFR5 remapping option inactive: Default alternate function.(2)
1: Port B3 alternate function = TIM1_ETR; port B2 alternate function =
TIM1_NCC3; port B1 alternate function = TIM1_CH2N; port B0 alternate
function = TIM1_CH1N

Value 28: This "28" is a hex number and is 40 in decimal and 00101000 in binary. Says bit 3 and bit 5 of Optionbyte 2(AFR3 and AFR5) are set.

AFR3 Alternate function remapping option 3
0: AFR3 remapping option inactive: Default alternate function.(2)
1: Port D0 alternate function = TIM1_BKIN.

TIM1_BKIN is the pin that stops the timer1 (PWM generation for MOSFET switching) by hardware, that's a safety feature for hardware overcurrent detection e.g.

The active AFR3 bit sets TIM1_BKIN to pin PD0. If AFR3 is not set, the TIM1_BKIN is pin PE3. So, if AFR3 is not set, the processor will check pin PE3 for the timer break function. Whatever is attached to PE3 on the TSDZ2 PCB...

The read out protection has nothing to do with this issue, it's only for protecting the intellectual property of the firmware developer.

regards
stancecoke

option bytes.PNG
 
Hello,
I have a TSDZ2 36V 250W motor and it started making this vibrating noise from its first kolomettres (30km) after its installation (video below).
It is a noise that sometimes disappears, but it is present almost constantly.
I tightened everything I could. I even tried to turn the pedals without the chain and
there is always this vibrating noise coming from the right side of the motor,
which is amplified by the chain when placed on the bike and I feel the vibration on the frame of the bike.
Have you had this kind of problem? What can this noise cause?
It drives me crazy, 400 km and I haven't yet figured out what causes the noise.
https://www.youtube.com/watch?v=KG4fGv4s2lw
 
In the video, the chainring doesn't seem to be running smoothly. So it looks different for me. I once read of someone who had problems with an unsteady freewheel bearing and thus an alternating compression between the large gear on the freewheel and the small gear driving it. That could match the noise, whenever the pressure is too great there is noise and when it decreases it is quiet.
 
Kati-moa said:
Thanks mbrusa, I will re-check what happens shortly. Suffice to say I did not delete the program memory before hand. My procedure was to reload/update with the Java configurator (changed variables etc to suit actual mode selected) and then use ST to update the Option Byte. After I noticed it seemed to not change I discontinued the practice and I have had no more strange and unpredictable operation.
Ian

Mbrusa, sorry for the delay but its summer down here and family gets first dibs! Here is the screen captures when reading and writing the Option Byte. Initially it was set to '20', I wrote '28' then read back the value in memory which was '20'. So did value not change but motor/operation responded and the erratic behaviour seen earlier (stopping, going into a weird form of cruise control or motor continuing to run when bike brought to a stop) also ceased. This operation fixed my wife's bike as well which was having similar 'issues'. Having done this procedure once settled everything down and I now load parameter updates normally.
 

Attachments

  • opt2.PNG
    opt2.PNG
    15.4 KB · Views: 1,070
  • opt3.PNG
    opt3.PNG
    15.1 KB · Views: 1,070
vanya_m said:
Hello,
I have a TSDZ2 36V 250W motor and it started making this vibrating noise from its first kolomettres (30km) after its installation (video below).
It is a noise that sometimes disappears, but it is present almost constantly.

Not entirely sure as the noise is exactly in the same pedal position each time, which could be co - incedental to what gear you are in, but when you very lightly damage the blue plastic gear, you get a very similar vibration and noise. When it first occurs it feels / sounds much worse, but within a few miles the steel gear reshapes the damage section and the noise sort of diminishes, but never fully disappears to the stage where your bike is.

I had a very bad chain suck in mud with a brand new chain and front sprocket on Monday ( tolerances were tight together with the mud ) and have damaged the blue gear again ( first time in over 3 years since going over the OSF firmware ) and although louder and more notchy, the ride home was pretty similar sounding to your bike.
 
Hi mbrusa. Well the net result was the same. I restarted as you requested after writing 28 but it read 20 as before. Here is the STVisual Prog. version details:
 

Attachments

  • ST VisualProg Version.PNG
    ST VisualProg Version.PNG
    6.6 KB · Views: 920
Hi emmebrusa, i'm in trouble...
I've modified my TSDZ2 installing temp sensor, calibrating torque sensor (hardware calibration) and installing your firmware (latest version).
Before reassembling the motor all worked fine, now i have these errors:
-overtemp error (temperature is 99.9)
-torque error (value is 99.9)
I've disassembled again the motor to verify the torque sensor and temp sensor: wiring is ok...
I'm using a 52v battery (14s).

Please help me! :cry:
 
Hi Filippods, Not long ago I looked into a similar problem with Temp Sensor. It turns out that critical SMD component is likely not fitted to non-throttle controllers, and without fitting this resistor the A to D input on the micro controller that we use for the temp sensor will be disconnected so a 99.9 value is not unexpected. Does not explain the torque error though.
Ian
 
I have noticed that a couple of vendors are have a SM-102 display that works with stock firmware. Do you think this OSF would would work with that version of the SM-102 or will it still require reprogramming the SM-102? I've that there is an option to select the display when configuring the firmware. All I've found that it does it change the number of segments for the power meter. Though I haven't done a complete code inspection.
Thanks for any help.
 
Back
Top