Soldering

Putting everything together

Building this version of the OpenDCC switch decoder should be easy for those who have previous experiences in building hardware. If someone without any experiences in soldering and electronics would like to build this version, it might be better to first obtain some experiences building some simple kits.

This page describes, step by step, how to build the OpenDCC switch decoder (hardware 2.2). The order to mount components is lowest height first; feel free however to use another order if you believe such order is more appropriate. Before you start, it may be good to print the picture below showing the various component locations and values. Note that, compared to the other pictures on this page, the picture below is rotated by 90 degrees.

Before you start, make sure you put all components on the component side of the PCB (see below), and not on the soldering side (click on the picture to see an enlarged version).

Step 1: mount the five 1N4148 diodes. Make sure each diode is mounted in the correct direction (see the line on each diode), since otherwise short-circuits are possible and the diodes may get damaged.

Step 2: mount the eight zener diodes. Again make sure also the zener diodes are mounted in the correct direction: the line on each zener diode should point towards the "bottom", thus towards the center of the PCB.

Step 3: mount all seven resistors. The direction on each resistor is not important, but since the resistors have different values, the location is important. From left to right to vertically mounted resistors should have the following values: 100 Ohm (brown-black-brown-gold), two times 10KOhm (brown-black-orange-gold), 150 Ohm (brown-green-brown-gold) and two times1K5 (brown-green-red-gold). The horizontally mounted resistor at the bottom should have a value of 1KOhm (brown-black-red-gold).

Note: the 150 Ohm resistor which is shown on the picture below is not really needed, and may be replaced by wire bridge. In the latest versions of the circuitry and PCB this resistor has been removed.

Step 4: mount the 10mH coil, which connects Pin 30 of the AVR (AVCC) to VCC. Although this coil is not strictly needed for the switch decoder (and can thus be omitted), it will be needed for certain other PCBs that are currently under development, such as the block occupancy decoder.

Step 5: mount the crystal of 11.0592 Mhz. This value was chosen for greatest precision of the optional RS-bus feedback signal. Other values may be selected, however, although usage of other values requires modification of the software make file value, and thus recompilation.

Step 6: mount the seven 100nF decoupling capacitors.

Step 7: mount the IC sockets. Note the small gaps at one side of each socket; except for the 28 pin socket at the bottom, all gaps should be located towards the left. Depending on the type of 40 pins IC socket, it may be necessary to remove small parts of the housing to create space for the crystal.

Step 8: mount the PC817 opto coupler. Also the opto coupler has a marking at one side; this marking should point towards the bottom.

Step 9: mount the three SIL resistors. The two 22K SIL resistors are located immediately above the two 18 pin IC sockets; and may be connected both ways (these two resistors are completely symmetric; there is no left nor right). The third 100K SIL resistor is not symmetric, however, and should be mounted such that the marker (usually a dot) on the resistor points to the left.

Step 10: mount the LED. Like normal diodes, the direction of how to connect the LED is important. In general the LED housing has a small indentation for the -, which should be located towards the right (the PCB's outside). The longer of both LED wires is the +, and should be located to the left (PCB center).

Step 11: mount the two capacitors of 18 (or 22) pF.

Step 12: add the button.

Step 13: mount the bridge rectifier. Again the connecting wires must be put in the right holes; the + should be directed towards the top-left. In case the decoder should receive power from the DCC line (instead of the separate power line), the bridge rectifier is not needed, bit an 1N4004 (or similar) should be mounted, and the soldering bridge should be closed.

Step 14: mount the BC556 transistor; also for this component the wires may bot be interchanged.

Step 15: add the 3,5 mm terminal block connector. Note that for the PCB described on this page the terminal blocks at the left all have screws, while the terminal blocks at the right and top are all pluggable. Feel free to change this, however, if desired. Also note that this terminal block is used for the (RS-bus) feedback signal; if the decoder should be operated without feedback, this terminal block need not be mounted

Step 16: mount the 16 pin IDC box type plug.

Step 17: mount the fuse.

Step 18: mount the 3,5 mm pluggable terminal block. Feel free to use another type of terminal block, is desired.

Note that this terminal block is used for the (RS-bus) feedback signal; if the decoder should be operated without feedback, this terminal block need not be mounted.

Step 19: mount the capacitor of 100 microFarad. The minus pole should be directed towards the right.

Step 20: mount the 5 mm terminal blocks at the left, right and top.

Step 21: mount the capacitor of 470 microFarad. The minus pole should be directed towards the left.

Step 22: mount the 7805 stabilizer. The metal part of the housing should be directed at the outside of the PCB.

Step 23: finally mount the ICs. Note that all IC markers should point towards the left.

The PCB is now ready. After is passes a visual test, it may be connected to the DCC signal, switches and power supply. If the micro controller was not programmed before, it is time to take care of that now.

Options

Instead of using separate power supply lines, the decoder may also receive its power via the DCC lines. In that case the rectifier bridge should not be mounted, but instead an additional 1N4004 is needed (any diode between 1N4002 and 1N4007 will do). In this case, don't forget to close the soldering bridge.

Instead of driving switches, the decoder can also be used to drive two servos. In that case two extra 3 pin servo connectors are needed, plus two additional bipolar 47 microFarad SMD capacitors of 6,3V; the traditional electrolytic capacitors will not do, however. Note that a dedicated servo decoder is planned later.

If no feedback is required, the 28 pin IC socket may be omitted, as well as both 3,5 mm terminal blocks.