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

From ZynthianWiki
Jump to navigation Jump to search
Line 45: Line 45:
  
 
[[File:Zynthian_hardware_scheme.png|600px]]
 
[[File:Zynthian_hardware_scheme.png|600px]]
 
And this is the electric scheme of a Zynthian Box, excluding soundcard and display:
 
 
[[File:Zynthian_scheme_GPIO.png|600px]]
 
  
 
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 repositories you will find all the electric schemes, PCB specifications, Herber files, etc. to build your own zynthian box from scratch:

Revision as of 19:53, 15 January 2017

1 Introduction

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

Getting a Zynthian Kit

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 ;-)

2 Some definitions

2.1 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 ;-)

2.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 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: What is Free Software?

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

Download Zynthian "Gorgona" SD-image

This SD-image include all the zynthian software, properly configured and 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/.

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

Building the SD Image using the Setup Script

2.3 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.

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

Zynthian hardware scheme.png

In the project 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

2.4 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:

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

Zynthian kit ensambled.jpg

Of course, other arrangements are possible and some people is working in different ones:

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

2.5 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:

+ Raspberry Pi 2/3
+ 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:

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 case like other people has done:

- Zynthian Enclosures
- Success Cases

3 Building the Zynthian Kit

3.1 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)
+ 4 x 4-pin-row male connector (angle)

4xcontroller single kit.jpg

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!).
2. Place the capacitor in the C1 position (the most right!)
3. Solder the encoder and capacitor carefully. Always avoid overheating!
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 screwdriver or similar to do it.

Controller single ensambled 01.jpg

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

3.2 2in1 Module

The 2in1 module kit is composed of:

+ 1 x 2in1 PCB
+ 1 x opto-coupler 6N138
+ 1 x dioode 1N4148 (D1)
+ 1 x resistor 1K (R1)
+ 1 x resistor 10K (R2)
+ 1 x resistor 220 (R3)
+ 1 x MCP23008
+ 2 x ceramic capacitor 100nF (C1, C2)
+ 1 x 8-row-pin male connector (angle)
+ 1 x 6-row-pin male connector
+ 1 x 2-row-pin male connector

2in1 kit.jpg

These are the steps for building the 2in1 module:

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!

2in1 ensambled.jpg

4 Tweaking the Modules

4.1 HifiBerry DAC+ soundcard customizing

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

Hifiberry dacplus extra connectors mounted.jpg

4.2 PiTFT 2.8' TouchScreen customizing

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.2.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.2.2 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.

Clonic pitft tweaked connectors.jpg


4.3 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

5 Case Mounting

5.1 Building the MIDI-IN connector

5.2 Building the JACK Audio Out connectors

5.3 Building the main computing block

Main computing block 02.jpg

Main computing block.jpg

5.4 Holding everything to the case

6 Connecting everything

6.1 Controller Module x 4

This step is a bit tricky. Remember that, if you follow 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 ;-)

So you should look at your controller modules from bottom side and with the pin-row on the top of PCB!

PHOTO NEEDED HERE!!

Note: Some encoders have reversed pin ordering, so, if you buy the encoders by yourself, perhaps you have to change A and B pins.

Wiring scheme controllers single.png

Zynthian inside 01.jpg

Warning: In this photo the controller modules wiring is reversed (1 by 2, 3 by 4). I will change it ASAP ;-)


6.2 2in1

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.

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

Cable-schema-2in1.png

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.

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)

7 ==