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

Joebill said:
casainho said:
elfnino said:
I have just flashed 850C_v0.4.2-bootloader.bin with home made bootloader box successfully and display turns on however the vertical screen flip is still present.
Also seems that I cannot flash it anymore as the display is not reacting to flashing signals from USBUART module as before.

Is there a chance that 0.4.2 could brick the UART/TTL capability of the display ?
About the vertical flip, follow the wiki instructions:

Bafang 850C: information and configuration
NOTE: some 850C displays have a different LCD inside and one of them will make the image flipped, in this case, go to configurations, LCD vertical flip, and change from default to invert. Next time you power up the display, the image should not be flipped anymore.

About the bootloader, usually the bootloader locks his own memory space at boot, so the firmware that runs after, can't change the bootloader memory and so the bootloader is protected.
I can't say there is no issue with the 850C bootloader...

I didn't quite follow the last part about the bootloader. Does that mean it can only be flashed once? (Sorry if I'm a bit slow)

I must admit I was wrong and when I checked all the cables I found broken Rx line. After fixing it I was able to re-flash the display again.
So there is nothing wrong with 0.4.2 it will not brick UART functionality on 850C display.

You can flash the display with UART multiple times.. I tested all the 0.4.x versions and no issues

Hope we can see 0.20.0 version for the 850C soon :?:
 
elfnino said:
Joebill said:
casainho said:
elfnino said:
I have just flashed 850C_v0.4.2-bootloader.bin with home made bootloader box successfully and display turns on however the vertical screen flip is still present.
Also seems that I cannot flash it anymore as the display is not reacting to flashing signals from USBUART module as before.

Is there a chance that 0.4.2 could brick the UART/TTL capability of the display ?
About the vertical flip, follow the wiki instructions:

Bafang 850C: information and configuration
NOTE: some 850C displays have a different LCD inside and one of them will make the image flipped, in this case, go to configurations, LCD vertical flip, and change from default to invert. Next time you power up the display, the image should not be flipped anymore.

About the bootloader, usually the bootloader locks his own memory space at boot, so the firmware that runs after, can't change the bootloader memory and so the bootloader is protected.
I can't say there is no issue with the 850C bootloader...

I didn't quite follow the last part about the bootloader. Does that mean it can only be flashed once? (Sorry if I'm a bit slow)

I must admit I was wrong and when I checked all the cables I found broken Rx line. After fixing it I was able to re-flash the display again.
So there is nothing wrong with 0.4.2 it will not brick UART functionality on 850C display.

You can flash the display with UART multiple times.. I tested all the 0.4.x versions and no issues

Hope we can see 0.20.0 version for the 850C soon :?:
Thanks for reporting.
 
Joebill said:
elfnino said:
I have just flashed 850C_v0.4.2-bootloader.bin with home made bootloader box successfully and display turns on however the vertical screen flip is still present.
Also seems that I cannot flash it anymore as the display is not reacting to flashing signals from USBUART module as before.

Is there a chance that 0.4.2 could brick the UART/TTL capability of the display ?

Any chance you can share any information on your successful set up? I'm looking to do the same.

No problem this is my final well working set up using "step up buck" instead of ebike buttery as power source..
The colors should match with bafang display cable

bafang extension cable - I recommend male to male (one end for bootloader box other for connecting display with TSDZ2)
https://www.aliexpress.com/item/32861639327.html

USBtoUART adapter - recomend this type as other was sensitive to AC power supply of laptop
https://www.aliexpress.com/item/32288431622.html

Step Up buck - DC booster
https://www.aliexpress.com/item/32807600304.html
 

Attachments

  • bootloader_box.jpg
    bootloader_box.jpg
    58.3 KB · Views: 5,302
  • IMG_7266.jpg
    IMG_7266.jpg
    31.7 KB · Views: 5,302
elfnino said:
Joebill said:
elfnino said:
I have just flashed 850C_v0.4.2-bootloader.bin with home made bootloader box successfully and display turns on however the vertical screen flip is still present.
Also seems that I cannot flash it anymore as the display is not reacting to flashing signals from USBUART module as before.

Is there a chance that 0.4.2 could brick the UART/TTL capability of the display ?

Any chance you can share any information on your successful set up? I'm looking to do the same.

No problem this is my final well working set up using "step up buck" instead of ebike buttery as power source..
The colors should match with bafang display cable

bafang extension cable - I recommend male to male (one end for bootloader box other for connecting display with TSDZ2)
https://www.aliexpress.com/item/32861639327.html

USBtoUART adapter - recomend this type as other was sensitive to AC power supply of laptop
https://www.aliexpress.com/item/32288431622.html

Step Up buck - DC booster
https://www.aliexpress.com/item/32807600304.html
Can you help to improve the wiki with this information?
 
elfnino said:
casainho said:
Can you help to improve the wiki with this information?
Yes I will try.
I went and pasted your notes and images. If you think it can be improved, please go ahead and edit the wiki:

image.png
 
Has anybody been experimenting with turn signals/blinkers? I would like to add some to my tsdz2 because I am often riding at night on steep roads with lots of traffic and I don‘t like to let go the handlebar in this situation to signal a turn. I think adding electric turn signals would be a bit of a challenge because there is hardly enough power for the regular lights.
 
h27 said:
Has anybody been experimenting with turn signals/blinkers? I would like to add some to my tsdz2 because I am often riding at night on steep roads with lots of traffic and I don‘t like to let go the handlebar in this situation to signal a turn. I think adding electric turn signals would be a bit of a challenge because there is hardly enough power for the regular lights.
Hmmm, the signals could be some external system to TSDZ2, right?? There are no dependencies from the TSDZ2...

Maybe you can do something with an Arduino...
 
casainho said:
h27 said:
Has anybody been experimenting with turn signals/blinkers? I would like to add some to my tsdz2 because I am often riding at night on steep roads with lots of traffic and I don‘t like to let go the handlebar in this situation to signal a turn. I think adding electric turn signals would be a bit of a challenge because there is hardly enough power for the regular lights.
Hmmm, the signals could be some external system to TSDZ2, right?? There are no dependencies from the TSDZ2...

Maybe you can do something with an Arduino...

External signal would be fine and Arduino would be nice as you could have control over blink rate etc. What I had in mind was a more fool proof solution such as an adaption of some existing system for motor bikes (combustion/scooters). There are many of these on the market, some need a relay, some seem to have the electronics included.
(https://www.ebay.com/itm/12-LED-Min...hash=item365178c255:m:mYEkidA8ur11yVQUgW6S_ww)

Also there are switches for the bar handle for the left/right signals, some including a button for a horn and light switch. Many of them work on 12 or 24 volt. It would be more elegant and safe to integrate something like this than adding some homemade electronics (at least in my case). Also there seem to be some legal requirements in some countries (it must give optical or acoustical signal to the driver if it is not working properly). Maybe it would be an idea to do something together with stronger head and tail lights running on 12 or 24V.
 
h27 said:
casainho said:
h27 said:
Has anybody been experimenting with turn signals/blinkers? I would like to add some to my tsdz2 because I am often riding at night on steep roads with lots of traffic and I don‘t like to let go the handlebar in this situation to signal a turn. I think adding electric turn signals would be a bit of a challenge because there is hardly enough power for the regular lights.
Hmmm, the signals could be some external system to TSDZ2, right?? There are no dependencies from the TSDZ2...

Maybe you can do something with an Arduino...

External signal would be fine and Arduino would be nice as you could have control over blink rate etc. What I had in mind was a more fool proof solution such as an adaption of some existing system for motor bikes (combustion/scooters). There are many of these on the market, some need a relay, some seem to have the electronics included.
(https://www.ebay.com/itm/12-LED-Min...hash=item365178c255:m:mYEkidA8ur11yVQUgW6S_ww)

Also there are switches for the bar handle for the left/right signals, some including a button for a horn and light switch. Many of them work on 12 or 24 volt. It would be more elegant and safe to integrate something like this than adding some homemade electronics (at least in my case). Also there seem to be some legal requirements in some countries (it must give optical or acoustical signal to the driver if it is not working properly). Maybe it would be an idea to do something together with stronger head and tail lights running on 12 or 24V.

I actually built a wireless Arduino based set of indicators/ rear light flasher and brake light for my 'Bike Train' which is a E-bike towing a recumbent trike.

I am happy to share the Arduino code (sorry never really finished it or used Github) its actually based around two Arduino nano boards using the HC12 TX/RX module as I needed it to be wireless, But you could easily simplify it and use just the receiver part and hard wire in a 3 way toggle switch for indicators and even link into the e brake for brake lights.
I 3D printed my own indicator switch and led indicator housing to make it a clean install on the bars. (This was an early example) I found it very usefull to have a visual indication on the bars to let you know if you had left the indicators on.
diy indicator.JPG

The receiver unit was a second Arduino nano that controlled some NeoPixel RGB leds housed in the indicator pods. These were nice as they run off 5v and being RGB easy to use as indicators or brake lights at will. It was just a case of change the patterns in the code.

If there is any interest into this I may revisit it and at least write-up what I did and share the code as it currently is.
I recorded a short video about it recently to give an idea of how it looked when we were discussing the TSDZ2 controlling the rear flashing lights.

[youtube]MG5v0Vgo9LU[/youtube]
 
I've been using version 20 Alpha 10 on one handcycle and version 20 beta 1 from Buba's original version on his drive on the other handcycle. We just Flashed the TSDZ2 that had Buba's original version with version 20 beta 1 from the official site. We didn't reflash that LCD3 with the different version 20. The problem I'm having is that the cadence doesn't work well anymore. On the other 2 versions it seems to be very accurate now with the new official version 20 beta 1 on the TSDZ2 but not the LCD3 it jumps around as far as 40 points at a time it's not accurate at all anymore. What I'd like to know is if it's not accurate because I only flashed the TSDZ2 or if some other problem is causing it not to be accurate anymore?
 
perryscope said:
h27 said:
casainho said:
h27 said:
Has anybody been experimenting with turn signals/blinkers? I would like to add some to my tsdz2 because I am often riding at night on steep roads with lots of traffic and I don‘t like to let go the handlebar in this situation to signal a turn. I think adding electric turn signals would be a bit of a challenge because there is hardly enough power for the regular lights.
Hmmm, the signals could be some external system to TSDZ2, right?? There are no dependencies from the TSDZ2...

Maybe you can do something with an Arduino...

External signal would be fine and Arduino would be nice as you could have control over blink rate etc. What I had in mind was a more fool proof solution such as an adaption of some existing system for motor bikes (combustion/scooters). There are many of these on the market, some need a relay, some seem to have the electronics included.
(https://www.ebay.com/itm/12-LED-Min...hash=item365178c255:m:mYEkidA8ur11yVQUgW6S_ww)

Also there are switches for the bar handle for the left/right signals, some including a button for a horn and light switch. Many of them work on 12 or 24 volt. It would be more elegant and safe to integrate something like this than adding some homemade electronics (at least in my case). Also there seem to be some legal requirements in some countries (it must give optical or acoustical signal to the driver if it is not working properly). Maybe it would be an idea to do something together with stronger head and tail lights running on 12 or 24V.

I actually built a wireless Arduino based set of indicators/ rear light flasher and brake light for my 'Bike Train' which is a E-bike towing a recumbent trike.

I am happy to share the Arduino code (sorry never really finished it or used Github) its actually based around two Arduino nano boards using the HC12 TX/RX module as I needed it to be wireless, But you could easily simplify it and use just the receiver part and hard wire in a 3 way toggle switch for indicators and even link into the e brake for brake lights.
I 3D printed my own indicator switch and led indicator housing to make it a clean install on the bars. (This was an early example) I found it very usefull to have a visual indication on the bars to let you know if you had left the indicators on.
diy indicator.JPG

The receiver unit was a second Arduino nano that controlled some NeoPixel RGB leds housed in the indicator pods. These were nice as they run off 5v and being RGB easy to use as indicators or brake lights at will. It was just a case of change the patterns in the code.

If there is any interest into this I may revisit it and at least write-up what I did and share the code as it currently is.
I recorded a short video about it recently to give an idea of how it looked when we were discussing the TSDZ2 controlling the rear flashing lights.

[youtube]MG5v0Vgo9LU[/youtube]

Nice job, perryscope! I would be very interested in your code and some more details of your build. I‘m not sure if I understood everything you wrote: Did you do an Arduino controlled version and a TSDZ2 controlled version? Where did you plug it in? Battery? TSDZ2 cable? Separate battery?
 
Hi,

I received a 850c from pswpower and am trying to flash it. I noticed it doesnt fit into my 4-1 cable because it came with a female end so i attempted to put on a new male connector (luckily had a spare). Cut it up and see that the colors are off and the pin positions dont match with what tsdz2 is expecting. So I tried to figure out and match up the pins according to this
3GaLDI1.jpg
.

Here's where I am now

jpccstL.jpg
.


Currently I am able to plug an unflashed 850c to my controller and see it start up but I can't get it to flash... is there anything i can verify? I assume that because the 850c can startup that my wiring should be ok. The APT program doesn't show much in the way of errors. Thanks

Tsdz2 display --> 850c
Gnd, Black --> black
Batt V+, Red --> purple
Rx, Yellow --> white
Tx, Green --> green
5v, Blue --> orange
 
So i got it to work since my last post...just tried everything all over again and pressed the power button vigorously to start the flashing and the progress bar came on

So far seems similar in functionality. I was expecting a bit of speed up with navigating menu and button responses compared to the LCD3 but its ok. I actively toggle the PAS so sometimes ill jump from lvl 2 to lvl 5 and with the lag it gets a bit frustrating..
 
h27 said:
Nice job, perryscope! I would be very interested in your code and some more details of your build. I‘m not sure if I understood everything you wrote: Did you do an Arduino controlled version and a TSDZ2 controlled version? Where did you plug it in? Battery? TSDZ2 cable? Separate battery?

This was a separate project for our 'Bike Train' (before I even knew about the TSDZ2, so the tow bike is running a bafang BBS02)
so there is no integration with the TSDZ2 or indeed the Bafang motor I have on this bike.

It's based on two units.

1) A Transmitter on the handlebars made from an Arduino Nano and HC12 radio module and powered from the USB power from my Bafang Controller ( it only gets power from the display) This transmits a packet to the receiver every 300ms or so to indicate the status of the switches ( left, right,brake)

2) A Receiver on the trailing recumbent bike made from a second Arduino and HC12 radio module this is currently powered by a separate 3 cell LIPO battery (via a 5v Dc-dc converter) to power the Arduino and all the LEDs ( these take a surprising amount of power at 5v! they are a string of 40 I think) This Arduino listens for the packets and triggers the LED patterns as needed.

I made it as I needed a way to control the indicators on the rear bike from the front bike and i didn't want to have a cable between the two as I commonly have to disconnect the rear bike.

Maybe a photo of the setup would help as it is a little unusual I know :)
rear.JPG


(h27) I will pm you the code as it stands, its not very tidy at this point, but it works. I would like to revisit it at some point to tidy it up and make a simple single unit for one bike that does not have the radio link and works of a single Ardunio nano. This would simplify things for anyone that just wants a separate unit controlled from a switch on the handlebar, but again separate from the TSDZ2 it may just draw power from the e bike battery.
 
jeff.page.rides said:
I've been using version 20 Alpha 10 on one handcycle and version 20 beta 1 from Buba's original version on his drive on the other handcycle. We just Flashed the TSDZ2 that had Buba's original version with version 20 beta 1 from the official site. We didn't reflash that LCD3 with the different version 20. The problem I'm having is that the cadence doesn't work well anymore. On the other 2 versions it seems to be very accurate now with the new official version 20 beta 1 on the TSDZ2 but not the LCD3 it jumps around as far as 40 points at a time it's not accurate at all anymore. What I'd like to know is if it's not accurate because I only flashed the TSDZ2 or if some other problem is causing it not to be accurate anymore?

Jeff, the way you wrote this is a little confusing. Let me clarify:

v20 alpha 10 had steady and reliable cadence readings on the KT-LCD3 display
v20 beta 1 cadence jumps around by as much as 40 and is not steady.

This makes me wonder if there was a code change in the cadence low-pass filter in v20 beta 1
 
perryscope said:
h27 said:
Nice job, perryscope! I would be very interested in your code and some more details of your build. I‘m not sure if I understood everything you wrote: Did you do an Arduino controlled version and a TSDZ2 controlled version? Where did you plug it in? Battery? TSDZ2 cable? Separate battery?

This was a separate project for our 'Bike Train' (before I even knew about the TSDZ2, so the tow bike is running a bafang BBS02)
so there is no integration with the TSDZ2 or indeed the Bafang motor I have on this bike.

It's based on two units.

1) A Transmitter on the handlebars made from an Arduino Nano and HC12 radio module and powered from the USB power from my Bafang Controller ( it only gets power from the display) This transmits a packet to the receiver every 300ms or so to indicate the status of the switches ( left, right,brake)

2) A Receiver on the trailing recumbent bike made from a second Arduino and HC12 radio module this is currently powered by a separate 3 cell LIPO battery (via a 5v Dc-dc converter) to power the Arduino and all the LEDs ( these take a surprising amount of power at 5v! they are a string of 40 I think) This Arduino listens for the packets and triggers the LED patterns as needed.

I made it as I needed a way to control the indicators on the rear bike from the front bike and i didn't want to have a cable between the two as I commonly have to disconnect the rear bike.

Maybe a photo of the setup would help as it is a little unusual I know :)
rear.JPG


(h27) I will pm you the code as it stands, its not very tidy at this point, but it works. I would like to revisit it at some point to tidy it up and make a simple single unit for one bike that does not have the radio link and works of a single Ardunio nano. This would simplify things for anyone that just wants a separate unit controlled from a switch on the handlebar, but again separate from the TSDZ2 it may just draw power from the e bike battery.
Thank you very much, perryscope, for the explanations and the code. This will be very helpful, when I try to build my turn signal/blinker and brake lights (I think I will go with the simpler hardwired version).
Your bike-train is a very nice project and build! :thumb:
 
Rydon said:
jeff.page.rides said:
I've been using version 20 Alpha 10 on one handcycle and version 20 beta 1 from Buba's original version on his drive on the other handcycle. We just Flashed the TSDZ2 that had Buba's original version with version 20 beta 1 from the official site. We didn't reflash that LCD3 with the different version 20. The problem I'm having is that the cadence doesn't work well anymore. On the other 2 versions it seems to be very accurate now with the new official version 20 beta 1 on the TSDZ2 but not the LCD3 it jumps around as far as 40 points at a time it's not accurate at all anymore. What I'd like to know is if it's not accurate because I only flashed the TSDZ2 or if some other problem is causing it not to be accurate anymore?

Jeff, the way you wrote this is a little confusing. Let me clarify:

v20 alpha 10 had steady and reliable cadence readings on the KT-LCD3 display
v20 beta 1 cadence jumps around by as much as 40 and is not steady.

This makes me wonder if there was a code change in the cadence low-pass filter in v20 beta 1

Version 20 alpha 1 cadence worked.
Version 20 beta 1 from Buba's own drive cadence worked.
Version 20 beta 1 from Buba's drive on that LCD3 with the official version 20 beta 1 on the TSDZ2 cadence does not work.
 
jeff.page.rides said:
Rydon said:
jeff.page.rides said:
I've been using version 20 Alpha 10 on one handcycle and version 20 beta 1 from Buba's original version on his drive on the other handcycle. We just Flashed the TSDZ2 that had Buba's original version with version 20 beta 1 from the official site. We didn't reflash that LCD3 with the different version 20. The problem I'm having is that the cadence doesn't work well anymore. On the other 2 versions it seems to be very accurate now with the new official version 20 beta 1 on the TSDZ2 but not the LCD3 it jumps around as far as 40 points at a time it's not accurate at all anymore. What I'd like to know is if it's not accurate because I only flashed the TSDZ2 or if some other problem is causing it not to be accurate anymore?

Jeff, the way you wrote this is a little confusing. Let me clarify:

v20 alpha 10 had steady and reliable cadence readings on the KT-LCD3 display
v20 beta 1 cadence jumps around by as much as 40 and is not steady.

This makes me wonder if there was a code change in the cadence low-pass filter in v20 beta 1

Version 20 alpha 1 cadence worked.
Version 20 beta 1 from Buba's own drive cadence worked.
Version 20 beta 1 from Buba's drive on that LCD3 with the official version 20 beta 1 on the TSDZ2 cadence does not work.

I just read my post, I ment version 20 Alpha 10 not 1
 
Hello, Just some considerations about the street mode.
At the moment we have couple of parameters to set on the street mode: power (typically 250W) and speed (typically 25 km/h).
The Power cuts precisely at 250w then and does not allow any peak value above that, except some +25W of rounding.
We all know that native bikes allow peak power much greater than 250W, does anybody know the logic behind?
Is extra power allowed for maximum X seconds after which it is faded down to 250W?
It should be nice to discover that logic in order to transfer it also on the OSF->street mode, what do you think?
 
thineight said:
Hello, Just some considerations about the street mode.
At the moment we have couple of parameters to set on the street mode: power (typically 250W) and speed (typically 25 km/h).
The Power cuts precisely at 250w then and does not allow any peak value above that, except some +25W of rounding.
We all know that native bikes allow peak power much greater than 250W, does anybody know the logic behind?
Is extra power allowed for maximum X seconds after which it is faded down to 250W?
It should be nice to discover that logic in order to transfer it also on the OSF->street mode, what do you think?

I didn't limit the power in street mode and it works/limits smootly. It is not like a lot of other e-bike that it's suddenly shuts off.
 
I flashed the 'official' beta 0.20.0 beta1 on my LCD3. I feel much backwards turn resistance. I can activate power assist and 3 levels, and also E-MTB assist. Cadence assist does not appear on screen. On all modes there is no assist at all, in E-MTB the motor will turn for a second then stall. Setup in LCD 3 seemed to work well, also sensor calibration for advanced mode.
Now what could be the reason? Should I try Buba's pre 0.20.0 beta1? Where else to start to fix? Reflash the motor, too?
 
andrewgateway said:
The motor should also be flashed with ver 20.
Of course, the motor also has 0.20.0 beta1 on it. I'm just assuming the error might be on the LCD rather.
 
jeff.page.rides said:
...
...
...

Version 20 alpha 1 cadence worked.
Version 20 beta 1 from Buba's own drive cadence worked.
Version 20 beta 1 from Buba's drive on that LCD3 with the official version 20 beta 1 on the TSDZ2 cadence does not work.

Thanks for your feedback
Have you a link to "Version 20 beta 1 from Buba's own drive" ?
It's already possible to download directly from Buba's drive ?
 
Back
Top