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

From ZynthianWiki
Jump to navigation Jump to search
Line 262: Line 262:
 
  2. Plug the mini-usb power conector. A good 5V micro-usb charger is recommended (> 2 Amp).
 
  2. Plug the mini-usb power conector. A good 5V micro-usb charger is recommended (> 2 Amp).
  
If you are using a SD image pre-configured for the Zynthian Kits v2, these are the stages that you should see while booting:
+
If you are using a SD image pre-configured for the Zynthian Kits v3, these are the stages that you should see while booting:
  
 
  1. Initially, the display must go white
 
  1. Initially, the display must go white

Revision as of 16:33, 11 July 2019

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 v3 (version 3), those using the All-In-One circuit and the ZynScreen v1.4 display.

ZynthianFront.jpg

Anyway, the instructions are quite detailed and can be used as inspiration for building a custom Zynthian Box from scratch. Of course, you will have to be creative if you want to do it in such a way ;-)

ZynthianBack.jpg

2 Bill of Materials

  • Zynthian Basic Kit (custom PCBs, electronic parts, wiring and knobs)
  • Case kit, including nuts, bolts and connectors
  • Raspberry Pi 3
  • HifiBerry DAC+ADC souncard
  • ZynScreen v1.4 (3.5" touch-display)
  • Power adapter for Raspberry Pi (5.1v 2.4A with microUSB connector)
  • 16GB SD Card (a good one, please!)

Visit the Zynthian Shop for most of components.

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 most recent 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 Zynthian "Aruk RC-3" SD-image, configured for Kits v3

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.

If you don't know how to do it, you can use Etcher (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.

Finally, if you like, 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 Bundle All Kit v3

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 Bundle All Kit v3, that is composed of these specific parts:

+ 4 x Controller Modules (rotary encoder + switch)
+ 1 x Zynaptik (GPIO expander + MIDI IN/OUT/THRU)
+ 1 x Main ribbon bus cable
+ Wiring Kit with JST connectors

Photo-not-available.jpg

these generic parts:

+ 1 x Raspberry Pi 3
+ 1 x Hifiberry DAC+ADC (also pro & lite)
+ 1 x ZynScreen 3.5' Touch-Display

Photo-not-available.jpg

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

and customized case:

+ 1 x Zynthian Aluminium Case
+ 1 x Connectors
+ 1 x Bolts & Nuts

Photo-not-available.jpg

This case is available as a kit, including all the needed connectors, knobs, bolts & nuts. 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 Assembling your Zynthian Box

4.1 Prerequisites

Assembling your own Zynthian Box is not very difficult, but you will need your attention and screwdriver. Read the instructions and observe the detailed photos carefully. If you get in trouble you can ask the community:

https://discourse.zynthian.org

4.2 Assemble the Main Computing Block

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

IMG 1293.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.

IMG 1353.JPG

Photo-not-available.jpg

Photo-not-available.jpg

4.3 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).

Photo-not-available.jpg

4.4 Secure the Zynaptik module

Secure the Zynaptik module to the case using 4 x separators and 8 x M2.5 bolts.

IMG 1294.JPG

Photo-not-available.jpg

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

Photo-not-available.jpg

4.6 Secure the MIDI-IN/OUT/THRU connectors

Just insert the connector with the JST-wire from the out-side of the case and the nut from the innerside. A pair of pliers can be useful for tighten.

Photo-not-available.jpg

4.7 Mount the MIDI activity LEDS

Insert the 3 LEDS in the case holes. You may want to push the LEDs with something more rigid than your finger. The screwdriver's handle could be fine.

Photo-not-available.jpg IMG 2365.JPG

When it's done, you have to plug the 2 LED wires (red/black) with the 2 spare wires on the MIDI JST harness (green/yellow). Polarity is important, so don't cross the wires:

* JST Green wire (1) => LED's Anode (LED's red wire/long lead)
* JST Yellow wire (2) => LED's Cathode (LED's black wire/short lead)

Photo-not-available.jpg

4.8 Secure the Display

For fixing the display to the case cover, you have to use this set:

IMG 1295.JPG

It's composed of 4 bolts, 4 nuts and 4 nylon separators. Before fixing the screen, don't forget to remove the protective plastic sheet.

Photo-not-available.jpg

4.9 Secure the Controllers

Plug a wire in every controller.

Rotary&wire.JPG

Fix the 4 controller modules to the case cover using the 4 bolts and washers attached to every rotary encoder.

ZynScreen&Controller.JPG

IMG 1401.JPG

4.10 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

4.11 Stick the rubber feet

Zynthian mounting case bottom.jpg

5 Connecting everything

The Zynthian Kit 3 is designed to use JST connectors, so connecting everything is really straight-forward:

  • Connect the Main Ribbon Bus cable to the RBPi's 40-pin header and also to the Zynaptik module

IMG 4741.JPG

Ribbon&Hifi&Zynaptik.JPG

  • Connect the 4 double JST cables to the 4 controller connectors on the ZynScreen (CTRL1, CTRL2, CTRL3, CTRL4)

ZynScreenConnect.JPG

  • Connect the 3 JST cables from the MIDI connectors to the MIDI-IN, MIDI-OUT and MIDI-THRU connectors on the Zynaptik module.

MIDIConnector.JPG

  • Connect the Jack connector to the auxiliar audio-out connector on the HifiBerry soundcard. It's the 3-pin JST connector that you soldered before:

Photo-not-available.jpg

5.1 Connect the Display

And finally, connect the ribbon's 26-pin connector to the Display's male side connector. Put attention to the orientation. The red wire should be the pin 1 that as marked in the display's PCB surface.

Screen&Ribbon.JPG

At this point, your Zynthian Box should look something like this:

Precierre.JPG

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

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

6.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 (> 2 Amp).

If you are using a SD image pre-configured for the Zynthian Kits v3, 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!!

IMG 1562.JPG

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

If you are using an older SD image that is not pre-configure for the Kit v2, then you should configure your Zynthian Box's hardware using the webconf tool. These are the adjustments you have to do:

  • Display: PiScreen 3.5 (v2)
  • Audio: HifiBerry DAC+
  • Wiring: MCP23017_ENCODERS
  • Style: FontSize = 14

6.3 Test the Controllers

If you get into the Zynthian UI, then you should be in the 'Layer Selection' screen. Let's start testing that your controllers are working OK.

1. Push 'select' to create a new layer. You should get into the 'Engine Selection' screen. 

IMG 1563.JPG

If it doesn't works, try pushing the 'snapshot' 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. Double-check the wiring again.

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

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. Select the ZynAddSubFX engine, select channel #1, bank and preset. You should get into the 'Instrument Control' screen.

IMG 1568.JPG

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

5. Push 'BACK'. You should go back to the 'Preset Selection' screen. 
6. Push 'Layer' again to return to the 'Layer Selection' screen. Try to create another layer following the same procedure.

IMG 1584.JPG

7. From the "Instrument Control" screen, push 'Snapshot' to get into the 'Load Snapshot' screen. Push 'Snapshot' again to 'Save Snapshot'. Push 'BACK' to return to the 'Instrument Control' screen.

If everything is working OK, then you should read the User's Guide and start enjoying your Zynthian Box, but before that ...

6.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 'Layer Selection' screen.
3. Push BACK and you will 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, and 'BACK' again to return to the "Layer Selection' screen.

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

6.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. Select some instrument.
3. You could add more layers for completing the band ;-)
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 ('Take Five') interpreted by your Zynthian's band ;-)
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).

6.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 you don't like it, probably you should take some piano lessons, same as me ;-)

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

6.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).

7 Final steps

Once everything is in its place and you have tested that it works, it's time to close the case ...

7.1 Close the case

Take your time to see how to bend and drive the cables to get a good fitting when closing the case.

IMG 1626.JPG

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

IMG 2287.JPG

8 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, ask in the forum. You can send a photo or description of the error message.

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

9.1 The display don't go white in the 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.

9.2 The display don't show the zynthian splash screen in the 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.

More coming soon ...

9.3 You can't solve the problem

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

https://discourse.zynthian.org

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

10 Technical Reference

Finally, i have included here some detailed schemes. 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.

10.1 Electrical Schematic

This is the electrical scheme of the All-In-One circuit:

Error creating thumbnail: convert-im6.q16: unrecognized color `none;' @ warning/color.c/GetColorCompliance/1057. convert-im6.q16: non-conforming drawing primitive definition `fill' @ error/draw.c/RenderMVGContent/4404.

10.2 RBPi GPIO

Raspberry-Pi-j8header-2b.png