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

OK, I just read this issue #65 on GitHub. When I checked speed sensor yesterday, it seems to be working without light. I was able to start motor assistance three or four times, but I did not do a real test drive. So, I think you are right!

Should I measure the battery current just of my lights? Would that be an interesting value for you to fix this issue? But I think an individual value for lights current would be fine, like you proposed on GitHub. Every bike has a different lights setup.

I'll check it this evening and inform again. Thank you very much!
 
Localhorst666 said:
OK, I just read this issue #65 on GitHub. When I checked speed sensor yesterday, it seems to be working without light. I was able to start motor assistance three or four times, but I did not do a real test drive. So, I think you are right!

Should I measure the battery current just of my lights? Would that be an interesting value for you to fix this issue? But I think an individual value for lights current would be fine, like you proposed on GitHub. Every bike has a different lights setup.

I'll check it this evening and inform again. Thank you very much!
Yes, just do like it is written on issue #65 on Github. Measure the battery while the motor is stopped and the lights are on and report.
 
@casainho Is it possible for future enhancement to save the odometer field? If i turn off using the battery switch, i think the information gets lost.
 
ezrider1199 said:
@casainho Is it possible for future enhancement to save the odometer field? If i turn off using the battery switch, i think the information gets lost.
Hi, it is saved I think. I disconnected battery for 2 days at the weekend and the value is still the same like on Friday. But I have an issue with the clock.

Maybe odometer will be saved if you turn off by using remote switch only!?
 
Localhorst666 said:
ezrider1199 said:
@casainho Is it possible for future enhancement to save the odometer field? If i turn off using the battery switch, i think the information gets lost.
Hi, it is saved I think. I disconnected battery for 2 days at the weekend and the value is still the same like on Friday. But I have an issue with the clock.

Maybe odometer will be saved if you turn off by using remote switch only!?
For the values to be saved, the user need to turn off the system as usually by long press on the ON/OFF button.
 
Maybe have like a frequent (but efficient) interval to save persistent values like the odometer or other future persistent values. For those who use other methods of turning the bike off

casainho said:
For the values to be saved, the user need to turn off the system as usually by long press on the ON/OFF button.
 
ezrider1199 said:
Maybe have like a frequent (but efficient) interval to save persistent values like the odometer or other future persistent values. For those who use other methods of turning the bike off

casainho said:
For the values to be saved, the user need to turn off the system as usually by long press on the ON/OFF button.
Please give details of why do you need, how do you use and how often?
 
casainho said:
ezrider1199 said:
Maybe have like a frequent (but efficient) interval to save persistent values like the odometer or other future persistent values. For those who use other methods of turning the bike off

casainho said:
For the values to be saved, the user need to turn off the system as usually by long press on the ON/OFF button.
Please give details of why do you need, how do you use and how often?

I have a rear and front light and most of the times i just shut off the battery switch which turns everything off. The lights are wired to a 12v step down, they have their own switches in a semi-convenient location but nothing is more convenient than just shutting off the battery switch.. like maybe its possible to save persistent values every 10 seconds or something.. this one is for the suggestion box :D

thank you
 
ezrider1199 said:
casainho said:
ezrider1199 said:
Maybe have like a frequent (but efficient) interval to save persistent values like the odometer or other future persistent values. For those who use other methods of turning the bike off

casainho said:
For the values to be saved, the user need to turn off the system as usually by long press on the ON/OFF button.
Please give details of why do you need, how do you use and how often?

I have a rear and front light and most of the times i just shut off the battery switch which turns everything off. The lights are wired to a 12v step down, they have their own switches in a semi-convenient location but nothing is more convenient than just shutting off the battery switch.. like maybe its possible to save persistent values every 10 seconds or something.. this one is for the suggestion box :D

thank you
Ok I understand. This is not a priority to me. Put this as an issue on Github , as a enhancement, so this will not be forgotten and maybe some other developer can implement this, on the display firmware.
 
ezrider1199 said:
casainho said:
ezrider1199 said:
Maybe have like a frequent (but efficient) interval to save persistent values like the odometer or other future persistent values. For those who use other methods of turning the bike off

casainho said:
For the values to be saved, the user need to turn off the system as usually by long press on the ON/OFF button.
Please give details of why do you need, how do you use and how often?

I have a rear and front light and most of the times i just shut off the battery switch which turns everything off. The lights are wired to a 12v step down, they have their own switches in a semi-convenient location but nothing is more convenient than just shutting off the battery switch.. like maybe its possible to save persistent values every 10 seconds or something.. this one is for the suggestion box :D

thank you
That would be a possible solution for my "light Problem" as well... Use a step down and not switching lights by software. [emoji1787]

@casainho
I just checked assistance regarding lights. My problem is caused by the lights! If they are switched on, the assist goes off. As soon as I turn them off, the motor turns on and it works very well!

Battery current = 0,2 amps (measured by display)

If you need a more exact value ,I have to use a measuring instument directly at the battery.
 
Localhorst666 said:
@casainho
I just checked assistance regarding lights. My problem is caused by the lights! If they are switched on, the assist goes off. As soon as I turn them off, the motor turns on and it works very well!

Battery current = 0,2 amps (measured by display)

If you need a more exact value ,I have to use a measuring instument directly at the battery.
Let´s see if I can do something for next version, I think it may take 2 weeks at least.
 
casainho said:
Localhorst666 said:
@casainho
I just checked assistance regarding lights. My problem is caused by the lights! If they are switched on, the assist goes off. As soon as I turn them off, the motor turns on and it works very well!

Battery current = 0,2 amps (measured by display)

If you need a more exact value ,I have to use a measuring instument directly at the battery.
Let´s see if I can do something for next version, I think it may take 2 weeks at least.

Thank you very much!
 
So I want to check the pinout of my motor/controller to determine how to hook up the display for flashing.

I was planning on setting the meter to 20V DC, and hooking up the black probe to an arbitrary pin. Then move the red probe to every other pin in succession to find the one that carries the battery voltage.

I am hesitant to do this because I'm worried I'll short something by not knowing which pin is GND. What if I hook up the black probe to the TXD pin for example and the red probe to the 52V pin? Will that send 52V down the TXD line and fry the controller? Or that's not how multimeters work and can safely take measurements this way?
 
Multimeters set to voltage have a very high input resistance. So measuring between +Vin and TxD shouldn't cause a problem.

You should be able to find the gnd wire by disconnecting your battery and waiting several minutes. next, measure the voltage between the battery minus connection (motor side) and one of the pins going to the display (also the motor side connector). If you are sure there is no voltage between those, measure the resistance between them. If the display pin is gnd, it should measure close to zero ohms between that display pin and battery gnd.

Once you know your gnd pin, reconnect the battery and find the pin that passes the battery voltage to the display.
If you reconnect the original display, you should have battery voltage on another pin when you turn the display on. That voltage is used to turn the motor controller on.

TXD and RXD signal might carry 3 - 5V on TXD. So the motor TXD should have a voltage and the display TXD should have a voltage.
TXD of the display should be connected to RXD of the motor and the other way around.

This doesn't give you the connections on display side. Without opening it and partially understanding how it's electronics work, those are hard to determine. If you use the wrong pin as gnd or connect more than 20V to the wrong pin, you will damage your display.
 
My assumption was that since the motor and the display work together, they’re both wired to be compatible.

And if I map the pin that carries battery voltage and ground on the motor side, then I know how to wire my home made flashing device to be the same.

Then it’s a matter of finding TXD or RXD bi I believe I can try one way and swap them if it was not crossed without causing damage.

This way I wouldn’t have to take the display apart, would I?

I’m confused with the voltage changing which pin it’s on when the display is connected. Does that matter for flashing the display, or would I be able to flash if I connect the 30V booster to the pin that I measured battery voltage on when the display was disconnected, ground, and RX + TX?
 
850C_v0.6.4 is the best ever. I skipped the previous version due to the hurry. Big thanks to casainho. I have the odo working, I also use the lights through the speed sensor splitter and I have no problem.
 
Alright so it was a bit of a PEBKAC issue. I had switched the + and - wires at the exit of the voltage booster... my pinout (at least GND and battery voltage) are as on the photo on the previous page. The display now turns on powered from a wall adapter rather than the battery so I have the right pins. But I might have accidentally shorted the serial lines because it behaves erratically when hooked up to the bicycle (was fine before)

I’ll try flashing again this weekend because I need the bicycle functional for commuting during the week.
 
Well, yes, display pinout and motor pinout should match, but the 850C is a display for bafang mid drive motors and you are using it on a TSDZ2 motor.
So originally, it's not just plug and play. If it worked before with the TSDZ2 motor, wiring should match.
 
A minor issue: this (see attachment) happens sometimes when I change graph by using "-" / down. I read somewhere that another guy experienced the same.IMG_20200128_204640.jpg
 
Same here. Ive seen it too once when changing the graph.

Localhorst666 said:
A minor issue: this (see attachment) happens sometimes when I change graph by using "-" / down. I read somewhere that another guy experienced the same.IMG_20200128_204640.jpg
 
Hey all, so I just recently upgraded to 850C_v0.6.4 and associated motor firmware and I'm finding that the assistance does not seem to be very linear. Perhaps I need to play with it a bit more but so far the assistance seems to have a curve to it.

Prior to this update, I would generally ride on assistance level 5 which was almost exactly 1:1 with human power. If my power was 100W, the motor power was right around there too. Now, I find that if I pedal softly, the motor power is less than human power and if I pedal harder, the motor power becomes more than human power.

Is this by design? I did run through the calibration steps and enabled the feature but that doesn't seem to change this significantly for me. Correct me if I'm wrong, but I thought the calibration helps give more accurate human power values but shouldn't affect the equation to turn that into motor power.
 
mrfusi0n said:
Hey all, so I just recently upgraded to 850C_v0.6.4 and associated motor firmware and I'm finding that the assistance does not seem to be very linear. Perhaps I need to play with it a bit more but so far the assistance seems to have a curve to it.

Prior to this update, I would generally ride on assistance level 5 which was almost exactly 1:1 with human power. If my power was 100W, the motor power was right around there too. Now, I find that if I pedal softly, the motor power is less than human power and if I pedal harder, the motor power becomes more than human power.

Is this by design? I did run through the calibration steps and enabled the feature but that doesn't seem to change this significantly for me. Correct me if I'm wrong, but I thought the calibration helps give more accurate human power values but shouldn't affect the equation to turn that into motor power.


I think a few posts here have been hinting at optimizing the torque assist characteristics. For me it was that 0.02 is a bit weak and 0.03 is much too strong. In 0.03 assist it can spike to over 500w whereas in 0.02 its hard to pass 260w. So i can echo your remarks as well that it seems the jump is non-linear. Maybe we should keep track of feedback regarding the assist in a single github issue ie the one i opened #67?
 
ezrider1199 said:
mrfusi0n said:
Hey all, so I just recently upgraded to 850C_v0.6.4 and associated motor firmware and I'm finding that the assistance does not seem to be very linear. Perhaps I need to play with it a bit more but so far the assistance seems to have a curve to it.

Prior to this update, I would generally ride on assistance level 5 which was almost exactly 1:1 with human power. If my power was 100W, the motor power was right around there too. Now, I find that if I pedal softly, the motor power is less than human power and if I pedal harder, the motor power becomes more than human power.

Is this by design? I did run through the calibration steps and enabled the feature but that doesn't seem to change this significantly for me. Correct me if I'm wrong, but I thought the calibration helps give more accurate human power values but shouldn't affect the equation to turn that into motor power.


I think a few posts here have been hinting at optimizing the torque assist characteristics. For me it was that 0.02 is a bit weak and 0.03 is much too strong. In 0.03 assist it can spike to over 500w whereas in 0.02 its hard to pass 260w. So i can echo your remarks as well that it seems the jump is non-linear. Maybe we should keep track of feedback regarding the assist in a single github issue ie the one i opened #67?

Perhaps... but this seems like a different issue to me. The changelog for this last release include "changed motor control to be motor current and not battery/motor power". This doesn't seem right to me (but maybe I don't understand it). It seem to me like the most natural assistance would be controlling the motor power in relation to human power. When I'm applying 100W of power to the pedals, I want 100W of power from the motor (or some other fixed ratio depending on assistance level chosen). Motor current should simply be the means of reaching the desired motor power. Perhaps I just don't understand the changelog but power did seem to be much more linear before this last update than it is now.
 
mrfusi0n said:
Perhaps... but this seems like a different issue to me. The changelog for this last release include "changed motor control to be motor current and not battery/motor power". This doesn't seem right to me (but maybe I don't understand it). It seem to me like the most natural assistance would be controlling the motor power in relation to human power. When I'm applying 100W of power to the pedals, I want 100W of power from the motor (or some other fixed ratio depending on assistance level chosen). Motor current should simply be the means of reaching the desired motor power. Perhaps I just don't understand the changelog but power did seem to be much more linear before this last update than it is now.
Previous, the motor current was always set to max value of 30 amps while the battery current was controlled. Now it is the inverse, battery current is always set to max value of 16 amps and motor current is controlled.

Looking at your feedback, maybe we should keep control the motor current BUT also the motor power in a way to limit the motor max power for it to be motor power = pedal human power * assist level factor. What do you think?

If so, then we would need 2 assist level factors for each assist level number:

1. motor current = human power * assist lever factor, for instance: motor current = 100 * 0.05 = 5 amps

2. motor power = human power * assist lever factor, for instance: motor power = 100 * 2.5 = 250 watts
 
casainho said:
Previous, the motor current was always set to max value of 30 amps while the battery current was controlled. Now it is the inverse, battery current is always set to max value of 16 amps and motor current is controlled.

Looking at your feedback, maybe we should keep control the motor current BUT also the motor power in a way to limit the motor max power for it to be motor power = pedal human power * assist level factor. What do you think?

If so, then we would need 2 assist level factors for each assist level number:

1. motor current = human power * assist lever factor, for instance: motor current = 100 * 0.05 = 5 amps

2. motor power = human power * assist lever factor, for instance: motor power = 100 * 2.5 = 250 watts

So, I'm actually going to take back what I said before. Or, at least, I need to test things out a little more. It appears something was acting up a bit for one of my last rides - torque sensor? I saw "human power" spike to 1000, then 1500, then up to 3000! I never knew I was so strong! :lol: Not sure what that was but the power assist on my ride earlier today seemed much more linear and human power was back in the normal range the entire time:
https://docs.google.com/spreadsheets/d/1UL2lGQy4usVbnjHrrx6Ie_yhc4UYNL2slb0MwKjYQ14/edit?usp=sharing

I'm also re-reviewing electric motor concepts: torque vs electrical power vs mechanical power. Initially, I thought motor power = human power (or another direct ratio) would be ideal but it might not be that simple. Perhaps motor toque = human torque would be better? I think that's essentially what you have now since torque should be directly related to motor current.

Thanks for your hard work! I'll continue playing around with this and maybe gather some more data...
 
Back
Top