Difference between revisions of "Building a Zynthian Box using an official Kit"

From ZynthianWiki
Jump to navigation Jump to search
 
(204 intermediate revisions by 3 users not shown)
Line 2: Line 2:
 
=Introduction=
 
=Introduction=
  
This tutorial is intended for those who are building a Zynthian Box using one of the kits i offer here:
+
This tutorial is mainly intended for those who are building a Zynthian Box using one of the ''official'' kits, that i offer here:
  
  [https://discourse.zynthian.org/t/zynthian-kits/150/17 Getting a Zynthian Kit]
+
  [http://shop.zynthian.org Zynthian Shop]
  
Anyway, it's quite detailed and can be used as a guide to build your Zynthian Box from scratch. Of course, you will have to be more creative if you want to do it in that way ;-)
+
Specifically, the instructions are for the assembly of kits v1 (version 1), those using the 2in1 circuit and the PiTFT 2.8' display. If you have a newer kit v2, based in the All-In-One circuit and the PiScreen 3.5' display, you better should read [[Building a Zynthian Box using an official Kit v2 | this updated tutorial]].
 +
 
 +
 
 +
[[File:Zynthian_finished_02.jpg|600px]]
 +
 
 +
Anyway, it's quite detailed and can be used as a guide to build a custom Zynthian Box from scratch. Of course, you will have to be creative if you want to do it in that way ;-)
 +
 
 +
=Bill of Materials=
 +
* Zynthian Basic Kit (custom PCBs, electronic parts, wiring and knobs). Visit the [http://shop.zynthian.org Zynthian Shop]
 +
* Case kit, with nuts, bolts and case connectors. Visit the [http://shop.zynthian.org Zynthian Shop]
 +
* Raspberry Pi 3 (or Raspberry Pi 2)
 +
* [https://www.hifiberry.com/products/dacplus HifiBerry DAC+]
 +
* PiTFT 2.8' TouchScreen
 +
** [https://www.adafruit.com/product/2298 Resistive touchscreen] (less expensive)
 +
** [https://www.adafruit.com/product/2423 Capacitive touchscreen] (better touch response)
 +
* Power adapter for Raspberry Pi (5.1v 2.4A with microUSB connector)
  
 
=Some definitions=
 
=Some definitions=
Line 12: Line 27:
 
===Zynthian===
 
===Zynthian===
  
It's a project with the goal of creating an Open Synth Platform. It's a community-driven project. If you are here, probably you already know this ;-)
+
It's an open project with the goal of creating an Open Synth Platform based in Free Software and Open Hardware Specifications & Designs (when available). It's a community-driven project. If you are here, probably you already know all this ;-)
  
 
===Zynthian Software===
 
===Zynthian Software===
Line 24: Line 39:
 
  + '''Zynthian User Interface''' ([https://github.com/zynthian/zynthian-ui github repository])
 
  + '''Zynthian User Interface''' ([https://github.com/zynthian/zynthian-ui github repository])
  
All the software used by Zynthian is Free Software (free as freedom) and it's covered by the GPL license or similar. If you don't know what i'm talking about, please, take a look to this: [https://www.gnu.org/philosophy/free-sw.en.html What is Free Software?]
+
All the software used by Zynthian is Free Software (free as in ''freedom'', not as in ''free beer'') and it's covered by the GPL license or similar. If you don't know what i'm talking about, please, take a look to this:  
 +
 
 +
[https://www.gnu.org/philosophy/free-sw.en.html What is Free Software?]
 +
 
 +
The easiest way of getting the software is downloading the last ''official'' SD image from here:
  
The easiest way of getting the software is downloading the last "official" SD image from here:
+
'''[https://os.zynthian.org/zynthianos-last-stable.zip Download Last Stable ZynthianOS SD-image ]'''
  
'''[https://discourse.zynthian.org/t/merry-zynthians-and-happy-new-sd-image/314 Download Zynthian "Gorgona" SD-image]'''
+
It's a 8GB compressed image file (plenty of soundfonts) compiled for Raspberry Pi 3. (Please, keep feeding the torrent after downloading!)
  
This SD-image include all the zynthian software, properly configured and ready to use. Plug and play! ;-)
+
These SD card images include all the Zynthian software, properly configured for working with the official kits. Completely ready to use. Plug and play!  
  
After downloading the SD-image, you have to write it to an SD-card. Depending on your OS you have to choose how to create the SD-card. You need a minimum size of 16GB for the full "Gorgona" image and 8GB for the "Gorgonilla" lite image. There is a really good manual for this at [https://www.raspberrypi.org/documentation/installation/installing-images/ https://www.raspberrypi.org/documentation/installation/installing-images/].
+
After downloading the SD-image, you have to write it to a SDcard. You need a SD card with a minimum size of 16GB, although you can use a bigger one if you want.
 +
 
 +
Use Etcher https://etcher.io/ (free software works on Mac, Windows or Linux) to flash the image onto the SDcard.
 +
 
 +
Or do it manually: There is a really good manual for this at [https://www.raspberrypi.org/documentation/installation/installing-images/ this link].
  
 
If you prefer, you can build your own SD image following these instructions:
 
If you prefer, you can build your own SD image following these instructions:
Line 40: Line 63:
 
===Zynthian Box===
 
===Zynthian Box===
  
A Zynthian Box is a hardware device designed to run the Zynthian Software. Currently it's based in the Raspberry Pi platform, but it could be adapted easily to other computer platforms.
+
A Zynthian Box is a hardware device, a small digital computer designed to run the Zynthian Software. Currently it's based in the Raspberry Pi platform, but it could be easily adapted to other computer platforms.
  
This is a sketch with the main blocks of a Zynthian Box:
+
This is a sketch with the main blocks of the ''official'' Zynthian Box:
  
[[File:Zynthian_hardware_scheme.png|600px]]
+
[[File:Zynthian_hardware_scheme.png|800px]]
  
In the project repositories you will find all the electric schemes, PCB specifications, Herber files, etc. to build your own zynthian box from scratch:
+
In the project's repositories you will find all the electric schemes, PCB specifications, Herber files, etc. to build your own Zynthian Box from scratch:
  
 
  - [https://github.com/zynthian/zynthian-hw Zynthian Hardware Repository]
 
  - [https://github.com/zynthian/zynthian-hw Zynthian Hardware Repository]
 
  - [https://github.com/zynthian/zynthian-case Zynthian Case Repository]
 
  - [https://github.com/zynthian/zynthian-case Zynthian Case Repository]
 +
 +
The ''official'' version is the canonical reference. Of course, you don't have to build the ''official'' version. You can build your customized Zynthian Box modifying and improving what you want. If you do so, some feedback would be very appreciated ;-)
  
 
===Zynthian Kit===
 
===Zynthian Kit===
  
A Zynthian Kit is a set of SPECIFIC electronic modules designed for building a Zynthian Box. This tutorial refers to the "canonical" zynthian kit, that is composed of:
+
A Zynthian Kit is a set of specific and generic electronic modules designed or picked for building a Zynthian Box. This tutorial refers to the ''official'' Zynthian Kit, that is composed of these specific parts:
  
  + 4 x Controller Modules (rotary encoder + switch)
+
  + '''4 x Controller Modules''' (rotary encoder + switch)
  + 1 x 2in1 Module (GPIO expander + MIDI IN)
+
  + '''1 x 2in1 Module''' (GPIO expander + MIDI IN)
  + Main ribbon bus cable
+
  + '''1 x Main ribbon bus cable'''
  + Dupont color-wire connectors
+
  + '''Set of Dupont color-wire connectors'''
  
 
[[File:Zynthian_kit_assembled.jpg|600px]]
 
[[File:Zynthian_kit_assembled.jpg|600px]]
  
Of course, other arrangements are possible and some people is working in different ones:
+
and these generic parts:
 +
 
 +
+ '''1 x Raspberry Pi 2/3'''
 +
+ '''1 x Hifiberry DAC+''' (also pro & lite)
 +
+ '''1 x Adafruit PiTFT 2.8' ScreenTouch (or clonic)'''
 +
 
 +
Of course, other arrangements and combinations are possible. You can easily configure your hardware using the [http://wiki.zynthian.org/index.php/Configuration_Users_Guide Webconf Tool], or if it doesn't work, tweaking from the [http://wiki.zynthian.org/index.php/Command_Line_User_Guide command line].
 +
 
 +
You can take a look to some of the alternate builds made by some community members:
  
 
  - [https://discourse.zynthian.org/t/a-build-with-variations/324 A build with variations, by vagnscott]
 
  - [https://discourse.zynthian.org/t/a-build-with-variations/324 A build with variations, by vagnscott]
 
  - [https://discourse.zynthian.org/t/another-wiring/333 Another Wiring, by Imager]
 
  - [https://discourse.zynthian.org/t/another-wiring/333 Another Wiring, by Imager]
 +
- [https://discourse.zynthian.org/t/success-cases/41 Success Cases]
  
 
===Zynthian Case===
 
===Zynthian Case===
  
It's the enclosure used to put on all the parts. Again, this tutorial refers to the "cannonical" zynthian aluminum case, that is designed to be used in conjunction with the next parts:
+
It's the enclosure used to put on all the parts. Again, this tutorial refers to the ''official'' Zynthian Aluminum Case, that is designed to be used in conjunction with the ''official'' Kit.
  
+ '''Raspberry Pi 2/3'''
+
This case is available as a kit, including all the needed connectors, knobs, bolts & nuts:
+ '''Soundcard HifiBerry DAC+''' (also pro & lite)
 
+ '''Display Adafruit PiTFT 2.8"''' touchscreen (or clonic version)
 
 
 
The case is available as a kit, with all the needed connectors, knobs, bolts & nuts:
 
  
 
[[File:Zynthian_aluminum_case_kit.jpg|600px]]
 
[[File:Zynthian_aluminum_case_kit.jpg|600px]]
  
If you intend to use a different soundcard or display, probably it won't fit the case and you will have to modify it. Of course, you can build your own case like other people has done:
+
If you intend to use a different soundcard or display, probably it won't fit the case and you will have to modify it. Of course, you can build your own customized case. Here you can find some examples from the community:
  
 
  - [[Zynthian_Images_Enclosures|Zynthian Enclosures]]
 
  - [[Zynthian_Images_Enclosures|Zynthian Enclosures]]
 
  - [https://discourse.zynthian.org/t/success-cases/41 Success Cases]
 
  - [https://discourse.zynthian.org/t/success-cases/41 Success Cases]
  
=Building the Zynthian Kit=
+
=Building the Zynthian Kit parts=
 +
 
 +
===Prerequisites===
 +
 
 +
Building your own Zynthian Box is not very difficult, but you will need all your attention, some basic tools and a few skills. Read the instructions and observe the detailed photos carefully. If you get in trouble you can ask the community:
 +
 
 +
https://discourse.zynthian.org
 +
 
 +
====Required Skills====
 +
 
 +
For building the hardware you should have the following basic competences:
 +
 
 +
+ Soldering
 +
+ Basic understanding of reading basic electronic circuit diagrams
 +
+ Enjoyment of work with electronic hardware and parts
 +
 
 +
If you have not soldered before, you should read a [http://www.ladyada.net/learn/soldering/thm.html good soldering tutorial], or perhaps you would prefer the [http://mightyohm.com/files/soldercomic/FullSolderComic_EN.pdf Soldering is Easy] comic book by [http://mightyohm.com/ MightOhm].
 +
 
 +
====Tools====
 +
 
 +
And this is the list of required and recommended tools:
 +
 
 +
+ Soldering iron
 +
+ Tin-solder
 +
+ Wire-cutter
 +
+ Small Plier
 +
+ Screw-drivers Philips
 +
+ Wrench, for potentiometer nuts (recommended)
 +
+ PCB holder for soldering (very recommended!)
 +
+ Small iron brush (very recommended!)
 +
+ Magnifiying glass (recommended)
 +
+ A vice (recommended)
 +
+ A hand saw for metal (recommended)
 +
+ Multimeter (recommended!)
 +
 
 +
===Some general recommendations===
 +
 
 +
'''1.''' Be careful to protect the components from [http://en.wikipedia.org/wiki/Electrostatic-sensitive_device electrostatic discharge].  This is most critical for the ICs and the diodes. Be careful with your fingers. Your body can hold a good amount of static electric charge. Under some circumstances that charge can be drained through some of the components that you are handling and this could break the component. Try to hold the PCBs by the borders and discharge your body frequently touching some "ground" with your fingers.
 +
 
 +
'''2.''' Before soldering, please, check that you are soldering in the right side of PCB, also that components orientation is correct (ICs, diode)
 +
 
 +
'''3.''' When soldering, always avoid overheating. Electronic components doesn't like overheat! This is specially important when soldering the big connectors in the HifiBerry soundcard and the PiTFT touchscreen. If you overheat the circuit, probably you will break some electronic component and you will end with a dead board. I recommend  to use a fan while soldering. If not, you can use your mouth ;-) Also, don't solder the contacts in order. It's better to jump from one to another in the oposite corner. If you are not sure of your soldering skills, please, take your time and do some practice with inexpensive components and prototyping board.
 +
 
 +
'''4.''' After finishig the soldering, brush smoothly all the contacts. You may use a small iron brush. After that, blow over the circuit to remove any remaining tin.
 +
 
 +
'''5.''' Inspect visually all the soldered contacts. You could use a magnifying glass for verifying that every soldered pin looks good. If you are not sure, perhaps you could add more tin or re-solder the pin. Also, you could use a multimeter for testing the dubious contacts.
 +
 
 +
'''6.''' And of course, double-check everything! Assembling and wiring process are prone to errors. Don't be too confident ;-)
 +
Re-check component's orientation (ICs and diode), wiring, etc.
 +
 
 +
===Assembling the Controller Modules===
  
===Controller Modules===
 
 
The controller module kit is composed of:
 
The controller module kit is composed of:
  
Line 92: Line 171:
 
  + 4 x rotary encoders with switch (PEC11R-4215K-S0024)
 
  + 4 x rotary encoders with switch (PEC11R-4215K-S0024)
 
  + 4 x ceramic capacitor 100nF (C1)
 
  + 4 x ceramic capacitor 100nF (C1)
 +
+ 8 x ceramic capacitor 10nF (c2, c3)
 
  + 4 x 4-pin-row male connector (angle)
 
  + 4 x 4-pin-row male connector (angle)
  
 
[[File:4xcontroller_single_kit.jpg|600px]]
 
[[File:4xcontroller_single_kit.jpg|600px]]
 +
 +
This components are used to build the 4 controller modules that form the input side of the physical ''Zynthian User Interface''. Each controller embed an incremental rotary encoder and a switch, so 4 wires are needed for connecting it with the RBPi GPIO.
  
 
These are the steps for building one module:
 
These are the steps for building one module:
  
  1. Bend the encoder's securing tabs to 90º, so you can insert it in the upside of the PCB (the labeled side!).
+
0. Be sure that you have read and understdood [[#Some_general_recommendations|these recommendations]].
  2. Place the capacitor in the C1 position (the most right!)
+
  1. Bend the encoder's securing tabs to 75º, so you can insert it in the upside of the PCB (the labeled side!). Please, be very careful when bending the tabs as the encoder case is quite fragil and could be deformed. I recommend to use a small plier and not reaching to 90º.
  3. Solder the encoder and capacitor carefully. Always avoid overheating!
+
  2. Place the 100nF capacitor in C1 position (the most right!). This is for debouncing the push switch.
 +
3. Place the 2 x 10nF capacitors in C2 & C3 positions. These are for debouncing the rotary encoder contacts.
 +
  3. Solder the encoder and capacitors carefully.
 
  4. Place the pin-row connector in the downside of the PCB, with the angle pins facing inwards (look the photo!)
 
  4. Place the pin-row connector in the downside of the PCB, with the angle pins facing inwards (look the photo!)
 
  5. Solder the pin-row carefully.
 
  5. Solder the pin-row carefully.
  6. Bend the pin-row outwards a little bit, like shown in the photo. You can use a screwdriver or similar to do it.
+
  6. Bend the pin-row outwards a little bit, like shown in the photo. You can use a screw-driver or similar to do it.
 +
7. Use the plier to close the tabs again, trying to "catch" the PCB.
  
 
[[File:Controller_single_ensambled_top.jpg|290px]]
 
[[File:Controller_single_ensambled_top.jpg|290px]]
 
[[File:Controller_single_ensambled_01.jpg|400px]]
 
[[File:Controller_single_ensambled_01.jpg|400px]]
  
You have to build 4 controller modules, so to have to repeat these steps 4 times.
+
You have to build 4 controller modules, so you to have to repeat the steps 4 times.
  
===2in1 Module===
+
===Assembling the 2in1 Module===
  
 
The 2in1 module kit is composed of:
 
The 2in1 module kit is composed of:
  
 
  + 1 x 2in1 PCB
 
  + 1 x 2in1 PCB
  + 1 x opto-coupler 6N138
+
+ 1 x GPIO-expander MCP23008 => 18-pin IC
  + 1 x dioode 1N4148 (D1)
+
  + 1 x opto-coupler 6N138 => 8-pin IC
  + 1 x resistor 1K (R1)
+
  + 1 x diode 1N4148 (D1)
  + 1 x resistor 10K (R2)
+
  + 1 x resistor 1K (R1) => brown-black-red (*)
  + 1 x resistor 220 (R3)
+
  + 1 x resistor 10K (R2) => brown-black-orange (*)
+ 1 x MCP23008
+
  + 1 x resistor 220 (R3) => red-red-brown (*)
 
  + 2 x ceramic capacitor 100nF (C1, C2)
 
  + 2 x ceramic capacitor 100nF (C1, C2)
  + 1 x 8-row-pin male connector (angle)
+
  + 1 x 8-row-pin male-angle connector
 
  + 1 x 6-row-pin male connector
 
  + 1 x 6-row-pin male connector
 
  + 1 x 2-row-pin male connector
 
  + 1 x 2-row-pin male connector
 +
 +
(*) Read from left to right with the tolerance ring (gold or silver) on the right.
  
 
[[File:2in1_kit.jpg|600px]]
 
[[File:2in1_kit.jpg|600px]]
Line 130: Line 217:
 
These are the steps for building the 2in1 module:
 
These are the steps for building the 2in1 module:
  
 +
0. Be sure that you have read and understood [[#Some_general_recommendations|these recommendations]].
 
  1. Place all the components in the upside of the PCB (the labeled side!). Put attention to the orientation of the ICs and diode.
 
  1. Place all the components in the upside of the PCB (the labeled side!). Put attention to the orientation of the ICs and diode.
  2. Solder the encoder and capacitor carefully. Always avoid overheating!
+
  2. Solder the components carefully. Always avoid overheating!
  
 
[[File:2in1_ensambled.jpg|600px]]
 
[[File:2in1_ensambled.jpg|600px]]
  
=Tweaking the Modules=
+
===Tweaking the HifiBerry DAC+ soundcard===
 
 
===HifiBerry DAC+ soundcard===
 
  
 
If you are using the HifiBerry DAC+ soundcard (also lite & pro versions), you should add 2 extra connectors to the board:
 
If you are using the HifiBerry DAC+ soundcard (also lite & pro versions), you should add 2 extra connectors to the board:
Line 143: Line 229:
 
  + 40 row-pin GPIO male connector, for connecting the '''main ribbon bus cable'''
 
  + 40 row-pin GPIO male connector, for connecting the '''main ribbon bus cable'''
 
  + 3 pin header connector, for connecting the extra audio line-out Jack connectors
 
  + 3 pin header connector, for connecting the extra audio line-out Jack connectors
 +
 +
Both connectors must be placed on the top side of the board, so you should solder the contacts on the bottom side.
 +
 +
'''WARNING!''' Soldering the big 40-pin connector can be difficult if you don't have enough practice. Please, before starting be sure that you have read and understood [[#Some_general_recommendations|these recommendations]].
  
 
[[File:Hifiberry_dacplus_extra_connectors_unassembled.jpg|600px]]
 
[[File:Hifiberry_dacplus_extra_connectors_unassembled.jpg|600px]]
Line 148: Line 238:
 
[[File:Hifiberry_dacplus_extra_connectors_mounted.jpg|600px]]
 
[[File:Hifiberry_dacplus_extra_connectors_mounted.jpg|600px]]
  
===PiTFT 2.8' TouchScreen===
+
===Tweaking the PiTFT 2.8' TouchScreen===
  
 
If you are using the Adafruit PiTFT 2.8' TouchScreen (or a clonic version) in a standard mounting (standard main ribbon bus and case size), is highly recommended to use the side 26-pin male connector, not the bottom female connector. The main ribbon bus is designed to use the side 26-pin male connector, and the case mounting will be easier if you do so.
 
If you are using the Adafruit PiTFT 2.8' TouchScreen (or a clonic version) in a standard mounting (standard main ribbon bus and case size), is highly recommended to use the side 26-pin male connector, not the bottom female connector. The main ribbon bus is designed to use the side 26-pin male connector, and the case mounting will be easier if you do so.
Line 158: Line 248:
 
====Clonic TouchScreen====
 
====Clonic TouchScreen====
  
If you have a clonic PiTFT 2.8' touchscreen, probably you don't have the side 26-pin male connector soldered in the board, so you should solder it by your own. Also, normally the female connector in the clonic versions is higher that in the original and more annoying yet, so, you will want to remove it with a saw. If you do so, i also recommend to use a vice.
+
If you have a clonic PiTFT 2.8' touchscreen, probably you don't have the side 26-pin male connector soldered on the board, so you should solder it by your own. Also, normally the female connector in the clonic versions is higher that in the original and more annoying yet, so, you will want to remove it with a saw. If you do so, i also recommend to use a vice.
 +
 
 +
After removing the female connector, the side connector must be soldered. Note that you have to place it on the bottom side of the board, so you should solder the contacts on the top side.
 +
 
 +
'''WARNING!''' Soldering the 26-pin connector can be difficult if you don't have enough practice. Please, before starting be sure that you have read and understood [[#Some_general_recommendations|these recommendations]].
  
 
[[File:Pitft_clonic_touchscreen_unassambled.jpg|600px]]
 
[[File:Pitft_clonic_touchscreen_unassambled.jpg|600px]]
Line 164: Line 258:
 
[[File:Clonic_pitft_tweaked_connectors.jpg|600px]]
 
[[File:Clonic_pitft_tweaked_connectors.jpg|600px]]
  
Frequently, clonic PiTFT touchscreen have soldered 4 switches that could be annoying when mounting the display in the case. If the switches remain pressed after mounting, then it would certainly cause problems as it uses GPIO pins and will conflict with the controller modules. The switches are easily pulled out with a pair of pliers, rotating each switch parallel to the board.
+
Frequently, clonic PiTFT touchscreens have 4 switches welded on it. These switches can be annoying when holding the display to the case. If the switches remain pressed after mounting, then it will cause problems as are connected to the GPIO and will conflict with the controller modules. The switches are easily pulled out by slighty turning each switch parallely to the board with a plier.
  
 
[[File:Pitft_clonic_touchscreen_switches.jpg|600px]]
 
[[File:Pitft_clonic_touchscreen_switches.jpg|600px]]
Line 178: Line 272:
 
  https://discourse.zynthian.org/c/building-zynthian
 
  https://discourse.zynthian.org/c/building-zynthian
  
=Case Mounting=
+
===Building the MIDI-IN connector===
 +
 
 +
Before mounting the MIDI-IN connector into the case we will solder the needed wires. Doing it in that way is rather more comfortable than trying to solder inside the case with all the wiring mess.
  
===Building the MIDI-IN connector===
+
If you want, you can protect the contacts using heat-shrink sleeve (the red sleeve pieces in the photo). In that case, remember to insert the sleeve pieces before soldering ;-)
  
 
[[File:Midi_connector_unasambled.jpg|600px]]
 
[[File:Midi_connector_unasambled.jpg|600px]]
Line 186: Line 282:
 
[[File:Midi_connector_assembled.jpg|600px]]
 
[[File:Midi_connector_assembled.jpg|600px]]
  
===Building the JACK Audio Out connectors===
+
===Building the JACK Audio-Out connectors===
 +
 
 +
In the same way, before mounting the Jack connectors into the case we will solder the needed wires. You can use heat-shrink sleeve too.
  
 
[[File:Jack_connectors_unassambled.jpg|600px]]
 
[[File:Jack_connectors_unassambled.jpg|600px]]
  
[[File:Jack_connectors_assambled.jpg|600px]]
+
[[File:Jack_connectors_assembled_new.jpg|600px]]
 +
 
 +
=Case Mounting=
 +
 
 +
===Assemble the Main Computing Block===
 +
 
 +
The main computing block is composed by the RBPi and the HifiBerry soundcard, and shouold be assembled using the next set of separator & bolts:
 +
 
 +
[[File:Bolts_main_computing_block.jpg|200px]]
 +
 
 +
For easier assembling, you should follow the next steps:
 +
 
 +
1. fix the 2x4 separators to the RBPi. The bigger one must be on top and the smaller one on bottom.
 +
2. insert the Hifiberry soundcard in the RBPi.
 +
3. screw the 4 bolts on top of the HifiBerry.
  
===Building the main computing block===
+
[[File:Main_computing_block_rbpi.jpg|600px]]
  
 
[[File:Main_computing_block_02.jpg|600px]]
 
[[File:Main_computing_block_02.jpg|600px]]
Line 198: Line 310:
 
[[File:Main_computing_block.jpg|600px]]
 
[[File:Main_computing_block.jpg|600px]]
  
===Holding everything to the case===
+
===Secure the Main Computing Block===
 +
 
 +
After assembling the main computing block, you should secure it to the case. Use 4 black M2.5 bolts (see photo above).
 +
 
 +
[[File:zynthian_mounting_computing_block_01.jpg|600px]]
 +
 
 +
===Secure the 2in1 module===
 +
 
 +
Secure the 2in1 module to the case using the 2 nylon separators with nuts and the last 2 black M2.5 bolts.
 +
 
 +
[[File:bolts_2in1.jpg|150px]]
 +
 
 +
[[File:zynthian_mounting_2in1_01.jpg|600px]]
 +
 
 +
===Secure the Jack connectors===
 +
 
 +
Put the rings on the outer side of the case to avoid damaging the case surface when you tighten the nuts.
 +
 
 +
[[File:zynthian_mounting_jack_connectors_detail.jpg|600px]]
 +
 
 +
[[File:zynthian_mounting_jack_connectors_top.jpg|600px]]
 +
 
 +
===Secure the MIDI-IN connector===
 +
 
 +
The ground connector goes upwards. I recommend to remove it with a plier as it could "touch" the controller row-pins when closing the case.
 +
 
 +
[[File:zynthian_mounting_midi_connector_detail.jpg|600px]]
 +
 
 +
[[File:zynthian_mounting_midi_connector_top.jpg|600px]]
 +
 
 +
===Secure the ScreenTouch===
 +
 
 +
This step is a little bit tricky because the bolts & nuts are tiny, and it have some slack. Don't press too much the nuts. The PCB have to bend a little bit, but not too much. You should be capable of moving the display pushing the borders with your fingers. Later, when the screen is on, you will fine adjust the position for having the margins equalized.
 +
 
 +
'''Note:''' Before fixing the screen, don't forget to remove the protective plastic sheet!
 +
 
 +
[[File:bolts_screentouch.jpg|200px]]
 +
 
 +
[[File:zynthian_mounting_display.jpg|600px]]
 +
 
 +
===Secure the Controllers===
 +
 
 +
[[File:zynthian_mounting_controllers.jpg|600px]]
 +
 
 +
===Insert the knobs===
 +
 
 +
You should insert the knobs into the encoders before closing the case. This will avoid forcing the encoders too much as otherwise, you could break them. Follow these simple steps and you wouldn't have any problem:
 +
 
 +
* moisten with water or saliva the encoder stem and the knob hole
 +
* press the encoder PCB with the finger from the rear side while pushing the knob from the front side until is completely inserted
 +
 
 +
===Stick the rubber feet===
 +
 
 +
[[File:Zynthian_mounting_case_bottom.jpg|600px]]
  
 
=Connecting everything=
 
=Connecting everything=
  
===Connect the Controller Dupont Wires to the Main Ribbon Bus===
+
This is an easy connection guide, based in colored wires and images. If you want to know and understand the details (or if you have problems and need to ''debug''), you should take a look to the [[#Technical_Reference|Technical Reference]].
 +
 
 +
===Connect the Dupont Wires to the Main Ribbon Bus===
  
 
====Controller Module 4-pin Dupont Wires (x 4)====
 
====Controller Module 4-pin Dupont Wires (x 4)====
  
Take the 4 x "20cm 4-pin Dupont Connector Wires". These are used to connect the 4 controller modules to the RBPi GPIO:
+
The next scheme shows the numbering/naming used for encoders and switches:
 +
 
 +
[[File:zynthian_ui_legend.png]]
 +
 
 +
Take the 4 x "20cm 4-pin Dupont Connector Wires". These wires are used to connect the 4 controller modules to the RBPi GPIO:
  
'''PHOTO NEEDED HERE!!'''
+
[[File:Controller_dupont_wires.jpg|600px]]
  
 
You have to connect it to the middle male connector of the Ribbon Bus Cable following the next scheme:
 
You have to connect it to the middle male connector of the Ribbon Bus Cable following the next scheme:
Line 214: Line 385:
 
[[File:wiring_scheme_controllers_single.png|600px]]
 
[[File:wiring_scheme_controllers_single.png|600px]]
  
'''Note:''' The red wire of the Main Ribbon Bus must be in the left. This wire is ALWAYS the number 1!
+
You can leave disconnected the two purple wires. It's more comfortable to connect it to the 2in1 module after pluging the Main Ribbon Bus to the RBPi.
 +
 
 +
'''Note:''' While connectig the wires, the red wire of the Main Ribbon Bus must be at left. The red wire is ALWAYS the #1!
  
 
====2in1 Module 6-pin Dupont Wire====
 
====2in1 Module 6-pin Dupont Wire====
Line 220: Line 393:
 
Next, you take the "10cm 6-pin Dupont Connector Wire". This is used to connect the 2in1 module to the RBPi GPIO:
 
Next, you take the "10cm 6-pin Dupont Connector Wire". This is used to connect the 2in1 module to the RBPi GPIO:
  
'''PHOTO NEEDED HERE!!'''
+
[[File:2in1_dupont_wire.jpg|600px]]
  
 
You have to connect it to the middle male connector of the Ribbon Bus Cable following the next scheme:
 
You have to connect it to the middle male connector of the Ribbon Bus Cable following the next scheme:
Line 226: Line 399:
 
[[File:Cable-schema-2in1.png|600px]]
 
[[File:Cable-schema-2in1.png|600px]]
  
'''Note:''' The red wire of the Main Ribbon Bus must be in the left. This wire is ALWAYS the number 1!
+
'''Note:''' While connectig the wires, the red wire of the Main Ribbon Bus must be at left. The red wire is ALWAYS the #1!
  
 
In that point you should have something like this:
 
In that point you should have something like this:
  
'''PHOTO NEEDED HERE!!'''
+
[[File:Zynthian_mounting_ribbon_wiring.jpg|600px]]
 +
 
 +
===Connect the Main Ribbon Bus to the RBPi===
 +
 
 +
It's time to connect the Main Ribbon Bus to the RBPi GPIO. When looking to the case from the front side, the red wire must be in the right, like in the photo above.
 +
 
 +
It's also time to connect the two purple wires to the 2in1 module if you haven't done before. This two wires are for the upper switches: CH(1) and LS(3).
  
 
===Connect the Controller Modules (x4)===
 
===Connect the Controller Modules (x4)===
  
This step is a bit tricky. Remember that, if you followed the instructions before, you have soldered the pin-rows in the bottom side of PCBs, so numbering is reversed when looking from bottom. You can use a little trick: if you rotate the PCB 180º, then numbering is "left to right" again ;-)
+
This step is a bit tricky. If you followed the instructions above, you have soldered the pin-rows in the bottom side of the controller PCBs, so numbering is reversed when looking from the bottom. You can use a little trick: rotate the PCB 180º and the numbering is "left to right" again ;-)
 +
 
 +
Anyway, if you take a look to the next photo, you shouldn't have any problem. Brown/green wires are #1.
 +
 
 +
[[File:Zynthian_mounting_controllers_wiring.jpg|600px]]
 +
 
 +
'''Note:''' Some encoders have a different pin ordering. If you bought the encoders by yourself, perhaps you have to change A and B pins (brown<=>red, green<=>blue).
 +
 
 +
===Connect the 2in1 Module===
 +
 
 +
Connect the 6-pin dupont wire to the 2in1 module. Numbering is from left to right (top to bottom in the photo) and pin 1 is the brown wire:
 +
 
 +
[[File:Zynthian_mounting_2in1_top.jpg|600px]]
 +
 
 +
Also, if you haven't done this before, connect the DIN-5 connector (MIDI-IN) to the 2in1 module. It's the 2-pin connector labeled as MIDI-IN.
 +
 
 +
[[File:Zynthian_mounting_2in1_case.jpg|400px]]
 +
[[File:Zynthian_mounting_connectors.jpg|400px]]
 +
 
 +
===Connect the Jack connectors===
 +
 
 +
If you haven't done this before, connect the Jack connectors to the auxiliar on-board audio-out connector in the HifiBerry soundcard. It's the 3-pin connector that you soldered before:
 +
 
 +
[[File:Zynthian_mounting_hifiberry_3pin_connector.jpg|600px]]
 +
 
 +
===Connect the ScreenTouch===
 +
 
 +
And finally, connect the ribbon's 26-pin connector to the ScreenTouch.
 +
 
 +
[[File:Zynthian_mounting_controllers_wiring.jpg|600px]]
 +
 
 +
=Testing your Zynthian Box=
 +
 
 +
And that's all. Your Zynthian Box is almost ready to boot. I recommend that you double-check everything before trying to boot.
 +
 
 +
===Double-check part's assembling and wiring===
 +
 
 +
It's easy to make a mistake while assembling the parts or connecting the wires. Some errors can be dangerous for the electronic components (short-circuits, some specific bad-wiring combinations) so it's better to be sure that everything is correctly assembled and connected.
 +
 
 +
===First Boot===
 +
 
 +
When you are pretty sure that everything is in its place, it's time to boot by first time, so:
 +
 
 +
1. Insert the SD-card with the zynthian image ready to run. If you don't have one yet, [[#Zynthian_Software|read this]].
 +
2. Plug the mini-usb power conector. A good 5V micro-usb charger is recommended (> 1 Amp).
 +
 
 +
These are the stages that you should see while booting:
 +
 
 +
1. Initially, the display must go white
 +
2. After 5-10 seconds, it will show the Zynthian splash screen
 +
3. After 1-2 seconds, it will go black
 +
4. If you are using a fresh zynthian image and it's the first boot, the stages 2 and 3 will be repeated
 +
5. After 5-10 seconds, the zynthian UI will be shown
 +
 
 +
If you get the Zynthian UI, congratulations!!! You are really close to get it!!
 +
 
 +
If not, bad luck! Probably you made some mistake during the mounting process. You have to [[#Locating_and_Solving_problems|locate and solve the problem(s)]].
 +
 
 +
===Test the Controllers===
 +
 
 +
If you get the Zynthian UI, then you should start by testing that your controllers are working OK.
 +
 
 +
1. Push the 'SELECT' controller. You should get into the 'Engine Selection' screen.
 +
 
 +
If it doesn't works, try pushing the 'LS' controller. Perhaps you have cross-wired the 3 & 4 controllers and in that case, you have to fix the wiring. If it doesn't work, try pushing the other two controllers and rotating the controllers. If something happens, most probably you have reversed the wiring order when connecting the controllers, or perhaps you have changed some wires while connecting the main ribbon bus. Double-check the wiring again.
 +
 
 +
2. Rotate the 'SELECT' controller to select the engine you want to start.
  
So '''you should look at your controller modules from bottom side and with the pin-row on the top of PCB!'''
+
The selector must go down when rotating clockwise and go up when rotating counterclockwise. If the rotation sense is reversed, you should check the wiring.
  
'''PHOTO NEEDED HERE!!'''
+
3. Push 'BACK'. You should get into the 'Admin' screen. Push 'BACK' again to return to the 'Engine Selection' screen.
  
'''Note:''' Some encoders have reversed pin ordering, so, if you buy the encoders by yourself, perhaps you have to change A and B pins.
+
4. Select the ZynAddSubFX engine, select channel #1, bank and instrument. You should get into the 'Instrument Control' screen:
  
[[File:zynthian_inside_01.jpg|600px]]
+
'''CAPTURE NEEDED HERE'''
  
'''Warning:''' In this photo the controller modules wiring is reversed (1 by 2, 3 by 4). I will change it ASAP ;-)
+
5. Rotate every control to test that it works and that the rotation sense is correct.  
  
===Connect the 2in1 Module===
+
If some controller doesn't work correctly, check the wiring again. You could try to figure what is happening by analizing the observed behaviour.
 +
 
 +
6. Push 'LS' to get into the 'Load Snapshot' screen. Push 'LS' again to 'Save Snapshot'. Push 'BACK' to return to the 'Instrument Control' screen.
 +
 
 +
7. Push 'CH' to jump to the 'Channel List' screen.
 +
 
 +
If everything works but 'LS' and 'CH' switches, then probably you have some wiring problem in the 2in1 module. Check the wiring again ;-)
 +
 
 +
Finally, if you can't fix the problems, you could try to login into the system and run some testing program from the command line:
 +
 
 +
# /zynthian/zyncoder/zyncoder_test
 +
 
 +
or reading directly the GPIO:
 +
 
 +
# gpio readall
 +
 
 +
etc.
 +
 
 +
===Test the Audio Output===
 +
 
 +
1. Connect the audio output (RCA or Jack connectors) to your amplifier or auto-amplified speakers.
 +
2. Boot your Zynthian. You should be in the initial 'Load Snapshot' screen.
 +
3. Push BACK twice to get into the 'Admin' screen.
 +
4. Select 'Audio Test' option and push 'SELECT'. You should hear the test audio-track: a nice afrocuban stuff ;-)
 +
5. Push 'BACK' to stop the playing
 +
 
 +
If you hear nothing, please, check the amplifier, speakers, cabling, gain, volume, etc. If nothing works, you have to [[#Locating_and_Solving_problems|locate and solve the problem(s)]].
 +
 
 +
===Test the MIDI subsystem===
 +
 
 +
1. Connect the audio output (RCA or Jack connector) to your amplifier or auto-amplified speakers.
 +
2. Boot your Zynthian, select FluidSynth engine, channel #1 and 'FluidR3 GM' bank.
 +
3. Push BACK, holding the switch pushed more than 2 seconds. You should get into the 'Admin' screen.
 +
4. Select 'MIDI Test' option and push 'SELECT'. You should hear the test midi-track: a 'Take Five' version ;-)
 +
5. Push 'BACK' to stop the playing
 +
 
 +
If you hear nothing, please, check the amplifier, speakers, cabling, gain, volume, etc. If nothing works, you have to [[#Locating_and_Solving_problems|locate and solve the problem(s)]].
 +
 
 +
===Test the MIDI-USB inputs===
 +
 
 +
1. Connect the audio output (RCA or Jack connector) to your amplifier or auto-amplified speakers.
 +
2. Boot your Zynthian, select ZynAddSubFX, channel #1, bank and instrument
 +
3. Connect a MIDI-USB keyboard to any USB port. The keyboard should be configured to use channel #1.
 +
3. After 2-3 seconds , play something with your keyboard. A simple ''Chopin's Nocturni'' would be enough. You should hear your music ;-)
 +
 
 +
If this doesn't work, you have to [[#Locating_and_Solving_problems|locate and solve the problem(s)]].
 +
 
 +
===Test the MIDI-IN connector===
 +
 
 +
1. Connect the audio output (RCA or Jack connector) to your amplifier or auto-amplified speakers.
 +
2. Boot your Zynthian, select ZynAddSubFX, channel #1, bank and instrument
 +
3. Connect your keyboard's MIDI-OUT to the Zynthian's MIDI-IN using a MIDI cable. The keyboard should be configured to use channel #1.
 +
3. After 2-3 seconds, play something with your keyboard. OK! A single melody can do the task. You should hear your song ;-)
 +
 
 +
If this doesn't work, you have to [[#Locating_and_Solving_problems|locate and solve the problem(s)]].
 +
 
 +
=Close the Case=
 +
 
 +
When everything is working OK, it's time to close the case.
 +
 
 +
This can be a little bit tricky. Take your time to see how to bend and drive the cables to get a good fitting.
 +
 
 +
[[File:Zynthian_mounting_case_open.jpg|600px]]
 +
 
 +
[[File:Zynthian_finished_01.jpg|600px]]
 +
 
 +
Finally, screw-drive the 8 sheet-threader bolts for securing the case, 4 each side.
 +
 
 +
=Update your Zynthian Box=
 +
 
 +
If you are using the official Zynthian SD Image, the first thing you should do after booting up your Zynthian Box and having the controllers working OK is update the software:
 +
 
 +
- connect the Zynthian Box to your router using a RJ45 cable
 +
- '''update zynthian software''' from the admin menu
 +
- '''update zynthian library''' from the admin menu
 +
- '''restart GUI''' (or '''reboot''') from the admin menu
 +
 
 +
The update process can take some time. Be patient. If you get some ERROR message while updating, please, [[https://discourse.zynthian.org/t/problems-updating-the-software-from-the-admin-menu/386|ask in the forum]]. You can send a photo or description of the error message.
 +
 
 +
=Locating and Solving problems=
 +
 
 +
In this section i will try to give you some tips for locating and solving the problems you may have.
 +
 
 +
For finding and solving problems, i really recommend to connect a HDMI display to the RBPi. It will give you accurate information during the booting sequence. Also, if you connect a USB keyboard, you can login into the system and get extra information, inspect the logs, etc.
 +
 
 +
===The display doesn't go white in boot stage 1===
 +
 
 +
I recommend you disconnect the controller and 2in1 modules and try to boot again.
 +
If the problem persist it's very probable you haven't solder correctly the side 26-pin connector. You should double check the connector and be sure that it's correctly soldered.
 +
 
 +
===The display doesn't show the Zynthian splash screen in boot stage 2===
 +
 
 +
In that case, probably the system is not booting correctly. You could try to connect a HDMI display and see if the system is booting. If you can't see the booting sequence, then you should re-burn your SD-card with the Zynthian image. Also, check that your image file is correct by using the SHA1 signature.
 +
 
 +
===The display is completely white===
 +
The latest SD Gorgona Edge image is pre-configured for the new v2 Kit. As you are using a Kit v1, you should access the Webconf tool (see [[Configuration_Users_Guide]]) using your browser and change these options:
 +
 
 +
Display: PiTFT 2.8’ Resistive
 +
Wiring Layout: PROTOTYPE-4
 +
Style -> Font Size: 10
 +
 
 +
'''More coming soon ...'''
 +
 
 +
===You can't solve the problem===
 +
 
 +
If you can't find a solution for your problem, ask the community:
  
The 2in1-PCB must be connected using one of the mini ribbon cables. The 6-pin connector must be located towards the PCB. Pin 1 is on the bottom left (component side up). On the other end of the cable there are 1-pin female connectors. They must be connected to the following pins on the (male) 40-pin-conenctor in the middle of the main ribbon cable.
+
https://discourse.zynthian.com
  
Next connect the DIN socket (MIDI) to the 2in1-PCB. The connector on the PCB is the 2-pin one located in the upper right corner of the PCB.
+
Also, if you found a solution for a problem not described here, please send feedback to the community, or better, edit this wiki! ;-)
  
 
=Technical Reference=
 
=Technical Reference=
Line 258: Line 608:
 
You can find all this info and much more in the project's [https://github.com/zynthian/zynthian-hw Hardware Repository].
 
You can find all this info and much more in the project's [https://github.com/zynthian/zynthian-hw Hardware Repository].
  
===Electric Scheme===
+
===Electrical Schematic===
  
This is the electric scheme of a Zynthian Box, excluding soundcard and display:
+
This is the electrical schematic of a Zynthian Box, excluding the soundcard and display:
  
 
[[File:Zynthian_scheme_GPIO.png|800px]]
 
[[File:Zynthian_scheme_GPIO.png|800px]]
Line 355: Line 705:
 
|-
 
|-
 
|}
 
|}
 +
EDIT from music.friend: I think that actually the 2nd from left pin
 +
of the MIDI IN socket carries the pin number 5. Pint 2 of the MIDI IN
 +
socket is used for MIDI OUT and MIDI THHRU for shielding (Connection to GND),
 +
while the MIDI IN socket has no direct connection to the receiver, otherwise
 +
the Optocoupler does not really make sense.
 +
NOTE: This is my first WIKI edit - please forgive me if i have misssed to
 +
follow existing style or other rules.

Latest revision as of 17:10, 9 September 2020

1 Introduction

This tutorial is mainly intended for those who are building a Zynthian Box using one of the official kits, that i offer here:

Zynthian Shop

Specifically, the instructions are for the assembly of kits v1 (version 1), those using the 2in1 circuit and the PiTFT 2.8' display. If you have a newer kit v2, based in the All-In-One circuit and the PiScreen 3.5' display, you better should read this updated tutorial.


Zynthian finished 02.jpg

Anyway, it's quite detailed and can be used as a guide to build a custom Zynthian Box from scratch. Of course, you will have to be creative if you want to do it in that way ;-)

2 Bill of Materials

3 Some definitions

3.1 Zynthian

It's an open project with the goal of creating an Open Synth Platform based in Free Software and Open Hardware Specifications & Designs (when available). It's a community-driven project. If you are here, probably you already know all this ;-)

3.2 Zynthian Software

The Zynthian Software stack consist of:

+ GNU Linux Operating System: Raspbian Jessie (Minibian is used in the last SD images)
+ Jack Audio Daemon
+ MOD-HOST + MOD-UI software, from ModDevices (github repositories)
+ A collection of standalone Synth Engines & LV2 Plugins (see Supported Synth Engines & Plugins)
+ Zynthian User Interface (github repository)

All the software used by Zynthian is Free Software (free as in freedom, not as in free beer) and it's covered by the GPL license or similar. If you don't know what i'm talking about, please, take a look to this:

What is Free Software?

The easiest way of getting the software is downloading the last official SD image from here:

Download Last Stable ZynthianOS SD-image 

It's a 8GB compressed image file (plenty of soundfonts) compiled for Raspberry Pi 3. (Please, keep feeding the torrent after downloading!)

These SD card images include all the Zynthian software, properly configured for working with the official kits. Completely ready to use. Plug and play!

After downloading the SD-image, you have to write it to a SDcard. You need a SD card with a minimum size of 16GB, although you can use a bigger one if you want.

Use Etcher https://etcher.io/ (free software works on Mac, Windows or Linux) to flash the image onto the SDcard.

Or do it manually: There is a really good manual for this at this link.

If you prefer, you can build your own SD image following these instructions:

Building the SD Image using the Setup Script

3.3 Zynthian Box

A Zynthian Box is a hardware device, a small digital computer designed to run the Zynthian Software. Currently it's based in the Raspberry Pi platform, but it could be easily adapted to other computer platforms.

This is a sketch with the main blocks of the official Zynthian Box:

Zynthian hardware scheme.png

In the project's repositories you will find all the electric schemes, PCB specifications, Herber files, etc. to build your own Zynthian Box from scratch:

- Zynthian Hardware Repository
- Zynthian Case Repository

The official version is the canonical reference. Of course, you don't have to build the official version. You can build your customized Zynthian Box modifying and improving what you want. If you do so, some feedback would be very appreciated ;-)

3.4 Zynthian Kit

A Zynthian Kit is a set of specific and generic electronic modules designed or picked for building a Zynthian Box. This tutorial refers to the official Zynthian Kit, that is composed of these specific parts:

+ 4 x Controller Modules (rotary encoder + switch)
+ 1 x 2in1 Module (GPIO expander + MIDI IN)
+ 1 x Main ribbon bus cable
+ Set of Dupont color-wire connectors

Zynthian kit assembled.jpg

and these generic parts:

+ 1 x Raspberry Pi 2/3
+ 1 x Hifiberry DAC+ (also pro & lite)
+ 1 x Adafruit PiTFT 2.8' ScreenTouch (or clonic)

Of course, other arrangements and combinations are possible. You can easily configure your hardware using the Webconf Tool, or if it doesn't work, tweaking from the command line.

You can take a look to some of the alternate builds made by some community members:

- A build with variations, by vagnscott
- Another Wiring, by Imager
- Success Cases

3.5 Zynthian Case

It's the enclosure used to put on all the parts. Again, this tutorial refers to the official Zynthian Aluminum Case, that is designed to be used in conjunction with the official Kit.

This case is available as a kit, including all the needed connectors, knobs, bolts & nuts:

Zynthian aluminum case kit.jpg

If you intend to use a different soundcard or display, probably it won't fit the case and you will have to modify it. Of course, you can build your own customized case. Here you can find some examples from the community:

- Zynthian Enclosures
- Success Cases

4 Building the Zynthian Kit parts

4.1 Prerequisites

Building your own Zynthian Box is not very difficult, but you will need all your attention, some basic tools and a few skills. Read the instructions and observe the detailed photos carefully. If you get in trouble you can ask the community:

https://discourse.zynthian.org

4.1.1 Required Skills

For building the hardware you should have the following basic competences:

+ Soldering
+ Basic understanding of reading basic electronic circuit diagrams
+ Enjoyment of work with electronic hardware and parts

If you have not soldered before, you should read a good soldering tutorial, or perhaps you would prefer the Soldering is Easy comic book by MightOhm.

4.1.2 Tools

And this is the list of required and recommended tools:

+ Soldering iron
+ Tin-solder
+ Wire-cutter
+ Small Plier
+ Screw-drivers Philips
+ Wrench, for potentiometer nuts (recommended)
+ PCB holder for soldering (very recommended!)
+ Small iron brush (very recommended!)
+ Magnifiying glass (recommended)
+ A vice (recommended)
+ A hand saw for metal (recommended)
+ Multimeter (recommended!)

4.2 Some general recommendations

1. Be careful to protect the components from electrostatic discharge. This is most critical for the ICs and the diodes. Be careful with your fingers. Your body can hold a good amount of static electric charge. Under some circumstances that charge can be drained through some of the components that you are handling and this could break the component. Try to hold the PCBs by the borders and discharge your body frequently touching some "ground" with your fingers.

2. Before soldering, please, check that you are soldering in the right side of PCB, also that components orientation is correct (ICs, diode)

3. When soldering, always avoid overheating. Electronic components doesn't like overheat! This is specially important when soldering the big connectors in the HifiBerry soundcard and the PiTFT touchscreen. If you overheat the circuit, probably you will break some electronic component and you will end with a dead board. I recommend to use a fan while soldering. If not, you can use your mouth ;-) Also, don't solder the contacts in order. It's better to jump from one to another in the oposite corner. If you are not sure of your soldering skills, please, take your time and do some practice with inexpensive components and prototyping board.

4. After finishig the soldering, brush smoothly all the contacts. You may use a small iron brush. After that, blow over the circuit to remove any remaining tin.

5. Inspect visually all the soldered contacts. You could use a magnifying glass for verifying that every soldered pin looks good. If you are not sure, perhaps you could add more tin or re-solder the pin. Also, you could use a multimeter for testing the dubious contacts.

6. And of course, double-check everything! Assembling and wiring process are prone to errors. Don't be too confident ;-) Re-check component's orientation (ICs and diode), wiring, etc.

4.3 Assembling the Controller Modules

The controller module kit is composed of:

+ 4 x controller PCBs
+ 4 x rotary encoders with switch (PEC11R-4215K-S0024)
+ 4 x ceramic capacitor 100nF (C1)
+ 8 x ceramic capacitor 10nF (c2, c3)
+ 4 x 4-pin-row male connector (angle)

4xcontroller single kit.jpg

This components are used to build the 4 controller modules that form the input side of the physical Zynthian User Interface. Each controller embed an incremental rotary encoder and a switch, so 4 wires are needed for connecting it with the RBPi GPIO.

These are the steps for building one module:

0. Be sure that you have read and understdood these recommendations.
1. Bend the encoder's securing tabs to 75º, so you can insert it in the upside of the PCB (the labeled side!). Please, be very careful when bending the tabs as the encoder case is quite fragil and could be deformed. I recommend to use a small plier and not reaching to 90º.
2. Place the 100nF capacitor in C1 position (the most right!). This is for debouncing the push switch.
3. Place the 2 x 10nF capacitors in C2 & C3 positions. These are for debouncing the rotary encoder contacts.
3. Solder the encoder and capacitors carefully.
4. Place the pin-row connector in the downside of the PCB, with the angle pins facing inwards (look the photo!)
5. Solder the pin-row carefully.
6. Bend the pin-row outwards a little bit, like shown in the photo. You can use a screw-driver or similar to do it. 
7. Use the plier to close the tabs again, trying to "catch" the PCB.

Controller single ensambled top.jpg Controller single ensambled 01.jpg

You have to build 4 controller modules, so you to have to repeat the steps 4 times.

4.4 Assembling the 2in1 Module

The 2in1 module kit is composed of:

+ 1 x 2in1 PCB
+ 1 x GPIO-expander MCP23008 => 18-pin IC
+ 1 x opto-coupler 6N138 => 8-pin IC
+ 1 x diode 1N4148 (D1)
+ 1 x resistor 1K (R1) => brown-black-red (*)
+ 1 x resistor 10K (R2) => brown-black-orange (*)
+ 1 x resistor 220 (R3) => red-red-brown (*)
+ 2 x ceramic capacitor 100nF (C1, C2)
+ 1 x 8-row-pin male-angle connector
+ 1 x 6-row-pin male connector
+ 1 x 2-row-pin male connector

(*) Read from left to right with the tolerance ring (gold or silver) on the right.

2in1 kit.jpg

These are the steps for building the 2in1 module:

0. Be sure that you have read and understood these recommendations.
1. Place all the components in the upside of the PCB (the labeled side!). Put attention to the orientation of the ICs and diode.
2. Solder the components carefully. Always avoid overheating!

2in1 ensambled.jpg

4.5 Tweaking the HifiBerry DAC+ soundcard

If you are using the HifiBerry DAC+ soundcard (also lite & pro versions), you should add 2 extra connectors to the board:

+ 40 row-pin GPIO male connector, for connecting the main ribbon bus cable
+ 3 pin header connector, for connecting the extra audio line-out Jack connectors

Both connectors must be placed on the top side of the board, so you should solder the contacts on the bottom side.

WARNING! Soldering the big 40-pin connector can be difficult if you don't have enough practice. Please, before starting be sure that you have read and understood these recommendations.

Hifiberry dacplus extra connectors unassembled.jpg

Hifiberry dacplus extra connectors mounted.jpg

4.6 Tweaking the PiTFT 2.8' TouchScreen

If you are using the Adafruit PiTFT 2.8' TouchScreen (or a clonic version) in a standard mounting (standard main ribbon bus and case size), is highly recommended to use the side 26-pin male connector, not the bottom female connector. The main ribbon bus is designed to use the side 26-pin male connector, and the case mounting will be easier if you do so.

4.6.1 Original Adafruit TouchScreen

If you have an original Adafruit PiTFT 2.8' TouchScreen, probably you have both connectors soldered in the board, so you don't need to solder anything. Anyway, the bottom female connector is quite annoying when trying to close the case, so perhaps you want to remove it using a saw. If you do so, i also recommend to use a vice.

4.6.2 Clonic TouchScreen

If you have a clonic PiTFT 2.8' touchscreen, probably you don't have the side 26-pin male connector soldered on the board, so you should solder it by your own. Also, normally the female connector in the clonic versions is higher that in the original and more annoying yet, so, you will want to remove it with a saw. If you do so, i also recommend to use a vice.

After removing the female connector, the side connector must be soldered. Note that you have to place it on the bottom side of the board, so you should solder the contacts on the top side.

WARNING! Soldering the 26-pin connector can be difficult if you don't have enough practice. Please, before starting be sure that you have read and understood these recommendations.

Pitft clonic touchscreen unassambled.jpg

Clonic pitft tweaked connectors.jpg

Frequently, clonic PiTFT touchscreens have 4 switches welded on it. These switches can be annoying when holding the display to the case. If the switches remain pressed after mounting, then it will cause problems as are connected to the GPIO and will conflict with the controller modules. The switches are easily pulled out by slighty turning each switch parallely to the board with a plier.

Pitft clonic touchscreen switches.jpg

Pitft clonic touchscreen switches removed.jpg

4.7 Other Soundcards and Displays

If you are using a different soundcard or display, you'll have to see the best way to integrate it. If you do so, please, don't forget to give good feedbak in the forum or here, in the wiki.

In the forum you can see what other users have done, and of course, don't doubt to ask whatever you want!

https://discourse.zynthian.org/c/building-zynthian

4.8 Building the MIDI-IN connector

Before mounting the MIDI-IN connector into the case we will solder the needed wires. Doing it in that way is rather more comfortable than trying to solder inside the case with all the wiring mess.

If you want, you can protect the contacts using heat-shrink sleeve (the red sleeve pieces in the photo). In that case, remember to insert the sleeve pieces before soldering ;-)

Midi connector unasambled.jpg

Midi connector assembled.jpg

4.9 Building the JACK Audio-Out connectors

In the same way, before mounting the Jack connectors into the case we will solder the needed wires. You can use heat-shrink sleeve too.

Jack connectors unassambled.jpg

Jack connectors assembled new.jpg

5 Case Mounting

5.1 Assemble the Main Computing Block

The main computing block is composed by the RBPi and the HifiBerry soundcard, and shouold be assembled using the next set of separator & bolts:

Bolts main computing block.jpg

For easier assembling, you should follow the next steps:

1. fix the 2x4 separators to the RBPi. The bigger one must be on top and the smaller one on bottom.
2. insert the Hifiberry soundcard in the RBPi. 
3. screw the 4 bolts on top of the HifiBerry.

Main computing block rbpi.jpg

Main computing block 02.jpg

Main computing block.jpg

5.2 Secure the Main Computing Block

After assembling the main computing block, you should secure it to the case. Use 4 black M2.5 bolts (see photo above).

Zynthian mounting computing block 01.jpg

5.3 Secure the 2in1 module

Secure the 2in1 module to the case using the 2 nylon separators with nuts and the last 2 black M2.5 bolts.

Bolts 2in1.jpg

Zynthian mounting 2in1 01.jpg

5.4 Secure the Jack connectors

Put the rings on the outer side of the case to avoid damaging the case surface when you tighten the nuts.

Zynthian mounting jack connectors detail.jpg

Zynthian mounting jack connectors top.jpg

5.5 Secure the MIDI-IN connector

The ground connector goes upwards. I recommend to remove it with a plier as it could "touch" the controller row-pins when closing the case.

Zynthian mounting midi connector detail.jpg

Zynthian mounting midi connector top.jpg

5.6 Secure the ScreenTouch

This step is a little bit tricky because the bolts & nuts are tiny, and it have some slack. Don't press too much the nuts. The PCB have to bend a little bit, but not too much. You should be capable of moving the display pushing the borders with your fingers. Later, when the screen is on, you will fine adjust the position for having the margins equalized.

Note: Before fixing the screen, don't forget to remove the protective plastic sheet!

Bolts screentouch.jpg

Zynthian mounting display.jpg

5.7 Secure the Controllers

Zynthian mounting controllers.jpg

5.8 Insert the knobs

You should insert the knobs into the encoders before closing the case. This will avoid forcing the encoders too much as otherwise, you could break them. Follow these simple steps and you wouldn't have any problem:

* moisten with water or saliva the encoder stem and the knob hole
* press the encoder PCB with the finger from the rear side while pushing the knob from the front side until is completely inserted

5.9 Stick the rubber feet

Zynthian mounting case bottom.jpg

6 Connecting everything

This is an easy connection guide, based in colored wires and images. If you want to know and understand the details (or if you have problems and need to debug), you should take a look to the Technical Reference.

6.1 Connect the Dupont Wires to the Main Ribbon Bus

6.1.1 Controller Module 4-pin Dupont Wires (x 4)

The next scheme shows the numbering/naming used for encoders and switches:

Zynthian ui legend.png

Take the 4 x "20cm 4-pin Dupont Connector Wires". These wires are used to connect the 4 controller modules to the RBPi GPIO:

Controller dupont wires.jpg

You have to connect it to the middle male connector of the Ribbon Bus Cable following the next scheme:

Wiring scheme controllers single.png

You can leave disconnected the two purple wires. It's more comfortable to connect it to the 2in1 module after pluging the Main Ribbon Bus to the RBPi.

Note: While connectig the wires, the red wire of the Main Ribbon Bus must be at left. The red wire is ALWAYS the #1!

6.1.2 2in1 Module 6-pin Dupont Wire

Next, you take the "10cm 6-pin Dupont Connector Wire". This is used to connect the 2in1 module to the RBPi GPIO:

2in1 dupont wire.jpg

You have to connect it to the middle male connector of the Ribbon Bus Cable following the next scheme:

Cable-schema-2in1.png

Note: While connectig the wires, the red wire of the Main Ribbon Bus must be at left. The red wire is ALWAYS the #1!

In that point you should have something like this:

Zynthian mounting ribbon wiring.jpg

6.2 Connect the Main Ribbon Bus to the RBPi

It's time to connect the Main Ribbon Bus to the RBPi GPIO. When looking to the case from the front side, the red wire must be in the right, like in the photo above.

It's also time to connect the two purple wires to the 2in1 module if you haven't done before. This two wires are for the upper switches: CH(1) and LS(3).

6.3 Connect the Controller Modules (x4)

This step is a bit tricky. If you followed the instructions above, you have soldered the pin-rows in the bottom side of the controller PCBs, so numbering is reversed when looking from the bottom. You can use a little trick: rotate the PCB 180º and the numbering is "left to right" again ;-)

Anyway, if you take a look to the next photo, you shouldn't have any problem. Brown/green wires are #1.

Zynthian mounting controllers wiring.jpg

Note: Some encoders have a different pin ordering. If you bought the encoders by yourself, perhaps you have to change A and B pins (brown<=>red, green<=>blue).

6.4 Connect the 2in1 Module

Connect the 6-pin dupont wire to the 2in1 module. Numbering is from left to right (top to bottom in the photo) and pin 1 is the brown wire:

Zynthian mounting 2in1 top.jpg

Also, if you haven't done this before, connect the DIN-5 connector (MIDI-IN) to the 2in1 module. It's the 2-pin connector labeled as MIDI-IN.

Zynthian mounting 2in1 case.jpg Zynthian mounting connectors.jpg

6.5 Connect the Jack connectors

If you haven't done this before, connect the Jack connectors to the auxiliar on-board audio-out connector in the HifiBerry soundcard. It's the 3-pin connector that you soldered before:

Zynthian mounting hifiberry 3pin connector.jpg

6.6 Connect the ScreenTouch

And finally, connect the ribbon's 26-pin connector to the ScreenTouch.

Zynthian mounting controllers wiring.jpg

7 Testing your Zynthian Box

And that's all. Your Zynthian Box is almost ready to boot. I recommend that you double-check everything before trying to boot.

7.1 Double-check part's assembling and wiring

It's easy to make a mistake while assembling the parts or connecting the wires. Some errors can be dangerous for the electronic components (short-circuits, some specific bad-wiring combinations) so it's better to be sure that everything is correctly assembled and connected.

7.2 First Boot

When you are pretty sure that everything is in its place, it's time to boot by first time, so:

1. Insert the SD-card with the zynthian image ready to run. If you don't have one yet, read this.
2. Plug the mini-usb power conector. A good 5V micro-usb charger is recommended (> 1 Amp).

These are the stages that you should see while booting:

1. Initially, the display must go white
2. After 5-10 seconds, it will show the Zynthian splash screen
3. After 1-2 seconds, it will go black
4. If you are using a fresh zynthian image and it's the first boot, the stages 2 and 3 will be repeated
5. After 5-10 seconds, the zynthian UI will be shown

If you get the Zynthian UI, congratulations!!! You are really close to get it!!

If not, bad luck! Probably you made some mistake during the mounting process. You have to locate and solve the problem(s).

7.3 Test the Controllers

If you get the Zynthian UI, then you should start by testing that your controllers are working OK.

1. Push the 'SELECT' controller. You should get into the 'Engine Selection' screen. 

If it doesn't works, try pushing the 'LS' controller. Perhaps you have cross-wired the 3 & 4 controllers and in that case, you have to fix the wiring. If it doesn't work, try pushing the other two controllers and rotating the controllers. If something happens, most probably you have reversed the wiring order when connecting the controllers, or perhaps you have changed some wires while connecting the main ribbon bus. Double-check the wiring again.

2. Rotate the 'SELECT' controller to select the engine you want to start. 

The selector must go down when rotating clockwise and go up when rotating counterclockwise. If the rotation sense is reversed, you should check the wiring.

3. Push 'BACK'. You should get into the 'Admin' screen. Push 'BACK' again to return to the 'Engine Selection' screen.
4. Select the ZynAddSubFX engine, select channel #1, bank and instrument. You should get into the 'Instrument Control' screen:

CAPTURE NEEDED HERE

5. Rotate every control to test that it works and that the rotation sense is correct. 

If some controller doesn't work correctly, check the wiring again. You could try to figure what is happening by analizing the observed behaviour.

6. Push 'LS' to get into the 'Load Snapshot' screen. Push 'LS' again to 'Save Snapshot'. Push 'BACK' to return to the 'Instrument Control' screen.
7. Push 'CH' to jump to the 'Channel List' screen.

If everything works but 'LS' and 'CH' switches, then probably you have some wiring problem in the 2in1 module. Check the wiring again ;-)

Finally, if you can't fix the problems, you could try to login into the system and run some testing program from the command line:

# /zynthian/zyncoder/zyncoder_test

or reading directly the GPIO:

# gpio readall

etc.

7.4 Test the Audio Output

1. Connect the audio output (RCA or Jack connectors) to your amplifier or auto-amplified speakers.
2. Boot your Zynthian. You should be in the initial 'Load Snapshot' screen.
3. Push BACK twice to get into the 'Admin' screen.
4. Select 'Audio Test' option and push 'SELECT'. You should hear the test audio-track: a nice afrocuban stuff ;-)
5. Push 'BACK' to stop the playing

If you hear nothing, please, check the amplifier, speakers, cabling, gain, volume, etc. If nothing works, you have to locate and solve the problem(s).

7.5 Test the MIDI subsystem

1. Connect the audio output (RCA or Jack connector) to your amplifier or auto-amplified speakers.
2. Boot your Zynthian, select FluidSynth engine, channel #1 and 'FluidR3 GM' bank.
3. Push BACK, holding the switch pushed more than 2 seconds. You should get into the 'Admin' screen.
4. Select 'MIDI Test' option and push 'SELECT'. You should hear the test midi-track: a 'Take Five' version ;-)
5. Push 'BACK' to stop the playing

If you hear nothing, please, check the amplifier, speakers, cabling, gain, volume, etc. If nothing works, you have to locate and solve the problem(s).

7.6 Test the MIDI-USB inputs

1. Connect the audio output (RCA or Jack connector) to your amplifier or auto-amplified speakers.
2. Boot your Zynthian, select ZynAddSubFX, channel #1, bank and instrument
3. Connect a MIDI-USB keyboard to any USB port. The keyboard should be configured to use channel #1.
3. After 2-3 seconds , play something with your keyboard. A simple Chopin's Nocturni would be enough. You should hear your music ;-)

If this doesn't work, you have to locate and solve the problem(s).

7.7 Test the MIDI-IN connector

1. Connect the audio output (RCA or Jack connector) to your amplifier or auto-amplified speakers.
2. Boot your Zynthian, select ZynAddSubFX, channel #1, bank and instrument
3. Connect your keyboard's MIDI-OUT to the Zynthian's MIDI-IN using a MIDI cable. The keyboard should be configured to use channel #1.
3. After 2-3 seconds, play something with your keyboard. OK! A single melody can do the task. You should hear your song ;-)

If this doesn't work, you have to locate and solve the problem(s).

8 Close the Case

When everything is working OK, it's time to close the case.

This can be a little bit tricky. Take your time to see how to bend and drive the cables to get a good fitting.

Zynthian mounting case open.jpg

Zynthian finished 01.jpg

Finally, screw-drive the 8 sheet-threader bolts for securing the case, 4 each side.

9 Update your Zynthian Box

If you are using the official Zynthian SD Image, the first thing you should do after booting up your Zynthian Box and having the controllers working OK is update the software:

- connect the Zynthian Box to your router using a RJ45 cable
- update zynthian software from the admin menu
- update zynthian library from the admin menu
- restart GUI (or reboot) from the admin menu

The update process can take some time. Be patient. If you get some ERROR message while updating, please, [in the forum]. You can send a photo or description of the error message.

10 Locating and Solving problems

In this section i will try to give you some tips for locating and solving the problems you may have.

For finding and solving problems, i really recommend to connect a HDMI display to the RBPi. It will give you accurate information during the booting sequence. Also, if you connect a USB keyboard, you can login into the system and get extra information, inspect the logs, etc.

10.1 The display doesn't go white in boot stage 1

I recommend you disconnect the controller and 2in1 modules and try to boot again. If the problem persist it's very probable you haven't solder correctly the side 26-pin connector. You should double check the connector and be sure that it's correctly soldered.

10.2 The display doesn't show the Zynthian splash screen in boot stage 2

In that case, probably the system is not booting correctly. You could try to connect a HDMI display and see if the system is booting. If you can't see the booting sequence, then you should re-burn your SD-card with the Zynthian image. Also, check that your image file is correct by using the SHA1 signature.

10.3 The display is completely white

The latest SD Gorgona Edge image is pre-configured for the new v2 Kit. As you are using a Kit v1, you should access the Webconf tool (see Configuration_Users_Guide) using your browser and change these options:

Display: PiTFT 2.8’ Resistive
Wiring Layout: PROTOTYPE-4
Style -> Font Size: 10

More coming soon ...

10.4 You can't solve the problem

If you can't find a solution for your problem, ask the community:

https://discourse.zynthian.com

Also, if you found a solution for a problem not described here, please send feedback to the community, or better, edit this wiki! ;-)

11 Technical Reference

Finally, i have included here some detailed schemes and tables. People hacking the standard Zynthian design would find it very useful. Also, if you have some problem and need to "debug", you would find it useful too.

You can find all this info and much more in the project's Hardware Repository.

11.1 Electrical Schematic

This is the electrical schematic of a Zynthian Box, excluding the soundcard and display:

Zynthian scheme GPIO.png

Note: The colors indicated in this scheme doesn't match exactly the colors in the schemes above.

11.2 Connection Tables

These are the connection tables for the Zynthian Kit modules. Note that the GPIO no. use the WiringPi numbering, not the RBPi official numbering. This numbering is used by the software too:

Raspberry-Pi-j8header-2b.png

Controller Module 1

Wire no. Function GPIO no. Pin on Raspi no.
1 Enc2-B 26 32
2 Enc2-A 21 29
3 Enc2-SW 07 GPIO-ext in 2in1
4 GND GND 30

Controller Module 2

Wire no. Function GPIO no. Pin on Raspi no.
1 Enc1-B 25 37
2 Enc1-A 27 36
3 Enc1-SW 23 33
4 GND GND 34

Controller Module 3

Wire no. Function GPIO no. Pin on Raspi no.
1 Enc2-B 00 11
2 Enc2-A 07 7
3 Enc2-SW 08 GPIO-ext in 2in1
4 GND GND 9

Controller Module 4

Wire no. Function GPIO no. Pin on Raspi no.
1 Enc1-B 04 16
2 Enc1-A 03 15
3 Enc1-SW 02 13
4 GND GND 14

2in1 <=> RBPi

Wire no. Function GPIO no. Pin on Raspi no.
1 Vdc 3.3V 3.3V 1
2 RxD RxD 10
3 I2C SDA1 08 3
4 I2C SCL1 09 5
5 Vdc 5V 5V 2/4
6 GND GND 6/9

2in1 <=> MIDI-IN connector

Wire no. Function MIDI-IN pin no.
1 MIDI-IN 2 (MIDI connector: 2nd from left)
2 MIDI-IN 4 (MIDI connector: 2nd from right)

EDIT from music.friend: I think that actually the 2nd from left pin of the MIDI IN socket carries the pin number 5. Pint 2 of the MIDI IN socket is used for MIDI OUT and MIDI THHRU for shielding (Connection to GND), while the MIDI IN socket has no direct connection to the receiver, otherwise the Optocoupler does not really make sense. NOTE: This is my first WIKI edit - please forgive me if i have misssed to follow existing style or other rules.