MU-01 MSX Yamaha mouse fix

By Edevaldo

Master (143)

Edevaldo's picture

06-01-2019, 22:58

I've been after an MSX mouse for a long while. It's probably been 28 years since I saw the first, and up to very recently, last one, in person. O bought a PS/2 mouse adapter for MSX that I was never able to make work even trying a ton of different mice with it. Lost many auctions (but didn't want to overpay). Until I finally got one from Yahoo in Japan! It seemed in very good condition and the seller made it positive that it would still work.

For my surprise, it came in the original box with the packaging (I added a couple pictures here for the curious) and looked almost new. The ball is in good condition but the mechanism was really dirty...

But I got really disappointed when connected it and it didn't really work. Buttons and Y axis worked as expected but X axis was jittery and would not move reliably.

I opened the mouse and checked for cleanliness which was ok. The mechanism was intact and the mouse circuitry used a 4MHz 4-bit microcontroller with, I believe, 1k of mask ROM in a DIP package and another SOIC chip which I determined to be an LM339 alike, with 4 comparators. I checked the waveforms reaching the MCU and for the Y axis they were the expected quadrature encoder waveforms. For the X axis the waveforms were short pulses not having the proper edge sequence that a quadrature encoder would generate.

Checking the output of the optical sensors I noticed that the the X axis sensors had slightly less amplitude than the Y ones. I only checked those with a multimeter by turning the encoder wheels.

I captured the sensor schematic in the figure bellow:

And it repeats 4 times, 2 for each axis sensors. The mouse had no markings or values, so those are my own labels. The operation is really simple, LDx1 infrared LED illuminates the DX1 photodiode. The light may be blocked by the encoder wheel as it turns, making pulses that the photodiode detects. As photons reach the photodiode they cause current to flow in the diode and a voltage drop to appear across the 1k8 resistor. When that voltage crosses the one on the other input of the comparator an edge is generated at the output of the comparator and the MCU counts those to measure displacement.

The 6k8 and 270 Ohm resistors set the comparator reference and the 100k resistor creates a small hysteresis of 10mV. The 3k3 resistors exists because the LM339 output is an open collector. All components were basically ok, just old. With no obvious defects.

I was surprised to see a photodiode here instead of a phototransistor. But I don't know what was available when this thing was designed. The way photodiodes like this work is that for each photon that reaches them there is a certain probability of causing an electron to pass through them. In some places this is called "quantum efficiency". A very similar thing goes for the LED. For every electron that goes though it there is a chance of it outputting a photon. And as LEDs age, their efficiency drops.

Considering that the LEDs have 8mA passing though them, and the efficiencies possible, and that most photons will get lost, the best you can have is a small fraction of 8mA passing through the 1k8 resistor when the sensor is fully illuminated. The voltage drop across it will be small. But it seems to me that the design of the sensor is a little marginal from the start and with LED aging and resistors drift the circuit lost sensitivity with time. Maybe it was connected to some musical instrument in some studio where it was on 24/7 for several years or something like that.

I fixed the problem by replacing the 1k8 resistors in the schematic by 3k6 ones in the 4 sensors and the mouse is now working properly. :-) Finally!

Over time it may become even less sensitive and require the LEDs to be replaced or the resistors increased again. But it would take years of continuous use... Or so I hope.

This mouse design seems to be very common in MSX mice and this problem may be very frequent. So I'm sharing my solution here.

Login or register to post comments

By Manuel

Ascended (18380)

Manuel's picture

06-01-2019, 23:44

Hi, great story! Please replace the image links in your post with links pointing to the actual JPEG file instead of the web page. Then they'll show up. Or perhaps a moderator can help here.

By Grauw

Ascended (10294)

Grauw's picture

07-01-2019, 00:02

By Edevaldo

Master (143)

Edevaldo's picture

07-01-2019, 00:30


Hi, great story! Please replace the image links in your post with links pointing to the actual JPEG file instead of the web page. Then they'll show up. Or perhaps a moderator can help here.

Thanks a lot for the hint, Manuel! I was scratching my head about this thinking the shortened url was pointing to the JPEG.
I tried to edit the post but it was too late, I can't edit anymore. Thanks for adding the images Grauw. First post with images... Next time. ;-)