Seb's Synth-DIY Pages

4xD - Construction guide


Click to view printable version of this page

This is not intended to be an comprehensive step-by-step guide.  It does however list most of what you will need to know when building a 4xD.


Component placement

The silkscreen legend is quite small, so if you have trouble reading it you can download and print this TIFF file: 4xd.tif.  There is an error on the silkscreen and in this file: the lower right sections are labelled "OUTPUTS 1&2" and "INPUTS 1&2".  These should in fact be labelled "OUTPUTS 3&4" and "INPUTS 3&4".

It is recommended you solder the surface mount parts first otherwise the bigger thru-hole parts will get in the way.

The spacing around the 2 power regulators is very tight, so if the 100uF capacitors C84 & C87 are fatter than the normal 5mm / 0.1" pitch size you will have to mount the regulators at a slight angle.  You may have to go as low as 10V rating to get a 100uF capacitor with 5mm diameter.

Be very sure to get the values of R104, R105 & R106 correct as these set the analog power rail voltage.  If you get them wrong you stand a good chance of damaging the expensive CODEC and the Opamp ICs (and the CODEC ICs will be tricky to desolder and resolder once all the other components are in place!).


Connecting the ground planes

THIS IS IMPORTANT!  The analog and digital grounds are kept completely separate in this schematic for the benefit of the PCB routing software.  However, these grounds *must* be connected at the PSU.  This is represented in the schematic by link L9 which is placed under capacitor C81.  If you don't want to solder under (or opposite side of) C81 then this connection can be made with a solder bridge between the anodes of D2 and D4.  Do not forget this connection or you may damage some of the ICs!


Optional components

Unless you want to have CV inputs, all the components in the bottom left corner section of the PCB can be omitted (this is 2 headers, 4 resistors, 2 opamps and a capacitor).  In addition the headers DIG I/O 1 and DIG I/O 2 can be omitted unless additional digital I/O is desired.  See the schematic page for more information on this.


Connecting the links

By default the 4 triple-links L1, L2, L3, L4 should be connected with the middle pad linked to the bottom right pad (i.e. in the "STD" position).  See the schematic page for more information on this.


Power supply considerations

The power supply is designed to run from a 5VAC to 7.5VAC 500mA wall-wart; it can run from a higher input voltage, but you will need more heatsinking.

I first tried a 7.5VAC 1A wall-wart which actually puts out more than 9VAC under the 4xD load.  With this I found I needed a small heatsink on U23 (a small bolt on heatsink orientated upside-down just about fitted in the space available).  The digital regulator U24 got really hot (dsPICs really suck current when running at 30 MIPS) so I fitted a PCB header and mounted it to a bigger heatsink away from the board (see the photo page).

I'm now using a different wall-wart that puts out 7.8VAC under 4xD load and with this the regulators are running a fair bit cooler.  I've still left the digital regulator mounted offboard on the big heatsink, but I think with a low enough input voltage it could be mounted on the PCB with a small heatsink.


Panel wiring

On the mechanical side of things, the rotary encoders will need the plastic panel locators snipped off unless you have a cavity for them to fit into.  You probably won't need the PCB brackets although I have included these with the encoders in case you do make up a PCB for the panel components and want to support it from them.  I always fit the lock washers between the encoder/pot and the panel rather than under the nut - this helps prevent the encoder/pot rotating.  Take care not to over tighten the rotary encoder and pot nuts or you may damage not just the plastic threads but also the body itself.

To minimise the amount of wires between the panel and PCB, the following connections need to be made at the panel:


If you have room in your panel design you might consider adding some input attenuator pots.  Use something like a 50K log pot from IN socket to ground, then take the signal input from the pot wiper.  If you only have linear pots then use 100K and the resistors on the PCB will make it behave somewhat like a log pot.

For the feedback pots, I have a feeling that linear pots may work better - my experience using mine, which is built with log feedback pots, is that the useful feedback range tends to be bunched up the top end of the pot position.  Those people who order feedback pots will receive linear ones.


Connecting the PCB headers

The following table details the pin connections for each PCB header.  Looking at the board with the 4xD logo the right way up: the horizontal header pins are listed in order from left to right, and the vertical header pins are listed in order from top to bottom.


Power
AC Input 7.5VAC 1=AC1, 2=AC2

MIDI
MIDI In MIDI IN 5=-, 4=+
(numbers correspond to DIN socket pin numbers)
MIDI Thru MIDI THRU 5=-, 2=GND, 4=+
(numbers correspond to DIN socket pin numbers)
MIDI Out MIDI OUT 5=-, 2=GND, 4=+
(numbers correspond to DIN socket pin numbers)

ICSP/ICD
UI PIC UI PIC 5=PGC, 4=PGD, 3=DGND, 2=+5V, 1=MCLR
(note this is round the other way compared to the DSP PICs)
DSP PIC 1 DSPIC1 1=MCLR, 2=+5V, 3=DGND, 4=PGD, 5=PGC
DSP PIC 2 DSPIC2 1=MCLR, 2=+5V, 3=DGND, 4=PGD, 5=PGC

LEDs
7 Segment LED LED1 1=e, 2=d, 3=DP, 4=c, 5=g, 7=b, 8=Digit3-common-anode,
9=Digit2-common-anode, 10=f, 11=a, 12=Digit1-common-anode
(numbers correspond to LED pin numbers, note that pin 6 is not connected)
Clip LEDs CLIP-1, CLIP-2,
CLIP-3, CLIP-4
A=anode(+), K=cathode(-)

Panel controls
LFO Select SW1 1=LFO A, 2=Common
LFO Wave SW2 1=Switched, 2=DGND (connects to other panel controls)
LFO Rate ENC5 1=CCW, 2=CW
LFO Depth ENC6 1=CCW, 2=CW
LFO Amt/Phase ENC7 1=CCW, 2=CW
Delay Time ENC1, ENC2,
ENC3, ENC4
1=CCW, 2=CW
Feedback FB-1, FB-2,
FB-3, FB-4
1=CCW, 2=Middle

Inputs & Outputs
Inputs IN-1, IN-2,
IN-3, IN-4
1=GND, 2=Tip
Outputs OUT-1, OUT-2,
OUT-3, OUT-4
1=GND, 2=Tip

Optional connections
Analog inputs AN I/O 1, AN I/O 2 1=CV1, 2=CV2
(CV GND should be connected analog ground, e.g. IN sockets GND)
Digital I/O DIG I/O 1, DIG I/O 2 4=!SS2/RG9, 3=SDO2/RG8, 2=SDI2/RG7, 1=SCK2/RG6


Programming the PICs


Note that the first time you program the dsPICs you will have to cycle the power on the 4xD board before the internal oscillators will start.  This is necessary because the PLL mode is changed when first programed.

To run the code in debug mode from the MPLAB software you need to load "MPLAB ICD 2" as the debugger and program the PIC from the Debugger menu - this loads the debug code into the device and sets the appropriate debug configuration bits.  After you have finished debugging the code you will need to switch to "MPLAB ICD 2" as the programmer and reprogram the device from the Programmer menu.

When you program the dsPICs from the debugger they will program ok, but then you will get the error message "Unable to enter debug mode".  This is normal because the PCB switch needs to be switched to the "DEBUG" position before you can begin running or stepping through the code.  Make sure the Comm Channel Select setting is set to "Use EMUC1 and EMUD1" in the Configure->Configuration Bits panel in MPLAB.  You will need to switch the PCB switch back to "PROG" each time you want to program new code.

Since the sine lookup table is rather large (probably higher resolution than it needs to be) programming the dsPICs is very slow, so after programming fully the first time I would suggest you set the ICD2 to program only from 0x0 to 0xFFF and turn off "Erase all before Program".  This will only re-program any changes to the code part and leave the sine table as is.

There are many possible problems you could run into when using MPLAB and ICD2, and I won't repeat all the troubleshooting documentation here, but if you do get a problem feel free to email me and I can probably help.


More ..