anszom / SW102_LCD

24 stars 4 forks source link

waiting tsdz2 #4

Open alekk89 opened 1 year ago

alekk89 commented 1 year ago

Hi, I recently bought sw102, flashed 0.19.15 and updated to 1.1.0, also flashed the tsdz2 to 1.1.1 from [casainho] but when i turn everything on I get "waiting for tsdz2"

I found this version and tried it too, but it stays at starting screen (bicycle) only.

Any idea what the issue is?

anszom commented 1 year ago

Since both LCD firmwares report the same error - failure to communicate with the motor, my guess would be that there is a problem with the motor controller or its firmware. Perhaps it's using an incompatible protocol?

This project is compatible only with casainho's motor controller software (https://github.com/OpenSourceEBike/TSDZ2-Smart-EBike). The original TSDZ2 firmware and emmebrusa's fork use a different UART protocol.

alekk89 commented 1 year ago

Thank you for the reply Can you provide link to the exact motor firmware i should download? I used v1.1.1 from here https://github.com/OpenSourceEBike/Color_LCD/releases/tag/860C_850C_SW102_v1.1.0

anszom commented 1 year ago

Yes, it's been a while since I've worked on this, but I think this is the right firmware.

I can think of one more thing - the motor controller waits for the brake to be released before starting. So if there is a problem with the brake sensor, the motor (and by extension, LCD) will not start.

alekk89 commented 1 year ago

The sw102 I bought is 8 pin and do have cable for the break sensor, however I have connected only 5 pins and not the break signal from the display. I guess that might be the issue. I will connect that as well and check if it works. I didn't connect it as the guide i followed used a 5 pin sw102 which don't have the break signal cable and i thought it's pointless to connect it.

anszom commented 1 year ago

The brake sensor is a NO switch, so leaving it unconnected should have the same effect as having a brake that is never pressed.

alekk89 commented 1 year ago

Still, if i wait a minute or two it the message will change to "e: brakes" on the original 1.1.0 , I am unsure on what that means and how to fix it

anszom commented 1 year ago

This means the same - that the LCD could not establish communications with the motor. I assume that "e:brakes" is a suggestion that the brakes may be at fault here.

I would double-check if the wiring is correct. The next step would be to observe the UART lines with an oscilloscope (or a multimeter, as a last resort) and see if the LCD & motor are trying to communicate.

alekk89 commented 1 year ago

When I swap rx/tx I get to "e: RX" instead. Looking at the code:

case MOTOR_INIT_GET_MOTOR_ALIVE: fieldPrintf(&bootStatus2, _S("Error brakes", "e: brakes")); break;

case MOTOR_INIT_ERROR_GET_FIRMWARE_VERSION: fieldPrintf(&bootStatus2, _S("Error RX line", "e: RX")); break;

Does that look like a communication problem still?