casainho said:Note that is valid for also SW102, so, I think that information should be in upper level of the instructions.
I can't find a suitable place higher up, so added the same warning to the SW102 page.
casainho said:Note that is valid for also SW102, so, I think that information should be in upper level of the instructions.
rcx194 said:Calibrated the torque sensor on my TSDZ2 today using a baggage scale and human weights.... jeeze does it make a difference to the ride! Power delivery is now awesome!
I'm curious, with the factory firmware and display, are the torque sensors calibrated at the factory?
Best way of running 1.0 beta1 is with the calibration disabled. I had not appreciated why until I read this. Many thanks!vshitikov said:The linear curve instead of logarithmic make assist very weak at the low cadence and I have to press even harder on the pedals to make my bike moving after the stop. I also experienced an uneven assistance while rotating a pedal, like if I had a oval chain-ring. I think this comes from the fact that the assistance is not averaged through the chainring rotation.
James Broadhurst said:Best way of running 1.0 beta1 is with the calibration disabled. I had not appreciated why until I read this. Many thanks!vshitikov said:The linear curve instead of logarithmic make assist very weak at the low cadence and I have to press even harder on the pedals to make my bike moving after the stop. I also experienced an uneven assistance while rotating a pedal, like if I had a oval chain-ring. I think this comes from the fact that the assistance is not averaged through the chainring rotation.
wpenner said:Hi,
I'm trying to update a TSDZ2 kit that came with a 850c display. Is there any problem opening the display and flashing using SWD STLINKV2. Will i end up with the same result result as if i used a bootloader box? I already have the stlink, but don't really have time to and money to order the bootloader box?
Thanks to anyone who can help with this maybe easy question.
wpenner said:wpenner said:Hi,
I'm trying to update a TSDZ2 kit that came with a 850c display. Is there any problem opening the display and flashing using SWD STLINKV2. Will i end up with the same result result as if i used a bootloader box? I already have the stlink, but don't really have time to and money to order the bootloader box?
Thanks to anyone who can help with this maybe easy question.
Well i can confirm this is probably is not a good idea. Flashed my screen and my motor and now the bike does not turn on with the power button and black display on 850C. Is is possible i was supposed to use a file that does not say bootloader on it. I tried to follow these instructions that say pick a file with *bootloader.bin
https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/Flash-the-firmware-on-850C-using-SWD
casainho said:- solve SW102 lock issues on configurations menu
Yes.Nfer said:Is your display setup in metric units and the weights in kilograms?
Well I am still bigger fan of the previous implementation of eMTB (based on torque) where I could just set coefficient and make the logarithmic curve less or more exponential. It was simple and effective.James Broadhurst said:Best way of running 1.0 beta1 is with the calibration disabled. I had not appreciated why until I read this.vshitikov said:The linear curve instead of logarithmic make assist very weak at the low cadence and I have to press even harder on the pedals to make my bike moving after the stop. I also experienced an uneven assistance while rotating a pedal, like if I had a oval chain-ring. I think this comes from the fact that the assistance is not averaged through the chainring rotation.
Many thanks!
You say you don't have bootloader box. If you flash through 850C tabs you have to use .bin file not bootloader.bin file.wpenner said:wpenner said:Hi,
I'm trying to update a TSDZ2 kit that came with a 850c display. Is there any problem opening the display and flashing using SWD STLINKV2. Will i end up with the same result result as if i used a bootloader box? I already have the stlink, but don't really have time to and money to order the bootloader box?
Thanks to anyone who can help with this maybe easy question.
Well i can confirm this is probably is not a good idea. Flashed my screen and my motor and now the bike does not turn on with the power button and black display on 850C. Is is possible i was supposed to use a file that does not say bootloader on it. I tried to follow these instructions that say pick a file with *bootloader.bin
https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/Flash-the-firmware-on-850C-using-SWD
casainho said:[...]Benoit said:casainho said:Are there are many others things to do that I think have higher priority:
- solve SW102 lock issues on configurations menu
- solve lights issue
- automatic shutdown does not work
- Trip (with quick reset): time, distance, Wh
- Short Trip: time, distance, Wh
- kms range estimation, based on Wh used of current short trip, last 5 or 10 minutes
- disable sensors: brake, cadence and torque
Maybe I can start to work on the trip features. It's something I could easily test and verify. Is that ok for you ?
Well, should we invest time to develop all this little details?? I don't known... I would instead invest my time on the wireless new version as for long rides, that type of users will value more using a Garmin Edge device that already implements this features and they are implemented already in conjunction with other important trip data and fitness, and recorded on the cloud.
Well, is up to you to decide in which project you prefer to invest more.
Benoit said:Anyway, I tried to compile then flash firmware. For the 860C, no problem, I can successfully compile it and flash the display, everything is working well.
But for the motor, I did not have "stm8-size" and "stm8-objcopy" commands. I've search on the web and found some informations. I tried to install stm8-binutils (https://stm8-binutils-gdb.sourceforge.io/) but the last step "make install" report me some errors at the end ("*** [Makefile:1754: install-recursive] Error 1" and 3 more)
So for now compilation give me a "main.elf" file. Is this enough ?
I'm using a Debian 10 command line environnement (which contains source code and is used for compiling) and VS code on Windows 10 for developping (remote SSH).
Thanks for the help !
Thanks !vshitikov said:Benoit said:Anyway, I tried to compile then flash firmware. For the 860C, no problem, I can successfully compile it and flash the display, everything is working well.
But for the motor, I did not have "stm8-size" and "stm8-objcopy" commands. I've search on the web and found some informations. I tried to install stm8-binutils (https://stm8-binutils-gdb.sourceforge.io/) but the last step "make install" report me some errors at the end ("*** [Makefile:1754: install-recursive] Error 1" and 3 more)
So for now compilation give me a "main.elf" file. Is this enough ?
I'm using a Debian 10 command line environnement (which contains source code and is used for compiling) and VS code on Windows 10 for developping (remote SSH).
Thanks for the help !
you don't need them. I compile simply with this line in the makefile. But I compile on Windows.
# How to build the overall program
$(PNAME): $(MAINSRC) $(RELS)
$(CC) $(INCLUDES) $(CFLAGS) $(ELF_FLAGS) $(LIBS) $(MAINSRC) $(RELS)
the other lines with objcopy and stm-size are commented. Then you can rename the file in .hex if necessary
wpenner said:wpenner said:wpenner said:Hi,
I'm trying to update a TSDZ2 kit that came with a 850c display. Is there any problem opening the display and flashing using SWD STLINKV2. Will i end up with the same result result as if i used a bootloader box? I already have the stlink, but don't really have time to and money to order the bootloader box?
Thanks to anyone who can help with this maybe easy question.
Well i can confirm this is probably is not a good idea. Flashed my screen and my motor and now the bike does not turn on with the power button and black display on 850C. Is is possible i was supposed to use a file that does not say bootloader on it. I tried to follow these instructions that say pick a file with *bootloader.bin
https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/Flash-the-firmware-on-850C-using-SWD
I'm fairly confident it is an error on the wiki page. I flashed one that did not say bootloader, and now it says "waiting for tsdz2" for a couple of seconds then the display shuts itself off(next problem to figure out)
Benoit said:Thanks !vshitikov said:Benoit said:Anyway, I tried to compile then flash firmware. For the 860C, no problem, I can successfully compile it and flash the display, everything is working well.
But for the motor, I did not have "stm8-size" and "stm8-objcopy" commands. I've search on the web and found some informations. I tried to install stm8-binutils (https://stm8-binutils-gdb.sourceforge.io/) but the last step "make install" report me some errors at the end ("*** [Makefile:1754: install-recursive] Error 1" and 3 more)
So for now compilation give me a "main.elf" file. Is this enough ?
I'm using a Debian 10 command line environnement (which contains source code and is used for compiling) and VS code on Windows 10 for developping (remote SSH).
Thanks for the help !
you don't need them. I compile simply with this line in the makefile. But I compile on Windows.
# How to build the overall program
$(PNAME): $(MAINSRC) $(RELS)
$(CC) $(INCLUDES) $(CFLAGS) $(ELF_FLAGS) $(LIBS) $(MAINSRC) $(RELS)
the other lines with objcopy and stm-size are commented. Then you can rename the file in .hex if necessary
I tried to compile it on Windows juste after posting my last message and it worked (I did not yet flash it however)
That's what I'll do so. I would prefer to compile both firmwares on Linux but the essential is I can compile .
andyme said:wpenner said:wpenner said:wpenner said:Hi,
I'm trying to update a TSDZ2 kit that came with a 850c display. Is there any problem opening the display and flashing using SWD STLINKV2. Will i end up with the same result result as if i used a bootloader box? I already have the stlink, but don't really have time to and money to order the bootloader box?
Thanks to anyone who can help with this maybe easy question.
Well i can confirm this is probably is not a good idea. Flashed my screen and my motor and now the bike does not turn on with the power button and black display on 850C. Is is possible i was supposed to use a file that does not say bootloader on it. I tried to follow these instructions that say pick a file with *bootloader.bin
https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/Flash-the-firmware-on-850C-using-SWD
I'm fairly confident it is an error on the wiki page. I flashed one that did not say bootloader, and now it says "waiting for tsdz2" for a couple of seconds then the display shuts itself off(next problem to figure out)
are you sure your wiring is 100% ok? I was away from this thread for over a year now. I had left it when the 805C was still in a very early stage with jtag programming and i still had that display on the shelf. not being up to date really, i installed the bootloader file. this did not work, but also did not ruin anything. i then installed the correct file and got the waiting for tsdz2 message. I opened the display and found that one of the cables had come loose. after resoldering it correctly everything worked out fine immediately.
so according to me there is absolutely no problem using the jtags if you do not make a mistake with the wires.
wpenner said:andyme said:wpenner said:wpenner said:Well i can confirm this is probably is not a good idea. Flashed my screen and my motor and now the bike does not turn on with the power button and black display on 850C. Is is possible i was supposed to use a file that does not say bootloader on it. I tried to follow these instructions that say pick a file with *bootloader.bin
https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/Flash-the-firmware-on-850C-using-SWD
I'm fairly confident it is an error on the wiki page. I flashed one that did not say bootloader, and now it says "waiting for tsdz2" for a couple of seconds then the display shuts itself off(next problem to figure out)
are you sure your wiring is 100% ok? I was away from this thread for over a year now. I had left it when the 805C was still in a very early stage with jtag programming and i still had that display on the shelf. not being up to date really, i installed the bootloader file. this did not work, but also did not ruin anything. i then installed the correct file and got the waiting for tsdz2 message. I opened the display and found that one of the cables had come loose. after resoldering it correctly everything worked out fine immediately.
so according to me there is absolutely no problem using the jtags if you do not make a mistake with the wires.
Thanks for the suggestion i have reflashed the motor and display multiple times, but have had problems every time. I am only programming the "current tab" as instructed (program > Current tab) do i need to go into the data tab to sort my strange problems?
Version 6.2 with .51motor - Works but up and down buttons for display are backwards, and i can not open config menu, when i hold down arrow walk assist turns on and motor moves.
Version 8.0 with .57 motor - Works and i can finally now get into config menu by holding all buttons, but when i press walk assist mode motor moves for .5 seconds and entire system restarts
version 1.00 beta1. Display boots and says waiting for TSDZ2.
GPIO_Init(GPIOB,
(GPIO_PIN_7 | GPIO_PIN_6 | GPIO_PIN_5 | GPIO_PIN_3),
GPIO_MODE_IN_FL_NO_IT);
benno said:Hello
Your progress with the bluetooth displays looks great!
I have another two questions about the implementation:
(1) In the adc initialization (adc_init()) you initialize Pin 3,5,6,7
There is no analog Signal on Pin 3. However, the torque signal is on Pin 4 whichCode:GPIO_Init(GPIOB, (GPIO_PIN_7 | GPIO_PIN_6 | GPIO_PIN_5 | GPIO_PIN_3), GPIO_MODE_IN_FL_NO_IT);
is not initialized here. Is there any reason for that or is it a mistake?
As the torque reading works fine, i did not change it so far.
benno said:(2) You explicitly prevent the motor from going over a certain max rotational speed (erps) (at least
in the implementation before you had field weakening).
Is it harmful for the motor to go over that speed? In my experience it just does not deliver any power anymore
if it reaches a certain speed.
Please share your notes about the derivation so we all can learn.benno said:By the way, i tried to derive the equations for the foc advance angle. According to my
calculations the angle should be twice as big as it is now.
I did some testing where i keept the motor speed constant and varied the foc angle.
At the optimum foc angle the power consumption is at a minimum.
My findings were that the 2x the current foc angle is usually quite close to the minimum for
all the operating conditions i tested.
static Field batteryMenus[] =
{
FIELD_EDITABLE_UINT(_S("Max current", "Max curren"), &ui_vars.ui8_battery_max_current, "amps", 1, 20),
FIELD_EDITABLE_UINT(_S("Low cut-off", "Lo cut-off"), &ui_vars.ui16_battery_low_voltage_cut_off_x10, "volts", 160, 630, .div_digits = 1),
FIELD_EDITABLE_UINT(_S("Resistance", "Resistance"), &ui_vars.ui16_battery_pack_resistance_x1000, "mohm", 0, 1000),
FIELD_SCROLLABLE("SOC", batterySOCMenus),
FIELD_READONLY_UINT(_S("Voltage est", "Voltag est"), &ui_vars.ui16_battery_voltage_soc_x10, "volts", false, .div_digits = 1),
FIELD_READONLY_UINT(_S("Resistance est", "Resist est"), &ui_vars.ui16_battery_pack_resistance_estimated_x1000, "mohm", 0, 1000),
FIELD_READONLY_UINT(_S("Power loss est", "Power loss"), &ui_vars.ui16_battery_power_loss, "watts", false, .div_digits = 0),
FIELD_END };
static Field torqueSensorMenus[] =
{
FIELD_EDITABLE_UINT(_S("Torque sensor ADC threshold", "Torq s thr"), &ui_vars.ui8_torque_sensor_adc_threshold, "", 5, 75),
FIELD_EDITABLE_ENUM(_S("Assist w/o pedal rot", "A w/o ped"), &ui_vars.ui8_motor_assistance_startup_without_pedal_rotation, "disable", "enable"), // FIXME, share one array of disable/enable strings
FIELD_EDITABLE_ENUM(_S("Coast brake", "Coast brak"), &ui_vars.ui8_coast_brake_enable, "disable", "enable"),
FIELD_EDITABLE_UINT(_S("Coast brake ADC", "Coa bk ADC"), &ui_vars.ui8_coast_brake_adc, "", 5, 255),
FIELD_SCROLLABLE("Calibration", torqueSensorCalibrationMenus),
FIELD_END };
FIELD_SCROLLABLE("Battery", batterySOCMenus),