# Noob building custom Zynthian

**URL:** <https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233>\
**Category:** Building Zynthian\
**Created:** [May 29, 2020, 6:34pm UTC](https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233 "2020-05-29T18:34:41Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neomorph](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/neomorph/32/4190_2.png) [@Neomorph](https://discourse.zynthian.org/u/Neomorph)\
**Post date:** [May 29, 2020, 6:34pm UTC](https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233/1 "2020-05-29T18:34:41Z")

</div>

Hi!

I’m totaly new to this, both electronics and synthesis, and very keen to learn and explore electronic music. And i decided to build my own Zynthian box as i’m a student and on a budget.

So, i’ve finally recieved all my parts from china and just now started to put it all together, and of course already run in to some problems!

The screen is working as it should, haven’t tested the touch yet. But I cant seen to boot correctly.

I’m booting in to the Zynthian Error screen, with my local IP showing. And it seems to be in an infinite loop.

It showed the terminal, then the error screen for a few second, and repeat.

What could be the problem?

I’ve hooked up the 4 encoders with breadboard so far, cross referencing the allinoneboard schematics, MCP23017 datasheet and the picture that is attached in the guide, according to this hackaday guide: [https://hackaday.io/project/166752-quick-and-dirty-zynthian](https://hackaday.io/project/166752-quick-and-dirty-zynthian)

Except for the reset pin, everything is connected.

Thanks in advance!

Here’s my partlist:

Raspberry Pi 3B+  
geeekpi 5" screen from ebay  
4x EC11 rotary encoders connected with MCP23017 ([http://tiny.cc/hceypz](http://tiny.cc/hceypz))  
Generic PCM5122 DAC+ ([http://tiny.cc/1aeypz](http://tiny.cc/1aeypz))  
USB Midi keyboard

---

<div class="post-metadata">

**Author:** ![riban](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/riban/32/2331_2.png) [@riban](https://discourse.zynthian.org/u/riban)\
**Post date:** [May 29, 2020, 6:42pm UTC](https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233/2 "2020-05-29T18:42:10Z")

</div>

Hi @Neomorph

Welcome to the community. You will need to access the web based configuration via a browser on a computer connected to the same network as your Zynthian then select Soundcard: HifiBerry DAC+ light from the hardware menu. Check out the wiki for information.

Beware, you will soon be receiving a cryptic message from @wyleu which basically means, when you have some audio coming out of your Zynthian, upload a sample to the forum.

You can search the forum for similar noob questions. It happens just about every time!!!

---

<div class="post-metadata">

**Author:** ![Neomorph](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/neomorph/32/4190_2.png) [@Neomorph](https://discourse.zynthian.org/u/Neomorph)\
**Post date:** [May 29, 2020, 6:47pm UTC](https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233/3 "2020-05-29T18:47:06Z")

</div>

Hi, thank you!

Alright, the encoders connect to the GPIOs, so I cant connect the soundcard and encoder at the some time right now. So i tried to configure it with a generic usb soundcard i got. But it doesn’t seem to work anyways. Can I attach debug logs or something?

haha, I suspected that! And will gladly upload some samples when it all works!

---

<div class="post-metadata">

**Author:** ![Neomorph](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/neomorph/32/4190_2.png) [@Neomorph](https://discourse.zynthian.org/u/Neomorph)\
**Post date:** [May 29, 2020, 8:10pm UTC](https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233/4 "2020-05-29T20:10:36Z")

</div>

I got the soundcard working and have booted successfully into Zynthian 🙂  
But I cant seem to get the encoders working…

As I said, Ive wired them up according to the allinone-schematics, and Ive tried all 3 options for MCP23017 in webUI, and nothing works…

Under advanced options, the pinout for INTA and INTB is pin 36 resp. pin 37, which checks out. But I dont understand the pinout for the encoders:

Encoders A-pins:  
102,105,110,113

Encoders B-pins:  
101,104,109,112

Switches Pins:  
100,103,108,111

Are these pinouts in the allinone-board, or the MCP23017 IC?

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [May 29, 2020, 8:54pm UTC](https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233/5 "2020-05-29T20:54:14Z")

</div>

Well you say you are using a MCP23017 so rather than using the I/o pins directly it uses the i2c bus connected to the MCP23017.

There is handy tool

i2cdetect -y 1

which will tell you if the synth sees anything of relevance on the 12C bus . . .

Even with the encoders completely miswired this should help.

---

<div class="post-metadata">

**Author:** ![Neomorph](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/neomorph/32/4190_2.png) [@Neomorph](https://discourse.zynthian.org/u/Neomorph)\
**Post date:** [May 29, 2020, 9:04pm UTC](https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233/6 "2020-05-29T21:04:01Z")

</div>

Thank you, @wyleu

But I dont quite understand…

Are you supposed to wire up the encoders to the pi’s GPIO individually?  
Doesn’t that make the MCP23017 unnecessary?

This is how its wired for me right now:

Encoders 1-4 to the MCP23017.

MCP23017 is then wired to the pi through pins:

INTA - pin 36  
INTB - pin 37  
SDA - pin 3  
SCL - pin 5  
VCC - pin 2  
GND - pin 39

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [May 29, 2020, 9:05pm UTC](https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233/7 "2020-05-29T21:05:04Z")

</div>

Apologies I just re-read a little more carefully.Refresh the thread Try now 😃

12cdetect -y 1 is your friend…

---

<div class="post-metadata">

**Author:** ![Neomorph](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/neomorph/32/4190_2.png) [@Neomorph](https://discourse.zynthian.org/u/Neomorph)\
**Post date:** [May 29, 2020, 9:07pm UTC](https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233/8 "2020-05-29T21:07:39Z")

</div>

It showes up like this:

root@zynthian:~# i2cdetect -y 1  
0 1 2 3 4 5 6 7 8 9 a b c d e f  
00: – -- – -- – -- – -- – -- – -- –  
10: – -- – -- – -- – -- – -- – -- – -- – --  
20: 20 – -- – -- – -- – -- – -- – -- – -- –  
30: – -- – -- – -- – -- – -- – -- – -- – --  
40: – -- – -- – -- – -- – -- – -- – -- – --  
50: – -- – -- – -- – -- – -- – -- – -- – --  
60: – -- – -- – -- – -- – -- – -- – -- – --  
70: – -- – -- – -- – --  
root@zynthian:~#

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [May 29, 2020, 9:10pm UTC](https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233/9 "2020-05-29T21:10:54Z")

</div>

Aah that’s good . . .

![image](https://discourse.zynthian.org/uploads/default/original/2X/1/184a0c6e19c7804d5b38f4ffddbb217ba9aeb9df.png)

Ignore the UU.

 ![image](https://discourse.zynthian.org/uploads/default/original/2X/2/2512c94d0d320273a498bf5e53451beb6884d50d.png)

So the 23017 seems to be properly configured.

---

<div class="post-metadata">

**Author:** ![Neomorph](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/neomorph/32/4190_2.png) [@Neomorph](https://discourse.zynthian.org/u/Neomorph)\
**Post date:** [May 29, 2020, 9:14pm UTC](https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233/10 "2020-05-29T21:14:38Z")

</div>

Yes, so now when I started the pi so test the command this happened:

The encoders were working, though in reverse but the buttons were not working. I guess I could either switch the pins, or change the configuration i the webui?

The i loaded up a synth, and again the encoders all worked, but in reverse but not the buttons.

Then a window opened on my mac (through XQuartz?) displaying a lot of settings for the specific synth, but then the encoders stopped working…

Any idea what just happened haha?

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [May 29, 2020, 9:15pm UTC](https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233/11 "2020-05-29T21:15:29Z")

</div>

The next best thing is get a camera out and start photographing things. . .

IF your ssh terminal ( I dont know XQuartz) is allowed to pipe the XWindow output from a particular layer then it will do what you describe. IT’s nothing to worry about cos it’s a side effect of firing up the layer the zynth doesnt really realise it’s going on. IT does no harm and it wont happen if you turn off the X window forwarding in the terminal , There’s probably a switch for it somewhere in XQuartz setup. The terminal session will set the display to something like :12.0 which will be the Xwindow on your host machine; you go to run an engine the engine looks for the display to start it’s gui up on, find the :12.0 and runs it there so it pops up on your desktop. Some people run it like that to get at it, but we are pure zynthians aint we … ? 🙂

As to the encoders, Personally I would rewire the pins to match the ‘normal’ settinghs as when you refresh the zynth from a fresh image you will have to remember what you had them set to, and you probably wont do it on the first occasion ( guess who didnt) and you have to work it all out again several months later, with virtually no notes !!

---

<div class="post-metadata">

**Author:** ![Neomorph](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/neomorph/32/4190_2.png) [@Neomorph](https://discourse.zynthian.org/u/Neomorph)\
**Post date:** [May 29, 2020, 9:31pm UTC](https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233/12 "2020-05-29T21:31:32Z")

</div>

Alright, I understand it now. And yes, i agree, thats nothing im looking for as I want a standalone zynth!

Ill look into fixing so it doesn’t open up XQuartz everytime later on.

But I still dont understand why the encoders is acting up, since they started working a little bit…  
Though, the breadboard looks quite messy atm, so I might just rewire it and hope that its just some bad connection somewhere!

And does my pinout of the encoders look fine? 1 and (1) are going to ground. And the rest is wired according to the allinone-schematics.

 ![image1](https://discourse.zynthian.org/uploads/default/original/2X/a/acc6b387de58cce2fcc06a3d47937e2f6692d691.jpeg) ![image2](https://discourse.zynthian.org/uploads/default/original/2X/1/17c8eb5a79518a19bd116b22ef79387fa0dff649.jpeg)

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [May 29, 2020, 9:38pm UTC](https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233/13 "2020-05-29T21:38:29Z")

</div>

Sadly can’t open the open the images I don’t know the format…

---

<div class="post-metadata">

**Author:** ![Neomorph](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/neomorph/32/4190_2.png) [@Neomorph](https://discourse.zynthian.org/u/Neomorph)\
**Post date:** [May 29, 2020, 9:40pm UTC](https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233/14 "2020-05-29T21:40:10Z")

</div>

Sorry, updated them now!

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [May 29, 2020, 9:49pm UTC](https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233/15 "2020-05-29T21:49:19Z")

</div>

[http://wiki.zynthian.org/images/4/44/Zynthian\_allinone.sch.svg](http://wiki.zynthian.org/images/4/44/Zynthian_allinone.sch.svg). Is the schematic to wotk to…

Breadboard are great but they can be a bit rickety… I’d mount the encoders on bits of strip board (veroboard) and solder on to the veroboard . You will have to cut some tracks but it does make it easy to check things are working.

---

<div class="post-metadata">

**Author:** ![Neomorph](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/neomorph/32/4190_2.png) [@Neomorph](https://discourse.zynthian.org/u/Neomorph)\
**Post date:** [May 29, 2020, 9:51pm UTC](https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233/16 "2020-05-29T21:51:06Z")

</div>

Alright, thank you!

Just measured that some wires were faulty, thats chinese stuff for ya 🙂

Will update after some tinkering!

---

<div class="post-metadata">

**Author:** ![Neomorph](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/neomorph/32/4190_2.png) [@Neomorph](https://discourse.zynthian.org/u/Neomorph)\
**Post date:** [June 1, 2020, 8:48pm UTC](https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233/17 "2020-06-01T20:48:22Z")

</div>

It turned out to just be some faulty wires, bad connections on the breadboard and also connected 5v to RESET and now it works great!

Will put up a post in the build thread when all the remaining part, such as the case, arives!

Thank you @wyleu and @riban for the support and quick replies!!

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [June 1, 2020, 8:50pm UTC](https://discourse.zynthian.org/t/noob-building-custom-zynthian/4233/18 "2020-06-01T20:50:48Z")

</div>

Excellent this means that I can swing the full of weight of 🧐 in your direction. . . .

Delight in the attention and the social pressure !! 🙂
