Skip to content
View in the app

A better way to browse. Learn more.

Pedelecs Electric Bike Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Experiences with Open Source Firmware on the Tongsheng TSDZ2

Featured Replies

[mention=16007]harrys[/mention] and [mention=37644]kiwisibk[/mention] - what version OSF are you both using v20.1c.1 or V20.1c.2?

 

I'm on 20.1c.1 at the mo and am satisfied with it and being a bit old skool, I didn't see the need to go for 20.1c.2 (as in if it ain't broke, then don't fix it) - maybe I should read the release notes for 20.1c.2?

  • Replies 176
  • Views 81.7k
  • Created
  • Last Reply

Top Posters In This Topic

Posted Images

19 upgrades for 1C.2 version.

 



List of changes v20.1C.2









1 - Added "Motor deceleration", adjustable 0-100%.






2 - Improved torque sensor calibration.






3 - Added adjustment of the adc offset of the pedal torque.






4 - Added adjustment of the adc range of the pedal torque.






5 - Added adjustment of the adc angle of the pedal torque.






6 - Added estimated calculation "Pedal torque adc step".






7 - Added "Startup assist", for starting from a stationary on difficult climbs.






8 - Added "Walk Assist" speed settings, one for each level.






9 - Added choice Startup boost mode, at zero cadence or at zero speed.






10 - Improved progressivity in "Cadence Assist" mode.






11 - Added choice of soc % calculation mode.






12 - Improved the problem of delay in restarting with bike in motion (from mspider65 v12)






13 - Modified standing start, softer.






14 - Fixed an overflow issue in power assist mode.






15 - Fixed calculation of human power.






16 - Fixed, coaster brake feature.






17 - Display of TE and TE1 torque sensor values (VLCD5 only).






18 - Changed "dead time" value to 2.0 us.






19 - Cross-check motor current variables, with assistance stop in the presence of incompatible values (possible cause of motor operation without pedalin

[mention=16007]harrys[/mention] and [mention=37644]kiwisibk[/mention] - what version OSF are you both using v20.1c.1 or V20.1c.2?

 

I'm on 20.1c.1 at the mo and am satisfied with it and being a bit old skool, I didn't see the need to go for 20.1c.2 (as in if it ain't broke, then don't fix it) - maybe I should read the release notes for 20.1c.2?

I have the latest version, so it should be the C2. I am doing well with it!

Thanks [mention=9614]Nealh[/mention] for the list of changes in v20.1c.2 (and I see there is an 'update 1' to that now).

  • I've never looked into the torque sensor calibration side of life as I've always been happy with the 'out of the box' feel - something else to read up on.
  • I've only ever used power assist mode so I'm wondering if change 14 will remedy the occasional blips I get where (a) the motor runs on even after I stop pedalling or (b) the loss of assist whilst pedalling - both minor irritations easily remedied by a power off/on- CHANGE 14 - Fixed an overflow issue in power assist mode.
  • For info :


  • List of changes v20.1C.2 update 1









    1 - Fixed "Startup assist" feature.






    2 - Assist without pedaling, can also be activated with negative torque offset.






    3 - E08 error speed sensor failure, disabled in Walk assist mode.






    4 - E05 error motor check, monitoring time increased.


     

Can anyone tell me if it is necessary to turn off the Hailong battery with the red power button when the bike is not in use? Or is it enough to turn off the VLCD5 display? Thanks
Turn the battery sw off , it will be a BMS sw so may still draw power and drain the batt over a longer period.

Turn the battery sw off , it will be a BMS sw so may still draw power and drain the batt over a longer period.

Can you please explain this a little better? What do you mean by "battery sw" and "BMS"? Thank you

Can you please explain this a little better? What do you mean by "battery sw" and "BMS"? Thank you

The reason I ask is that I have seen that when I turn off the battery switch, the kilometers are not stored correctly in the display. The next time I turn it on there are a few missing... what could this be? I have turned off the odometer compensation because I do not use the data display of the emmebrusa firmware.

BMS - Battery Management System - the electronics board within the battery casing that controls the charging and discharging of the batteries.

 

On my vlcd6 setup, I noticed the other evening in my darkened bike shed, that there was a faint glow on the screen even though I'd powered off from the display. Thus I now switch off using the switch on the battery casing.

 

I can't advise about the kilometre readings on the display as I use a separate cycle computer (one of the Cateye brand) as l can't be bothered to faff around with the one on the vlcd6.

Well, I had oddities like throttle not working and speedometer dead with the embrus that I wanted to go back tp ground zero and verify my motor still worked.

 

i'm convinced the speed sensor works diffrent with embrusa as I have to redo the magnet spacing to get it working with the his firmware. The throttle is just the way the defualts pile up, I guess.

 

I'm agreed that powering up in street mode is a oorr intro to the firmware, and unless you learn how to switch modes from the display, you're stuck there unless you can configre power up in other modes.

 

I ran out of quality garage time. No lazy warm afternoons tinkering in the garage It's darn cold now, so I'm not up to changing a parameter and dashing off on a test ride. For the next few months, if the roads are dry and free of ice, I'll just want to ride a bike and not be tuning. So it's the stock FW for now.

 

For the FW issue, Iused his latest C.2 ?

Unless one is manually checking cells groups voltages or using a balance charger then it is strongly advised to use batteries with BMS. Not all BMS have a switch (sw) option but those that do will have an external sw on the battery case. All the time the sw is on the BMS remains live and will draw mili-ohms in current from the battery, simply relying on the display to turn off only stops the bike operation but doesn't turn off the battery.

My batteries with no sw I always disconect them from the controller.

Edited by Nealh

I'm agreed that powering up in street mode is a oorr intro to the firmware, and unless you learn how to switch modes from the display, you're stuck there unless you can configre power up in other modes.

The 'Enable on startup' might help you out on this one?

 

1668672621122.png.064730fcc76981bb85dae113df0f6b21.png

  • 10 months later...

Hello all,

 

For a 48 V 750 W battery, what value should I enter in "Battery power max (W)" under "Basic settings" when using a 500 W motor?

 

1695282021373.thumb.png.26e32d95cf4d8b408619cc95ac1ac53f.png

 

Thanks

1695281970689.thumb.png.f77c9619112e541a2470a973ea350993.png

Hello all,

 

For a 48 V 750 W battery, what value should I enter in "Battery power max (W)" under "Basic settings" when using a 500 W motor?

 

[ATTACH type=full" alt="54093]54093[/ATTACH]

 

Thanks

Your battery is not 750W. That's the wrong unit. W is watts, meaning power. Battery capacity is stated in 'watt hours', written Wh. These units are frequently confused, but are not interchangeable. Power is not capacity.

 

If you check the label or spec, you will likely find your battery is 48V, 750Wh.

 

The motor power setting has nothing to do with the battery capacity. Unless there is some other reason to change it, then leave it as it is.

Your battery is not 750W. That's the wrong unit. W is watts, meaning power. Battery capacity is stated in 'watt hours', written Wh. These units are frequently confused, but are not interchangeable. Power is not capacity.

 

If you check the label or spec, you will likely find your battery is 48V, 750Wh.

 

The motor power setting has nothing to do with the battery capacity. Unless there is some other reason to change it, then leave it as it is.

 

Sorry, this is nonsense in my opinion. For the Wh you mentioned there is a separate field in the Parameter Configurator and it is calculated from battery voltage x capacity in Ah:

 

1695289306240.thumb.png.1e91b614f18f22cabab7ae6c9fdf01a5.png

Sorry, this is nonsense in my opinion. For the Wh you mentioned there is a separate field in the Parameter Configurator and it is calculated from battery voltage x capacity in Ah:

 

[ATTACH=full]54094[/ATTACH]

Did you check the specification of your battery in the seller's listing? Most are around 25 amps, which would be 1200w. A 750w one would be only 15A, which is very low unless it's a very low capacity one or uses crappy cells. Your battery may well be 750w, but Mathewslack was right about you needing to check what the max current is to calculate it's power.

Did you check the specification of your battery in the seller's listing? Most are around 25 amps, which would be 1200w. A 750w one would be only 15A, which is very low unless it's a very low capacity one or uses crappy cells. Your battery may well be 750w, but Mathewslack was right about you needing to check what the max current is to calculate it's power.

 

This is the battery specification:

 

HAILONG-PLUS 48V 12.5AH Specification: (Include 2A Charger)

The battery pack fits 48V 250W/350W/500W/750W motor,If your motor power over 750W,we can't provide warranty for this battery

Rated capacity: 12.5AH

5P13S Li-ion 2.5Ah 65 pcs 18650 battery cells (china battery cells)

 

HAILONG-PLUS 48V AH Specification:

1. Rated capacity:AH

2. Voltage: 48V

3. Charging Voltage: 54.6V

4. Discharge cutoff voltage: 36.4V

5. Continuous discharge current: 30A

6. Pulse/Max discharge current 50A

7. Max charging current : 5A

8. Charging temperature: 0~45°C

9. Dischargeing temperature: -20~55 °C

10.Operating voltage:36.4V~54.6V

11.Diamesion: 90*109*362mm

12.Weight of battery pack About kg

13.It has no usb power output

  • 6 months later...

A couple of notes for those looking to use OSF for the first time:

EDIT: an update on older versions of SDCC below

 

> I've just got a Win11 laptop and wanted to be able to program my TSDZ2 which until now I've been doing using my Win10 laptop.

> I revisted the Github page (by Embrusa - link) to remind myself on what I needed to do. So some files like the previously downloaded OSF from the github repository I simply transferred from the Win10 to the Win11 laptop.

> Other items such as Java Runtime, ST Visual Development (by ST Microelectronics, and the Small Device C Compiler (SDCC) would be fresh downloads.

> Issue No1 - the Visual Programmer STM32 has now been replaced the STM32CubeProgrammer and initially it was the latter I installed - don't do that as Cube doesn't support the STM8 (the processor in the motor controller) SWIM protocol. Fortunately the original Visual Programmer STM32 is still available on their website.

> Issue No 2 - On running the configurator (that's the very useful series of dialogue boxes you're given to set up the various motor parameters) I noticed in the black dialogue box that subsequently runs as the necessary files are 'compiled', that the 'c' file named ebike-app.c was reporting errors e.g. "warning 283: function declarator with no prototype" (as per pic below) - all gobbledegook to me but I was guessing that something was amiss on the 'C' compiler side of life?

> I've no clue as to 'C' programming etc and after doing the obvious 'file checking' things, I wondered if the SDCC (the 'C' compiler) was a different version to what was originally used. Unfortunately I wasn't able to determine the version of SDCC on my Win10 machine but what ever version it is, it was installed in Oct 2021, so likely an earlier version than the current one. So to be on the safe side I copied all the SDCC files on the Win10 machine to the Win11 machine and BINGO, everything worked as expected.

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

EDIT: an update on older versions of SDCC below

> So opening a CMD (command) window and navigating to the SDCC directory and issuing the command sdcc.exe --version reveals that the version on the Win10 machine is V4.1.0 whereas the one I'd loaded onto the Win11 machine is V4.4.0

> V4.1.0 can be found at sourceforge.net HERE.

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

I'm sure there will be readers of this post who understand exactly what was initially amiss and so please add to this thread so that others can benefit.

 

Happy (TSDZ2) pedlling, B4t

 

1711977685996.png.89a65d453586224b14075c365fbaada9.png

Edited by Bikes4two

  • 2 weeks later...

Hello everyone,

if you have a 48V 750W motor, is it possible to limit the power assist mode to 250W? So that you are legally OK in the EU with max. 250W and 25kmh?

Many thanks for your feedback!

Hello everyone,

if you have a 48V 750W motor, is it possible to limit the power assist mode to 250W? So that you are legally OK in the EU with max. 250W and 25kmh?

Many thanks for your feedback!

Simply no, no matter what you do to the settings the motor remains illegal.

It is rated for 750w and that is it's designated rating , one can't simply fudge the figures to suit your needs.

  • 4 months later...

Hello everyone,

 

who can tell me the best possible parameter settings to save as much battery as possible, but still have reasonable motor support?

 

Please be as detailed as possible!

 

Thank you very much!

Hello everyone,

 

who can tell me the best possible parameter settings to save as much battery as possible, but still have reasonable motor support?

 

Please be as detailed as possible!

 

Thank you very much!

You need to understand how physics works. You take the energy out of the battery and use it in the motor to assist your pedalling.

 

You can take it out of the battery fast and get a lot of assistance, or take it out slowly and get low assistance. You can't take it out slowly and get a lot of assistance with any software or settings.

You need to understand how physics works. You take the energy out of the battery and use it in the motor to assist your pedalling.

 

You can take it out of the battery fast and get a lot of assistance, or take it out slowly and get low assistance. You can't take it out slowly and get a lot of assistance with any software or settings.

He's looking for a good compromise, at a guess. A grey area, not black and white as some prefer.

Set the speed cut off to 25kph rather than the default of 40 as if you're going more than 25, it is relatively easy to pedal unassisted Vs using the motor.

 

Also in OSF, keep lowering the percentage power uplift in the various assist levels to a point where it's still comfortable to ride. I've done this and in ECO mode, I now average 5-6 watt hours per mile, down from 7 Wh when I first set the bike up.

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...
Background Picker
Customize Layout

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.