Midi to USB Converter

I had to do that as well.initially. I added a line of code on the webconf years ago which does that when you change your sound decvice to audio injector. Not sure if you triggered that line of code…

what is Audio Injector? Is it a soundcard? I have the standard Kit2 with Hifiberry DAC+ and 5" waveshare Display.

My Alsamixer Setup looks like this:

And this are my Audio Settings in WebConf (default, nothing changed)

Checked all the GPIO connections => ok
Changed the audio cable.
And i flashed the sd card with gorgona omega again. Still the same issue.

What else could be the problem?

I will disassemble everything again today and then only operate the raspberry pi with the HB DAC+. Without ribbon cable and all-in-one board and display. Can anyone tell me commands for the console over putty that can be used for testing? Can I play the test-mp3 file over console?

The first thing you will have to do is stop the various zynthian services that systemd starts up and will restart if they go down…

so Putty onto the zynth as root

systemctl stop zynthian

will stop the zynthian stack from running…

cd /zynthian/
cd zynthian-ui # the user interface directory . . .

python3 zynthian_gui.py

will restart the User INterface but has the ‘advantage’ that the Putty terminal will display the output details. VERY useful for fault finding…

Also do make sure that the webconf settings are relevant for the setup when you start,
If you have no encoders then Hardware set to Dummies . . etc

That should, at least, allow you to get some idea of where the problems lie. Oh and don’t plug two MIDI USB devices into it on start up . There is a long running linux issue with allocation that confuses the hell out of the zynthin startup :frowning:

ok, if I understand right I will do the following

  • Disasamble everything

  • Put the HB DAC+ direct on the raspberry Pi

  • Start the raspberry and change the settings in Web Config to dummy-devices.

  • Then I restart again to save this changes.

  • Start Putty and type into console:

    systemctl
    cd /zynthian/
    cd zynthian-ui #
    python3 zynthian_gui.py

And then I can choose the audio-test over the UI displayed in Putty?

Yep. It makes more sense to do rather than describe.

ok it doesn’t work. I startet raspberry pi3b+ with HB DAC+ and the Gorgona omega image, changed in web config the wiring to dummies ant connected wie ethernet and putty.

Then i typed and get the following:

root@zynthian:~# systemctl stop zynthian
root@zynthian:~# cd /zynthian/
root@zynthian:/zynthian# cd zynthian-ui
root@zynthian:/zynthian/zynthian-ui# python3 zynthian_gui.py
Traceback (most recent call last):
File “zynthian_gui.py”, line 39, in
import zynautoconnect
File “/zynthian/zynthian-ui/zynautoconnect/init.py”, line 5, in
from zynautoconnect.zynthian_autoconnect import *
File “/zynthian/zynthian-ui/zynautoconnect/zynthian_autoconnect.py”, line 34, in
from zyngui import zynthian_gui_config
File “/zynthian/zynthian-ui/zyngui/init.py”, line 22, in
import zyngui.zynthian_gui_config as zynthian_gui_config
File “/zynthian/zynthian-ui/zyngui/zynthian_gui_config.py”, line 288, in
top = tkinter.Tk()
File “/usr/lib/python3.4/tkinter/init.py”, line 1854, in init
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
root@zynthian:/zynthian/zynthian-ui#

I can not see a UI via putty

First can you see the webconf if you point a browser at it ?
You can use zynthian.local in the browser (it sometimes works in Windows :frowning: ) or use the iP address, since you have got on via PUtty I’m assuming you know your IP address (if not type ipconfig on the Putty command line)

Have a look at the display settings, are they correct?

It’s on.
I plugged in the display and selected it in Web Config. After that it worked with the Putty.

The test without the All-in-One board was positive. The audio test worked.

After plugging in the All-In-One board, the sound was quiet again. I soldered all solder points again.

The next test with All-In-One Board WITHOUT Encoder, Midi, and Jack Connector was positive again and I sounded ok.

Then I connected Encoder, Midi and Jack connector one after the other. When connecting the jack connector the sound was quiet again.

But without Jack-Connector it works in any case :slight_smile: The wiring of the Jack-Connector will be checked again this weekend.

What I still have for a problem is that the Zynthian sometimes crashes when I do something at encoder 4. I use the KY-040 encoders without resistors and capacitors. I suspect that it might be a problem that I don’t use capacitors. I will also solder and test the 10nF and 100nF capacitors this weekend.

1 Like

I lost all my KY-040 credibility with the “just don’t connect the +5V pin”

But I use purest zynthian encoders . . . :face_with_monocle::face_with_monocle::innocent:

I’ll try to build here another Zynthian, takes some time, but this time i don’t remove KY-040 resistors, just connect +5V pin to Vcc. Maybe i add some capacitors too, but my current zynthian works without.
Generally looks like KY-040 is better suited for interfacing with TTL logic circuits thanks to Arduino background.

Don’t be frustated about KY-040-s and your recommendation, those 10k pullups interfere with MCP23017 internal 100k pullups in a puzzling way. But everything takes place, when you think about Ohm and Kirchoff’s laws. I’ll try to explain.

|----(A)-/ ------|---------------------------O----[=100k=]---- +5V internal
| . . . . . . . . . .|----[=10k=]-----|
|–> GND . . … . . . . . . . . . . . |
| . . . . . . . . . .|----[=10k=]-----|
|----(B)-/ ------|---------------------------O----[=100k=]---- +5V internal

O-s on schematics are MCP23017 input pins, left side is encoder, right side is extender. Now if you look at encoder output signals, then A and B overlaps. Which effectively means that at some moments current flows back to another input via 10k encoder resistors (summarily 20k vs 100k). This may be enough to confuse extender interrupt logic (INTx when pin state changes).

Update: Still can’t draw right schematics in a way that web based editor don’t change my graphics. Schematics is wrong - those 10k pullups are connected together and tied to encoder +5V pin, resistor other end is connected to A and B encoder output. Huh, i’ll try to correct my drawing, takes some time.

Update 2: Now schematics is correct. replace dot’s ( ‘.’ ) with spaces. Don’t know, how to add multiple spaces without that damn nice automatic reformatting. :slight_smile:

The sleep I’ve lost …:disappointed_relieved::thinking: . . .:stuck_out_tongue_winking_eye:

I always wonder about the 5V / 3.3V Bus Voltage on the Int Pins and SCL/SDA pins of the MCP23017 is that an issue or a feature?

External pullups on SDA and INTx pins? This is probably because those are internally open collector outputs for cascading multiple devices.

INT pins are configurable, open drain or active high/active low via MCP23017 IOCON register.
In zyncoder.c file starting at line 156:

// configure the interrupt behavior for bank A

bitWrite(ioconf_value, 6, 0); // banks are not mirrored
bitWrite(ioconf_value, 2, 0); // interrupt pin is not floating
bitWrite(ioconf_value, 1, 1); // interrupt is signaled by high

Same for bank B. So this explains, why INTx pin has some voltage.

From the data sheet. . .

Configurable Interrupt Output Pins:

Three Hardware Address Pins to Allow Up to
Eight Devices On the Bus

So we have another 7 devices we can specify :smiley:

Yes. And always you can add “Yet Another Address Decoder” with one GPIO pin + AND gate on SCL line when there is lack of inputs for knobs und blinkenlamps :smile: , effectively doubling address space to 16 extenders.

Time to take an sleep or soon i fly into space with my mind…

1 Like

image

“HEY MAMA! LOOK! A COPY OF APOLLO SPACECRAFT PANEL!!!”
“No, son. It’s just @Werewolf’s new synthesizer…”

:rofl:

1 Like

Ok, 5 people and 10 opinions…

what should I do now with my Encoders to get it work? The resistors are removed from the board and dissapeared.
Is there a way to get my encoders work? What is the difference between the original Zynthian Encoders and the KY-040 ? Is there not a way to modify the KY-040 that they work like the original encoders?

It would be good to identify if this is an pick up issue. If you try to turn on and off something mains based close to the zynth does that produce the effect? You are very much into an area of your own because this is un-explored, your build is exactly that we can advise but at the end it’s only speculation. Please remember this is not an official kit implementation and is really supported on best effort.

The zynthian encoder simply connects 0v to the centre encoder tap without any pull up arrangements and place a anti bounce capacitors across the three connections.

At the end of the day you could simply solder the wires to the encoders themselves and place caps across the terminals.

We have @Werewolf saying he has modified, without caps, successfully so there would seem to be a way. But I don’t know how consistent the encoders are.

Just one thing, you are sure that there is no resistance between the two outer pins on the encoders when the KY-040 is unplugged? That would at least confirm that you have completely severed the connection for the resistors.

I don’t have room for control panel like Apollo, so moon is unreachable for me :slight_smile: