Showing posts with label Electronics. Show all posts
Showing posts with label Electronics. Show all posts

Tuesday, 15 November 2016

PDF to Gerber Converter

If you want to make your own permanent electronic circuits and don't want to use either strip- or protoboards, you really have no other option than to etch your own PCB. Or, rather, you had, because nowadays you can find PCB manufacturing services on the internet that make small-run high quality PCBs for little money. Just search for PCB prototyping service and you'll get any number of offers.

Usually, you simply upload your design and specify a few options (board thickness, number of PCBs, etc), and within a week or two you get your very own professionally looking PCBs. Of course, your design needs to be presented in a machine readable file format. In general, one of several popular options can be chosen when you upload.

Sometimes, however, a PCB design that someone offers to the public for DIY purposes is available only in graphical form, for example, because the designer self-etches his PCBs and therefore doesn't need to make files suitable for uploading to a PCB service.

Because I don't etch, I found myself several times in this situation, where a PCB design that was kindly offered by some friendly dude in the DIY community proved to be inaccessible to me. If only I had a program that could convert a PCB design given as a PDF file to a file format suitable for manufacturing.... But then, why not write one myself?

A PDF to Gerber Converter

I knew from writing a PDF reader in an earlier life, that PDF is basically a graphics file format. It consists of a sequence of graphics commands such as "draw line from here to there using color X" that together represent the page that you see on the screen or printed on paper. If instead of painting these lines on the screen I converted them to commands in a command language like Gerber -- one of the common file formats for manufacturing PCBs -- and then write these commands to a file, I could upload this file and have the PCB made, without me having to get my hands dirty! YES!!

After several days (and nights) of hacking, I managed to complete a simple quick'n'dirty PDF-to-Gerber-converter that can read and process most PCB designs given in PDF format. In addition to the PCB traces, it can identify solder pads and holes, and produce appropriate solder mask and drill files. You only need to manually specify the outline of the PCB (to also create an outline file) -- and perhaps additional pads or traces that need to be free of solder mask (for edge connectors etc). It even converts text on the solder side to a vector format. But it needs to be a PDF with line graphics. It can't, and likely never will, convert bitmaps.

At this stage, it can handle only single-sided boards. It doesn't convert silk screen lettering, either. And it crashes often. But still, I managed to make Gerber files for the boards of my MiniMoog clone based on PDFs published by Crazy Patroche on his own MiniMoog report [French].

Screen shot of Mini Moog VCO board with output screen open.
Blue/orange/green blobs are solder pads.
I'm currently done converting PDFs, which is why the software rots quietly on my hard disk. I'd like to make a Web-based online converter some time in the future, but there's more pressing stuff on my todo list right now.

Clarification regarding the image above: If a board outline is specified, only those traces and pads within the outline are output to the Gerber file. The circles and pads above and below the circuit in the image are of course ignored.

Wednesday, 1 June 2016

Minimoog Replica



In the next few weeks I'll be reporting about my new project of building a Minimoog Replica. I have already started researching options and ordering some of the rarer parts. I have found various sites on the intertubes of people who have already built their own. Some even offer PCB layouts to copy, print and etch.

Here are the sites that I relied on most.

Clonage du Minimoog by Crazy Patroche
He's published on his site very nice PCB layouts in PDF form that match closely those of a Minimoog. I used these to make Gerber files so I can send them to a PCB manufacturer (I don't etch my own PCBs). Patroche uses the "newer" VCO that contains very rare and very expensive components.

By the way, Patroche gave me permission to post the derived Gerbers on this site, which I'll do as soon as I find they're OK.

Building a Minimoog Model D Replica by Tauntek
This is quite a detailed report on the construction of a Minimoog, electronics, case and all, including some details that I could not find anywhere else. For his replica he used the "older" VCO that uses the CA3046 transistor array. I'm using the same one.

Moog Minimoog (export) by FantasyJack
The essential site with all the schematics and parts list copied from the service manuals. Don't even think of building a Minimoog without consulting it early and often! There are also a few pictures of a disassembled Minimoog, especially boards, that are helpful when tracing a PCB or constructing a Minimoog cabinet.

Minimoog by Arpeggi8
Not quite as detailed as the other sites, but a great inspiration anyway with fine, detailed pictures of the cabinet.

Minimoog Wiki by J R
Quite a detailed build log, essential notes and an indispensable parts list (with substitutions).

Minimoog Resources on YuSynth (Yves Usson's site)
...especially the cabinet dimensions.

Mini-Modules : Minimoog DIY clone on its way by Julien Delgoulet (on MuffWiggler)
This has become quite an extensive post on MuffWiggler, but an essential read nonetheless. Some of the transistor substitutes (see below) were proposed by Julien.

Incidentally, Julien's about to offer a collection of PCBs and a Eurorack frontpanel for his Minimoog clone. But, of course, you can always forego the panel and hide the PCBs inside a nice vintage Minimoog cabinet.

Components

I intend to build my replica as closely as possible (or reasonable) to the original. This means using original components when they are still available, and other parts that look like those on the pictures of the Minimoog PCBs, even if they are a bit more expensive. When in doubt, I follow the pictures.

Transistors

Some of the transistors used in the original Minimoogs are obsolete and cannot be found with reasonable effort and/or expense. They are substituted with similar devices. Here's a table of all transistors used in the schematics, and possible substitutes and sources.

DeviceSubstitutes (reference)Source
2N3392still availableTayda Electronics
2N34152N3904 (original schematics), 2N3392 (Patroche)BGmicro
2N4058still availableMouser
2N4303BF245 (Julien), 2SK30 (Patroche)
2N4402still availableSmall Bear Elec, BGmicro
E402LS3954Aebay, Micross
MPS-U05TIP31C (Patroche)Tayda Electronics
MPS-U55TIP32C (Patroche)Tayda Electronics
TIS922N3904 (parts of orig. schematics)
TIS932N3906 (parts of orig. schematics)
TIS97MPS8097 (Julien)Mouser

This table gives a range of possibilities to choose from. When the original schematics offer substitution options, of course, I'll take these. For some of the TIS92/93, substitutes are specified in the schematics, but not for all of them. Still, I think it's safe to substitute them all. For the remainder, I happily rely on the advice and experience of others.

Some of the substitutes have different pin-outs than the original devices. Luckily, the original PCBs have appropriate labeling on the solder side indicating which hole represents which pin. These labels were present in Patroche's PDFs, and hence also converted into my Gerbers. Still, care will be required when stuffing the PCBs.

Also, you need to be aware that some of the transistors need to be matched in pairs. Therefore order a few extras so you'll have enough to select from.

Resistors

In the schematics, 1/4W resistors are specified in some of the units, and 1/2W in the power board. However, in the bill of materials (the ones in the service manual), all carbon film resistors are 1/2W units, as are apparently those in the pictures (size matters sometime...). So I ordered 1/2W ones for all of them. They're cheap anyway, at least on Tayda Electronics. Some rarer values are not stocked there, however, and are much more expensive to order from Mouser or Digikey. But luckily, there's only a few of them.

Capacitors

Most modern circuits used in the DIY community use radial capacitors that use very little real estate on a PCB. This one uses axial instead. There are not that many capacitors, but some of them are quite rare in axial form and hence quite expensive (especially tantalum capacitors).

The filter board uses two 30nF polystyrene capacitors. The biggest value I could find so far was 10nF. That means wiring 3 of them in parallel. Fortunately, there's plenty of space on the boards.

PCBs

I've finished tracing the VCO circuit (that I was unable to find on the intertubes) from a picture of the board -- or rather two of them. Indeed, I had to manually compensate for the lens distortion in order to get right angles, and then arrange the two pictures so that the traces meet where they need to. After a few attempts I got an almost perfect fit, which is why the board came out reasonably well.

To convert the resulting circuit to Gerber files, I exported the graphic as PDF and then used my hand-made PDF-to-Gerber converter program to generate Gerber files (bottom, outline and solder mask only). There were a few issues with the software that I had to fix along the way, but eventually, I got very nice Gerbers of all six circuit boards. Presently (02.Jun 2016), they're off for production at EasyEDA.

8. June 2016
The full set of PCBs has finally arrived! On the picture starting from the top left we have the oscillator, the filter/VCA, then on the second row the small rectifier, the tiny octave buffer, then the dual contour and finally the power/noise board. Some of the components, especially the resistors, have also arrived earlier today, so I could technically start soldering now.


However, there's another shipment arriving later this day (the switches, the card edge connectors and some other items from DigiKey). I think I can just barely hold off until that's arrived, too.

I forgot to mention that I went to the post office today to fetch a package that could not be delivered yesterday. That's the fourth package in a single day, a new personal record! It contains the 15nF polystyrene capacitors that I finally managed to find and buy on ebay. They'll simplify my building the filter board a bit (see Capacitors above).

12.06.2016
I started stuffing the boards with the resistors that I have (that's almost all of them. A few are still in transit from the moon. Futurlec, I'm talking to you!!). Anyway, thanks to the nice layouts by Patroche, all resistors have a common 15mm spacing, which allows bending the legs using a bending gauge utility. Nonetheless, stuffing the boards is a tedious task because (a) the boards don't have silkscreen on top (like the original boards), (b) there are a lot of different values and (c) some of the values given in the replacement lists are wrong (here's Tauntek's errara list) or have been updated as "factory mods". It's a good idea to cross check with images of original stuffed boards once in a while. Working over my original VCO layout that I posted on the Electro-Music forum was a good idea, too, because now that all components align properly, it is quite obvious which holes belong to which resistor.

Meanwhile, I'm finalizing my orders with Mouser (mostly parts that can't be found anywhere else), Musikding (cheaper than Mouser but limited catalog) and Reichelt (whatever remains). I decided to go with the look'n'feel of the earlier boards. These have colorful tropical fish capacitors for certain polyester values instead of the boxy-types of later boards (see Crazy-Patroche for pictures). Some of the boxy-values are expensive or non-stocked at Mouser. Lump-types (as I call them) are always cheaper and more readily available, and while being not as colorful as tropical fishes, at least have a similar lumpy shape. That's good enough for me (and, no, I won't paint them). I'll make a list of component sources once I have them all.

Tip-of-The-Day: When ordering stuff, be sure to double- and triple-check your cart before sending it off. I ordered too few red rocker switches (3 instead of the required 5), which will lead to an expensive follow-up order with shipping cost far exceeding parts cost.

13.06.2016
I've finished soldering those components that I have (resistors, diodes, jumper wires) and made a picture to show off. When soldering resistors, I do the "factory mods" described in the service manuals, which is why some of the values differ from those in the parts lists. I follow the pictures on FantasyJack where you can clearly see that they've got the mods, too (if you know, where to look, that is).

VCO (top) and Dual Contour boards, partly stuffed

I do have some of the transistors (2N3392, 2N3904/6) that I need, but I'm unsure whether it's a good idea to solder them now, i.e. before the less delicate components such as the remaining resistors, capacitors etc. are in place.

The friendly people at DigiKey allowed me to amend a pending partial order, so I'll have all rocker switches without an additional follow-up order.

18.06.2016

Oh Futurlec, ye online shoppe,
How hard just can it be,
Whatev'r it is you do to drop
and send those parts to me!


I'm still juggling orders between retailers in order to save shipping costs (big ones like Mouser offer free shipping above a certain minimum amount) and/or moving parts between shopping carts when a certain value is (temporarily) unavailable at a certain retailer. It also seems that certain parts or values are unobtainable with reasonable effort. Here's a (potentially growing) list of parts that I'll have to substitute and hence deviate from the original design.

5M #1 Taper Potentiometer (Glide pot on front panel)
I could not find any reference as to what a #1 taper potentiometer actually is, but Tauntek has measured[PDF] the taper curve, and it seems pretty close to an audio one. Incidentally, on image 9-17 of the service manual -- the wiring diagram -- R2 is specified as 5M audio pot. Unfortunately, those aren't obtainable either (Mouser, DigiKey, eBay). Finally, I've given up searching and will take a 1M audio pot instead. A welcome rationale is given by the friendly people at CAESound:
Glide pot note: We have substituted to the 1 Meg value from the stock 3 meg. We found that this works very well. Our survey says that almost no one ever used the Glide pot set to maximum Glide time. Therefore the Value of 1 Meg will work for 99% of all players.
That's good enough for me.

05.07.2016
The order from Futurlec has finally arrived, and I have already started soldering the resistors in place. The VCO that I'm using requires 2 sets of 3 matched resistors, one of 51.1k and one of 15k Ohms. I'm not quite certain as to what degree I have to match them, but I guess when my brand new DMM does not show any difference between them, that's close enough. Unfortunately, I forgot to order enough 15k units, so I don't get a close enough match. I'll add a few more to the Tayda order that's in the queue.

I also checked the 15nF polystyrene capacitors that I found on eBay (see above) and discovered that they are 10% values, when I actually need 2.5% tolerance. I measured the devices using my DMM and found four that are just about within the 2.5% margin, especially when I pair them up to get the required 30nF. I'll take my chances and use them anyway.

Tomorrow, I'm finally going to match transistors. There's just no way around that, if I ever want to finish the synth. I'm going to follow the procedure and use the circuit by Ian Fritz which seems easy enough. Luckily, I still have the circuit somewhere on a breadboard. Also, I have ordered plenty of MPS8097s (TIS97 substitute) and 2N3392s, so I'm confident to find a few matches.

07.07.2016
I've finished matching NPN transistors (MPS8097 and 2N3392) and found enough devices that I can use. Indeed, I bought 30 transistors of type MPS8097 at Mouser and found their VBE to be within +/-2mV of each other with only a few outliers. After setting up a current of 100µA, I was able to match 6 of them pairwise to less than 0.1mV. As for the 2N3392 that I bought at Tayda, I found those that I tested to be all within less than +/-1mV which is a bit suspicious. I didn't expect to find a match after testing 3 devices. They have a different pin layout (ECB), but I checked and re-checked several times. Nonetheless, I'll build Ray "Music From Outer Space" Wilson's transistor matching circuit and check all matches again just to be on the safe side. What remains to do is to find two NPN/PNP pairs, one of them matched to +/-3mV at 20mA, and the other one such that the VBE of the PNP device is 10mV to 20mV lower that that of the NPN at 200mA. I'll try using Ray Wilson's circuit to measure the devices.

07.07.2016
There appears to be a small controversy about the transistors in the VCF ladder, and whether they are matched or not. I thought that they need to be matched but then found that those transistors specifically mentioned in the parts list refer mostly to different ones. Page 2 of the Moog Factory Service Bulletin 804C[jpg] (Synthfool Minimoog Docs), which amends the notes on page 9-9 of the Minimoog Service Manual (the VCF schematics) lists those transistors that need to be matched, but again these are not part of the ladder:
Change note 3 to read:
  Q26 and Q28 are matched to ±3mV Vbe at 20mA IC.

Add note 5:
  Transistor pairs: Q5 & Q7, Q13 & Q14, Q15 & Q16,
Q27 & Q33 Vbe matched to ±4mV at IC=20mA.
In the schematics, the bottom pair of the ladder (but only the bottom pair) is marked with a small M in a circle, apparently indicating a matched pair (and, indeed, Q29 and Q30 are matched). Also, in some of the pictures I have of the filter PCBs, the ladder transistors are marked with a color dot (see the VCF on Patroche's site), indicating that they are "special" (as in "matched").

Here's what I'll do: Given that the matching target above is rather generous -- so much so that I think nearly all the transistors I have lie within that range -- I'll use the ones I already did for the ladder and then match 4 more pairs for those listed above in the "add note 5".

What bothers me a little, however, is the requirement for one of the complementary pairs (NPN/PNP) to be matched at a collector current of 200mA. This is pretty much the absolute maximum rating of the 2N3904/6 (substitutes for TIS92/93). The datasheet shows the TIS92/93 to have a higher maximum rating of 800mA, so the required matching current is well within their limit. Perhaps it's sufficient to match the pair at a slightly higher current, say 50mA (one quarter of the maximum rating), to have a pair that's at least partially consistent with the original. Fingers crossed!

20.07.2016
I'm building a variant of the Moog transistor matcher circuit (with a few additions suggested by Ray Wilson). While I believe that most transistors' VBE are well within the limits required for the different circuits, I want to check some of them again. When I redid some measurements to find a few additional matches for the VCF, I found completely different values for the matches that I already had. Perhaps I blew a few transistors when plugging them into the breadboard. I don't know. In any case, I can't trust the matches I have, so I'll do them again but in the traditional way by measuring the VBE directly and then find close pairs.

Electronics Enclosure

I've started planning/building the cabinet of the synth. I bought an (expensive) aluminium sheet in my local DIY store for the front panel. It's only 1.5mm thick instead of the original 0.063" = 1.6mm, but I hope that's not a problem. I sawed it by hand into shape, i.e. 7" x 27 ⅛" (plus 1cm on either side for the bent-down wings). Sawing the long edge was a problem, because my hacksaw does not "reach" far enough into the sheet. I had to saw from either side until the saw frame hit the sheet, and then used a blank sawing blade that I held with gloves to saw the part between. It was ugly but I finally managed to complete the front panel. I'm not quite sure yet how to bend the wings or all the flaps on the side sheets (see pictures of the insides linked above).

I test fitted one of the switches that I bought by cutting a rectangular hole in one of the aluminium cutouts and drilling countersunk holes for the screws. I saw that the specs for the switch were tight, but not that tight.

How to mount a rocker switch using standoffs (left 1cm, right 9mm).
How NOT to mount a rocker switch using standoffs.
In short, the mounting holes are useless, because they are too close to the switch. Or my spacers and my screws are to big. I don't know how Patroche managed to fit his (see picture [scroll down] of his front panel). Blimey!

20.08.2016
It's been a while since I updated this build log, but I had a few other projects to tend to. I'm not finished with the PCBs yet, because I still need to match a few transistors (see above ). Also, I had to order a few additional components that I don't like the look or quality of. I found on eBay another couple of 15nF polystyrene capacitors, but they have not arrived yet.

In the meantime, I started with the enclosure (by the way, I'm doing several things in parallel, so this log may at times become a bit messy. Once I'm finished, I'll make a PDF document that will record the whole construction in a more sensible order). I built a bending rig to bend my aluminium sheets (why does autocorrect suggest "aluminum". I'm not mercan...). It worked somewhat well for the two heat sinks for the power supply board, but was totally overwhelmed when I tried to bend the front panel wings: the hinges were bent and torn out. That spells trouble in all caps, when I have to bend the length of the sheets that make up the sides of the electronics enclosure. I'll have to come up with a design different from the original.

While we're at it, I also ruined a plank of wood when I tried to plane it down from 17mm down to 15.9mm ( the metric equivalent of 5/8 inches). At my DIY store I can't get the right thickness, so I'll have to pay a visit a local carpenter.

So many words to report so little progress.

21.06.2017
I've been busy working on a couple of different projects, including a video series on music electronics, but now I'm back. I still haven't decided yet on the metallic enclosure for the synthesizer, so I proceeded with the wooden cabinet in order to get started again. I've finally found a plank of 15mm thickness at my local DIY store and decided that this was close enough to the original (according to the published cabinet dimensions). It will make the synth a bit lighter without making much of a difference visually.


I started by sawing -- by hand -- the two cheeks at the side of the cabinet. By keeping the saw vertical and carefully cutting along the line, I managed to get straight cuts at the proper angles. Because the cuts were done by hand, the cheeks are almost but not completely identical. I hope I can sand them to size. I don't have any decent woodworking tools, and the cheeks showed clearly the limits of what can be done by hand. So I built a jigsaw table that would allow me to do the longer cuts for the remaining cabinet pieces. I'm still making mistakes and ruin lumber galore, but the cuts are certainly straighter and faster to do. So far I've got the cheeks, the back piece with a beveled cut and a glued-on bottom bar, and the trim piece going to the top of the front panel. All the pieces have the occasional scratch and blemish that I'll either be able to sand away or have to attribute to it being a vintage synth, after all.

06.07.2017
I've finally managed to complete matching transistors, so I can finish soldering all the circuit boards. I built a permanent version of both Ian Fritz' simplified transistor matcher and a version of Robert Moogs circuit based on the Dragon Fly Alley adaptation (using a TL071 and an additional capacitor as suggested by Ray Wilson). I re-tested the matched 2N3392 (used in the contour/keyboard board) and found them spot on. I then proceeded to find additional matches for the MPS8097 (TIS97 substitute), so I can use matched transitors for the ladder filter. Nearly all of them lie generously within the requested margins (worst pair is less than 0.2mV apart with 4mV being acceptable).


Matched transistors ready to be used. A few leftovers in the bag. Coffee hard earned (and well deserved).
Indeed, all transistors I have are practically matched to one another within a few tenths of millivolts. This made it quite hard to find the one pair where the VBE of the PNP needs to be "10mV to 20mV lower" than that of the NPN (contour/keyboard). I had to revert to earlier orders and my small inventory to finally find a pair that is 12mV apart.

I think regarding how far manufacturing technology has evolved since Robert Moog's times, you can probably just grab a pair of transistors from the same batch and be fine i.e. have an acceptable match. Anyhoo, I'll use what I have and then decide on the electronics enclosure to finally begin the tedious wiring process.

10.07.2017
I'm nearly finished soldering the boards. The only thing that remains is the tempco mod that Yves Usson of yusynth.net describes on his Minimoog page. It consists of moving the three tempco resistors closer to the transistor arrays that they are supposed to control the tracking of. That should take no more than a few minutes. Oh, and I still have to push the ICs into their sockets. That's another five to ten minutes.

I've also figured out -- finally -- how the electronics enclosure is built in the original Minimoog. By inspecting the interior pictures on fantasyjackpalance.com (and also reading Tauntek's page word by word) I discovered, that the bottom part of the enclosure (where the PCBs are slot into their sockets) is attached to the front panel using a piano hinge, allowing it to "swing" up and down a little, presumably to give access to the card slots and the wiring. The whole enclosure is then attached to the case using another piano hinge. Because there is only one row of mounting holes along the bottom of the front panel, it appears that both hinges are mounted there: one is mounted "inwards" to attach the bottom of the enclosure to the front panel, and the other "outwards" in order to mount the front-panel-plus-enclosure to the wooden frame. The bottom piece of the enclosure therefore needs only one long bend (along the edge opposite the hinge) and two short bends (one on each of the short edges). I should be able to do that -- fingers crossed. After all, Tauntek was too, apparently.

Update

Done! The boards are finally complete. I haven't yet fixed the tempcos to the transistor arrays (note the flying white wires on the VCO board), but I'd call it a milestone anyway.


I may also have found a way to attach the switches to the front panel (see discussion above) by using a narrow brass tube that is narrow enough not to interfere with the switches' operation. But not today. I'll have a beer now, cheers!

14.12.2018
Here are the Gerbers of all of the PCBs seen in the pictures above.

Before you proceed to download, here are the terms and conditions, that you agree to by downloading the Gerber files.

All PCBs except the oscillator board were designed by Crazy Patroche. He kindly gave permission to publish the derived (by me) Gerbers of his original PDF designs. So thanks go to him alone.

The oscillator board (CA3046 version) is my design. I traced it by hand from a pair of pictures. Therefore it looks different (more square and less professional). All blame is mine alone.

I made the Gerbers automagically by converting them from the original PDFs. Based on these, I had the PCBs manufactured at EasyEDA (now JLCPCB). They were accepted, so they seemed to have worked. You may have to alert them, that the strange "grilles" on the oscillator boards are intentional.

The PCBs have no silk screens. You need the original PCB layouts and parts list (especially the assembly scans and parts list further down on the linked page) to complete the build. Cloning a professional instrument is an expert-level project. If you can't be bothered to research and look it up, don't download the files.


Thursday, 18 February 2016

ASM-2

16. May 2015
Alright then, I think it's time for a new analog synth project. I've done digital stuff for long enough. After having researched various options I decided to go for something big. I'm not that much into modular synths but I do like the idea of being able to manually patch a few connections for that special sound. I finally decided to go for the ASM-2.

The ASM-2 is an upgrade to a synthesizer called ASM-1 (somewhat expectedly...) and includes a few additional modules and some enhancements to some of the original ones. PCBs can be bought at Elby Designs and contain several practically self-contained modules allowing the builder to customize their systems as they see fit, e.g. as a modular, semi-patched or hard-wired system.

The ASM-2 consists of the following modules:
2 x VCO
2 x VCF (1 x state variable, 1 x low-pass transistor ladder)
2 x VCA
2 x VCLFO
2 x ADSR
1 x Glide Generator
1 x Ring Modulator
1 x Noise Generator
1 x Sample & Hold

I just received the PCB in the mail, and after having admired it long enough I'm now in the process of ordering all the electronic components. I already sent an order for some of the rarer parts to utsource.com. I hope they arrive on time. In the meantime here's a picture of the PCB.


11. June 2015
It took me a while to shop around for all the electronic components but I finally managed to decide where to buy. The bulk of the components, in particular semiconductors and capacitors, arrived today. I ordered from Reichelt which I found to be the cheapest supplier. A few rarer items such as the LM394 matched transistor pair, the J108 JFET transistor and some germanium diodes I found on utsource. They arrived a couple of days before. Those few semiconductors that Reichelt does not stock, plus resistors in bulk amounts that are cheaper there, I ordered from Futurlec. Those items that in turn Futurlec does not stock, in particular the CA3080, I'll order from Musikding. Unfortunately, Musikding currently does not stock it either (apparently they ran out just when I was ready to buy), so that'll have to wait.

I've already got a heap of components, yet they are only the ones that go into the PCB. The panel mount components, i.e. all the switches, potentiometers and jacks will constitute another sizable order. But first things first.

24. June 2015
I just returned from Vienna. Not that anyone cares to know but because there's little else to report I figured I can just as well mention it anyway. I just saw that Musikding now has CA3080 OTAs in stock but instead they don't have any 2n2 polystyrene capacitors left. Life is hard at times.

23. July 2015
It appears that Futurlec ran out of some of the components that I had ordered. So I went back searching for them and eventually found them at Small Bear Electronics. They also stock a LM394 work-alike (AS394 by Erica Synth for US$ 4.95). They, too, slipped into my order.

I hope that the Futurlec order will arrive soon because the bulk of the resistors is in there. I'd like to begin stuffing the PCB with the lowest parts, and that'll be resistors and diodes.

28. July 2015
I'm still waiting for the Futurlec order to arrive. But I'm not waiting idly. Instead, I started stuffing the PCB with the components that I have. That would be all those resistors that I happened to have lying around, and all the IC sockets. It's coming along nicely.


The alert reader may be baffled by two blank areas on the left of the board where there's an IC socket outline but no socket. That's the spot where the matched transistors go. I bought a pair of LM394 fakes work-alikes in a TO-5 can that I'll solder there. Mystery solved.

12. August 2015
The Futurlec order has finally arrived, and I was also able to complete the order with Musikding (including the CA3080s that I ultimately need). In the meantime I also received the latest PCB overlays and bill of materials from Elby Designs. It appears that several resistor values have changed, including some that I already soldered in place. There are some new odd values that I don't have at hand and that require a follow-up order from Reichelt. But first I'll continue soldering those that I have, and that will take some time.

15. August 2015
I have finished soldering the resistors. Most of them anyway. There are some whose values had changed in the most recent schematics and that I must order first. Also, a kludge is required because of late improvements to one of the modules that were published but I hadn't noticed. It requires cutting two traces on the PCB and soldering two resistors in their place. I'm reluctant to violate the beautiful PCB by hacking at it with hacksaw, crossbar and hatchet. Or a precision knife. But there's no way around it, if the synthesizer is ever to be finished.

18. August 2015
The synthesizer is coming along nicely. I finished soldering diodes and most of the capacitors. There are some that a I bought too few of and others that I did buy enough of but somehow cannot find anymore. I'm adding those to the Reichelt order that I mentioned above. Also I need to have another email exchange with Elby Designs in order to clarify a few things regarding resistor and capacitor values that have changed in the BOM but not in the schematics. It is (and will be for some time) a lot of work but I'm confident that this thing is going to be my masterpiece!

PCB with most resistors and capacitors in place.
21. August 2015
Today I managed to complete ... nothing. I have plenty of other ideas that I want to explore, in addition to the couple of synths that are stalled in various stages of completeness. I also experiment with digital circuits, because you can only do so much analog stuff at any one time. The following picture shows an Auduino granular synthesizer, based on a "standalone" Arduino board. The alert, hawk eyed reader may notice that I wired the ISP connector the wrong way round. In any case, I'll open a separate thread to report on my experiments with (and potential enhancements of) the Auduino.
Midified Auduino synthesizer with front panel.
10. September 2015
The PCB is nearly completely stuffed. After quite an intense email exchange with Laurie Biddulph of Elby Designs, who has proven extremely patient and helpful, I'm quite certain now that I'm up to date with the most recent specs. I had to replace a few components but it was worth it. This is definitely going to be my masterpiece!


A handful of components is still missing, including several ones that I ordered the wrong number of, but mostly it's the trim pots that I'll do after I have given the board a decent cleaning using isopropanol to remove the solder resin residue. Also, I haven't soldered the germanium diodes yet. I'm a bit intimidated by them because I think they are quite delicate.

18. February 2016
The PCBis now completely stuffed, germanium diodes, trim potentiometers, missing components, voltage regulators and all. The only thing that's left are the three modifications that need to be done on the PCB:
  1. one leg of a capacitor in VCO1 is left unsoldered and needs to be connected to a leg of a nearby resistor
  2. one leg of the corresponding capacitor in VCO2 needs to be connected to a leg of a nearby IC
  3. two cuts need to be done on connections on the PCB and then bridged with resistors
That's next on my list. I've already started planning the layout of the front panel. I think I'll go for a prepatched ("normalized") design, yet with full patchability. The idea is that the most common connections can be done with switches on the control side of the panel, but for the extra flexibility, there's a patch panel to override the normalized routing (using switched jacks).

Saturday, 28 November 2015

Polyphonic Auduino

If you're into Arduino hacking and are also interested in synthesizers, you've probably heard of the Auduino granular synthesizer by Peter Knight of tinker.it. It's a simple noise maker built using a 16MHz Arduino board and a handful of components. And it's a lot of fun to play with.


If you want to build one, you can head over to Notes and Volts where there's a multi-part video explaining how to do it, starting with a standalone Arduino board, the actual Auduino, and then two videos describing a line level and finally a MIDI mod (links to the various parts are provided in the video).


The synthesis engine is only a few lines of code and invites hacking it ... to boldly go where no man has gone before. So, what about a polyphonic Auduino?

To generate sounds, the synth employs a method called granular synthesis. I don't know anything about granular synthesis (and haven't found a simple introduction on the intertubes), but from reading the code I was able to dissect the basic operation of the synth. There's a two-part counter called synthPhase (with an Accumulator and an Increment) that controls the pitch of the sound. It does so by determining the rate at which two triangle wave samples -- the grains that give the method its name -- are replayed (i.e. restarted). The two triangle wave oscillators that generate these samples consist each of a two-part counter grainPhase (grain2Phase, respectively, each with an Acc and Inc) and a decaying amplitude grainAmp (grain2Amp, respectively). The speed and decaying rate of these two oscillators is determined solely by the parameters read in the main loop. In other words they are quasi free-running oscillators that are independent of the note being played. All in all there is one counter for the note and two for the grains. In principle, adding another voice would mean adding another counter. Does the Arduino have enough power to allow adding more voices?

If you inspect the code (I'm talking of the midified code by David Benn of Notes and Volts) you can see that it consists of two loops. Actually, you don't, but it does. The main loop is represented by the function called loop, and the second by the timer interrupt routine. The loop function is called repeatedly by the Arduino main program and contains all time insensitive operations such as the processing of MIDI events and the reading of the potentiometers that control the sound of the synth. The second one is called repeatedly by a timer and is responsible for computing the actual sound samples at a rate of 31.25kHz. If you consider that the Arduino's processor is running at 16MHz, this leaves at most 512 cycles for the interrupt routine. Otherwise it won't be able to finish before another interrupt is initiated. That's not a lot. In order to provide, say, four independent voices we need to severely limit what needs to be computed for a sound sample.

Before starting to tinker with the code I measured how long it takes the interrupt routine to compute a sample. I built a version of the Auduino code with a free digital pin being set when the interrupt routine is entered and cleared before it is exited. A plot of the corresponding signal on an oscilloscope shows a square wave with a duty cycle of about 26%. In other words, the processor spends a bit more than a quarter of the time in the interrupt routine. Upon closer inspection, I found a few places where the compiler produces sub-optimal code, especially with regard to multiplications (a fact that has not been lost on others). By working around that and also reformulating a further two lines of code, I was able to reduce the duty cycle to less than 22% without even beginning to change the algorithm.

In order to see, how far I can push the envelope with a simplistic approach, I copied the wave generating code within the interrupt routine three more times, added some simple 4 notes on/off logic and burned the whole contraption to the Arduino. Lo and behold, I was able to play 4-note chords on the Auduino with the duty cycle only going a tad above 75%.


Spending three quarters of the time in an interrupt routine is a lot, but perhaps just about acceptable. I analyzed the code (including the generated assembly code), and I can confidently say that 4 voice polyphony is quite the limit on a 16MHz Arduino, if one wants to keep the algorithm as it is. Of course, one needn't do that. I wonder, if you can hear any difference, if the grain waves are of a different shape. After all, the ATmega contains two hardware counters (one 16 and one 8 bits) which could be used instead of the software counters to generate the grain waves.

So there you go. A 16MHz Arduino is perfectly capable of doing 4-voice polyphonic grain synthesis. Four voices is not a lot, of course. But considering that you can buy brand new professional equipment with just 4-voice polyphony, we need not be embarrassed.

Monday, 24 August 2015

V/Oct Calibration Tool

I'm currently upgrading a few of my first DIY synthesizers by adding MIDI control and perhaps also renovating the front panel. I also want to re-calibrate the tracking of all the oscillators of the first synths I built in order to have a proper volt/octave scale for the MIDI/CV converters to work with. To that end, I built a small V/Oct calibration tool based on an old circuit by Ray Wilson of Music From Outer Space that he mentions in one of his earlier VCO circuits. In contrast to Ray's tool, mine spans a 7 octave range by supplying voltages from 0 to 7 volts.

V/Oct calibration tool. Soon with enclosure.

I started by selecting a couple of resistors from a batch of 50 or so (10k 1% metal film) for equal resistance using a Wheatstone bridge. I managed to find two groups of 3 and 4 resistors that among them produced a midpoint voltage of 0.0mV (when measured using my cheapo DMM), with the two groups being 0.1mV apart. I don't know how that difference translates to resistance, but in any case they all now seem pretty equal to me. :-)

I used these resistors to build a multi-level voltage divider to produce the voltage steps starting with the 7 volts on top of the chain. Incidentally, I get the top 7 volts by simply swapping the 47k and 68k resistors in Ray's circuit (trimmed to precision using a 10k multi-turn trimpot). The calibration tool's power is taken from the synth's power supply. Two LEDs on the front panel show proper connection to both negative and positive supply voltages.

It took a bit more time to build than I anticipated (I did it on perfbord with the component leads providing the connections between parts), but now that it's finished I actually look forward to tediously calibrating all the oscillators.

Friday, 22 May 2015

Mutable-Instruments Shruthi-1

22. May 2015
I've visited the site of Mutable Instruments many times in the last two years or so, and pondered and contemplated buying one of their fine synthesizer kits. But then I paused visiting them for a while, and while I was absent they appear to have stopped offering some of them. You can still download and manufacture on your own their PCB designs, but ready-for-assembly kits are gone. The only synthesizer that they still sell kits for is the Shruthi-1, and nobody knows how long stocks will last. I wonder if you can guess what happened next...

If what you guessed rhymes with "bought a kit" you're on the right track. Indeed, I just received the kit by DHL, and here's what I've got.

Full kit with PCBs, parts and metal enclosure.
Filter board. Pretty little details...
Really nice and solid metal case.
As I have written elsewhere I prefer interesting standalone synthesizers to giant modular racks, and that's why I couldn't resist adding a Shruthi to my growing collection of DIY gear. Building the device shouldn't take too long -- a few hours they say on the web site. That'll give me something to work on while I'm sourcing all the necessary parts for the ASM-2 that I also just bought a PCB for.

25. May 2015
I started stuffing the filter board. I finished the power supply and soldered all resistors. The board pretty much looks like step 10 on the very detailed step-by-step Shruti assembly instructions page. Which is why posting any pictures of my progress seems pretty pointless, come to think of it.

26. May 2015
Done! After having completed the filter board I started stuffing the control board. It has far fewer components and was completed in half the time it took to stuff the filter board. Some care is required, though, because there are parts on both sides of the board, and you need to be careful that they don't interfere with one another, especially with the display. Before mounting the display I made sure the micro controller booted correctly, as suggested in the building instructions, because it'll obscure parts of the micro controller's solder pins and render them inaccessible.

After having soldered the display in place and also the controller elements (buttons, potentiometers and the encoder), I was ready to calibrate the filter to a V/oct scale. I did it "by ear" using my DX7 as a sine wave source. It's not the most accurate way of doing this, but I managed to match the filter's resonance sine wave to that of the DX's to within a fraction of a cycle. That's good enough for me. Mounting the PCB stack into the metal case completed the project.

Building the Shruthi-1 took me about a day, and I'm not the most efficient builder. Anybody more experienced should be able to complete it in a few hours. And what does it sound like? What I've heard so far sounds very cool, especially the built-in arpeggio and sequencer. I'll make a YouTube video to show off the synth but first I'll have to waste some time with it.

Wednesday, 3 December 2014

RAM Cartridge for the Yamaha DX7 Synthesizer (Part V: Success)


This is part five of my report on building a RAM cartridge for the Yamaha DX7 digital synthesizer, and finally I've got some positive news: I've got a prototype that works! Since my last failure report I ordered another prototype batch, this time using seeedstudio's Fusion PCP service, and a 1.2mm thick board. I also ordered on eBay a replacement cartridge socket so I could wire the connector out of the synthesizer and in the future plug the prototype panels in without wearing out the cartridge socket of the DX7.

The layout of the new PCBs is the nearly same as that of the ones manufactured at OSH Park. They're only thinner, i.e. 1.2mm instead of 1.6mm, and this time I even added a pad for the (necessary?) 2.2uF decoupling capacitor. Soldering the handful of components was quick and painless. When I plugged it into the DX7 for the first time (the external connector isn't set up yet), it didn't work. The synthesizer simply didn't recognize the cartridge. To my utter dismay it appears that the PCB is too thin now, as it slipped right into the socket without any force. I could make the DX7 recognize it, however, by pressing it slightly backwards. Still, it didn't work: I consistently got a Write Error. I was quite convinced by then that there was a fundamental problem with my design.

I studied the circuit diagrams again for hours, even wrote a quick'n'dirty disassembler for the DX7's main CPU, the HD63B03X, to disassemble the system ROM and inspect the routines for writing the cartridge. I also started making a connector probe using one of the PCBs with wires soldered to the EEPROM solder pads. This would allow me to signal-trace the various EEPROM bus signals, especially the two chip select lines /CE1 and /CE2 and the write enable line /WE. Because the PCBs are too thin I planned to cover the connector pads with some solder to make them slightly thicker. For good measure I did the same thing with the prototype PCB for a final test to make sure it wasn't a dodgy connection that caused the failure.


I plugged it in, and it went quite nicely into the socket, requiring some but not excessive force. Then I pressed the cartridge voice selector. The display read FORMAT CONFLICT! So I pressed function 8: format cartridge. The display read CARTRIDGE FORM ? I pressed yes. ARE YOU SURE ? Yes. MEMORY PROTECTED. Oh, sure, I forgot. I pressed the cartridge protect selector. MEMORY PROTECT CARTRIDGE ON. I pressed off, then function 8. CARTRIDGE FORM ? Yes. ARE YOU SURE ? Yes. UNDER WRITING ! I stopped breathing. Then, after a few long seconds: FORMATTING END. I took a breath. It worked? I pressed the cartridge voice selector, then voice 1: INIT VOICE. Voice 17: INIT VOICE. It worked?? I saved the internal memory onto the cartridge, and after a few seconds of UNDER WRITING I found all my voices on the cartridge, and they sounded exactly as they're supposed to. I even switched the cartridge to the second bank, ran the same formatting exercise and ended up with a cartridge that had my voices on one bank and init voices on the other. It worked! Success! Oh, sweet success!! How can I ruin it. I need some rest. And another breath.

Monday, 3 November 2014

RAM Cartridge for the Yamaha DX7 Synthesizer (Part IV: Reboot)

This is part four of my report on building a RAM cartridge for the Yamaha DX7 digital synthesizer. It took a while since the last installment, because I've got several hard- and software projects that run in parallel. One is a hardware programmer for the DX7, a bit like this Jellinghaus DX programmer, but with far fewer knobs, but a graphical display instead. Another is a user interface (including graphical display) for a Yamaha XG synthesizer based on a DB50XG daughter board, and the third is a software librarian and editor for the DX7.

Anyway, I completely redesigned the RAM cartridge, this time using a correctly sized edge connector, correct pin assignment, and a through-hole EEPROM.


Furthermore, I tried to stay within the confines of the original cartridge board area. The packing is dense but not too crowded. Soldering the components was quick and painless. The board is suitable for both 64kbits (suitable for 2 DX7 voice banks) and 256kbits (8 banks) EEPROMs. To test the board I use the simpler 64kbit device and a an ordinary sliding switch in the position of the rotary coding switch (top left corner of the board), and only one additional resistor. I didn't include a pad for the 2.2uF polar capacitor, but managed to mount it between 5V and ground by soldering it to the power leg of the EEPROM and the bottom pad of R1 to the left of the memory chip. The finished board looked quite neat and tidy, a far cry from the mess of the previous prototypes. I couldn't wait to test it in my DX7.

Well, make that last one "I couldn't wait to test it in my DX7". It seems the board is too thick. I could possibly force it into the connector, but I don't want to ruin my DX7. The boards do have a solid if not heavy feel. Nonetheless, OSH Park's pricing and spec page states that the boards are 1.6mm thick. They're closer to 1.8mm. When I tested my previous prototypes I thought that even my 1.6mm thick hand crafted adapter was close to the limit regarding the force required to set the board into the socket, but these are just too thick.

This is very unfortunate, because I like the quality, price and ease of use of OSH Park, but for this project I can't use their service. I need to find a different prototyping service that allows specifying thinner boards, perhaps 1.4mm or so.


Friday, 26 September 2014

The Noisy Cricket Guitar Amp

The Les Paul DIY guitar project is nearing completion. Only a few more coats of Tru-Oil, and then assembly, wiring, stringing, tuning and intonation are necessary. Oh, wait...

What I really meant to say is that I want a small guitar amp that I can take anywhere. When googling "simple diy guitar amp" you'll quickly come across the Noisy Cricket Guitar Amp, the latest of a series of LM386-based mini amplifiers like the Ruby amp, Little Gem and Smokey Amp. It is a simple amplifier running off of a 9V supply (wall wart or battery) and consisting of a handful of components around a LM386 audio amplifier chip.

You can find various veroboard designs for a Noisy Cricket on the intertubes, but I chose a small protoboard to build mine. Here's a picture of the component layout. I usually do small layouts in Microsoft PowerPoint. No, I'm fine.

Veroboard panel. Note pinout difference between MPF102 and 2N5951.

I ordered all the components at Futurlec, especially the LM386 that I don't have at hand. It's one of the cheapest supplier, but they ship from Hong Kong which takes at least three weeks. The speaker is a small 10cm Visaton full range speaker (FR 10 HM) from Conrad at less than CHF 15, including shipping.

The build follows closely the guide on DIY Strat with the following exceptions: instead of a separate power switch I'm using a potentiometer with switch for the volume control. I also had to use a 2N5951 JFET instead of the original MPF102, and finally, I'm going for an integrated amp and speaker design.

Noisy Cricket parts

I soldered the board according to the layout above. The picture below shows the result (LM386 not in place yet). Note that the board is not a stripboard. Therefore the connections have to be made by bending and soldering the component leads appropriately. Apart from the two gain connections on pins 1 and 8 of the LM386, no additional wires were necessary to complete the circuit.


The leads that stick out on either side indicate the connection points for the potentiometers, switches, and power as indicated on the layout above.

Panel wiring in progress.

In the meantime I brought my (limited) wood working skills to fruition and built a wooden cabinet for the amplifier. As usual, the corners are nearly but not completely at right angles, but thanks to modern photography it can all be blamed on visual perspective.

Raw amplifier cabinet, sanded and ready for staining.

I then stained the box using a water based mahogany stain, and after it had dried completely, I applied 3 layers of Tru-Oil, giving it a nice vintage look that goes very well with my shoddy wood work.

Stained and oil-finished cabinet, surrounded by a glow of contentment.

I also finished the panel wiring, and the amplifier is now more or less ready for final assembly. The following picture shows the completed panel. From left to right we have volume control with power switch, tone control, grit, gain control, and bass switch. The protoboard is attached to the back of the panel using an aluminium carrier that is held in place by the grit switch. I soldered a 4 pin connector (Vcc, Ground, Input, Output) to the board to allow for easy assembly/disassembly.


The connector plugs into a 4 pin header that is part of the back panel, where the input, headphones, and power jacks are located (see last picture). There's also a 2 pin header there for the actual speaker.

After having fixed a small problem with the protoboard (I had forgotten the connection between pins 3 and 4 of the LM386; see design above), the amp worked! YES!!! It won't fill a concert hall, but as an exercise amp for the living room, it'll do just fine.

The controls have less effect than I expected, something I have to check, but at least I get some sound through the speaker. The connectors have already paid off, because now I can disassemble, check, fix, and then reassemble everything. For now, I have assembled everything and made a few pictures.

Finished guitar amp. I'll look for a speaker grille later.
Back of amp with power, headphones, and input jacks.
This more or less completes the construction of the Noisy Cricket Guitar Amp. I'll check the tone, grit and tone controls to see, if I did everything right, but for now I'm quite satisfied.

I'm aware that you can get a Marshall Micro Amp for around 50 Dollars, but to be honest, building the Noisy Cricket was way more fun than making an online order.

Tuesday, 23 September 2014

RAM Cartridge for the Yamaha DX7 Synthesizer (Part III: Testing)

DX7 RAM cartridge version 1 (left) and 2 (right). Surprisingly(?) neither works.
My DIY project to build my own RAM cartridge for the Yamaha DX7 digital synthesizer is currently in limbo. I have fixed everything that I found to have made wrong with my prototype board, and it still does not work. I had the following problems with my board:
  • Edge connector is too narrow. It appears to have a 3+ mm pitch. Mine has a tenth inch (2.54mm) pitch. I fixed it by gluing a separate correctly sized/pitched double sided  PCB to the board. At the same time I also fixed...
  • Swapped connectors. There was a 50-50 chance as to which side of the edge connector faces which way. My guess was wrong: the side with the power supply faces backwards. To fix that, I had to wire the pins of my glued-on PCP to the corresponding pins on the prototype PCB crosswise back-to front and front-to-back.
  • Missing pull-up resistors. For a reason that totally eludes me, I forgot to add pull-up resistors for address lines 8 to 10. I soldered them at the back of the PCP using the power pin on a near resistor network.
  • Missing 2.2uF/16 polar bypass capacitor. I know from various synth DIY projects that you're supposed to add bypass capacitors near the power supply of ICs. I didn't add one on the prototype board, because the design on yates.ca doesn't include one either.
Despite all of the above, the board fails consistently with a Write Error! message. I can briefly see the message Under Writing flash by, which led me to the missing address pull-up resistors. That didn't fix it, though. I'm a bit at a loss, because the circuit isn't that complicated, and I can see no reason why it shouldn't work. Perhaps I have simply fried the 28C64 EEPROM? It is a surface mount device, and I'm not the most expert solderer. For me, it means to go back to the drawing board.

In the meantime, you might be interested in the DX7 RAM Cartridge project by blogger Brian Durocher.

Monday, 8 September 2014

RAM Cartridge for the Yamaha DX7 Synthesizer (Part II: Prototyping)

You knew it! If you followed my Les Paul DIY build log, you're not surprised to hear that I managed to bungle the DX7 cartridge project in a similarly spectacular fashion, and it's all my fault.

The prototype boards arrived, and they look awesome! The PCB material is of a dark violet color, and all the solder pads are golden. I ordered them at OSH Park, where you'll always get (multiples of) 3 boards.

DX7 cartridge prototype boards, rightmost already populated.
When I checked them I saw instantly that I made the connector part too small. Instead of measuring the proper connector spacing, I violated Sommerer's Law ("your assumptions are wrong") and assumed them to be the usual one tenth of an inch or 2.54mm. Well, its closer to 3 mm, so they don't fit. Oh, well!

Now, instead of throwing them away and order another batch with the proper dimensions, I'll use them as tinkering material. I already ordered a small sheet of blank double sided circuit board, which I'll cut to size using a high-tech template that I made from an obsolete phone card.


I'll make the properly spaced connector traces by filing or scratching gaps into the copper layer, and then glue the contraption as a new connector onto the PCB. All that's needed then is pieces of wire connecting the pads on the cartridge PCB with the corresponding pads on the new connector. It'll look hideous, but serve its purpose.

But first I have to wait for the blank PCB to arrive.