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

Bourtin said:
After 1300 km with the original firmware, I installed version 0.19 with display 850c and version 5 beta7.
It's great, it seems to me that the engine is less noisy, very versatile for both settings and information.
The distance trip and the odometer are reset to zero when I turn off the display. Is this normal operation?
I like toting the mileage on an entire battery discharge.
Trip is considered to start at every system boot.

Odometer has that issue you say. Will probably make an option on configuration to see and edit (like reset) this value.
 
Apart from issues with secondary functions or plans to add any additional features, is the motor control of 0.20 considered reliable yet?
 
famichiki said:
Apart from issues with secondary functions or plans to add any additional features, is the motor control of 0.20 considered reliable yet?

I have been running for a few months, zero issues for me (using KT-LCD3) It's great!
 
Can anyone please explain to me what these settings are for, what the delay is referring to and why bigger is bad?

Thanks!

Code:
#define READ_BATTERY_CURRENT_FILTER_COEFFICIENT                   2
#define READ_BATTERY_VOLTAGE_FILTER_COEFFICIENT                   2

/*---------------------------------------------------------
  NOTE: regarding ADC battery current measurement and 
  filter coefficients 

  Possible values: 0, 1, 2, 3, 4, 5, 6
  0 equals to no filtering and no delay, higher values 
  will increase filtering but will also add a bigger delay.
---------------------------------------------------------*/
 
Without studying and knowing the code, I would expect it to do some filtering and averaging of the battery voltage.
Let's assume you read the voltage every second. If you take the average of 2 readings, you only have the result 2 seconds later.
Without averaging, you will have the result after a second. Battery voltage depends upon current draw due to battery internal resistance and cable resistances. If you average your readings, you will get a more stable reading that lags a bit behind. As your battery voltage isn't suposed to suddenly jump below it's minimum treshold, this shouldn't be a problem for most, unless you really want to see how much the voltage drops if you load the battery.
 
I'm still waiting for my 48v battery to arrive, but i'm already do some pre-work when the battery arrives..

- downloaded STVP-STM32 from https://www.st.com/en/development-tools/stvp-stm32.html
- installed STVP-STM32 software
- plugged the ST Link v2 mini to a free usb port: https://i.imgur.com/Io1ev0I.png
- configured stm32 with this settings: https://i.imgur.com/llRif19.png
- load TSDZ2-v0.20.0-beta.1.hex file https://i.imgur.com/LjhcMeC.png
- which button need a push to flash the fw? And how to save the original fw ?
 
obcd said:
Without studying and knowing the code, I would expect it to do some filtering and averaging of the battery voltage.
Let's assume you read the voltage every second. If you take the average of 2 readings, you only have the result 2 seconds later.
Without averaging, you will have the result after a second. Battery voltage depends upon current draw due to battery internal resistance and cable resistances. If you average your readings, you will get a more stable reading that lags a bit behind. As your battery voltage isn't suposed to suddenly jump below it's minimum treshold, this shouldn't be a problem for most, unless you really want to see how much the voltage drops if you load the battery.

Thanks for the the info. Do you think this is purely for the battery level display, or could it also have some effect on motor operation?
 
850C display new firmware

Here is the latest version and I think 90% of the firmware is done - I don´t expect to add much more on the firmware, at least new configurations should be added that depends on the motor controller firmware development.

Download here: https://github.com/OpenSource-EBike-firmware/Color_LCD/releases/tag/850C_v0.5.0-beta.8

Changelog beta.8:
- graphs: graphs now show the variables up to a time of 15m, 1h or 4h
- graphs: added customization for each graph variable of X axis of 15m, 1h, 4h or automatic, where automatic the X axis scale starts at 15m and increases with the time
- more options configurations on the battery graph and text
- increased the configuration cell number up to 15 as seems a user is testing a 15S battery with success
- odometer: corrected issue where odometer value was not saved
- odometer: value is show on configurations and can be edited (to be reset for instance)

70063738-37212c80-15e0-11ea-9517-81aebb760b1a.jpg
70063742-38525980-15e0-11ea-8d0c-d843c89015f9.jpg
 
Still cannot consistently get to Configuration Menu with new release 850C_v0.5.0-beta.8. Using the steps of 1) short click of Power Button followed by 2) long press 0f Power Button, it works about 1 out of 20 attempts. The rest of the time the display turns off.
 
mikec1953 said:
Still cannot consistently get to Configuration Menu with new release 850C_v0.5.0-beta.8. Using the steps of 1) short click of Power Button followed by 2) long press 0f Power Button, it works about 1 out of 20 attempts. The rest of the time the display turns off.

Try do it very fast.
 
casainho said:
850C display new firmware

Here is the latest version and I think 90% of the firmware is done - I don´t expect to add much more on the firmware, at least new configurations should be added that depends on the motor controller firmware development.

Download here: https://github.com/OpenSource-EBike-firmware/Color_LCD/releases/tag/850C_v0.5.0-beta.8

Changelog beta.8:
- graphs: graphs now show the variables up to a time of 15m, 1h or 4h
- graphs: added customization for each graph variable of X axis of 15m, 1h, 4h or automatic, where automatic the X axis scale starts at 15m and increases with the time
- more options configurations on the battery graph and text
- increased the configuration cell number up to 15 as seems a user is testing a 15S battery with success
- odometer: corrected issue where odometer value was not saved
- odometer: value is show on configurations and can be edited (to be reset for instance)

70063738-37212c80-15e0-11ea-9517-81aebb760b1a.jpg
70063742-38525980-15e0-11ea-8d0c-d843c89015f9.jpg

Odometer works ! :bigthumb:
 
mikec1953 said:
Still cannot consistently get to Configuration Menu with new release 850C_v0.5.0-beta.8. Using the steps of 1) short click of Power Button followed by 2) long press 0f Power Button, it works about 1 out of 20 attempts. The rest of the time the display turns off.
So it means the short click is not being detected. You need to make a very fast click and immediately followed of the long press.
 
Is that possible to do multiple trip times and distance cancelled by user, not reseting when power off display ? Some like Trip 1, Trip 2, Trip 3 .
 
redwater said:
Is that possible to do multiple trip times and distance cancelled by user, not reseting when power off display ? Some like Trip 1, Trip 2, Trip 3 .
Yes it is. Please put your suggestions on github issue tracker so they will not be forgotten.
 
Hi,
I just swapped out a broken torque sensor for a brand new one, however, there is no assistance from the motor now when peddling. The vlcd5 is fine and has no error codes. I tried the walk assist to test the motor and that is not working. If the display is working does that mean the controller is ok? The torque sensor is new and the wires seem to be ok on it. I can't figure out why it's not giving assistance. Had anyone experienced this before?
 
Someting strangle. I ride tomorrow 30 km, and till 29 km display shows always 53V, when reset display , shows 47,5V on the rest, when I ride again showing voltage 53V, when motor stop working show 47V, and when again working show 53V. Its strangle.
 
casainho said:
Uturn said:
Would be great to have some convenient menu in github to point us to current versions of stuff and to bleeding edge versions of stuff easily.
Good idea. It should be a wiki page pointing to the download/release of github. Are you able to do it??

I offered sometime ago to setup automatic builds with CI integration (e.g. TravisCI) for this project. Releases could be built on creating tags in Git repo. If devs are interested we could elaborate a bit more on git branching strategy used at the moment and finding something to make the job for the devs simpler and for the whole release process.
 
hefest said:
casainho said:
Uturn said:
Would be great to have some convenient menu in github to point us to current versions of stuff and to bleeding edge versions of stuff easily.
Good idea. It should be a wiki page pointing to the download/release of github. Are you able to do it??

I offered sometime ago to setup automatic builds with CI integration (e.g. TravisCI) for this project. Releases could be built on creating tags in Git repo. If devs are interested we could elaborate a bit more on git branching strategy used at the moment and finding something to make the job for the devs simpler and for the whole release process.
I am ignorant about CI integration so it is hard to me to understand the value as also as it is naturally, I am reluctant to changes. Other developers already mention such topic, we discuss on github issue tracker and gittter. The developers are discussing development on gitter channel and this forum thread is more for feedback between users and developers, join the channel here: https://gitter.im/OpenSource-EBike/community
 
Just to let you guys know, that as being discussed between the developers here and on gitter channel, I am start working for the new improved protocol, mainly because the need of increased configurations size due to the new feature of full torque sensor calibration, that is ready once the calibration values can be setup on the display.

The notes I wrote for developers:

I am being thinking and writing the new improved protocol, see here: https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/Improved-communications-protocol
the new things are 2 commands: configurations and get motor controller firmware version
this 2 commands and his data associated only need to be exchanged at very specific moments like at startup or when user exit the configurations
all the other data needs to be sent every 100ms because it is needed to real time calculations
I am adding new data for real time
motor phase current (6 bits)
next firmware version, the pedal human power should control motor phase current and not the battery current, still both will be limited to max values
hall sensors state (3 bits) + pedal position
because this way user can debug faulty hall sensors has did happened to me and led me to burn a motor
and pedal position to debug/validate the pedal position needed to the torque sensor calibration
 
famichiki said:
Can anyone please explain to me what these settings are for, what the delay is referring to and why bigger is bad?

Code:
#define READ_BATTERY_CURRENT_FILTER_COEFFICIENT                   2
#define READ_BATTERY_VOLTAGE_FILTER_COEFFICIENT                   2

obcd said:
Without studying and knowing the code, I would expect it to do some filtering and averaging of the battery voltage.

Could someone please tell me if this is purely for the battery level display, or will changing these settings also have some effect on motor operation?

I have 20+ seconds startup time while the battery bars are progressively being displayed (using Demion's branch default settings of voltage 6 & current 4) and I really want to reduce that.

Is this what will be causing that delay?

Is it OK to start riding before the battery bars are fully displayed?
 
famichiki said:
Is it OK to start riding before the battery bars are fully displayed?
Yes, you can ride as soon you see the main screen which is almost immediately.
 
redwater said:
Someting strangle. I ride tomorrow 30 km, and till 29 km display shows always 53V, when reset display , shows 47,5V on the rest, when I ride again showing voltage 53V, when motor stop working show 47V, and when again working show 53V. Its strangle.

It was my fault, I write wrong battery resistance parameter to display. Now works well.
 
Minatauro said:
Hi,
I just swapped out a broken torque sensor for a brand new one, however, there is no assistance from the motor now when peddling. The vlcd5 is fine and has no error codes. I tried the walk assist to test the motor and that is not working. If the display is working does that mean the controller is ok? The torque sensor is new and the wires seem to be ok on it. I can't figure out why it's not giving assistance. Had anyone experienced this before?

I am experiencing something similar. I am on beta 0.20 from buba's Google Drive. I was running it for about 2000km without any problems.
Since two days, the display starts up correctly, but sometimes the lights do not come on (I have the setting that the lights should be on after start). When this is the case, also the motor does not start at all. Voltage, cadence and speed readings are working. I can change the assist levels. But when I switch the lights, only the display light switches, and no motor assist whatsoever, also no walk-assist.

I do not have e-brakes, but today I saw once that the e-brake sign was shortly on. Could that be the reason?
In other cases, the e-brake sign was not on at all, and the motor had the same behaviour.
Sometimes, after a while the lights come on and then the motor also works as expected for the whole trip until I shut it down again.

A couple of questions:
If, for some reason the e-brake pin is giving the wrong reading during bootup, could this lead to the described behaviour?
Could we add a function to disable the ebrakes completely in the software?
Is there any other thing which could prevent the motor to give assistance?

Another theory is that there is something in the code, i.e. could it be that there is a buffer overflow or similar? I will re-flash the bike this weekend to check if that is the case.
 
Back
Top