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

Bash1303 said:
Hello every one

The inner motor seems to have given upp :(
I manager to order a replacement that Will take some time.

Sorry to hear that! May I ask what happened?

Bash1303 said:
My question is: if i connect my old hub motor 36v 350w (hall sensor) to the controller. Will it run normal or i Will be damaging the controller?

I am running the open source firmware V 17

I do not recommend to do that if you are not willing to change the source code so that it works better with a different motor.
 
buba said:
Bash1303 said:
Hello every one

The inner motor seems to have given upp :(
I manager to order a replacement that Will take some time.

Sorry to hear that! May I ask what happened?

Bash1303 said:
My question is: if i connect my old hub motor 36v 350w (hall sensor) to the controller. Will it run normal or i Will be damaging the controller?

I am running the open source firmware V 17

I do not recommend to do that if you are not willing to change the source code so that it works better with a different motor.

Hello buba,
Thanks for answering.
I am not sure what happened, I think it overheated. I need to check and maybe replace the temp sensor also

What do i need to change in the source code and how to do it?

Thank you
 
Bash1303 said:
Hello buba,
Thanks for answering.
I am not sure what happened, I think it overheated. I need to check and maybe replace the temp sensor also

What do i need to change in the source code and how to do it?

Thank you

No problem at all!

Hope you sort it out.

If you want to use a different motor you need to rewrite the motor firmware for that specific motor. Not something I recommend to do.
 
buba said:
No problem at all!

Hope you sort it out.

If you want to use a different motor you need to rewrite the motor firmware for that specific motor. Not something I recommend to do.

I Will try to sort it out. Am not sure i Will attempt to change the firmware. It Will be a more complicated task.

Thank you buba. 🙂
And have a nice day and weekend
 
I received the LCD SW102 that I bought from PSWPower and I went to open it and I wrote a wiki page with my findings:

https://github.com/OpenSource-EBike-firmware/Color_LCD/wiki/SW102

Although seems it is not possible to open this LCD without breaking/deform it, it is easy to access to the board that has the firmware programming/debug pads:

LCD_SW102-03.jpg


1. use something thin to slide on the sides on the keypad
2. force gently to the side the plastic cover until you can remove the keypad plastic cover
3. you will find the firmware programming/debug pads under the keypad plastic cover

The front glass and LCD are glued, there is no way to open without breaking the case. I had to heat the plastic case and deform it until I could get the boards and LCD exposed.

LCD_SW102-01.jpg


LCD_SW102-02.jpg


LCD_SW102-04.jpg
 
buba said:
rmnlsn said:
How can I be sure that the my hex and the TSDZ2-v0.18.2.hex are the same if I didn't modify any src file?

It should and must be the same if you are compiling the same source files. Do note that the latest source files will not compile version 0.18.2 of the firmware. The source files have been updated and are continually developed for the next version: 0.19.0.

And so to get, for example, the github version 0.18.0 of the firmware which source code version should I compile? I made some test but didn't get the same file.

I'm a rookie in this world, thank you for the patience.


buba said:
rmnlsn said:
Can someone help me?

Hope it helped!

Thank you very much for clarifying some steps!
 
casainho said:
I received the LCD SW102 that I bought from PSWPower and I went to open it and I wrote a wiki page with my findings:

https://github.com/OpenSource-EBike-firmware/Color_LCD/wiki/SW102

Although seems it is not possible to open this LCD without breaking/deform it, it is easy to access to the board that has the firmware programming/debug pads:

1. use something thin to slide on the sides on the keypad
2. force gently to the side the plastic cover until you can remove the keypad plastic cover
3. you will find the firmware programming/debug pads under the keypad plastic cover

The front glass and LCD are glued, there is no way to open without breaking the case. I had to heat the plastic case and deform it until I could get the boards and LCD exposed.

I bought a bunch of these displays as Eggriders. The engineers that wrote the software for the Eggrider have a small UK company and ebike business. They did a total rewrite of the firmware to work with Bafang, Lishui, and other controllers. The Bafang version is what I use because it is small, discrete and the big feature is it can completely reconfigure the bafang controller on the fly. The kind of stuff you normally need a computer and programming cable to do, this little display does while riding down the road. This is what they do to implement a road and off-road mode. It must have a lot of memory to be able to do this.

It is programmed and set up using Bluetooth. In fact they use bluetooth to flash the firmware in the display using a free iOS and Android utility "nRF Connect". Instructions can be found here on their wiki https://bitbucket.org/eggpower/eggriderv2/wiki/Home.

I have been in contact with Topology Tech, the manufactureres of this display. Unlike APT, they are willing to provide programming details that include how to flash it using nRF Connect. They will provide complete technical documentation with a signed NDA. I will send you contact info separately via PM.

Here is the technical specification of the display.
 
Rydon said:
I bought a bunch of these displays as Eggriders. The engineers that wrote the software for the Eggrider have a small UK company and ebike business. They did a total rewrite of the firmware to work with Bafang, Lishui, and other controllers. The Bafang version is what I use because it is small, discrete and the big feature is it can completely reconfigure the bafang controller on the fly. The kind of stuff you normally need a computer and programming cable to do, this little display does while riding down the road. This is what they do to implement a road and off-road mode. It must have a lot of memory to be able to do this.

It is programmed and set up using Bluetooth. In fact they use bluetooth to flash the firmware in the display using a free iOS and Android utility "nRF Connect". Instructions can be found here on their wiki https://bitbucket.org/eggpower/eggriderv2/wiki/Home.

I have been in contact with Topology Tech, the manufactureres of this display. Unlike APT, they are willing to provide programming details that include how to flash it using nRF Connect. They will provide complete technical documentation with a signed NDA. I will send you contact info separately via PM.

Here is the technical specification of the display.SW102 display technical specification-20171013.pdf

Precisely, as I had mentioned earlier, the info is easily available, but an NDA is required. I am in the latter stages of TSDZ2 development, and have had them working for some time... we started on these way back when I presented them to casianho last year. Anyway, another batch due to land next week! They are a very responsive company, and I am happy to deal with them. While I like the eggrider, I much prefer the easier setup, and styled my own BBS model, as well as the TSDZ2 model we are perfecting. I'll post some videos over the weekend if I have time. This is my favorite display out! Glad to see it picking up more traction.
 
Okay, so I am working on increasing the resolution of the assist level multipliers. This is so that we can setup the assistance for any rider and their particular disposition.

Could not help myself to include physics. I have calculated (not measured) the aerodynamic forces in play. Mostly parasitic drag and approximations.

The air resistance in particular is something I usually only considered in airborne designs. But we have bikes capable of 50 KPH / 30 MPH. So I became curious of the relative wind speed and its relation to motor power.

----------------------------------------------

Force of air resistance = 1/2 * AirDensity * DragCoefficient * TotalArea * Velocity^2

The power required to sustain speed would then be:

Power = Force * Velocity => Power = Force of air resistance * Velocity

----------------------------------------------

Following graphs were born:



This is why we all instinctively setup the assist level multipliers as a polynomial growth. It better suits the different speeds in which we operate our bikes. One can add rolling resistance as well and create a mathematical formula for calculating the optimal assist level multipliers.

Just wanted to share this as I found it interesting.
 
rmnlsn said:
buba said:
rmnlsn said:
How can I be sure that the my hex and the TSDZ2-v0.18.2.hex are the same if I didn't modify any src file?

It should and must be the same if you are compiling the same source files. Do note that the latest source files will not compile version 0.18.2 of the firmware. The source files have been updated and are continually developed for the next version: 0.19.0.

And so to get, for example, the github version 0.18.0 of the firmware which source code version should I compile? I made some test but didn't get the same file.

I'm a rookie in this world, thank you for the patience.

If you want a particular hex file I recommend going to the releases on the project page on GitHub and download the version of the firmware you want to test:

https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/releases

If you want the source files for a particular version of the firmware you can find it on the same link just below the hex files. It is zipped and named: Source code (zip).
 
Hello everyone,

I just installed the opensource firmware for the first time on my TSDZ2 36V, but for some reason it is limiting the power to around 320-380w. No matter how hard I pedal I can't raise the assist above 380w. What am I doing wrong? Is this normal? It seems significantly less powerful than the stock firmware at the moment. I have the max current set to 16a so I figured that I would be able to pull aprox 550w at peak. I have tried disabling/adjusting any setting that would limit the speed/power in the sub menus, but the bike still is stuck at 320-380w as the upper limit.

Thanks
 
casainho said:
I received the LCD SW102 that I bought from PSWPower and I went to open it and I wrote a wiki page with my findings:

https://github.com/OpenSource-EBike-firmware/Color_LCD/wiki/SW102

Although seems it is not possible to open this LCD without breaking/deform it, it is easy to access to the board that has the firmware programming/debug pads:

1. use something thin to slide on the sides on the keypad
2. force gently to the side the plastic cover until you can remove the keypad plastic cover
3. you will find the firmware programming/debug pads under the keypad plastic cover

The front glass and LCD are glued, there is no way to open without breaking the case. I had to heat the plastic case and deform it until I could get the boards and LCD exposed.

Yes, this is what I cautioned against as far as the construction went... Good to see you were at least able to inspect.... Let me know if you want to move forward and I will send the Bluetooth model, but I will also need to have you sign an NDA as well if we move forward perfect manufacturers requirements, as we previously discussed.

Best Regards
 
buba said:
Okay, so I am working on increasing the resolution of the assist level multipliers. This is so that we can setup the assistance for any rider and their particular disposition.

Could not help myself to include physics. ...
...
This is why we all instinctively setup the assist level multipliers as a polynomial growth. It better suits the different speeds in which we operate our bikes. One can add rolling resistance as well and create a mathematical formula for calculating the optimal assist level multipliers.

Just wanted to share this as I found it interesting.

Yes, amazing how non-linear wind resistance makes it. After about 25-30kph it graph gets pretty vertical. A little extra speed costs a lot of power. Thanks for sharing this. I look forward to trying out the results. :)
 
QuirkyOrk said:
Hello everyone,

I just installed the opensource firmware for the first time on my TSDZ2 36V, but for some reason it is limiting the power to around 320-380w. No matter how hard I pedal I can't raise the assist above 380w. What am I doing wrong? Is this normal? It seems significantly less powerful than the stock firmware at the moment. I have the max current set to 16a so I figured that I would be able to pull aprox 550w at peak. I have tried disabling/adjusting any setting that would limit the speed/power in the sub menus, but the bike still is stuck at 320-380w as the upper limit.

Thanks
See if you had configured the max power limit to 350W or something. You have the max current limit and max power limit on the firmware, changed on LCD3.
 
buba said:
Okay, so I am working on increasing the resolution of the assist level multipliers. This is so that we can setup the assistance for any rider and their particular disposition.

Could not help myself to include physics. I have calculated (not measured) the aerodynamic forces in play. Mostly parasitic drag and approximations.

The air resistance in particular is something I usually only considered in airborne designs. But we have bikes capable of 50 KPH / 30 MPH. So I became curious of the relative wind speed and its relation to motor power.

----------------------------------------------

Force of air resistance = 1/2 * AirDensity * DragCoefficient * TotalArea * Velocity^2

The power required to sustain speed would then be:

Power = Force * Velocity => Power = Force of air resistance * Velocity

----------------------------------------------

Following graphs were born:

funGraphs.png

This is why we all instinctively setup the assist level multipliers as a polynomial growth. It better suits the different speeds in which we operate our bikes. One can add rolling resistance as well and create a mathematical formula for calculating the optimal assist level multipliers.

Just wanted to share this as I found it interesting.
That is very interesting, maybe we should write a wiki page specific to how to configure the assist levels multipliers.

When I am on the mountains, when I increase to double the motor power, I clear feel that I need to do half of the power with my legs to maintain the same low speed at climbs. There, I do not feel the wind so I prefer to setup at increase of 50% of power only.

But I use the same bicycle on everyday at the city and there I think can be nice to follow that graph.
 
eyebyesickle said:
Yes, this is what I cautioned against as far as the construction went... Good to see you were at least able to inspect.... Let me know if you want to move forward and I will send the Bluetooth model, but I will also need to have you sign an NDA as well if we move forward perfect manufacturers requirements, as we previously discussed.
No NDA, as it would not be compatible with OpenSource. Anyway, the idea would be to fully develop our firmware for it and they would not give us the full "secrets".

The LCD hardware is only one (just like on TSDZ2 various versions), it fully supports Bluetooth but it may be disabled on the firmware. But Bluetooh firmware part is the piece from Nordic that is free available for anyone that uses that Nordic microcontroller, so Bluetooth is pretty straightforward to implement.

I wounder if that LCD could communicate simultaneously with the popular chinese BMS with Bluetooth (the "Smart BMS with Bluetooth") and with mobile app. If so, we could have a system much more integrated, access data/control from each battery pack cells on LCD and mobile app, other than keep controlling TSDZ2.

Anyway, I am busy working on 850C LCD and I will not start developing to SW102 LCD but I could help if other developers want to do it. For instance, the only piece missing is the information on how to control that monochrome graphic LCD and I have the tolls to look at the digital signals and find it, just like I did on 850C LCD.

casainho said:
I am sharing pictures of the battery pack I built for using with TSDZ2.

I am using the most power density cells available on the market, the LG INR18650-M36 3600mAh - 10A.
Using this cells, my pack as 14S3P (14 cells in series and 3 cells in parallel) of 42 cells in total.

This pack has about 525 Wh and weighs only about 2.5 kgs (including the weight of BMS, connectors, etc). My girlfriend wants a light bicycle so I decided to use this cells/battery on his bicycle. Next I will do another for my bicycle and I will keep my older big packs (that use the same cells) to use when we do long rides like near or over 100 kms in a day.

I am using for the first time the chinese popular BMS with Bluetooth, the "Smart BMS with Bluetooth", that we can find in many online shops. This BMS would be very easy to develop firmware for if we want (used Arduino AVR microcontroller and popular battery management IC) but there is a lot of information about it, including the communication protocol.

I think I will need to limit on LCD3 the battery current to be 10 Amps, other way this cells may heat to much and damage quick but I will configure the BMS temperature sensors protection and I will keep a loop at the temperature to find the "max" average current for this cells in 3P.











My girlfriend bicycle:
 
Understood, however an NDA may not be as ultimately limiting as you think... To gain all the info, one is required, however with permission and negotiation I'm sure there could be an understanding with the manufacturer, or I would not be suggesting it. No worries though, I am also glad to hear you are still working on the 850c. I am waiting for the manufacturers tech to get back and will hopefully have access to the bootloader etc very soon! They have been a hard egg to crack!
 
casainho said:
QuirkyOrk said:
Hello everyone,

I just installed the opensource firmware for the first time on my TSDZ2 36V, but for some reason it is limiting the power to around 320-380w. No matter how hard I pedal I can't raise the assist above 380w. What am I doing wrong? Is this normal? It seems significantly less powerful than the stock firmware at the moment. I have the max current set to 16a so I figured that I would be able to pull aprox 550w at peak. I have tried disabling/adjusting any setting that would limit the speed/power in the sub menus, but the bike still is stuck at 320-380w as the upper limit.

Thanks
See if you had configured the max power limit to 350W or something. You have the max current limit and max power limit on the firmware, changed on LCD3.

I figured out that the V cutoff was set for a 48v battery @ 39.0 by default. I think this might have been what caused it.

Thank you for taking the time to reply as well as the time and effort you've put into this project. I've made a small paypal contribution as a token of gratitude.
 
Hello guys,

I work for the automotive industry, and we regularly use the formulas for calculating resistant forces.
The formula calculating the air resistance force is correct, but the rolling resistance component is missing.
Rolling resistance does not depend on speed, it is a constant that depends in particular on the type of tyre, tyre pressure etc.
The formula used is therefore:

Fr= F0 + F1 * V + F2 * V²

Fr = Resistance force in Newton
F0 = Rolling resistance force
F1 and F2 = Air resistance force
V = velocity in meters/second

It is possible to measure the F0,1,2 coefficients on the vehicle, for this it is necessary to find a flat road, or almost, and to measure the deceleration of the vehicle from a high speed. Knowing the deceleration as a function of speed, we can deduce the 3 coefficients specific to the vehicle.
It is important to measure back and forth on the same road and average to eliminate the effect of slope.

The slope is of course a very important component of the resistance to driving.

Slope force = Weight x G x Slope

Slope Force in Newton
Weight in kg
G = 9.8066
Slope in % (height divided by distance travelled)

I hope this will help you.
 
Rydon said:
Yes, amazing how non-linear wind resistance makes it. After about 25-30kph it graph gets pretty vertical. A little extra speed costs a lot of power. Thanks for sharing this. I look forward to trying out the results. :)

Totally! :)


casainho said:
That is very interesting, maybe we should write a wiki page specific to how to configure the assist levels multipliers.

When I am on the mountains, when I increase to double the motor power, I clear feel that I need to do half of the power with my legs to maintain the same low speed at climbs. There, I do not feel the wind so I prefer to setup at increase of 50% of power only.

But I use the same bicycle on everyday at the city and there I think can be nice to follow that graph.

I agree!

The wind resistance is actually not that bad compared to elevation changes. But I thought it was interesting to see the graphs nonetheless. Take it as fun trivia :wink:


NIPSEN said:
Hello guys,

I work for the automotive industry, and we regularly use the formulas for calculating resistant forces.
The formula calculating the air resistance force is correct, but the rolling resistance component is missing.
Rolling resistance does not depend on speed, it is a constant that depends in particular on the type of tyre, tyre pressure etc.
...

Thank you so much for taking your time to write, NIPSEN! :)

I deliberately did not incorporate rolling resistance nor calculations for elevation changes. The latter particularly has an insane effect on power required! But as mentioned before I mostly focused on parasitic drag (aerodynamics). This is because a lot of parameters are user dependent and it is hard to draw conclusions as everyone has a different setup: bike, tires, weight and so on.

The results from the aerodynamic effects give good approximations as there are fewer variables that change from user to user, in short: the standard deviations are low on those variables that might differ among users.
 
You're right not to integrate these parameters. I think the performance is better without it. The cyclist wants to have the feeling of assistance, proportional to the pressure on the pedals, by integrating these parameters, we would obtain an identical acceleration of the bike whatever the slope.
As for rolling resistance, it is clearly negligible on a bicycle.
 
Thanks for the contribution, I don't know English, so I use Google Translate, I would like to ask, I have a 350w 36v tsd z2 xh18, if I brush the firmware, can I have more power and speed?
 
554226203 said:
Thanks for the contribution, I don't know English, so I use Google Translate, I would like to ask, I have a 350w 36v tsd z2 xh18, if I brush the firmware, can I have more power and speed?
You can increase power two ways:

1. Increase the allowed amperage in the manufacturer firmware.
2. Install the open source firmware and set a higher power level. This is harder and you need to wire in a different display. (KT-LCD3).

350W at 36V is 9.7 amperes. You can overheat your motor if you use many more amperes for long time.

At 36V 350W is safe. 550W (15A) is OK for 5 - 10 minutes to climb a hill. 550W to go fast for a long time might overheat your motor.
 
tomtom50 said:
554226203 said:
Thanks for the contribution, I don't know English, so I use Google Translate, I would like to ask, I have a 350w 36v tsd z2 xh18, if I brush the firmware, can I have more power and speed?
You can increase power two ways:

1. Increase the allowed amperage in the manufacturer firmware.
2. Install the open source firmware and set a higher power level. This is harder and you need to wire in a different display. (KT-LCD3).

350W at 36V is 9.7 amperes. You can overheat your motor if you use many more amperes for long time.

At 36V 350W is safe. 550W (15A) is OK for 5 - 10 minutes to climb a hill. 550W to go fast for a long time might overheat your motor.

Thank you for your reply, then please, how can I do the first solution?
 
554226203 said:
Thanks for the contribution, I don't know English, so I use Google Translate, I would like to ask, I have a 350w 36v tsd z2 xh18, if I brush the firmware, can I have more power and speed?


To increase the power and leave your original display you can also use the marcoq software :D
https://endless-sphere.com/forums/viewtopic.php?f=30&t=98281
 
Back
Top