Hi kortina, the resets you're talking about aren't related to each other in any way. The EEPROM reset clears your data memory (the firmware configuration). You seem to have issues with the programmer and communication with the device. Is the reset signal (RST) of the programmer properly connected? Basically your device isn't properly programmed right now...kortina said:Hi Guys,
Received all of my gear to upgrade my TSDZ2. I have made the cables, flashed the KT-LCD3 OK.
When I attempt to flash my TSDZ2 I get an error:
Code:> Loading file C:\Users\Michael\Downloads\TSDZ2-v0.13.1.hex in PROGRAM MEMORY area ... < File successfully loaded. File Checksum 0x19D1EE > Programming PROGRAM MEMORY area... Error : Problem while trying to Reset swim and device. Apply a Power On Reset < PROGRAM MEMORY programming completed. > Verifying PROGRAM MEMORY area... Error : Problem while trying to Reset swim and device. Apply a Power On Reset < PROGRAM MEMORY successfully verified.
I have attempted the EEPROM reset:
To use the reset to factory defaults feature (it's no longer necessary to program the data memory!):
- Enter configuration menu 6
- Go to submenu 3
- Press the UP button 10 times, a counter on the display will be incremented anytime you do this
- The display will turn off
- Turn it on again and it will reset your configuration to the factory defaults!
The KT-LCD lights ups, and shows the correct voltage. (52v battery, fully charged showing 57.7).
The issue that I get is that 0 watts of power are applied to the motor.
Any ideas what I can do to finish this off, and get the bike running again?
Kind Regards
I still have to try your settings (can't find them right now...) but I'm afraid to somehow destroy my motorjbalat said:No worries, btw very dissapointed you still haven’t increased the cadence. I was out doing some mountain biking yesterday on the way home from work and I had to take a run up to get up the hill and noticed the motor did not want to do anything above 95 cadence... if you like I can do those changes for you fairly quickly, now that I’m committed to the temperature sensor I want to get the firmware to a level I’m happy with... sorry I’m selfish that way![]()
Nice, well done! Struggling is part of the project to be honestaja said:Thankfully I managed to figure it out - the pins connecting the wires to the LCD3 were slotted in but I thought why not press down on them and thankfully that resolved the issue! Step one sorted![]()
EndlessCadence said:I still have to try your settings (can't find them right now...) but I'm afraid to somehow destroy my motorjbalat said:No worries, btw very dissapointed you still haven’t increased the cadence. I was out doing some mountain biking yesterday on the way home from work and I had to take a run up to get up the hill and noticed the motor did not want to do anything above 95 cadence... if you like I can do those changes for you fairly quickly, now that I’m committed to the temperature sensor I want to get the firmware to a level I’m happy with... sorry I’m selfish that way![]()
![]()
I think we should an experimental motor configuration option to configuration menu 8.0, now there are just two options 36v or 48v battery but we can add a "36v high cadence (experimental)". I'm using a 36v motor as well and I can test this too.
Thanks, I did now thatAZUR said:I think you are using a 48V battery and jbalat is using a 36V battery.
In this forum people says higher battery voltage allows higher cadence.
Maybe you must be aware of this in your tests with Jbalat´s V0.3 version.
Regards
Hmmm, for some reason I thought the DZ version could measure higher temperate. Anyway, I hope to never got my motor to 100 degrees.EndlessCadence said:Casainho, I've read somewhere that you're using the LM35DZ sensor. Can you explain why?
I see that this type has a range of 0-100 degrees celsius and for instance the LM35A has a range of -55-150 celsius.
Good work!! I hope to test it on next days.EndlessCadence said:Everyone, after a day full of testing I'm confident to release version 0.14.0. You can find it here, including an overview of the changes and open issue(s):
casainho said:I connected the STLinkV2 clone to Bafang LCD 850C and I was able to flash and debug (run step by step and add breakpoints) a test firmware that toggles a pin. Here is the debug session on Eclipse:
And the pin signal on oscilloscope:
I am sharing the firmware here: https://github.com/OpenSource-EBike-firmware/Color_LCD/tree/master/Bafang_LCD_850C_firmware
And technical notes about the LCD: https://github.com/OpenSource-EBike-firmware/Color_LCD/wiki/Bafang-850C
As now I have all the wiring from the microcontroller to LCD, next step is try to initialize and write to LCD. The issue is that I don't know which LCD driver it uses... but I guess it is something popular, something that uses 16 data lines + some control lines.
![]()
EC, as you know, If you test with the battery not fully charged (about 40V) you get the same voltage we get with the 36V battery fully charged (10x4,2=42). Our range is between 29V and 42V.EndlessCadence said:Thanks, I did now thatAZUR said:I think you are using a 48V battery and jbalat is using a 36V battery.
In this forum people says higher battery voltage allows higher cadence.
Maybe you must be aware of this in your tests with Jbalat´s V0.3 version.
RegardsI agree with jbalat that the cadence is a bit limited (around 95 RPM?) even on 48v battery, is there even a difference right now? But I also think that this limited cadence isn't noticable for everyone. I'm a road cyclist (unassisted) normally and very used to higher speeds and high cadences (+100 RPM). I think jbalat is a sporty cyclist (trails?) as well
@jbalat
Can you create a Github issue with your custom FOC settings? Then I'm happy to create the experimental motor profile for you![]()
I was just kidding hehejbalat said:EC you seriously are not scared you will blow your motor up with my version?, I have probably done almost 1000kms with that version and I have also tested it with 14s up to 128 cadence. I know Casainho says it’s probably not efficient but it’s exactly the same in real life testing just that the motor keeps helping you in the higher rpm whenever you need it. Ideally we want the FOC to ramp linearly from 80 at low rpm to 130 at high rpm/erps this should be a piece of cake to program in.
If your FOC is to high the motor simply loses timing and then you need to change gears. I don’t think it will cause any damage, I got the best value by many tests so this shouldn’t happen.
All the performance ebikes go to 120 now with almost full torque, reviews are brutal and people will stop buying bikes that won’t keep up with the trends.
I just wanted you to give it a quick try so you can compare, that’s all. It gives you a comforting sense of freedom.
Anyway I will look at the latest source and make my changes and see if it compiles. If it works then maybe you can add it as an option.
![]()
Will be riding Offroad today but won’t get a chance to try the new firmware till tomorrow. Using version 12 to test the temp sensor. Yes I’m also using the DZ version.
// ---------------------------------------------------------------------------------------------------------------------
// NOTE: EXPERIMENTAL and may not be good for the brushless motor inside TSDZ2
// Original message from jbalat on 28.08.2018, about increasing the limits on 36V motor -- please see that this seems to go over the recomended values
// The ui32_l_x1048576 = 105 is working well so give that a try if you have a 36v motor.
// This is the minimum value that gives me 550w of power when I have asked for 550w at level 5 assist, >36km/hr
//
// remember also to boost the max overdrive erps in main.h to get higher cadence
// #define MOTOR_OVER_SPEED_ERPS 700 // motor max speed, protection max value | 30 points for the sinewave at max speed
// ---------------------------------------------------------------------------------------------------------------------
You are right!! Probably it is safe to make a specific version of firmware. Still, it is always possible that user flash the wrong firmware version... -- well, but it is safe then what is now enable/disable temp sensor on LCD3, it is to easy/flexiblejbalat said:I think I am back up to 125 again, as well as the max erps there may also be a max cadence value set somewhere which I also bumped up. So yeah not too many changes
Just been thinking seriously about the temperature sensor installation and the potental for it to cause serious injury or...
For instance if the code sees the signal as a throttle signal as your motor starts heating up then it will lead to an out of control bike.
For this reason I can never use my old code again.
I’m even wondering whether it is worth making standalone No throttle version just in case. Either way this case should be considered with great care when implementing any new features or doing any changes in future.
1. Looking at the code I think it doesn't unfortunately. And you don't have ebrakes if I remember correctly...jbalat said:EC do you know if the level assist zero will kill all power if throttle is on ?
Ps. Discuss options with Casainho before you decide on a path forward
EndlessCadence said:1. Looking at the code I think it doesn't unfortunately.
This feature of sensor temp reading and motor current reducing due to high temperature works.EndlessCadence said:1. Looking at the code I think it doesn't unfortunately.jbalat said:EC do you know if the level assist zero will kill all power if throttle is on ?
Ps. Discuss options with Casainho before you decide on a path forward
2. Of course I do but from a safety point of view I think this very important (and easy to do). I didn't look into the temperature readout and limit code yet but didn't casainho already test this?
I fully agree with you. I would advice to not use the temperature sensor for now. I examined the code and I think it will definitely act as throttlejbalat said:EndlessCadence said:1. Looking at the code I think it doesn't unfortunately.
Well there is your first safety feature
No I don’t believe in ebrakes for torque assist bikes, none of the big brands are doing this, the fact they even introduced throttle is very disappointing too, if people are choosing throttle option they should have chosen a pas or hub motor.
Yes I agree.EndlessCadence said:Edit: thanks casainho, glad that it could work for now. I assume you agree with the idea of a separate hex file? :wink: