Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

IrlDaveBlue said:
I tried to download SDCC but have BitDefender anti virus running.

I am downloading from https://deac-fra.dl.sourceforge.net/project/sdcc/sdcc-win64/4.2.0/sdcc-4.2.0-x64-setup.exe

BitDefender prevents this from downloading.

Is this a legit source for SDCC and if so, I assume that I should disable BitDefender and run the download again?

Dave

I just used this link to download SDCC,

https://sourceforge.net/projects/sdcc/
 
Elinx said:
Ianane said:
... if I go down Woodland way I can go way over 80kph.. but I'm way to scared to... I got up to 80 once when a couple of kangaroos jumped in front of me.......
Without motor assist there is no speedlimit.
So if the assist is stopped at 25km/h you may go 80km/h downwards :wink:

But.... does EN 15194:2017 also apply in Australia, or do other rules apply there?

NB
I see the 250W 25kph without throttle is based on the EU rules, but I see there are also a 200W with throttle rules.
Road and therefore e-bike legislation is state based in Australia but I think each state has adopted the EU legislation - the Aus governments are way too lazy to reinvent the wheel...
When I was checking 12 months ago, it was still the 2011 version of EU legislation that was referred to in South Aus, but I just checked and it has been updated and simplified about six months ago without the link referring to EU legislation which was the 2011 version.
Another interesting change is it just refers to continuos power output not exceding 250 watts without the complicated temperature stuff and they have removed the requirement for manufacturer compliance certification on the frame, which was impossible for DYI kits.
I see the EU has been up graded in 2017 and noticed you think another update is on it's way.
For me, it's all about me :), these changes mean that my kits are all arguably legal, definitely the TSDZ2, but I don't think that I have run my 48v 30amp beast over the 250w continuous power metric as most of my rides average out between 250 and 400 watts and I reckon I would put in between 100-180 watts... so my bikes are now locally legal... but my speed settings may still be questionable ;)
But again, I go back to the spirit versus the letter of the law... most of my rides average around the 21 to 23kph... except when I am using 500m of gravity assist...
BTW... getting it all back to the TSDZ2, I've just flashed my motors and a spare controller (long story) so I will have data for my routes coming in, once I have added the heat pads and the temperature sensor. I'll post time and experience changes.
A while back we were talking overheating/demagnetising motors and I was worried... but I think my saving graces have been having the 48v motor so it runs a bit cooler and I lowered the max amps through the VLCD5 display and as I am a commuter, I rarely ride for more than 40 mins.
Anyway... must be a father now
 
Elinx said:
Ianane said:
... if I go down Woodland way I can go way over 80kph.. but I'm way to scared to... I got up to 80 once when a couple of kangaroos jumped in front of me.......
Without motor assist there is no speedlimit.
So if the assist is stopped at 25km/h you may go 80km/h downwards :wink:

But.... does EN 15194:2017 also apply in Australia, or do other rules apply there?

NB
I see the 250W 25kph without throttle is based on the EU rules, but I see there are also a 200W with throttle rules.
I don't use a throttle on any of my kits, it takes too much space on the valuable real-estate of my handlebars and I like to use my legs so I pay little attention to the 200w throttle rules.
 
Clueless88 said:
Elinx said:
Clueless88 said:
....
Newbie here, ....
Is there a step by step guide anywhere for people who want to use the OSF adapted for VLCD5? .....
You can start reading the wiki :wink:
It start with a 7 steps guide


If you download the firmware, you will find some manuals inside.
The configuration manual has also a short guide


Ok so I read it all, and I've tried to do it. And I just can't. For someone who rarely uses a computer and hasn't for many years. I just don't get certain aspects of it. Download this, download that, make sure you save it here, hey presto there you go....... That might be all well and good to someone clued up, but I'm not, and far from it. I need more help. Shown how. Is nobody willing to do a video detailing each step so more people can access and use this OSF. Because otherwise, I feel people who aren't as computer savvy as others are being pushed out of the OSF benefits. For many people out there, who need a more in-depth guide, the current guides mean nothing. I just wish there was more genuine help on this topic and not just a "go read this", that doesn't help at all. If it did nobody would be asking.

I've had trouble and got it sorted. The sad truth for us non IT types is, that the instructions provided are pretty good but when you don't know, well, you don't know.
So you need to load four things into C:/ drive, all are hyperlinked in the wiki.
1) The STLink V2 programmer
2) SDCC Compiler
3) mbrusa's zip file, and then unpack that into C:/
4) and Jave Runtime.

Make sure Java is showing the coffee cup logo... when I installed Jave the first time, another program I had for reading files was hijacking the Java files so, it would not work.
I also made the mistake of loading the SDCC controller into another folder then copying it into C:/ and that seemed to upset things too so I removed all the files, and reloaded them directly into C:/

So, be prepared to delete programs and reinstall them... you will need to have 'operator access' to your computer... which you should have but may not if someone else has set it up for you.

You need to buy the STLink USB thingy. There's a couple of youtube videos, the one by Seven Christall is the most direct way of doing it. I bought an extension cable and soldered all the connections so they would directly plug in the right places and it didn't work... I tried, I tried, I cried then I did the direct way and it worked.

Even with the STlink I needed to restart the computer a few times to get it working properly.

Anyway... theres a start, if you return to this thread and you have got the STlink USB thingy and you're ready to procede, reach out again and we'll see if we can get you sorted. Once it works it is embassingly simple and straight forward BUT when you have no idea it is DAUNTING.
 
Ianane said:
......Once it works it is embassingly simple and straight forward BUT when you have no idea it is DAUNTING.
:bigthumb: Gongrats
Everyone must start once and bite the bullit.
 
[/quote] :bigthumb: Gongrats
Everyone must start once and bite the bullit.
[/quote]

Now I need the time to do the heat pads and temp sensor. When I've got the motors apart I'm interested to compare the colour of faulty motor (that has only done about 10 kilometers MAX) and the motor that replaced it and has done over 3000km in all weather from 0 to 40 degrees c. I'll photograph and post for reference.
I'm naively hoping that the faulty motor will work after the OSF flashing... if that doesn't get it going I'll check the torque sensor to see if it is cracked.
So until I have more to add I'll just pop in sporadically.
Thanks for thie forum and the ideas and support.
 
Hi all,
I am French, please excuse the automatic translation.
I recently bought and installed a TSDZ2B kit, I try to flash the firmware, but without success so far. Here is a picture of what I did and with what.
PXL_20230110_171828675 (Petite).jpg

I cut an extension cable from the speed sensor and connected it to the STLink V2 following the datasheet plan.
Capture d’écran 2023-01-11 085630.jpg
and the schema of the wiki
TSDZ2_speed_Sensor_Pinout.jpg

PXL_20230111_081713247 (Petite).jpg
I checked several times the continuities, the current passes.
I also checked the voltage across the STLink, I have 3.30V between pin1 and pin3.
With the adapter connected to the motor but not to the STLink I have a resistance of 2-3Mohm between the pins.

It's an STLink V2, not a clone, the firmware is up to date.
Sans titre4 (Petite).png

I configured STVP like this:
Sans titre (Petite).png
I tried STM8S105x4 and x6

But when I try to read the tables I get this message: "Cannot communicate with the device!"
Sans titre2 (Petite).png
Sans titre3 (Petite).png
The bike still works normally, but with the original firmware.
I must have missed something, but I really don't see what! I will be very grateful if you point out my mistake.

Damien
 
MazetteDeMazout said:
...
I cut an extension cable from the speed sensor and connected it to the STLink V2 following the datasheet plan.
....
Have you checked the speedconnector, because normally the swim pin isn't connected there
As in your drawing connect:

Brown = 5V ST-Pin 1 (3.3V should work also)
Black = Swim ST-Pin 2 (data)
Orange = GND ST-Pin 3

ST-LINK-v2_SWIM.jpg

With STVP window you can check your connection and make a backup/restore (STM8S105x4) of all 3 tabs for stock firmware
(NB:Only for backup/restore OSF choose STM8S105x6)

If you want to flash a controller with Java configurator, shut down STVP so it can run from cmd.
The cmd script choose the settings what is needed (STM8S105x6)
 
Elinx said:
Have you checked the speedconnector, because normally the swim pin isn't connected there
As in your drawing connect:

Brown = 5V ST-Pin 1 (3.3V should work also)
Black = Swim ST-Pin 2 (data)
Orange = GND ST-Pin 3
Not sure to understand what you mean, I have ckecked with a multimeter, the resistance between the male speed connector and the dupont plug is 0 ohm.
Do you think I didn't put the wires at the right place?
 
MazetteDeMazout said:
.... the resistance between the male speed connector and the dupont plug is 0 ohm.
Do you think I didn't put the wires at the right place?
If all the sockets are connected to the colored wires, it couldn't be wrong.
First I thought you had swapped orange/black
But if I see your picture, it looks your wire connections are OK

So I don't understand why the swim isn't recognized.

Have you measured the connection from the 4 pin to the 20 pin too?
5V - P01-02
3.3V - P19
swim - P10
gnd - P18-20-12
 
Hangman said:
... the new controller which can't be programmed with the OSF.
That controller only is sold by Enerprof.
But indeed there is a small chance MazetteDeMazout has one too.
He can measure the Voltage on the motorside between Swim and Gnd.
5V is the old controller

file.php
 
Hi,
thank you for confirming that there is no error in the wiring.
I bought the kit from pspower.
I measured the voltage, I have 5V, so it's an old controller.
I will try to do a frame analysis with the oscilloscope to understand what is happening.
 
After checking with the oscilloscope, no frame sent at all on the data pin.
I also checked the VDD pin, I have no more 3.3V, it seems that my stlink is damaged :-(
 
MazetteDeMazout said:
.....VDD pin, I have no more 3.3V, it seems that my stlink is damaged...
Had you connected the battery too? That is not adviced.
Because in that case you get 5V from it at the 3.3V

Have you measured the 20pin too?
 
I removed the battery from the bike before each ride.
On the 20-pin connector, it's not clear, I have my 3.3V on the multimeter, but not on the oscilloscope...
I asked the supplier to change me the ST-Link, if he does not want I will try with a clone...
 
Maybe a daft question but are you using Windows 64 bit or 32 bit
For 32bit select all 32bit drivers etc but to get it to work on an old windows 32bit system (tablet) I needed to creat a folder "Program files (x86)" on drive "c" and copy over the whole "STMicroelectronics" folder into Program files (x86) folder.
Then everything ( java configurator ) works ok with 32bit system

TSDZ2-Smart-EBike-1-20.1C.2-update-1 will run on 32bit windows pc

EDIT
01.02.2023
just tried "TSDZ2-Smart-EBike-1-20.1C.2-update-2" on 32 bit tablet but it no longer runs
runs ok on 64bit system though
 
Try this, open only STvisual programmer and try to read data if it is fails, there is pop table, on it is written what to do. You should connect RST with GND on ST- link and turn off the STvisual programmer then turn it on, with connected RST and GND. After that release RST-GND and try read memory on the STvisual programmer. For me it helped.
 
My stlink (cheap clone) connects to my TSDZ2 controller only when battery is connected and the display is turned on. Won't do anything otherwise. Have you tried that?
 
Attenation .The ST Programmer can be inhibit for three wire communication. I described how to unbloced it.
 
kaziq said:
My stlink (cheap clone) connects to my TSDZ2 controller only when battery is connected and the display is turned on......
If you do this. Only connect gnd and swim and don't connect V+, to prevent a burned STlink or controllercircuit.
 
Elinx said:
kaziq said:
My stlink (cheap clone) connects to my TSDZ2 controller only when battery is connected and the display is turned on......
If you do this. Only connect gnd and swim and don't connect V+, to prevent a burned STlink or controllercircuit.
How would high voltage find its way to 5V line?
If anything, someone could confuse 6V from headlights. So I don't understand reason for disconnecting the battery.
 
dzid_ said:
..... How would high voltage find its way to 5V line?
...... I don't understand reason for disconnecting the battery.
Lower Voltages don't come directly from the battery, but from Voltage regulators on the controllerboard.
These Voltages are different from the Voltage of the STlink USB connection, so there could be uncontrolled current running between them, which can give as result a burned Voltage regulatorcircuit on the controllerboard or STlink.
If you switch on the battery and display, there is also communication between controllerboard, the display, sensors etc.
So you flash memory which is in use.
So that is the reason to use only the Voltage of one source, preferably the STlink.
 
Ok, if that is the rationale then I can agree - connecting some external capacitive load to 5V line could potentially overload the voltage regulators, burn and short them out and so possibly the high voltage could end up on 5V line.
Also maybe connecting programmer 3.3V line by mistake could somehow source excessive current from 5V regulator.

I guess it's a good precaution, since we don't know what kind of programmers people connect.
Thanks.
 
dzid_ said:
How would high voltage find its way to 5V line?
If anything, someone could confuse 6V from headlights. So I don't understand reason for disconnecting the battery.
I guess if you connect 5V from TSDZ2 to 3.3V output from STLink you will burn STLink.
 
Back
Top