My 1.5th Build


#1

Hey all–

I’ve already done a dev Zynthian by burning Gorgona to a micro-SD, and modifying the crap out of some settings to do HDMI instead of TFT, using the onboard sound card, and using a USB MIDI controller. Later, I even went so far as to buy a Hifiberry cause the onboard soundcard obviously just wasn’t cutting it :wink: . Anyway… now I have my own kit! @jofemodo sent me one and it just arrived this past Friday.

@jofemodo was nice enough to do all the soldering for me, so I’m at the wiring/connecting phase. Obviously I’ve been helped tremendously by the instructions on the blog and in the wiki, but I’ve hit a small issue I’d like to share with the community.

First off, PICTURES!

Everything laid out and ready:

A rotator–part of the question.

The 2-in-1 PCB:

What I’ve assembled so far:

The splash screen!

Select a preset:

Choose your engine:

Admin Menu:

So I’m super excited, for obvious reasons, but I guess my question comes down to this:

In this diagram, from the Wiki, pin 1 or in general the ordering / numbering of pins is very very important… the color of the wire lines here doesn’t matter except as to help you connect the right pins to the right pins… right?

So I guess my situation is, if you look at the rotary encoder picture up above, maybe someone can use that picture or give me another way to deteremine which pin is pin 1?

On the ribbon, it’s a bit easier, I think, because you hold the ribbon such that the little slot in the middle faces down, and then pin 1 is the bottom left pin, pin 2 is the top left pin, and they go like that across the ribbon. No sweat. I’m having trouble finding a way of reliably identifying pins on the other components–particularly the 2-in-1 and the rotary. Forgive the n00b question–I’m a software person, not a hardware person :frowning:

So, that’s one major question, and I guess the other is this: do all 4 rotary controllers have to be connected, and also connected to the 2-in-1 to get a working UI navigation control? I ask because with just two connected (controllers 1 and 2), all I can do is go back between the admin screen and the engine selection screen endlessly. With what I have, pushing in a rotary doesn’t select anything, and actually the other controller doesn’t really do anything.

Of course, I can follow the rest of the instructions, go ahead and connect the other rotaries, etc, but I wanted to make sure I’m doing it right before I move on–particularly given that I’m having a hard time identifying pins.

Thanks in advance for any help on this issue! I now know why people use so many exclamation marks (!) when they post that they received their kit or started their build!


#2

Hi @programsam!

Please, read carefully the tutorial, and look the photos. I think it should sold solve all your doubts about wiring :wink:

Of course, you can ignore the colors, but it’s a lot easier to solve the problems if you follow the instructions and respect the color convention. If not, it’s difficult to check your wiring by looking your photos.

BTW, your 2in1 wiring is reversed, pin 1 is always on left :wink:

Kind Regards!


#3

Hm. I followed the wiring very carefully this time and I’m still seeing very strange behavior:

  1. The rotary encoders do not function at all as I would have expected them to. When I rotate left or right, it’s as though I clicked (selected) something. Some plain don’t do anything, others make you go back, none of them allow you to go left and right or back and forth. I was able to tap on the TFT to navigate a bit, which is how I figured out #2

  2. I’ve done cat /dev/ttyAMA0 and don’t see any data coming when I connect my MIDI keyboard. I connected my keyboard to another MIDI device and it works fine, so I know it’s not the keyboard.

Let me ask this: are these wiring diagrams for Raspberry Pi 2? Or Raspberry Pi 3? I’m pretty sure that the pin numbering changed on the GPIO between these two versions of Pi. I’m a bit out of my depth here, but it seems to me that the wiring diagram is not at all correct.


#4

Update:

I have disconnected everything and followed the instructions mentioned here that show how to send MIDI to the UART ports on the Pi. I ran ttymidi -s /dev/ttyAMA0 -b 38400 -p and was able to see output but that was basically 0 or e0 when I didn’t push buttons on my MIDI keyboard and then quite a variety of data as I ran my fingers down every key pretty quickly. I tested this several times over the course of a minute. To be clear: this is

ttymidi <–> RPi GPIO <–> HifiBerry Hat <–> Wires from UART pins on Pi <–> MIDI Connector <–> MIDI Cable <–> MIDI Keyboard.

My keyboard can successfully send data through the hat. Then, when I connect the PCB 2-in-1, I do not get data. I’ve tried several wiring configurations, each assuming the RPi pin 1 is in a different place, I’ve tried inverting the diagram… all kinds of stuff. I guess maybe I have a dud 2-in-1?

MIDI input is obviously a critical feature, so I’m stumped as to what to try next.


#5

Hi @programsam!

Please, send updated photos of your wiring.
BTW, have you fixed the 2in1 wiring? As i told you, it’s reversed in the photos you sent :wink:

Regards!


#6

I did try switching the wiring on the 2 in 1. At this point I’m worried I fried that component? One of the chips on it got very hot at one point (burned my fingers). I will re-wire and send–I’m holding off on the controllers until I establish a point of sanity w the 2 in 1, so I’ll just send the 2 in 1 wired and with MIDI in connected – this is the config I have going when I see no inputs on ttymidi


#7

Let me also say: thank you for helping this n00b (me) through the process. It’s part of the “fun”, even though at the moment I’m frustrated. It’s a learning experience :grinning:


#8

If you have reversed main connector in “2 in 1 board” you’ve reversed power and ground on the MIDI photocoupler, and there is a relatively high probability that you fried it. But I don’t think the Microchip I/O Extender sustained a lethal voltage.
YMMV, as always…


#9

Hey guys–I’m pretty confident at this point that I’ve fried the MIDI photocoupler on my 2-in-1 as @Axeman has suggested–the pictures I have below show what I mean. @jofemodo was right before that I had the wiring on my 2-in-1 reversed. I did have it the correct way initially, but that was doing weird things vis-a-vis my controllers, so I switched it just to see what that would do. This is obviously a learning experience for me, but that was an annoyingly costly mistake :wink:

It’s all on me that I did that though. Anyway, here’s why I now think that component is fried.

First, the overall setup of what I’m working on right now to debug this issue: got the Pi connected to power and to my HDMI screen (so I can switch ttys and run commands but still see the TFT). The TFT connected to the end of the ribbon cable, the ribbon cable exposed with the right cables going in the right spots now, and them running to the appropriate places on the 2in1 PCB. Check me here, but I don’t think anything is wrong with how I’ve done this. As I say below, but I’ll put it here, too, I’ve switched the order/position of the MIDI cables just to see if it helps, and it does not.

Here’s the wiring on the 2-in-1. MIDI and lines to the Pi only for simplicity and sanity (no controllers connected).

Here’s another view of the position of the cables for MIDI in. Note that I’ve tried switching the order of those, too.

This is the output of ttymidi when I’ve got my MIDI device connected through the 2-in-1 PCB. No data stream whatsoever. This is only important when you see the other picture below.

This is the output of ttymidi when I’ve got my MIDI connection going straight to the top of the Ada Fruit HAT. As you can see, lots of fun data. Some of it is obviously the clock, but I run my hands down the keys and saw all these other bytes flow in. If I don’t touch anything for a while, it goes back to the clock, like you’d expect :frowning:

This is the wiring from the MIDI device direct to the HAT for the Adafruit. I figured out the UART ports with a GPIO diagram and connected this hack myself just to test my theory.

On a more positive note, I can confirm the following:

  1. The 1/4" wiring for the Adafruit DAC works; I’ve run it from the “Test Audio” menu in the admin menu when I had things more/better connected. Sounds great! One thing I was curious: there are two outputs, but they both seem to be the seem to be of the same channel (my stereo connector always put them in the left channel). Is Adafruit only capable of mono output?

  2. The touchscreen aspect of my TFT works (thanks @jofemodo! ) so even though I’ve been in controller hell, I’ve been able to navigate and get around the menus decently.

I guess at this point I’m trying to figure out the best way forward. I’d be willing to pay @jofemodo for another pre-wired 2in1 PCB (will send PM as well to confirm price, etc). Maybe somebody else can check the above and see something stupid and obvious that I’m doing or not doing and I won’t have to do that though?

Thanks again for your read and support!
Ben


#10

Just a litte hintfor @jofemodo and the others Zynthian PCB designers: never ever EVER place power signals that get be inverted by reversing a connector… Murphy is always lurking in the dark… :slight_smile:


#11

Good tip, @Axeman!

I’m a bad electronic designer. Sorry :flushed:

@programsam, i don’t think it’s a good idea to connect the MIDI-IN wires directly to the GPIO. MIDI signal is not compatible with the GPIO voltage levels and you could break the GPIO ports. If you could do that, we wouldn’t need a MIDI-IN circuit :wink:

Regards!


#12

It’s not @jofemodo s fault! I’m impatient and didn’t follow instructions!