Repair an Amiga mouse (and identifying mystery component) - Page 1
Forum section: electronics / repair

author: Turrican3
author_rank: Regular Contributor
timestamp: June 20, 2020, 09:59:03 am
content: Hey there, brand new user here, and a beginner as well! So I apologize in advance for anything inaccurate I'm going to write, still in the learning process so to say.I'm trying to repair a very old Amiga mouse, and while we're at it there's one or two components I am not sure about that perhaps some of you might help me identifying.But let's start with what I know.1.the Amiga is definitely ok: I own a couple of other mice and they work flawlessly2.quadrature signals (H, V, HQ, VQ) are present at mouse connector, but I have no idea about the relative timing: I currently own a ultracheap handheld oscilloscope that can only grab one signal at a time; nor I do know about the requirements for the signal to be recognised by the Amiga to be honest3.signals seem to be (assuming no calibration issues...) slightly below 5V on the non working mouse, slightly above 5V on the working unit4.the quad comparator IC LA6339 apparently gets 4.93V, while output levels seem to be around 4.78V;5.tons of smd stuff on the back side of the PCB, that I believe are resistors6.there's a voltage drop of about 1.11V on each IR emitter, I don't know about the receiver side (there's like a "cartridge" holder that won't unlock, and I'm worried about damaging it) butaccording to this siteit could be an OSRAM LPT80A phototransistor or something like thatNow, questions!a.first and foremost, any idea about what could be wrong? I'm planning to get a decent oscilloscope soon, so that I can at least have a look at both H/V and HQ/VQ simultaneously, but I wonder if I can do something already to diagnose the issueb.there are two blue "things" on the back of the PCB (see photos) that I can't recognise... multimeter says 0.2 Ohms, are they 0 ohm resistorors, i.e. basically a jumper or what?c.on the upper side of the PCB, near the quad comparator, there's a black thing that I can't recognise either, what could that be?That's all, hope I didn't forget anything important to report, I will happily do it though if needed.Please remember though I am a complete electronics newbie so don't assume anything about my knowledge(it's a long story that doesn't belong to this threadyet I hope I can fix as soon as possible by keeping studying electronics from - basically - zero)

author: Turrican3
author_rank: Regular Contributor
timestamp: June 20, 2020, 10:02:34 am
content: Adding photo of the upper side of the PCB in a separate post due to attachment constraints.

author: Kleinstein
author_rank: Super Contributor
timestamp: June 20, 2020, 10:18:09 am
content: The J1 part looks like a jumper, maybe a ferrite for EMI suppression. So I very much doubt it is a fault.With the mouse the most common problem is dirt, especially on the rollers in contact to the ball.The other point is often the switch for the left mouse buttonThe quadrature signals come from the photo-detectors and the xx339 chip make a clean digital signal from that.A looks like variant of the LM339.

author: m3vuv
author_rank: Super Contributor
timestamp: June 20, 2020, 10:29:49 am
content: is it a ball mouse or optical?

author: Turrican3
author_rank: Regular Contributor
timestamp: June 20, 2020, 10:31:59 am
content: Quote from: Kleinstein on June 20, 2020, 10:18:09 amGreat to know, thanks!Right now I don't believe there a dirt issue, as you can see the mouse has been disassembled so I can freely let the X/Y wheels roll, yet the pointer does not move at all.Quote from: m3vuv on June 20, 2020, 10:29:49 amIt's an original Commodore part with a ball.

author: Kleinstein
author_rank: Super Contributor
timestamp: June 20, 2020, 11:02:35 am
content: Compared to a PC mouse the amiga mouse is very simple: just the 2 optical decoders and some comparators / Schmidt triggers (AFAIK one of my Amiga mice has an 74hc14). So one could check the quadrature signals before and after the comparator.A possibly problem would be misalignment of the optics part or aging of the IR LED. Some 1.1 V at the IR emitters sounds about right. Too much ambient light can also be a problem, especially with an open case.

author: Turrican3
author_rank: Regular Contributor
timestamp: June 20, 2020, 11:12:44 am
content: Since I do have quadrature signals at the mouse port, is there anything clearly noticeable/wrong that I should check?Can I assume the optical part is ok with this kind of results or not?

author: Ian.M
author_rank: Super Contributor
timestamp: June 20, 2020, 11:41:44 am
content: http://www.pavouk.org/hw/en_amigamouse.htmlThe X and Y axes are mostly independent. The only parts they have in common are the series circuit powering their IR LEDs and the fact they each use two channels of the same quad comparator IC, so as both axes are bad those are the areas to concentrate on.Power the mouse from a current limited 5V supply (not the Amiga, as there's no need to risk it), and scope each of H, HQ, V and VQ in turn while manually rotating the corresponding axis roller. Make sure the scope input is DC coupled. IIRC it needs to output TTL compatible logic levels so high must be >3.3V and low <0.8V, and you are looking for a good clean rectangular pulse train, but only when you turn the roller. I would expect the LM339 outputs to go all the way up to Vcc when unloaded and to pull down to 0.3V or less as it has open collector bipolar outputs. You'll probably need to shield the board from your bench lighting to prevent side illumination of the photosensors messing up the signals.The Amiga will accept any near-quadrature pair of signals, and the low two bits of the mouse position registers are directly decoded from the quadrature signals, so even serious mark/space ratio distortion that resulted in non-overlapping signals that cant increment/decrement the higher bits of the position registers should still result in the pointer jittering by a couple of pixels.You can check the quadrature overlap by connecting a pair of high intensity LEDs between the pair of signals for the axis and ground, then rotate the roller very slowly by a finger on the edge of its encoder wheel. The LEDs should go through the cycle both off, one on, both on, other one on, returning to both off, i.e only one LED should change state at a time. If you've got a logic analyser you could also hook up all signals to that and check the quadrature overlap directly. If you find any problems, check the voltages at the + and - inputs of that signal's comparator as you turn the encoder very slowly. The - in should be fixed at near enough 1V by the resistor divider, common to all channels, and the - in should go up and down by an adequate margin around that voltage, with smooth transitions.

author: Turrican3
author_rank: Regular Contributor
timestamp: June 20, 2020, 12:18:47 pm
content: Hey @Ian_M thanks to you, too!As I said I currently have very limited tools available, but a proper oscilloscope should be coming soon.Didn't think of LEDs as a diagnostic tool, I will definitely give it a try!I will also check the comparator (I think when you say voltage going up and down you actually refer to the + input, right?), but if I recall correctly it did NOT have 1V at the - pins. That might be something to further investigate perhaps?I will also provide scope grabs of each quadrature signal if needed, I understand one is not enough.PS: I've seen that schematic but resistor values do not seem to match at all with my unit

author: shakalnokturn
author_rank: Super Contributor
timestamp: June 20, 2020, 12:44:01 pm
content: The most common problem I've encountered with mice is the wire itself, mostly breaking just before the mouse.This is not always visible, the multiple strands break inside the cable, you can sometimes get the feel of it being slightly more supple.If you're getting a slightly lower Vcc measured on the defective mouse it could be that the wires do have higher resistance than on the working one, also check the condition of contacts on the plug.A good check to start with is continuity on all conductors between the DB9 and the solder-side of the connector in the mouse.Anything with a noticeable resistance is suspicious.

author: Turrican3
author_rank: Regular Contributor
timestamp: June 20, 2020, 12:54:32 pm
content: Thanks @shakalnokturn, I'll check that too, although it seems output is already "low" at the comparator 4 Vouts.Sooo many variables!

author: Turrican3
author_rank: Regular Contributor
timestamp: June 21, 2020, 04:29:57 pm
content: Ok I think I have some interesting news.While trying to troubleshoot the mouse, its "daughter board" (for the lack of a better word) that holds the left and right buttons lost one wire. Since they were working I decided to remove all of them to concentrate on the X/Y movement.I connected the mouse to the Amiga again and to my huge surprise, vertical axis seemed to (mostly) work! I said mostly because it seem to lose some bits while going in the up direction but I'd say it's definitely better! I have no idea why or how would the mouse button affect X/Y movement by the way.Thanks to the Amiga Test Kit diagnostic software I am also able to confirm that, while no visible horizontal movement is present, I do see a VERY little (horizontal) jittering in the dedicated test section.So... I then tried the LED method suggested byIan_M, and unless I'm doing things very wrong, I have the impression I rarely get the condition where both LEDs get turned off, if ever. Please note I did this check directly at the mouse connector, which is also sealed (it's the infamous L-shaped one, which I hope I can keep intact)Lastly, I moved to the comparator, where I found another suprise (or at least, it was a surprise with my current knowledge, and the way I thought the circuit would work that is)Not only are the - inputs changing values whenever I rotate the wheels (within a range of roughly 0-250mV), but the + inputs slightly change too, always tied with the wheel rotation but with a far narrower range (roughly 210-230mV). I was expecting the - input, not the + one, to remain reasonably stable, but I guess that's just because I'm in the early learning stage.That's all for now.

author: Ian.M
author_rank: Super Contributor
timestamp: June 21, 2020, 05:43:33 pm
content: So it sounds like that schematic doesn't apply to your mouse. You'll need to do some circuit tracing to figure out the differences. Swapping + and - comparator inputs in that circuit would still work, though I *THINK* swapping them may reverse the axis direction. It sounds like the IR LEDs may be weak, which could cause the signal to shift relative to the threshold and distort the output mark/space ratio till the pulses no longer had a quadrature overlap.It may be worth changing the comparator as 'low hanging fruit' to see if it helps. It looks like theLA6339isLM339compatible.

author: Turrican3
author_rank: Regular Contributor
timestamp: June 21, 2020, 05:54:08 pm
content: Quote from: Ian.M on June 21, 2020, 05:43:33 pmYeah I'm quite confident this is the case, as I said resistors are SMD so they have their value easily readable (color codes are a nightmare to me!) and do not match at all with that schematic.Soon I should have a (cheap, but decent) oscilloscope and a desoldering gun, so I'll report back hopefully in a more accurate way about the quadrature, and also give a try at swapping the comparator with a brand new IC.Meanwhile, I'll do my best to build a schematic.Thanks again!

author: Kleinstein
author_rank: Super Contributor
timestamp: June 21, 2020, 07:19:05 pm
content: Chances are the comparators are wired to get some hysteresis: usually one has some weak link from the output to the +input of the comparator. This is kind of needed here so that the comparator does not flicker when the signal is close to the edge.Getting 0-250 mV from the encoders sounds reasonable. However than the level at the +inputs should be more like 100-150 mV and not at some 220 mV. So this could be weak LEDs and a trigger level not suitable to the weak signal. Chances are it could be easier to adjust (change a resistor or 4) instead of changing the LEDs.

author: Turrican3
author_rank: Regular Contributor
timestamp: June 21, 2020, 07:34:49 pm
content: Quote from: Kleinstein on June 21, 2020, 07:19:05 pmI would definitely hope you're right, especially since the IR area (especially the receivers) wouldn't be easy to access... regarding the receivers it seems I cannot pull out the "shell" at all!

author: Kleinstein
author_rank: Super Contributor
timestamp: June 21, 2020, 08:13:10 pm
content: So far it looks like the receivers are Ok. It is more like the LEDs are weak, or the reference level is a little high.For crude first test one could try increasing the current to the IR LEDs a little with an extra resistor in parallel. There should be some 3 V at the resistor, so some extra 470 Ohms in parallel would give another 6 mA - this could be detectable, but still OK for the Amiga and LED. It is probably time to find a more accurate schematics for this mouse version. The circuit is relatively simple and symmetric, so reverse engineering should not be too difficult.P.S. the photo is not very sharp, but just good enough to see the circuit: There are comparators with hysteresis. To adjust the Level one could add a resistor (e.g. some 470 Ohms) in parallel to those resistors 4 with 271 marking, going from ground to the 4 +inputs. For the first test use just one direction.It is usually easier to just add a second resistor on top than removing the old one.

author: Turrican3
author_rank: Regular Contributor
timestamp: June 21, 2020, 08:20:11 pm
content: Quote from: Kleinstein on June 21, 2020, 08:13:10 pmTotally agree, and to be honest I'm a bit surprised that a relatively popular machine like this (yeah I know the A1000 didn't exactly set the charts on fire, but it's not like a few thousands, ultra-niche/exotic hardware either) doesn't have schematics available somewhere... even though Commodore probably built a ton of more or less subtly different mice, I would have thought information wouldn't be so difficult to find.Oh well, I'm going to try and do it myself, it will probably be a good exercise as well and perhaps, if I'm succesfull, it might help others too. :-)

author: Tomorokoshi
author_rank: Super Contributor
timestamp: June 21, 2020, 10:53:09 pm
content: I have three Amiga mice, and they all have different circuit boards. The plastic buttons had to be molded differently also.

author: Turrican3
author_rank: Regular Contributor
timestamp: June 22, 2020, 05:44:24 am
content: @TomorokoshiCrazy, yet somehow understandable... knowing Commodore it wouldn't surprise me if this was a cost saving measure. Was it effective? I don't know.@KleinsteinJust saw your edit. I'm going to post a better photo, meanwhile may I kindly ask you about the resistors you mentioned? I think I can only see one or two 271 marked ones that could fit your description, i.e. going to a + input (again, I apologize in advance if this is something extremely obvious, don't forget I'm a newbie)

author: Kleinstein
author_rank: Super Contributor
timestamp: June 22, 2020, 05:57:09 am
content: The photo is just good enough. I see 4 resistors with 271: 2 near the wheel on the right, one near the hole near the center and one near the top right.The pinout of the 339 comparator can be a bit confusing, it is different from the quad OPs

author: Turrican3
author_rank: Regular Contributor
timestamp: June 22, 2020, 06:17:09 am
content: Thanks!So, if I get it right, you suggest trying to put a resistor in parallel with every single one of those 271 marked ones, but to avoid doing unnecessary work it would be better to start with just one of those?

author: Kleinstein
author_rank: Super Contributor
timestamp: June 22, 2020, 07:12:56 am
content: One may have to add parallel resistors to 2 to see an effect (e.g. fix one axis). Every resistor is for one of the quadrature signals so it would only improve one of the signals.

author: Turrican3
author_rank: Regular Contributor
timestamp: June 22, 2020, 07:22:29 am
content: Yup so then it would be better to start with the axis that is currently giving more issues (the horizontal one)

author: Ian.M
author_rank: Super Contributor
timestamp: June 22, 2020, 08:11:02 am
content: Rig a gear-motor with a wheel with a smooth rubber tyre, so you can turn the axis roller at a constant speed, and try changing the value of one of the resistors while scoping the output waveform.I suggest tack soldering several inches of Kynar wire wrap wire or moderately fine magnet wire to each end of the resistor in question, with breadboard compatible pins at the other end of the short wires, so you can try different resistors in parallel by simply plugging them into a small breadboard. The aim is to get the duty cycle as near as possible to 50% when the roller is turning at a constant speed.I suspect that if you get both the signals for an axis to 50% duty cycle they'll have sufficient overlap to restore normal quadrature operation. The only way that could fail to help is if a phototransistor has been bent out of alignment.

author: Turrican3
author_rank: Regular Contributor
timestamp: June 22, 2020, 08:22:32 am
content: @Ian.MThat seems brilliant!Unfortunately right now I don't have any Kynar wire nor any suitable motor.I think I could steal the breadboard trick suggestion though so I can fiddle with resistor values.PS: better PCB picture coming in seconds

author: Turrican3
author_rank: Regular Contributor
timestamp: June 22, 2020, 08:38:11 am
content: Here's the PCB picture in good quality(feel free to click to enlarge and get the full size image)

author: Ian.M
author_rank: Super Contributor
timestamp: June 22, 2020, 10:04:31 am
content: A motor would be better, and much easier to use for testing the duty cycle, but you could also put a long wide ribbon or strip of un-gummed paper tape under the mouse (with the ball in place) and pull it out at as steady a speed as you can manage.The next thing to do is either to print out that new photo A4 size, or use a paint program to edit it, and start labelling the signals (look in the Amiga manual for the mouse port pinout and use a DMM on continuity to identify each wire), and mark on it symbols and values for the top side components. If you have any difficulty identifying them post a high quality topside photo with the wires held out of the way. The electrolytic capacitor (little aluminum can in plastic sleeve) should have its value,and working voltage printed on its sleeve, together with a stripe to identify its negative lead.

author: Turrican3
author_rank: Regular Contributor
timestamp: June 22, 2020, 10:19:24 am
content: Quote from: Ian.M on June 22, 2020, 10:04:31 amSeems another great suggestion, that would likely help me with the schematic as well!(I already have the pinout labeled and continuity tested from the PCB to the connector, still a lot of work to do of course)

author: Turrican3
author_rank: Regular Contributor
timestamp: June 23, 2020, 06:02:00 pm
content: Hey guys I'm back with a VERY good update!(I'm still working on the schematic by the way)So, by adding the 470 ohm resistors in parallel to the 271 labelled ones, as suggested by @Kleinstein, I'm happy to confirm that both X and Y axis are now working (apparently) flawlessly! Tomorrow I should receive my scope so that I can have a visual confirmation of the quadrature signals being ok, but I'd say this is already a significant step forward.Now what?Should I try to source replacement IR LEDs?Or, should I just leave the current LEDs in place and just purchase different valued smd resistors (which value? the parallel between 270 and 470 or what?) instead?

author: Kleinstein
author_rank: Super Contributor
timestamp: June 23, 2020, 06:20:19 pm
content: It the parallel resistors solve the problem, I see no reason to change the LEDs. I would even consider leaving the parallel resistor construction.

author: Turrican3
author_rank: Regular Contributor
timestamp: June 23, 2020, 07:03:31 pm
content: I'm a bit worried about size, there's not a lot of space there.Perhaps the other option then, i.e. replacing the smd resistors with an adequate, different value?

author: Tomorokoshi
author_rank: Super Contributor
timestamp: June 23, 2020, 07:06:38 pm
content: Quote from: Turrican3 on June 23, 2020, 07:03:31 pmFor boards like when replacing parts it is very easy to lift tracks and pads. Can you show a picture of the modified board?

author: Turrican3
author_rank: Regular Contributor
timestamp: June 23, 2020, 07:29:21 pm
content: Absolutely!But it was meant to be a test so it's just the photo posted before, plus 4 regular resistors hanging around the solder side of the PCB.Would it be useful nonetheless?

author: Tomorokoshi
author_rank: Super Contributor
timestamp: June 23, 2020, 07:40:30 pm
content: Quote from: Turrican3 on June 23, 2020, 07:29:21 pmSure, got it. From that view if access is only available on the bottom side of the board then replacing the components with the equivalent part should be fine. Those tracks look quite robust.

author: Turrican3
author_rank: Regular Contributor
timestamp: June 23, 2020, 08:34:47 pm
content: Great!So what about the value then? Parallel of 270 and 470 Ohms as I guessed before or what?

author: Kleinstein
author_rank: Super Contributor
timestamp: June 23, 2020, 09:22:13 pm
content: The exact value of the resistance is not that critical. My estimate would be 180 ohms, as a standard value. 220 Ohms may work too, but it is not such a big step down from 270 ohms.I would expect that the space should be OK for 2x0805 stacked.

author: Turrican3
author_rank: Regular Contributor
timestamp: June 23, 2020, 09:29:07 pm
content: Awesome, thanks again.I don't think I have any brand new smd resistor available right now, but I own a decent number of non working boards, I'm quite confident something must be waiting to be desoldered and brought to (new) life.

author: Turrican3
author_rank: Regular Contributor
timestamp: July 05, 2020, 07:59:30 am
content: Sorry for the huge delay, I'm still waiting for the delivery of the SMD resistors (found nothing inside my small broken electronics bag/junkyard, and brand new parts are not available in my area unfortunately, so I had to resort to ebay) so here's at least I can share what I see for Horizontal and Vertical quadrature signals with the standard resistors in parallel with the original parts as suggested.As I said, the mouse currently seem to work flawlessly, I guess the quadrature signals are... ok-ish?