RIAA phono preamp for Tascam M-1B Line Mixer

In the workshop I have a couple of these Tascam M-1B line mixers. They’re a very useful box: they have eight inputs, each with a level control and pan pot, which are mixed together and fed into a master volume control. There’s also a pair of headphone outputs with their own volume control driven by a headphone amplifier with enough voltage swing to drive 600 ohm headphones properly. Into the mixer I typically feed the sound output of my PC, other audio sources such as a cassette player (yes!), and a spare cable lying around on the workbench ready to connect to whatever I’m working on, or my phone. The output is connected to the workshop speakers. With this setup I can hear all the sources at once without fiddling around, switching anything or unplugging anything.


Tascam M-1B Line Mixer

The workshop I set up a couple of years ago turned out to have space for a new audio source: a turntable. Great! I can listen to vinyl (not ‘vinyls’, please). I had a spare turntable on the shelf, so I put it in place. The trouble is, the turntable has a magnetic cartridge which can’t be connected straight to the line inputs on my trusty mixer. It needed amplification and RIAA equalisation. I could have just gone and bought an off-the-shelf preamplifier, but where’s the fun in that? Looking at the back of the Tascam mixer, there’s a blanking plate which looks perfect for adding a preamplifier, neatly built in. No worries about trailing cables or yet another power supply to plug in. Now to find a suitable circuit.


A quick web search pulled up an application note from National Semiconductor for their LM833 audio op-amp which shows a simple preamplifier circuit. It then goes on to describes the circuit’s deficiencies and how a two-stage design can improve on it, but I decided to stick with the simple version.

I didn’t have any LM833 op-amps in the spares box, but did have some NE5532s, which are not only an excellent audio op-amp but live two to a package. Finding the passive components in the spares box also proved to be a challenge. Getting the right component values is one thing, but finding two identical ones of each proved to be impossible. However, all was not lost, so I thought. The RIAA equalisation curve needs three time constants, of 75µs, 318µs and 3180µs. I found pairs of resistors and capacitors that gave the same time constants as R1C1 and R2C2 even if their values weren’t what the original design specified. Here’s a circuit diagram with my substitutions marked in red.


I built up a small piece of matrix board and tried it out. It worked, but didn’t sound quite right: there was a noticeable lack of bass. I decided to check the frequency response. The application note shows a useful table of the RIAA response at various spot frequencies, so I had something to compare my results with. I used the ARTA STEPS program with a PC sound card to measure the frequency response of my circuit. It took a bit of fiddling with the levels to get good results, since the phono preamplifier has a lot of gain, but the result looked like this.


The curve looks convincingly like the RIAA curve, but it should be +17dB at 50Hz (relative to 1kHz). In fact it’s more like +13dB in my version, so I’ve lost 4dB of bass. At the other end of the spectrum it’s more accurate: at 20kHz it’s at almost exactly -20dB as it should be. (Note, when taking readings from the plot, that the level at 1kHz is about -3dB. It’s the relative levels that are important).

What I’d neglected in my component value calculations was that the relative values of the two RC networks are also important. The National Semiconductor application note actually goes on to explain more about this, but I hadn’t read any further than the circuit diagram. Rather than delving in to the maths and risking discovering that I needed more components I didn’t have, I started playing with the values I actually did have. Here’s a plot of the before-and-after empirical results.


The green curve is the modified version. The level at 50Hz is now +17dB relative to the level at 1kHz, as it should be. Below 50Hz there’s a bit of a rolloff, but that’s not something I’m worried about – my speakers don’t go down that low and it makes for a useful rumble filter. The modified circuit is shown here.


I had to change both RC networks to get a good result. The time constant of one of them (11k/6n8) is still 75µs, but the other (180k/22n) is more like 4000µs than 3180µs. I suspect it’s interacting with the time constant of R0C0 to give roughly the right result.


It fits neatly in to the slot in the back panel of the mixer. The toggle switch connects the output of the preamplifier to inputs 1 and 2. Switching it off leaves those inputs available for normal line-level use if desired. There’s also an earth terminal.


Time for some testing. What were the skies like when you were young?



The Euroquadruped, or the solution to wall wart Tetris

Having relocated from the UK to Poland, the change in mains plugs has never quite been resolved. All the equipment that came from the UK has 13A plugs on it, and all the local sockets are the CEE 7/5 type. Then there are locally-acquired bits and pieces  which generally have two-pin Europlugs. No matter how many adapter cables and extension leads I make, or change the plug or socket on, there’s always something that doesn’t fit, or won’t reach the nearest compatible socket.

Of particular annoyance are various chargers and wall warts. They’re all bigger than a standard Europlug, and there’s no standard for which way the ‘lump’ of the charger will be attached, so connecting several of them in to a multi-socket extension lead doesn’t work well. Often one charger will obscure one or more sockets in such a way that all the things you need just won’t fit, or the whole assembly becomes so big and unwieldy that things start falling out under their own weight.

It is therefore with some relief that I announce the debut of the Euroquadraped: one 13A plug with short cables to four Europlug sockets. It reminded me of an octopus but only has four ‘legs’, hence the name.


Getting all four cables in to the 13A plug was a bit fiddly, but choosing a roomy plug helped. The little Europlug sockets are neat. I’ve only seen them here in Poland. The finger ring to discourage pulling on the cable is a nice touch, and doubles as a cord grip internally. They even (finally) have safety shutters on the socket holes, roughly 60 years after shutters became standard on the British 13A socket…

The great advantage of this thing is that each socket is independent of the others and can find its own equilibrium with whatever electrical carbuncle is plugged in to it.


It’s trivially simple, but it’s going to save a lot of frustration in the workshop.

Canon S100 Shutter Button Fix

This is my Canon S100 digital camera. After long, somewhat arduous service, the shutter button started playing up: it would focus but not take the photo. Eventually I got a mobile phone with a better camera and quietly forgot about the Canon. The S100 has been extensively frozen, boiled, soaked, rattled and trodden on, so I figured that the shutter button problem was just due to the abuse. It doesn’t owe me anything. However, it’s still useful for some things the phone camera won’t do: it fits a tripod, and has good long exposure and manual control facilities including a handy neutral density filter.


Trying to use it to take some tricky oscilloscope photos the other day, the shutter button got really annoying. I searched on line for the problem and discovered that it’s quite common. That sounded like an interesting problem to me. Here’s my attempt at fixing it.

Before we start, don’t try this unless you’re used to dealing with annoyingly tiny things and have the tools to match: jeweller’s screwdrivers, tweezers, a very fine soldering iron and either amazing close-up vision or a good magnifier.

The camera comes apart surprisingly easily. There are six little black screws on the outside: two on each end and two on the bottom, close to the tripod mount. Take those screws out. The back comes off very easily – take care not to lose any of the buttons though.


The front also comes off easily, though there’s a little FFC connector to the setting ring round the lens. Unplug it carefully. It doesn’t have a locking bar so the flex PCB just pushes in and out. There’s also a foam gasket round the lens and the plastic cover for the HDMI and USB sockets. They’ll fall on the floor.


The shutter button and other controls are underneath the top cover. There are two more screws to remove: one on the front near the lens and one on one end. They’re different lengths so take note of where each came from. Before removing the top, there’s one more FFC to unplug. This one connects to the microphones. Again it has no locking bar so just pull gently. It’s the middle of the three FFCs in this photo.


With the top cover off, the controls themselves are revealed. On the left here, the function selector rotary switch, then the shutter button and zoom switch, then the power button, and on the right the big square thing is the GPS antenna.


If you put the battery back in, the camera actually works fine in this dismantled state, so it’s easy to try experiments. I prodded and poked the shutter button. Sometimes it worked, sometimes it didn’t. I doused the button with my favourite contact cleaner (DeoxIT D5) to no avail. I looked on the web for replacement buttons: “double action tactile switch” seemed to be the best thing to search for. There are lots out there which might fit, but they’d take a while to get hold of and would be really fiddly to solder, especially with the zoom switch so close by.

I wondered about a mechanical solution, extending the plastic rod from the outside shutter button that presses the switch to give it more poke, but sometimes the switch just refused to work no matter how hard I prodded it with a screwdriver, so that probably wasn’t worthwhile.

Given that it wasn’t worth spending a lot of time on what’s effectively a life-expired camera, an alternative engineering solution was called for. The first stage of the shutter button, the half-press to lock the focus and exposure, still works reliably. What if I just wired it in parallel with the shutter release contact? Then there would be no way to lock the exposure and focus, but at least the camera would take photos.

Some fiddly soldering with a fine iron bit and some polyurethane-insulated mod wire later, the two opposite corner contacts on the button are connected…


…and the S100 lives again. It’s not a full fix, call it a workaround, hack or bodge, but it’s good enough for me to take pictures. Oh yes, and assembly, as somebody once said, is the reverse of disassembly.

Garage door opener life extension

This little thing is really annoying. It’s the remote control for our electric garage door, and I use it several times a day to get my bike in and out. Luxury, pure luxury. Or it would be, if it worked properly. The trouble is that about half the time after pressing the button, it locks up, stuck either on, with its little red LED lit, or off, so it won’t open or close the door, and drains the battery. The only way to fix it is to pull it apart, take out the battery, and put it back in without losing any of the bits of plastic. You can imagine how much fun that is with gloves on, in the rain, when you’re in a hurry. Yeah, yeah, first world problems, I know. But there doesn’t seem to be any way of opening our garage door manually, which is a nuisance.


Inside is a little PCB containing a PIC12F635 microcontroller and a simple 433MHz transmitter circuit using a couple of transistors and a resonator. I did all the obvious things: replace the battery, clean the board with solvent, all of that. Nothing helped. It seems there’s a bug in the PIC’s software which makes it prone to locking up. The switch under the button is rather worn and thus suffers from contact bounce, and I think that’s what’s upsetting it.

I tried filtering the signal from the button to the PIC with an RC network. That didn’t help: the PIC didn’t even respond to the button any more. Presumably it needs a fairly quick risetime to trigger an interrupt, or something similar.

There is a second button which is less worn. It transmits a different code which doesn’t seem to do anything on our garage door, but it never crashes the PIC. I considered swapping the switches over, but they’re surface-mount and glued down, and the chances of removing both of them and successfully soldering them down again undamaged were slim.

I wondered about rewiring the PCB so that the input to the PIC is always active, and the button just switches the power to the PIC. A quick test by adding a blob of solder and removing and reconnecting the battery showed that wasn’t going to work: the PIC just didn’t transmit. It needed to have the power applied and then have the button activated.

There was another issue to address. The button, when it worked, was prone to getting pressed by accident as the bunch of keys rattled around in my pocket. That led to the garage door opening itself at odd times, which wasn’t great for the security of our bikes. Somehow modifying it to be less prone to accidental operation would be nice. 

Design changes were called for. Since the second button is redundant, I decided to convert it in to a power switch, so it has to be held down while the real button is pressed, and releasing it will guarantee that the power is cut from the PIC so it can’t remain locked up. I cut the power track to the PIC and took advantage of the PCB layout to add a P-channel MOSFET in series with it, then cut the track from the second button to the PIC’s input and wired it to the MOSFET’s gate. The buttons both have one terminal to battery negative. A pullup resistor between gate and source completes the circuit.


Here’s the modified board. You can see the remnants of some of my previous repair attempts, and the extra MOSFET and pullup resistor at top right. Now, to open or shut the door, I have to hold down the button on the right and press the left button, rather like using a shift key on a keyboard.

It seems to work reliably now, so leaving the house and returning are considerably quicker and less stressful. 

Incidentally, I did the repairs and modifications in the office, which is several miles away from the offending garage door. To check that the remote was actually transmitting properly, I used my Tektronix 7912AD programmable digitizer with 7A29 vertical plugin. Originally intended for high-speed laser and nuclear physics research, it’s kind of overkill for testing a garage door opener, but its 700MHz bandwidth is plenty fast enough to get a clear picture of the transmission using just a loop of wire connected to the input. Analogue technology at its very finest. Here’s its TV output connected to a little LCD monitor showing the 433MHz signal from the remote.


Replacing the screen of a Wileyfox Swift phone

For the last couple of years, my wife has been using a Wileyfox Swift phone. For a budget smartphone, it’s had a few niggles but has generally been very good. A few weeks ago we and the phone got caught in an almighty rainstorm and the phone got wet. Leaving it to dry overnight didn’t help: it just made a funny fizzing noise when we put the battery back in.

I took it apart and discovered that water had got trapped in various places, not least the internal connectors to the display, cameras and so on. Some tracks on the display ribbon had completely corroded away overnight! Lesson one: if a phone gets wet, take it apart to dry it out properly. Don’t wait and see what happens.


I dried out everything else with warm air and tried the phone again. It seemed to work, giving a little vibrate when I switched it on and showing the charging LED correctly. But there was nothing on the screen. Since the damage to the display connector was plain to see and nothing else seemed to be wrong, I thought I’d try changing the screen.

A replacement screen was only £25 from a Chinese supplier on eBay. It arrived quickly, very well packed with a dinky little bag of tools too, but absolutely no instructions. I couldn’t find any on the web, either. Lots of stories about Wileyfox’s screen replacement policy, but no description from anyone who’d actually done it. Well, here’s how I did it. Or, more precisely, how I’d do it again next time – I did the dismantling in the wrong order which made it unnecessarily difficult. Many of these photos were actually taken while I was reassembling the phone.

First, unclip the back of the phone in the usual way as if to change the battery or SIM card.


Take out the battery and undo all the little screws which hold the inner case on. I think there are nine of them and one of them is behind a sealing sticker. Use a spudger or fingernail to gently unclip the inner case from the phone’s frame, and the insides will be revealed. Notice here the red spotty sticker – a tell-tale that the phone has been wet.


This much dismantling is enough to see whether the phone will work with the new screen. The screen connector is at the top left, labelled ‘BY’ in the photo. Flip up the brown tab with a fingernail and the flexible PCB will come out. It’s easy enough, though a bit fiddly, to plug in the replacement screen, wedge the battery in place and switch on.


Joy! It works. The repair is worth continuing with. Now, remove the battery and gently unclip the black plastic assembly at the bottom right.


The whole phone is a miracle of industrial design and packaging, but the way the display is fitted is kind of awkward. It has a flex PCB which goes all the way from the bottom of the display up the inside of the phone to the motherboard connector, and runs behind the big identification sticker. Even more odd is the arrangement in the bottom left hand corner: a chip which I believe is the touchscreen controller sticks up on a bit of flex PCB through a hole in the phone’s frame, folds back on itself and has another connector which connects it to another part of the display flex PCB, so the whole thing forms a kind of knot around the frame.

To remove the screen successfully, it’s easiest to remove the motherboard first. There are various connectors to remove:

  • display connector at top left, if you haven’t already done it
  • selfie camera connector also at top left (flip up the black tab)
  • another connector with a white flip-up tab by the SIM sockets

Remove the two screws holding the PCB and gently unclip it – it has clips on the left and right edges. Now there are two connectors to remove from the underside of the board:

  • tiny ribbon plug which goes to the USB socket. This will probably just drop off itself, but it’s really fiddly to put back.
  • U.FL-type antenna connector on the right hand size. Carefully prise it off with fingernails or tweezers.

The vibrator motor is attached by soldered connections on another flex PCB. I left it attached, but it might be possible to unclip it from the frame or desolder the connections. Be careful, it’s fragile.


Note how the screen flex PCB  goes underneath the sticker. It turns out that it also runs underneath the USB flex PCB. Peel off the sticker (a bit of gentle heat helps to soften the glue) and peel back the USB flex PCB. I had to score the screening tape between the two flexes.


Now the screen flex PCB is free all the way to its hole through the frame near the bottom of the sticker.

Now to untangle the fiddly bit at the bottom left. First, unplug the little connector by easing up the black tab. Mine also had a bit of yellow Kapton tape holding it down. Withdraw the flex PCB from the connector and straighten out the folded flex PCB with the chip and connector on it – it’s held in place by sitting on a little peg on the frame.


Now the screen is fully disconnected. Time to remove it from the front of the phone.

The screen is bonded to the Gorilla Glass sheet which forms the front face and touchscreen. This in turn is just stuck to the phone’s frame with double-sided tape. I used a heat gun to warm the glass and soften the adhesive, and a combination of a Stanley knife and spudger to ease it away from the frame. The glass is surprisingly strong and flexible: I managed not to break it.



Once the tape has all softened and come off, the screen’s flex PCBs should come free with a bit of wriggling. Now clean off the self-adhesive goo. I used a spudger and car brake cleaner for this. The surfaces of the frame should be clean and smooth ready to accept the new screen.IMG_20171008_112802.jpg

The new screen needs a bit of preparation before fitting. The little connector for the touchscreen has to be disconnected:


and it needs some self-adhesive tape applying, because it doesn’t appear to come supplied with any. I used little bits of carpet tape (!), shown in the photo below still with its yellow backing paper on.


Now thread the screen’s flex PCBs through the holes in the frame where they should fit, being particularly careful with the folding chip thingy, and the touchscreen ribbon which is easy to get trapped and forget about. Once you’re happy that the flex PCBs are sitting in the right places, peel off the backing from your double-sided tape with a scalpel or tweezers and stick the screen in place.

Assembly is the reverse of disassembly, to coin a phrase.

Dress the flex PCBs into their final positions. Fold up the touchscreen chip and connector and pop it on to its little peg, then plug in its ribbon and lock the connector. Then lay the flex PCB to the motherboard in place, lay the USB flex PCB on top of it and re-stick the Wileyfox sticker. Don’t get cat hair on the back of the sticker because it won’t stick properly.

Put the motherboard back in, taking care to reconnect all the cables including the really fiddly one to the USB flex PCB. I found I had to manipulate it with the blade of a knife underneath the motherboard. Once the screen is reconnected, it’s time to switch on for a test.


Success! Now just to put the screws back in and celebrate. The phone works again, though the rear-facing camera appears to have died. I don’t know if that’s because of the water or because I dislodged its connector and didn’t notice. One day I’ll have another look at it. Until then, this phone is now only a spare, so nobody’s too bothered about not being able to take photos with it.


Repairing the display of a CAP reader

My bank in the UK requires me to use a CAP reader for some online transactions, its security compromises notwithstanding. It’s quite simple to use: I slide the bank’s card in to the slot and follow the instructions on the display and on the bank’s web site. At the end of the process it displays a number which I have to type in to the web site in order to authenticate the transaction.

The problem is, over the last few years, the displays have been gradually failing and losing rows and columns of pixels. It reached the point this morning where I couldn’t read the numbers on either of the CAP readers I’ve got, and so I couldn’t make a payment to a supplier. Getting hold of a replacement reader would take a while – I’m outside the UK at the moment – so it was time to see if they were repairable.


Some of the fixing screws are hidden. There’s one underneath the label in the centre (which displays ‘void’ when it’s peeled off – never mind), two under the feet, and four inside the battery compartment, which itself is closed with one little screw.


The case unclips, and then there are two black plastic pieces which form the card slot. They’re held by another six screws. That removed, we can see the PCB and display. The display is connected by a ribbon which is bonded to the PCB using a special conductive adhesive. The adhesive appears to gradually come unstuck, so the display stops working. Squeezing it with a fingernail restores some missing parts of the display temporarily.


There are lots of guides on the web about repairing these things and I’d had a few unsuccessful attempts previously on other gadgets. This time I was successful, and the method I used was simple. Lay a piece of paper over the area where the ribbon is stuck to the PCB, and then apply gentle pressure with a hot soldering iron to melt the adhesive. I worked my way along in a series of squeezy dabs. The paper chars a bit, but that’s just an indication that it’s working.

Having done the whole ribbon, carefully peel off the paper. It tends to stick to the ribbon so pull it off gently so as not to pull the ribbon off the PCB.


Success! The display is working again, tested using a bench power supply clipped on to the battery contacts. I tickled the leaf switch which indicates that a card is in the slot. Of course the card is not responding – it’s not there.


I did both the readers I’ve got, and they both worked. I then tried an actual banking transaction which also worked, so there’s no funny security boobytrapping going on. That’s good for me, because I can repair my CAP readers, but less good for anyone who doesn’t know where their CAP reader has been.


Tektronix 7A18 versus Soviet Я4C-90

In a previous article, I described briefly the Tektronix 7000 series of oscilloscopes and some that looked awfully similar from the Soviet Union. Having the technical documentation from both, I decided to do a comparison and see what, if anything, the designs owed to each other, bearing in mind that the soviet version appeared at least 7 years after the US one.

I chose the vertical amplifier plugin for comparison. The soviet one is called the Я4C-90, and looking at its specifications (2 channel, about 100MHz bandwidth) it seems very similar to the Tektronix 7A18. Here are the two side by side: my own 7A18 on the left, and a picture of an Я4C-90 from the internet on the right.


They have a lot in common. Where Tek have used rotary switches for the trigger source and display mode, and a slide switch for the channel 2 polarity, the USSR used pushbuttons for those functions. In addition, the Я4C-90 has a 20MHz bandwidth limiting switch, like the (200MHz bandwidth) Tektronix 7A26.

I’ve cut-and-pasted sections from each of their technical documentation in order to be able to compare the designs. Let’s start at the front end: the attenuator.



First, Tektronix. They have used x100, x10, x4 and x2 attenuators with switches arranged to bring them in to circuit for the various deflection settings, from 5mV/div to 5V/div.


Now the USSR. They have used x100, x10, x4 and x2 attenuators with switches arranged…oh, hang on, it’s exactly the same. Even the switch combinations are the same. And whoever drew the diagram had exactly the same idea as the Tektronix drawing office when it came to representing the switching.

Well, let’s move on to the main amplifier.



Tektronix have used a FET input stage followed by a couple of bipolar differential gain stages, with an emitter follower on the output. And the USSR? Well, the input stage is visible on the right hand side of the attenuator diagram, and it’s practically identical to the Tek one even down to some of the resistor values. They didn’t have Tek’s matched dual FETs so had to make do with two individual ones matched on test. Let’s look at the rest of the stages.


Oh look! Two differential bipolar gain stages, just like Tek. I can only see two noteworthy differences: the gain control acts after the second stage rather than after the first, and the USSR version doesn’t have the emitter follower on the output.

Next comes the channel switch, which selects between channel 1 and channel 2 to feed to the mainframe.

Channel switch


To get high performance here, Tektronix actually designed and made their own ICs. The channel switch, U270 in the diagram, uses a 155-0022, which appears in all sorts of places in Tek equipment where switching or addition of differential signals is needed. That’s followed by a transistor stage, Q280/Q380, which drives the mainframe. Here’s the soviet equivalent.


Fancy that. There’s a special module, MC1, which does the switching. An internal circuit diagram  is also present, which looks suspiciously similar to the rather ambiguous diagram of the Tek 155-0022 chip. The soviet module is actually a 04КН009, which has been extensively reverse engineered by Erik Baigar, see his site here. Interestingly it’s a hybrid module rather than an integrated circuit, though it clearly does the same job.

Interesting here is the frequency compensation network. The Tek design has, between pins 1 and 16 of U270, a couple of RC networks, with one adjustment to get the high-frequency response of the stage right. Conventional enough.

The USSR design has a whole load more stuff in the same position, between pins 1 and 14 of MC1. In addition to three RC time constants with three adjustments (!) there’s a curious arrangement involving a thermistor R4 and a pair of varicap diodes D1 and D2, which seems to do some temperature-sensitive frequency response adjustment. It could be very creative design, but it smacks of desperation to me: the 04КН009 module is probably more sensitive to temperature variations than the Tek chip.

Bandwidth limiting

The final transistor stage before the output isn’t shown on the USSR diagram. It has a separate page to itself. It’s a little more complex than the Tektronix 7A18 because it has the 20MHz bandwidth limiting function. Now, there’s a Tek plugin, the 7A26, which has a 20MHz bandwidth limiting function. Just for fun, let’s look at the circuit diagram of its output stage.


It has an extra pair of transistors and some filter components (C860/L860/L880) connected by a diode switching arrangement. What did the USSR do?


Well I never! An extra pair of transistors and some filter components (C34/L1/L2) connected by a diode switching arrangement. Great minds think alike.

There are differences, of course. The ones I’ve noticed are:

  • The Я4C-90 doesn’t have the probe identification ring and ‘Identify’ button that the 7A18 has.
  • The readout is implemented differently in the Я4C-90. It uses a 6-bit digital interface to the mainframe rather than Tektronix’s delightfully eccentric 2-dimensional analogue readout interface.
  • The Я4C-90 appears to use TTL logic to do the channel switching for CHOP and ALT modes, whereas the 7A18 uses a mechanical switch.

The architecture of the Я4C-90 is, barring minor details, identical to the 7A18. It’s close enough for me to say that it’s a straight copy which has been adjusted to suit the soviet semiconductor technology available at that time. If imitation is the sincerest form of flattery, the engineers in the USSR must have been big fans of Tektronix.