Wednesday 5 July 2017

Yamaha CG-100A student guitar

The second guitar I bought for my students is a 1989 Yamaha CG-100A. I have a soft spot for old Yamaha classical guitars. This one was a level up from a student model, slightly better woods used and a glossier finish. A good clean up and fresh strings got it back to its original glory. As with the Musima I grabbed a few weeks ago, the more I played it the more it opened up.

The dimensions of both guitars are almost exactly the same down to the millimetre. I didn't realise there was such a standard for the shape of a classical guitar! The Musima is about 1mm narrower on the neck and the action is a bit lower so it's slightly easier to play. Both shall make good beginners guitars.

The Yamaha is Japanese specification but made in Taiwan, and the Musima is German...sooo Asia versus Euro :-) I had my wife listen as I played the same songs on both to see what she thought.

Results are Asia has a better bass, it felt like the bass was deep inside and not so much projecting out but booming from within like a subwoofer. It makes the guitar sound powerful, but muddy. Euro on the other hand has a mid and treble projection that leaps out of the guitar, but the bass is subdued. My Esteve on the other hand has clear trebles, mids and bass.

But don't take my word for it, have a listen! All captured exactly the same on my Zoom H1, unproceeded, all guitars wearing brand new D'Addario EJ45 strings

Musima 130:

Yamaha CG-100A:

Esteve 1GR11:

So, next stop, see if I can teach two twelve year old girls how to play some classical guitar!

Sunday 2 July 2017

Fender FM212R amplifier debugging

I do some volunteer work for the school music program, mostly easy stuff like restringing guitars, but I was asked if I could fix an amp. "I'll have a look at it." I didn't live to regret saying it, but it really pushed the limits of what I am capable of.

It's a Fender Frontman FM212R, the last of the Fender analogue amps. Analogue as in it is full of transistors and resistors and capacitors and not a single digital chip inside it. There are always going to be analogue circuitry in an amp, but most amps these days use digital processing for any effects like reverb and drive.

Straight up some potentiometers were noisy. As in, as you twist a knob, there are crackles and hiss and thumps and it's pretty awful. This happens a lot, behind each knob is a potentiometer that generally has a carbon film with a mechanical "wiper" that sweeps across the surface changing the effective resistance. Crackles when there is dust and any other crud building up on the carbon surface. They aren't sealed, so buy a can of electronics "Contact cleaner" that come with a thin straw and squirt some inside the potentiometer (there are generally a few access points) and twist the shaft a lot, most of the time they come good. If they don't it's probably because the carbon film is worn down, in that case, replace them.

I ended up replacing 4 of them, now be careful, some pots are "linear" and some are "logarithmic". Generally, if it is "A" that means it is logarithmic. "B" means linear. This has not always been the case, when in doubt check! A linear pot, when half twisted, will be half way through its resistance. For example an A10k half twisted will be at 5k resistance, whereas a logarithmic will be a lot less than that. Why? It's how our ears work, you generally have to double anything to make it sound twice as loud. If you used a linear pot you'd be at half volume by about position 3, and the difference between say 9 and 10, being maximum volume, you wouldn't hear any difference. Generally, people want to hear an audible difference between volume 9 and volume 10.

Anyway, that was the easy part. The hard part was that the amplifier was distorting.

To diagnose this you need a schematic diagram of the circuit, an oscilloscope to monitor what is going on in the circuit while it is operating, and say an electronic engineering degree and/or several years of experience debugging analogue circuits. I managed to find the schematic circuit (last seen here: http://www.nodevice.com/manual/fm212r/get126250.html), source an oscilloscope, and I do have an electronic engineering degree but was quite lacking in analogue circuit debugging. But I do like trying!

The way to approach this is to inject a waveform into the amplifier, and then use the oscilloscope to check what the amplifier is doing as the signal travels through the circuit. Injecting a waveform is as simple as plugging in your guitar and sounding a note - but what you really want is a continuous signal. I did this with my laptop, an online signal generating website, and a cable from the laptop headphones to the amp. Let me tell you how sick I am of a 440Hz sinewave. I mixed it up from time to time, changing the frequencies, but man, constant pitch is truly awful.

Now a fixed frequency sine wave doesn't tell you the full story - if the amplifier is failing only in different frequency ranges, you might not see the problem. Square waves are great, (insert engineering discussion), they contain all frequencies. The problem is when I injected a square wave and observed the output, it didn't match the square wave at all! This is to be expected as a guitar amp doesn't have to reproduce a square wave. So it's hard to tell what's right and what's wrong.

But I was in luck. The problem did show at lower frequiencies of sine wave. Not easy to hear, but easy to see on the oscilloscope. You can see in the photo the yellow input sine wave is distorted in the blue output signal (click to zoom). Moving slowly through the circuit, comparing the input signal against the output signal, I found the section of the circuit where the problem. Which was a big section of many transistors, diodes, resistors, and, well, it helped but I couldn't say "it's that part!"

I did some of the basics first - I resoldered a big area of that circuit, in case any of the components had a dry joint. I poked components with a wooden chopstick while it was operating to see it it made a change. No. The distortion sort of came and went, sometimes the amp would play fine. This is the worst sort of problem you can come across; intermittent failures.

I decided that it must be a heat issue. So, with a heatgun (I could have used a can of cold spray, but heatgun was easier) I pointed heat at small sections of the circuit board and watched the output on the oscilloscope. Eureka! A bunch of diodes very clearly showed the distortion changing with heat!

Did I mention I am an electronics engineer? I haven't done electronics for a living for 20 years, but I recognised the signal diodes as the crossover biasing diodes for the class AB amplifier stage. Quick summary - class B amps have matching complementary transistors (or FETs) that deal with half the load each, and the crossover between the transistors creates distortion, so class AB introduces diodes to pre-bias the transistor pair eliminating the distortion.

There was also a diode that I didn't recognise the function of, some sort of signal feedback from a later stage I'm guessing, sadly it was a different sort of diode to the rest being able to take a much higher voltage drop. I couldn't tell which of the 4 were the problem, so I ordered some of each online. You could only buy the diodes in packs of 200, but at $14 delivered for 400 diodes it's not really a problem.

Since a class AB amplifier has a symmetry, I also decided to replace the other set of diodes, even though they weren't showing a problem. As a minimum, the new diodes will be more balanced than a new one and an old one, or, if they failed on one side of the amplifier symmetry it was likely they may fail on the other side too.

I desoldered the diodes and popped the new ones in. Couldn't believe it, problem solved. Played through the amp for at least an hour, perfect.

Let me tell you, I was well pleased with myself, I nearly gave up a few times, it took me two months of stuffing around from time to time on it, trying to keep myself encouraged. On the day I sent it back to the music teacher I said "don't put it into production until you have rebuilt some confidence in it." And here's the difference between a cautious engineer and a music teacher - that very same day he put it into an evening concert...