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

buba said:
Rafe said:
Throttle still behaves as an on off switch but suspect you know that.

Did not know that! Same thing on the 0.19.0? Have seen conflicting reports stating that it does work and others that it is like a switch. I have the temperature sensor so have never even tested the throttle on the open source firmware.

Would you mind looking at the Technical Data, 11:1?
1. Does it scale appropriately?
2. Are you seeing around 127 when giving half throttle?
3. Is it really sensitive and goes 0 to 255 with basically minimal input?
4. What is the maximum value on 11:0 when giving full throttle?
6. What is the resting value on 11:0, no throttle applied?
7. What is the resting value on 11:1, no throttle applied?

I could rewrite the throttle code. Expanding the range of operation and enable users to have finer throttle control if that is something desirable.

With the bike on a kick stand

1. Yes from 0 - 255
2. Yes
3. No, It is quite linear , with only a small movement required to leave zero at the bottom end and it reaches 255 with just a little movement left at the top end.
Wheel starts moving at 5 reaches maximum speed at about 30 with no further increase of speed all the way up to 255. As the physical movement between 5 and 30 is so small and difficult even on the kickstand to achieve this must be why when riding the bike it feels like an on off switch. Edit: to ensure the throttle was not cutting out at maximum wheel speed I did this test again with that set to maximum (62mph) and in 1st gear and had the same result of approximately 30.
4. 182
6. 42
7. 0


You also asked me about Cadence on the BBS HD but since then Perryscope has replied and I could not add anything useful to his (or her) excellent answer. I also set my BBSHD up a couple of years ago and have never had to revisit the settings. The throttle works like a throttle though :)

Thank you for taking an interest but don't put yourself out too much over it. I tend to use the manual throttle in a sudden situation where it is not possible to pedal and just need it to keep the bike moving and it does that just as it is now except it can be too much help. For now though I will disable cadence mode as your other 3 modes are more than enough to play with and enjoy. If only someone would come up with a tougher plastic gear, the metal gear is too noisy but lasts forever and the blue gear is quiet but suddenly fails under too much load.
 
buba said:
The video tutorial of the Cadence Sensor Automatic Calibration:

[youtube]m05rFrDUGHg[/youtube]
Hello Buba,
waiting for a spare slot of time to install and test the v.20, I'm keeping updated with the task to perform once installed, in particular the cadence calibration.

You mention to tie the crank to the chainwheel to lock, I understand, the backwards rotation, in short to "remove" the freewheel. This is not clear as the video zooms to the display when everything is powered and some rotation occurs.
I am afraid I cannot do it the same way because I mounted the 30T chainwheel from futurebike.
Could you explain if I can do it another way? Otherwise I will try to lock some of the teeth with the crank..

Here below my setup.
IMG_20180921_102250.jpg

Thanks
 
58 (on the road) km's done with 0.20.0 alpha2 (36V motor/battery combination).

There is indeed a small backward resistance, it didn't disappear as andrea_104kg mentioned, but it doesn't bother me.
When the cadence reaches +-90, then the motor power drops. I then just shift gear. I didn't notice that with 0.19.0, but I assume that both I and the motor were to enthusiastic with 0.20.0alpha.
The throttle is as Rafe describes, but my throttle usage is limited to keep the bike going at certain occasions. I can live with how it works today.

I really, really enjoy riding my bike with OSF!
Congrats to all contributors.

@casainho: I am looking forward to use the 850C display on OSF.
 
thineight said:
buba said:
The video tutorial of the Cadence Sensor Automatic Calibration:

[youtube]m05rFrDUGHg[/youtube]
Hello Buba,
waiting for a spare slot of time to install and test the v.20, I'm keeping updated with the task to perform once installed, in particular the cadence calibration.

You mention to tie the crank to the chainwheel to lock, I understand, the backwards rotation, in short to "remove" the freewheel. This is not clear as the video zooms to the display when everything is powered and some rotation occurs.
I am afraid I cannot do it the same way because I mounted the 30T chainwheel from futurebike.
Could you explain if I can do it another way? Otherwise I will try to lock some of the teeth with the crank..

Here below my setup.
IMG_20180921_102250.jpg

Thanks

Is it not be possible to remove 2 chainring bolts and zip tie the crank through the bolt holes for the cal?
 
bwb said:
@casainho: I am looking forward to use the 850C display on OSF.
Are you having any issue with 850C running our firmware?
 
casainho said:
bwb said:
@casainho: I am looking forward to use the 850C display on OSF.
Are you having any issue with 850C running our firmware?

No, I only started using OSF since 0.19.0 with LCD3, then switched to 0.20.0 and thought that 850C doesn't work yet with 0.20.0.
My display is opened, the correct programmer has arrived and I am keen to try it.
 
bwb said:
casainho said:
bwb said:
@casainho: I am looking forward to use the 850C display on OSF.
Are you having any issue with 850C running our firmware?

No, I only started using OSF since 0.19.0 with LCD3, then switched to 0.20.0 and thought that 850C doesn't work yet with 0.20.0.
My display is opened, the correct programmer has arrived and I am keen to try it.
Ok, so is up to you.
 
casainho said:
buba said:
Having runtime variables initialized to a value, not using the EEPROM in any way, minimizing structs and discarding all other instructions needed for the implementation we have today will be the best for programming memory.

I am pretty sure that every initialization value (other than 0) takes programing memory so we need to avoid it if possible.

1. Having runtime variables initialized to a value together with:
2. Not using the EEPROM in any way
3. Minimizing structs and discarding all other instructions needed for the implementation we have today will be the best for programming memory.

There are more instructions for what we have today than a simple:

static uint8_t ui8_motor_type = 48_VOLT_MOTOR;

I am comparing everything as a whole and not just the initialization.



casainho said:
buba said:
casainho said:
Maybe you can say how much memory in being used right now on the motor controller from the available 32 kbytes.
Yes, we are at 77 % used up and therefore 23 % left.
So I think we are in red zone because I think we should let 10% free for maintenance, then only 13% is left. I want to implement at least more 4 features:
- torque sensor full calibration
- configuration to disable PAS, torque sensor, brake sensor or wheel speed sensor, so in case of a failing while riding far from home we can still use the ebike
- field weakening to increase motor max RPM of current 4000
- password protection as used on KT-LCD3 and 850C LCDs original firmware but here the password paired with the motor controller

I think the 13% will not be enough for that 4 features and I am sure we will have other features in the list, like improving motor errors to give user more feedback of system state, etc.

So, we are on red zone already, we need to save every byte possible on the motor controller firmware.

Well I have optimized not only the new things but the whole system has gotten optimizations. In comparison, the 0.19.0 is at 66 % compared to 0.20.0 with 77 %! But the 0.19.0 got some optimizations as well so it is maybe better to compare to the 0.18.0 but that is not the point. What I am trying to say is if we move forward and consider every step there should be no problem to implement the things you are planning and still have space left for maintenance.
 
bwb said:
58 (on the road) km's done with 0.20.0 alpha2 (36V motor/battery combination).

There is indeed a small backward resistance, it didn't disappear as andrea_104kg mentioned, but it doesn't bother me.
When the cadence reaches +-90, then the motor power drops. I then just shift gear. I didn't notice that with 0.19.0, but I assume that both I and the motor were to enthusiastic with 0.20.0alpha.
The throttle is as Rafe describes, but my throttle usage is limited to keep the bike going at certain occasions. I can live with how it works today.

I really, really enjoy riding my bike with OSF!
Congrats to all contributors.

@casainho: I am looking forward to use the 850C display on OSF.

I will take a look at everything you have mentioned and everything should be solved in the 0.20.0 Alpha 3! Please let me know if I miss something or forget. But this is exactly why I love that you are out and testing! I get some great feedback and all this goes into making the Alpha 3 better :)
 
thineight said:
buba said:
The video tutorial of the Cadence Sensor Automatic Calibration:
Hello Buba,
waiting for a spare slot of time to install and test the v.20, I'm keeping updated with the task to perform once installed, in particular the cadence calibration.

You mention to tie the crank to the chainwheel to lock, I understand, the backwards rotation, in short to "remove" the freewheel. This is not clear as the video zooms to the display when everything is powered and some rotation occurs.
I am afraid I cannot do it the same way because I mounted the 30T chainwheel from futurebike.
Could you explain if I can do it another way? Otherwise I will try to lock some of the teeth with the crank..

Here below my setup.
IMG_20180921_102250.jpg

Thanks

Looking forward to hear your impressions!

It is a lacking video tutorial but wanted to get it out so at least there is something. I do apologize as the steps could be more descriptive.

When you lock the pedals to the crank they rotate with the motor. The motor rotates perfectly with no change in the rotational speed. Much easier than if we were to manually rotate the pedals and of course much more accurate.

I see you have a situation that requires another setup for the calibration. Maybe use some sort of metal wire to wrap around the pedal arm and attach it somewhere on the chainwheel?

Or maybe:

Rafe said:
Is it not be possible to remove 2 chainring bolts and zip tie the crank through the bolt holes for the cal?

Also, It would maybe possible to loosen one bolt and get a metal wire around that and of course have it wrap around the pedal arm.

There is not much pressure during rotation. So it is only important that the pedal arm rotates at a constant speed with the chainwheel and it does not need to be rock solid. You will see that is works when the value in the odometer field actually converges to a value.

Please let me know if you find a way or need more ideas how to do it! I do not mind at all throwing around ideas and trying to get it to work. My goal is that you only need to do this calibration once with your display and that is it. So I hope that makes it even more worthwhile.

(Nice bike! I see you have the Thudbuster, I can imagine it is a smooth ride!)
 
thineight said:
buba said:
The video tutorial of the Cadence Sensor Automatic Calibration:

[youtube]m05rFrDUGHg[/youtube]
Hello Buba,
waiting for a spare slot of time to install and test the v.20, I'm keeping updated with the task to perform once installed, in particular the cadence calibration.

You mention to tie the crank to the chainwheel to lock, I understand, the backwards rotation, in short to "remove" the freewheel. This is not clear as the video zooms to the display when everything is powered and some rotation occurs.
I am afraid I cannot do it the same way because I mounted the 30T chainwheel from futurebike.
Could you explain if I can do it another way? Otherwise I will try to lock some of the teeth with the crank..

Here below my setup.
IMG_20180921_102250.jpg

Thanks

I have the same chainring and did a simple hack to lock the crank... ;)
screwdrivere.JPG

Mr Perryscope
 
The backwards resistance in the new software is intermittent. For example power up and enable the 3 different modes (PTC) in turn and it is there and also in eMTB mode but after using walk assist there is no backwards resistance, then switch off and on again and it is back use walk assist and it has gone. That's just one example but I have noticed it come and go in use too. It's only a slight resistance though and nothing like it used to be.
 
nbdriver said:
Thanks buba for the answer about flashing .ihx, indeed it is working like a .hex file.
I tested the bike this morning to work, and everything went great, felt smoother and more reactive (Advanced cadence enabled and calibrated, thanks to your video :thumb:).

All that sounds great and I am ecstatic to hear that! Hope you enjoy the ride! :)



nbdriver said:
Just something confusing is that we have to configure a power limit (new) in Basic setup, and a max current (as before). These two settings are doing the same thing for me because if i want to limit motor power to 576w i set current to 12Amp (12amp x 48v) and so on. I agree that it is more convenient for the end user to have a power limit in watts, and not having to calculate it by himself :D

But it can also be confusing because if i have a current limit at 10Amps (48V battery) and a power limit set at 550Watts i suppose that i will not be able to reach that limit because current limit would have priority, am i right ?

You should set the battery current limit to the maximum current you can safely pull from your particular battery. But also the current you feel is safe for the motor in your riding environment. No calculations required.

But the wattage you set is the amount of power you want to be assisted. You can put this to whatever you like as the system will always take the lower limit of the two. So if you set the power limit to 1000 watts but the current limit is lower it will automatically use the current limit. If you set the current limit to 18 A and the power limit is lower then the power limit will be used.

You do not need to calculate anything nor match the values. Just set the limit you feel is more important and set the other limit higher.

So if you want to be sure that you get as much assistance as possible from the motor, but not exceeding a certain amperage and therefore limit motor heating, you can configure it to 10 amps and it will adjust the power so this condition does not exceed. But if you are more concerned of getting a certain power level at all times you can configure the power limit and the current will adjust so the power level is maintained. No limit is ever exceeded.



nbdriver said:
And also, i don't understand the difference between Power mode and torque mode, as it is always a multiplier of human input. What is the advantage of using one instead of the other ?

Power Assist:

1. Measure the torque sensor value and convert it to torque.
2. Measure the cadence.
3. Calculate human power, it is defined as torque * cadence.
4. The target motor power is calculated by human power * assist level multiplier. So if we measure a value of 200 watts human power and multiply it with an assist level multiplier of 2.0 we will be asking the motor to assist us with 400 watts motor power.

Result: the more you sweat the more assistance you will get.


Torque Assist:

1. Measure the torque sensor value.
2. The target motor torque is calculated by torque * assist level multiplier

Result: the more you push on the pedals the more assistance you will get.

There are no advantages. Just different experiences. Personal preference :)



nbdriver said:
last question, in the wiki, section Power Assist we find :
"The assist level multipliers sets the motor power as a factor of the power the rider is generating at the crankshaft. For instance, if a multiplier is set to 2.0 the motor will assist with 100 watts if the human power generated at the crank shaft is 100 watts."

Is it not with a multiplier of 1.0 that the motor should give 100W if the rider gives 100W ? it seems more logic to me to multiply the human power by a factor to find the motor power, i always understood the multiplier this way.

The wiki seems to have bugs and is in development :lol: Will change!


nbdriver said:
Thank you for this wonderful work, and i will update my impressions and findings. Also i'm still available to translate wiki to french, this would make the firmware accessible for more people.

Thank you for the kind words!

That would be great and is very generous of you! Maybe when the 0.20.0 is released and the wiki is finished together with the help from others as well!
 
andrea_104kg said:
but cadence calibration it's only for cadence mode or also for power and torque mode?

Cadence Sensor calibration is used for every riding mode and used for everything that uses the cadence sensor. It can improve several aspects and makes the system more responsive :)

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

For clarification:

PAS stands for Pedal Assist System. A hand throttle is not defined as PAS.

The torque sensor is a type of PAS.

The cadence sensor is a type of PAS.

The cadence sensor calibration improves the cadence sensor. Sometimes referred to as the PAS sensor... I think it is better to call it the cadence sensor for obvious reasons.
 
EDIT: Sorry double post this one was incorrect, see next post
 
perryscope said:
Rafe said:
buba said:
Rafe said:
Throttle still behaves as an on off switch but suspect you know that.

Did not know that! Same thing on the 0.19.0? Have seen conflicting reports stating that it does work and others that it is like a switch. I have the temperature sensor so have never even tested the throttle on the open source firmware.

Would you mind looking at the Technical Data, 11:1?
1. Does it scale appropriately?
2. Are you seeing around 127 when giving half throttle?
3. Is it really sensitive and goes 0 to 255 with basically minimal input?
4. What is the maximum value on 11:0 when giving full throttle?
6. What is the resting value on 11:0, no throttle applied?
7. What is the resting value on 11:1, no throttle applied?

I could rewrite the throttle code. Expanding the range of operation and enable users to have finer throttle control if that is something desirable.

With the bike on a kick stand

1. Yes from 0 - 255
2. Yes
3. No, It is quite linear , with only a small movement required to leave zero at the bottom end and it reaches 255 with just a little movement left at the top end.
Wheel starts moving at 5 reaches maximum speed at about 30 with no further increase of speed all the way up to 255. As the physical movement between 5 and 30 is so small and difficult even on the kickstand to achieve this must be why when riding the bike it feels like an on off switch. Edit: to ensure the throttle was not cutting out at maximum wheel speed I did this test again with that set to maximum (62mph) and in 1st gear and had the same result of approximately 30.
4. 182
6. 42
7. 0


You also asked me about Cadence on the BBS HD but since then Perryscope has replied and I could not add anything useful to his (or her) excellent answer. I also set my BBSHD up a couple of years ago and have never had to revisit the settings. The throttle works like a throttle though :)

Thank you for taking an interest but don't put yourself out too much over it. I tend to use the manual throttle in a sudden situation where it is not possible to pedal and just need it to keep the bike moving and it does that just as it is now except it can be too much help. For now though I will disable cadence mode as your other 3 modes are more than enough to play with and enjoy. If only someone would come up with a tougher plastic gear, the metal gear is too noisy but lasts forever and the blue gear is quiet but suddenly fails under too much load.

I have done some tests on the throttle as well

Would you mind looking at the Technical Data, 11:1?
1. Does it scale appropriately?
Yes but only uses half the throttle range
2. Are you seeing around 127 when giving half throttle?
Yes
3. Is it really sensitive and goes 0 to 255 with basically minimal input?
No there is control over the first half of throttle
4. What is the maximum value on 11:0 when giving full throttle?
184
6. What is the resting value on 11:0, no throttle applied?
43
7. What is the resting value on 11:1, no throttle applied?
0

I have recorded a video to try and show this, you should be able to see i hit full throttle with plenty of moment left and higher values showing on the screen for 11:1 also you can hear in the motor that the speed hits a limit at around a value of 90ish. Please excuse the rattle without a chain attached this motor is a bit noisy!

[youtube]uRr0T9F3EHw[/youtube]
 
Rafe said:
buba said:
Rafe said:
Throttle still behaves as an on off switch but suspect you know that.

Did not know that! Same thing on the 0.19.0? Have seen conflicting reports stating that it does work and others that it is like a switch. I have the temperature sensor so have never even tested the throttle on the open source firmware.

Would you mind looking at the Technical Data, 11:1?
1. Does it scale appropriately?
2. Are you seeing around 127 when giving half throttle?
3. Is it really sensitive and goes 0 to 255 with basically minimal input?
4. What is the maximum value on 11:0 when giving full throttle?
6. What is the resting value on 11:0, no throttle applied?
7. What is the resting value on 11:1, no throttle applied?

I could rewrite the throttle code. Expanding the range of operation and enable users to have finer throttle control if that is something desirable.

With the bike on a kick stand

1. Yes from 0 - 255
2. Yes
3. No, It is quite linear , with only a small movement required to leave zero at the bottom end and it reaches 255 with just a little movement left at the top end.
Wheel starts moving at 5 reaches maximum speed at about 30 with no further increase of speed all the way up to 255. As the physical movement between 5 and 30 is so small and difficult even on the kickstand to achieve this must be why when riding the bike it feels like an on off switch. Edit: to ensure the throttle was not cutting out at maximum wheel speed I did this test again with that set to maximum (62mph) and in 1st gear and had the same result of approximately 30.
4. 182
6. 42
7. 0

Would you mind testing one last thing so we can confirm something? :wink:

Can you set the power limit to 1000+ watt and increase the max battery current to 18 A? And then try the throttle and see if it reacts more as one would expect.


Rafe said:
You also asked me about Cadence on the BBS HD but since then Perryscope has replied and I could not add anything useful to his (or her) excellent answer. I also set my BBSHD up a couple of years ago and have never had to revisit the settings. The throttle works like a throttle though :)

Thank you for taking an interest but don't put yourself out too much over it. I tend to use the manual throttle in a sudden situation where it is not possible to pedal and just need it to keep the bike moving and it does that just as it is now except it can be too much help. For now though I will disable cadence mode as your other 3 modes are more than enough to play with and enjoy. If only someone would come up with a tougher plastic gear, the metal gear is too noisy but lasts forever and the blue gear is quiet but suddenly fails under too much load.

Okay, totally agree. Let us put Cadence Assist on hold for now and just think about it in the back of our heads. A lot of things going on now. There is a chance we will revisit this when everything else settles :)

Also agree on your comments regarding the gear!
 
perryscope said:
I have recorded a video to try and show this, you should be able to see i hit full throttle with plenty of moment left and higher values showing on the screen for 11:1 also you can hear in the motor that the speed hits a limit at around a value of 90ish. Please excuse the rattle without a chain attached this motor is a bit noisy!

Hmm... this just proves how much value there is in giving me as much information as possible. Nice!

Okay, so basically the throttle is a torque mode implementation so it only works when there is a load on the motor. That is why it bottoms out at around half throttle when there is no load. So when testing there needs to be a load on the motor.

If you try the throttle "live" outside and configure 1000+ watts and set the maximum battery limit to 18 A, does it operate any better?
 
Rafe said:
The backwards resistance in the new software is intermittent. For example power up and enable the 3 different modes (PTC) in turn and it is there and also in eMTB mode but after using walk assist there is no backwards resistance, then switch off and on again and it is back use walk assist and it has gone. That's just one example but I have noticed it come and go in use too. It's only a slight resistance though and nothing like it used to be.

Will solve this as soon as possible! And Rafe (+ all others) THANK you for the constant feedback!
 
buba said:
(Nice bike! I see you have the Thudbuster, I can imagine it is a smooth ride!)

Thanks, yes the Thudbuster smooths up the bumps you find along your paths, on a front MTB you can put some weight on the seat going downhill without risking your nuts each rock you hit :mrgreen: :mrgreen:
 
perryscope said:
I have the same chainring and did a simple hack to lock the crank... ;)
screwdrivere.JPG

Mr Perryscope

Thanks Perryscope, I see you do not have the chain mounted in your picture. Is that not required? In that case I would put a zip-tie somehow between the chainweel teeth and the crank.
How is the process of calibration, are the cranks rotating forward or backwards?

Thanks
 
thineight said:
perryscope said:
I have the same chainring and did a simple hack to lock the crank... ;)
screwdrivere.JPG

Mr Perryscope

Thanks Perryscope, I see you do not have the chain mounted in your picture. Is that not required? In that case I would put a zip-tie somehow between the chainweel teeth and the crank.
How is the process of calibration, are the cranks rotating forward or backwards?

Thanks

I understood it that the chain and drive did not need to be connected, but I may be wrong about that? ( buba can you confirm if this is ok?)
I just thought it was easier than trying to prop the bike up as i don't have a stand on this or the trike

The trike does not actually need a stand ;) and in this case lifting a wheel would be an issue as well it has a limited slip differential! I kid you not! so still drives forward with a wheel lifted, fun to ride on two wheels but not good for testing!

The calibration process drives forward slowly..
[youtube]9Owk0f0c7ys[/youtube]
 
buba said:
nbdriver said:
And also, i don't understand the difference between Power mode and torque mode, as it is always a multiplier of human input. What is the advantage of using one instead of the other ?

Power Assist:

1. Measure the torque sensor value and convert it to torque.
2. Measure the cadence.
3. Calculate human power, it is defined as torque * cadence.
4. The target motor power is calculated by human power * assist level multiplier. So if we measure a value of 200 watts human power and multiply it with an assist level multiplier of 2.0 we will be asking the motor to assist us with 400 watts motor power.

Result: the more you sweat the more assistance you will get.


Torque Assist:

1. Measure the torque sensor value.
2. The target motor torque is calculated by torque * assist level multiplier

Result: the more you push on the pedals the more assistance you will get.

There are no advantages. Just different experiences. Personal preference :)

Thank you buba for this complete answer, i will try power mode tonight.
 
Back
Top