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

casainho said:
nassal said:
The only thing I didn’t understand is
“ max power: configure on main screen the max power
Read the features and configurations wiki page.
Thanks for editing Features and configurations. Got the throttle going now. I believe pedal assist not working because PAS has beeb damaged, due to wrong wiring and not disconnecting the battery during the firmware upgrade. Only my self to blame. New parts it on the way. Thanks for great work and help.
 
HughF said:
Come on over to the other thread and we will discuss further, let's not clutter this thread with the discussion, at the request of Casainho.

Can you give a link, please.
 
dameri said:
Can you give a link, please.
https://endless-sphere.com/forums/viewtopic.php?f=30&t=105973
 
Buster84 said:
Hi,
New to the forum and ebikes. I tried to find information if the 500w TSDZ2-motor with the 850C display can be restricted to a lower power level like 250w? In my country You will need a traffic license for motors over 250w. During my daily commutes more power probably won't be needed.

im not a lawer, but there was some research done by Rene Kreher in Germany. He has asked the police, his insurrance and the insitution responsible for motor bike street legal testing in germany.

i plan to add a wiki page for this, as it was one of my main concerns. The 250W do not refer to a maximum power limit but to a "duration rated performance" (dont know if it is translated correctly). What it means is that the motor needs to be rated 250W by the ebike manufacturer. the rating is determined under laboratory conditions and leaves a lot room for interpretation to the manufacturer. (something like: average wattage under which the motor does not heat more than 20 degrees in 30 minutes iirc).

The power rating is not only influenced by the motor but also by the battery and controller used, so the 250W power rating does not apply to the engine but to the bike as a whole.
Now here is the funny part: as you are building the bike, you are the manufacturer - which means that you have to specify the duration rated wattage (so putting one of these 250W stickers on you engine cloud be a legit move :eek:). but as you have no laboratory (and i think nobody would expect you to have one) you can only estimate the wattage of your bike.

Main problem is that the laws (and your insurance) do not have extra rules for upgrade kits like the TSDZ2 is. the laws are only made for bikes made by bigger manufacturers. but not having no specific law for upgrade kits does not make them illegal.

It is reported that street legal Bosch Performance Line CX 250W Motors are pumping out peak powers up to 850W. it is also known that the TSDZ2 48V (sold as 500/750W) version cannot run on 750W for extended time without overheating. i guess even running on 400W for 30 minutes would also cause overheating but i do not have it long enough to say for sure.

the street mode currently implements a power limit of i.e. 250W which should be pretty solid. i think it would be possible to allow Wattages up to the engines full power for short periods like the bosch engines do without making it illegal.

the consensus of research done by Rene Kreher was that all parties do not care much about the manufacturer rated wattage, because it is very flexible (Bosch) and also not possible to test it on street (when the police stops you). when having a crash, it is likely not the reason for it.
Most important is the assisted speed limit of 25km/h and only getting assist while pedaling.

my goal is to have a (optionally) street legal bike in germany. i will patch the firmware so the street mode will make it street legal with as much features enabled as possible. i plan to build a bike for my wife using a TSDZ2 and i do not want her to get into trouble for riding an illegal bike.

im not sure if the street mode throttle flag disables the new virtual throttle. it should do it because a throttle would make your bike illegal.

you should also keep the walk assistant currently disabled because it assists up to 8 km/h. i plan to work on the walk mode and change it to max. 6km/h so it would be street legal.

@casainho would you mind having the walk mode top out at 6km/h? i personally do not walk faster than this. especially as i use the walk mode only uphill.

one thing i would have to think about is the street mode toggle by hotkey. i'm almost sure that no judge would consider an ebike as legal, which you can switch between legal and illegal within 1.5 seconds while riding. so i think about adding an option to disable this hotkey. as manufacturer of the bike, you should have a way to test it off roads. so switching the street mode by the main configuration menu could be fine - also because that is nothing you can do unnoticed while been stopped by the police. this is also how it works on the tsdz2 stock firmware - not saying the Chinese manufacturer complies to any European law.
 
raw said:
im not sure if the street mode throttle flag disables the new virtual throttle. it should do it because a throttle would make your bike illegal.
For me seems reasonable that throttle in this context refers to physical throttle only.
The current virtual throttle is very hard, if not impossible, to active by mistake - user must be aware to enable the virtual throttle so it is just like enable or disable street mode.

raw said:
you should also keep the walk assistant currently disabled because it assists up to 8 km/h. i plan to work on the walk mode and change it to max. 6km/h so it would be street legal.

@casainho would you mind having the walk mode top out at 6km/h? i personally do not walk faster than this. especially as i use the walk mode only uphill.
I just did that change for next firmware version. I also think is reasonable to go max of 6km/h as walking speed.
 
Totally agree with above, my bosch cx is way more powerful than the tsdz2, when I travel up my steep hill at 25km/hr in turbo I estimate at least 800w since I can only do about 18km/hr roughly topping out at around 550w on the tsdz2. For EU the 250w is only a sustained amount of power that does not cause motor to rise in temperature.
It is not written that way in Australian law since they refer to maximum of 250w yet it is perfectly legal in Australia to use these bikes that comply to European standards which put out much more than 250w maximum. Despite this unless you are going up hills or fighting a strong wind I would usually draw less than 230w continuously when I ride. So I think from a power perspective we are pretty legal without having to clamp anything down.

25km/hr is where assistance needs to stop in AU however in NZ it is 32km/hr, in other countries this can be up to 45 however there are only 2 motors namely the Bose and the Bosch 2020 that even make it possible for a strong rider to legally go any faster without assistance since all the other motors including the tsdz2 create lots of drag when pedalling faster than the motor. To be totally legal you shouldn't be able to switch between street legal and offroad without doing a firmware flash. Offroad is also tricky, it is not legal to go above 25 just because you are offroad, you can only do this on private property.

This is where I have a problem since I would rarely ride under 30km/hr on my normal unassisted bike when commuting and I would expect the same from an ebike, 25km is too slow and if we can't change the laws then we need to be able to modify the motor somehow to eliminate the drag. Suggestions welcome, but this is another project :)

Sorry didn't mean to rant on haha ;)
 
New firmware release: v1.0.0-beta.1

Changes from previous alpha version:
- added configuration for motor current control as torque mode as also keeping the previous power mode
- changed Walk assist max speed to 6 km/h while previously was 8 km/h
- added a few configuration to clock field: disable, clock, battery SOC % and battery volts

Download here: https://github.com/OpenSource-EBike-firmware/Color_LCD/releases/tag/860C_850C_SW102_v1.0.0-beta.1
 
casainho said:
New firmware release: v1.0.0-beta.1

Changes from previous alpha version:
- added configuration for motor current control as torque mode as also keeping the previous power mode
- changed Walk assist max speed to 6 km/h while previously was 8 km/h
- added a few configuration to clock field: disable, clock, battery SOC % and battery volts

Download here: https://github.com/OpenSource-EBike-firmware/Color_LCD/releases/tag/860C_850C_SW102_v1.0.0-beta.1
How did you decide to do the torque mode? As originally discussed where we disable the cadence sensor or another way?
I will try it later this week, from tomorrow we are allowed to exercise outside for longer periods, and for more than one time.
 
@ Casainho,
plpetrov said:
2. The jumps of the calculated weight at the moment of switching between the approximation interval for the right pedal.

I tried to analyse further the results of the tests I did yesterday. The jump of the calculated weight based on the ADC torque sensor for the right pedal, when switching the calibration intervals. A possible error might be, that instead of using the next approximation interval N, the code is calculating using the values from the next one N+1. At least this is the case for me.
 
Hello ,
Sorry I quite new here, maybe I didn't post where it should be.
I had a TSDZ2 36V motor with opensource firmware made. Yesterday I was very happy to see It's working after I setup following your features and configurations for version 0.18.X. I obtain 550 Watt power and for my hill was very good , but when I stop suddenly my display KT LCD3 became like in this photo
and stop working, after that the display start blinking . First of all I push the Power button to stop, but didn't make it, so I disconnected from the battery and I started again with the Power button, but when I push the button appear on the display again like in the photo and remains like that ,I checked the battery the wires seems to be good.
Please help me, I do not know what to do anymore !!
Thank you
Florin
 

Attachments

  • 2020-05-11_16-18-14.png
    2020-05-11_16-18-14.png
    76.4 KB · Views: 807
flo said:
Hello ,
Sorry I quite new here, maybe I didn't post where it should be.
Please do not post on this thread - I think the title is clear on this. Post instead on the specific thread for the outdated firmware version with KT-LCD3.
 
casainho said:
flo said:
Hello ,
Sorry I quite new here, maybe I didn't post where it should be.
Please do not post on this thread - I think the title is clear on this. Post instead on the specific thread for the outdated firmware version with KT-LCD3.
Perhaps we need this thread title changed to 'latest Casainho code only'

After all, you did write all the versions :)
 
casainho said:
raw said:
im not sure if the street mode throttle flag disables the new virtual throttle. it should do it because a throttle would make your bike illegal.
For me seems reasonable that throttle in this context refers to physical throttle only.
The current virtual throttle is very hard, if not impossible, to active by mistake - user must be aware to enable the virtual throttle so it is just like enable or disable street mode.
yeah, that is the topic.
it is not possible to enable it by mistake, but it is (will be) a documented feature of the firmware. having a throttle (virtual or not) makes the bike assist without pedaling which makes it clearly not street legal in europe (without a licence plate)

you are right, the street mode shortcut is just the same - a way to leave the street legal borders just by pressing a button combination.

there a multiple reasons why your bike can get confiscated and checked for its properties (even undeservedly). some professional checking a tsdz2 bike with the open source firmware will surely lookup the github page from the startup screen and read through the features page. so the key combination is not a secret :|

i really love having an open source bike. your firmware was the main reason i did buy the TSDZ2. i love to ride it and i love to see it develop and i want to be part of it. i want it possible to DIY build a ebike in a street legal way so it is just as legal as any other prebuilt one (with the option to disable the street mode in the settings). thank you for all your work!

i will improve the street mode to archive this goal and create a PR on this. i hope you would accept it as i want to contribute.

jbalat said:
To be totally legal you shouldn't be able to switch between street legal and offroad without doing a firmware flash.
that would be the most secure way, but it would require every user to adjust the settings in the sourcecode and compile them their own (as you could not expose a configuration option for the max speed i.e.). it may be possible to offer prebuilt images, but generally i dont think we need to go this route.
if you can switch the mode only while standing and only though the menu, there is a chance that this would be enough. This is similar to how it works on the TSDZ2 VLCD5 stock firmware (but there you have to restart the display).

casainho said:
raw said:
you should also keep the walk assistant currently disabled because it assists up to 8 km/h. i plan to work on the walk mode and change it to max. 6km/h so it would be street legal.

@casainho would you mind having the walk mode top out at 6km/h? i personally do not walk faster than this. especially as i use the walk mode only uphill.
I just did that change for next firmware version. I also think is reasonable to go max of 6km/h as walking speed.
nice, thank you!
im still wondering what the cruise mode is about. i have triggered the walk mode with a high gear so the back wheel was spinning with >20km/h in the air. i could feel the bike giving power while still beeing above 8km/h. i guess it is meant to maintain the speed after reaching the limit?
 
HughF said:
casainho said:
flo said:
Hello ,
Sorry I quite new here, maybe I didn't post where it should be.
Please do not post on this thread - I think the title is clear on this. Post instead on the specific thread for the outdated firmware version with KT-LCD3.
Perhaps we need this thread title changed to 'latest Casainho code only'

After all, you did write all the versions :)

Here is the link to the LCD3 forum

https://endless-sphere.com/forums/viewtopic.php?f=30&t=104232&=1&view=unread#p1552781
 
cowboy bikes have an option to switch the system in "off road" mode.
It disables the 25km/h assist speed limit. They are sold as street legal pedelec's.
I remember people complaining on a german forum that the gazelle lights are powered by the battery.
According to the german law the lights must function independently wit a dynamo to be street legal.
I just assume most polticians inventing those laws don't ride a pedelec.
The motor power restriction of 250W is another such stupid rule.
Why is it 750W in the States and only 250W in Europe.
A Bosch motor will still produce 80NM with those spec's. A cheap chinese motor will only produce half of that.
I doubt they will look up the source code of your motor controller.
As long as you don't pass at 50km/h like an idiot without pedalling, they will just ignore you.
Maybe if you have a 4000WH battery between your legs, they will ask questions as well.
Knowing how governments work, you likely will need a certification in the future to build pedelec's.
So, enjoy it while you still can. Let's just try to stay under the radar with our self build pedelecs.
 
Hi, still is issue in configuration menu in battery current, whatever value I set, after power off and on, it is set at 16A, which explains why motor power is limited to about 750W max.
This was on 1.0.0 alpha4, and is on beta1.
 
redwater said:
Hi, still is issue in configuration menu in battery current, whatever value I set, after power off and on, it is set at 16A, which explains why motor power is limited to about 750W max.
This was on 1.0.0 alpha4, and is on beta1.
Can you get more than 750w out of a tsdz2 without it combusting?
 
Great to have the Torque mode back ! :bigthumb:
But in Beta1 seems there is zero threshold for the Torque sensor and the motor starts pulling just with a very soft touch on the pedal or even without touching it just by chaining the pedal position. It would be great to have adjustable threshold.
In v0.20 I used ADC value of 30 as a threshold for the Assist Without Pedal Rotation and it worked very well even without installed break sensors.

Virtual Throttle is nice to have but I realized it is just too difficult to activate and to slow down or stop in dynamic situations is just too slow and little bit dangerous.
I would much rather prefer to have the Cruise mode from previous versions. In v0.20 it was smooth and safe as well.
 
redwater said:
Hi, still is issue in configuration menu in battery current, whatever value I set, after power off and on, it is set at 16A, which explains why motor power is limited to about 750W max.
This was on 1.0.0 alpha4, and is on beta1.
I will limit the value to 18 on the display configuration menu.

On the motor controller side is currently:

Code:
// This is the current that motor will draw from the battery
// Higher value will give higher torque and the limit of the controller is 18 amps
#define ADC_BATTERY_CURRENT_MAX 115 // 18 amps (0.156 amps each unit)
 
elfnino said:
Great to have the Torque mode back ! :bigthumb:
But in Beta1 seems there is zero threshold for the Torque sensor and the motor starts pulling just with a very soft touch on the pedal or even without touching it just by chaining the pedal position. It would be great to have adjustable threshold.
In v0.20 I used ADC value of 30 as a threshold for the Assist Without Pedal Rotation and it worked very well even without installed break sensors.
I will add that threshold, it will be important even for when cadence sensor is disabled because is broken.

elfnino said:
Virtual Throttle is nice to have but I realized it is just too difficult to activate and to slow down or stop in dynamic situations is just too slow and little bit dangerous.
Do you have any suggestion for how to improve virtual throttle?

elfnino said:
I would much rather prefer to have the Cruise mode from previous versions. In v0.20 it was smooth and safe as well.
You are mixing the features/concepts, right?
 
raw said:
i will improve the street mode to archive this goal and create a PR on this. i hope you would accept it as i want to contribute.
I accepted your pull request for the improvement to walk assist - it was simple but good improvement.

About the street mode, for me ok that virtual throttle can be disabled.

But I did not understand the new configurations you added:
1. Enable Mode (there is already Street mode feature enable...)
2. Hotkey enable

Can you please explain the need for each new configuration?
 
Buster84 said:
Hi,
New to the forum and ebikes. I tried to find information if the 500w TSDZ2-motor with the 850C display can be restricted to a lower power level like 250w? In my country You will need a traffic license for motors over 250w. During my daily commutes more power probably won't be needed.
You don't say what country you're from. But most probably your country does NOT restrict MAXIMUM power but CONTINOUS power. And continous power is not easily changeable. So it basically is a matter of definition from the manufacturer. It's based on how much power the motor can take "endlessly" without taking damage.
That's a simplified definition but it's easier to understand that way.
Almost EVERY legal system you can find in eg. Europe must obey to the 250W limit, but still output like 700W boosts. But not for 100% of the time.
So just pust a sticker on your motor saying 250W. Being that super small you should be fine, because basically that is all it can output over infinite time.

EDIT: Sorry. This post wasn't updated in my browser, so I didn't see that this topic already was answered in detail 8)
 
Back
Top