If you want to analyze what the motor is 'thinking' , you could consider downloading the specific Yamaha tool from the internet—though note that it is only for Windows 98. As far as I know, it is possible to run a Windows 98 emulator on a Linux computer, but I haven't tried that myself.I have not found any other software for this purpose. Here is the link from which I downloaded the Yamaha E-Bike Diagnostic Tool:
The bicycle was successfully analyzed by connecting the e-bike's control unit to a computer via a USB cable. The port on the bike is concealed beneath a small rubber cover and uses the older micro-USB standard.
From the same source, I also found a short PowerPoint presentation that explains how the software works. Here is the link to it:
The program also displays the battery voltage, total number of charge cycles, temperature, remaining battery capacity, total time since the first charge, and the battery charge level at the time the charging cable was connected.
This photo shows a front view of the internal cable connector. This connector attaches to the motor and links the motor's control unit with the battery's control unit. There are 5 pins inside the connector. Data travels between the motor control unit and the handlebar controller through this connector.
This photo shows a front view of the connector for the cable running between the motor and the battery. This connector is attached to the motor and links the motor to the battery. It has 3 pins.
This photo shows the plugs for the blue, white, and yellow power cables inside the motor.
This photo shows a plug located inside the motor. The wire colors are black, yellow, dark blue, white, and red. This plug connects the motor control unit and the handlebar controller.
On the left is the old, worn intermediate gear, and on the right is the new one. There is a freewheel mechanism inside the gear. I assume its purpose is to allow pedaling even when the electric motor is switched off.
Both sides of the electric motor opened up. The motor control unit is visible on the left, while the cover containing the inner part of the ratchet clutch is on the right. The outer part of the ratchet clutch is visible on the left side. After removing all the screws from the cover, I opened the motor at the mating surface using a knife and by carefully tapping with a hammer from all sides. At first, it feels as if nothing would happen, but once a tiny gap of a millimeter opened up and the sealant gave way, it came apart very easily. Immediately after opening it, I cleaned out all the plastic chips from the interior that had broken off the intermediate gear.
The motor control unit side, viewed from a slightly different angle
The motor control unit side, viewed from above. At the top, behind the PCB, the torque sensor is visible—the round metal part stamped with the number 3. The green PCB has a clear laquer coating.
A close-up of the electric motor cover with the new intermediate gear assembly
The motor control unit side, with the intermediate gear assembly held in place by hand in the position it occupies inside the motor.
I attached the electric motor cover, having first applied silicone sealant to the mating surface. The mating surface is flat and features six screws that must be tightened evenly. The screws require a torque of 5 Nm. Next, I attached the motor control unit and tightened its screws to 5 Nm as well. Then I put the motor back onto the bike—securing it with just one screw for the moment—so I could connect the plugs. Before disassembly, I had marked both ends of the connectors with tape to avoid mixing them up, It is probably impossible to put them in the wrong way around anyway. At this stage, the hardest part was stuffing all the cables and the plug under the cover.
Wiring diagram for cables and connectors:
Here are the explanations for all the error codes that appear on the bike's display when the motor is faulty. It might be a bit outdated, but it could provide some clues if the motor is broken.
Here is the documentation for the Yamaha battery pack. It is quite useful to know what the cables are for; the document also includes the cable color codes. By holding down the button on the battery pack for 5, 10, 20, or 30 seconds, you can access various pieces of information regarding the battery's status. For example, if you press and hold the button for 10 seconds and the LED for the lowest setting lights up, it indicates an imbalance between the cells.
Lastly, here is a general guide applicable to various types of e-bikes. I find this guide useful because it contains many isometric illustrations that explain the functions of different e-bike components.
To supplement these instructions, I recorded what the motor sounds like when a fault occurs due to a damaged gear interface, how to identify an error code by pressing the button on the handlebar controller, and how the Yamaha diagnostic software functions when connected to the bike.
This webpage features good photographs—specifically, arrows indicate which part is which—and it delves even deeper into the details of the motor. For instance, the author has recorded the tooth count for every gear, listed the order codes for the connectors, and itemized the codes for the various microchips. It’s a very meticulous piece of documentation. It appears that this POM intermediate gear has broken in their case as well—and even more severely than in mine.