Is AKSO discussion also allowed here? Question about Midi input

Hello,
Since Akso forum has also been dead for some time it would be great to be able to discuss about it here too. When the axoloti forums went down it sucked, but I don’t know, you could always find axoloti users, and when the backup of the forum reappeared it was not the same, but you could always find whatever you were looking for.
But when I had problems with my AKSO and the forum went down… I felt so alone.
Now I’m trying to make something with it, and I have a question, I hope someone here could guide me a bit.
It is about sending 5 pin din midi from a Teensy to an AKSO.
I have made the recommended circuit for outputting midi from a teensy 3.2. I’ve checked with a midi monitor on my pc and the Teensy is sending notes and CCs just fine.
The doubt I have is about receiving that midi on my Akso.
The only documentation there is about this topic is this:
" > MIDI

Akso’s USB device jack exposes a standard USB-MIDI device to the connected host; it is plug and play with your USB-MIDI setup. The host USB port supports USB-MIDI devices such as keyboards and control surfaces.

Traditional MIDI DIN is also supported at test points but requires a breakout board or adapter. Starting from the voltage in pin VI and working down, the test points align with the five pin connector on Axoloti Core’s MIDI section, so it can be reused if you have one available. MIDI RX is mapped to pin G9. MIDI TX is mapped to pin GE."

So I tried making a midi input with a 6N138 optocoupler, but it doesn’t seem to be working.
This is the schematic of what I made.
Did I do something wrong here?

The instructions on the Akso documentation are not very clear, so I guess I have messed up somewhere.

Hi Z, first of all, Akso questions are very welcome here! Wondering if I should create an own category so there will be less confusion when people search for things.

Now about your question: if you’re sure you got pins 4 and 5 right (I always mess those up between plug and socket), the issue seems to be with 3.3V power versus 5V power.

What is pin VC on the Akso, where the red power line goes in your diagram? Assuming this is like VCC=3.3V.

Edit: I just found out that VC is 3.3V analog via the specification

So it is not a good idea to power a digital circuit from there. Find a " V: +3.3V processor/digital" pin.

Which would mean that the whole MIDI out to in circuit is running on 3.3V. You could try reducing the 220 ohm resistor near the 1N4148 diode (as it is receiving 3.3V not 5V, so you’ll need less resistance to turn on the photodiode). But then don’t connect any other MIDI devices (which run 5V) if you reduce this resistance.

Next question, are both teensy and akso in the same case, powered by the same PSU and share the same GND? because then you can be sure that no harmful voltages come in via the MIDI lines and you wouldn’t need the optocoupler circuit. you can simply connect Teensy TX (1) to Akso RX (G9? in the diagram?).

See here:
https://sebiik.github.io/community.axoloti.com.backup/t/extra-midi-io-via-uart-not-working-in-standalone-mode/36924658.html?page=2

If you are going from a Teensy or Due to Axo, you don’t need to use a 5 pin din at all, just link the TX/RX with Axo RX/TX, as they are both 3.3v, you just need to join the grounds so the reference remains level. If you are using a Uno, if this is 5v you will need a logic converter.

1 Like

Wow thank you for this quick and detailed reply!
I am indeed powering both with the same psu, so I am going to try simply wiring teensy tx to akso rx pin, and I’ll let you know if that works. I got used to using optocouplers for midi and it didn’t even occur to me that in this case it is not necessary! This simplifies everything, which is a good thing :blush:

Hi again!
Just an update. For some reason I haven´t been able to send any midi from the Teensy to the Akso by connecting the Teensy TX pin to the Akso RX pin.
The reason for doing it like this was because I also want to send midi notes via usb midi to the Akso from a Launchpad X, so I needed the usb port free.
But since I had a Teensy 4.1 laying around waiting for another project I have in mind, I am going to use the Teensy 4.1 usb host capability (instead of the 3.2) and merge the incoming midi from the Launchpad with the midi the Teensy itself is going to generate, and send it all to the Akso via Usb.
Reading the midi from the Launchpad on the Teensy seems to work fine, so now I just have to test sending midi from the Teensy to the Akso via USB and if that works fine that is the way it will be.
So thanks for the help, I hope someday I can finish this project and show it here :slight_smile:

You did have a common ground connection? Maybe it was a software issue then?

Yeah, they both shared ground, and teensy was sending midi fine (checked it with the din input in my sound card and a midi monitor software). The problem was on the akso side, but since I’m going to end up using usb I don’t really mind anymore (as long as the micro usb - usb c adapter I ordered works fine).
Thanks a lot!!!

Got it! Wait didn’t the Akso have some MIDI in bug? Wondering if it was for DIN MIDI.

1 Like

Hey there, also an Akso user here.
USB MIDI IN via Host port has never worked for me (the Akso restart in loop, I don’t know if it’s a voltage issue or something else). I always had to use the Com/Power USB port to send Midi which is a bummer because you can’t go dawless this way.

I’m also interested in adding physical MIDI DIN ports to my Akso but I want to make sure it works first.

1 Like

If you’ve got a teensy, you can run that in host mode and go USB → USB on the Akso I would imagine. Then have the teensy act as a midi bridge.

1 Like

That’s an interesting idea. I’ll dig that.

On the old axoloti board a lot of people have been interconnecting to teensy to pin PA2 and PA3, the serial pins. Check in the community library hug extra midi IO. If you have a shared ground anyway you also don’t have to fiddle around with octocopplers. Not sure if this would work on akso, but it’s another thing you could try. the nice thing is that this keeps the midi IO free for other stuff.

1 Like

Hi!
I’m so sorry, I went on vacation and with the child starting school and all I haven’t been able to get back to work on this until today.
Yes, I also remembered there was some type of bug on akso and midi, but I don´t remember if it was on usb or din. That is why I was willing to try any possible way.

I have received the micro usb to usb c adaptor and I am doing some tests.
I have a basic program on the teensy sending note 60 on and off every second.
The results I’m getting are mysterious:

-If I connect the teensy to the usb-c port on my pc (teensy-MicroUSBtoUSBC Adaptor - UsbC to UsbC cable - Pc) I receive midi notes on the pc (midi monitor software) from the teensy.
-If I connect the Launchpad to the Akso Usb C Host port I get notes sent from the Launchpad on the Akso. Using the same usb C to usb C cable as the previous test.
-If I connect the Teensy to the Akso (Teensy - microUSB to USB C adaptor - Usb C to Usb C cable - Akso Usb Host port) I get nothing.

The teensy sends midi fine.
The adaptor works fine.
The cable works fine.
The pc can receive midi notes sent from the Teensy.
The Akso can receive midi notes sent from the Launchpad.
The Akso can NOT receive midi notes sent from the Teensy.

The notes I’m sending from the teensy are formed just fine as I can see on the midi monitor software on the pc, and they are sent in the same channel as the notes sent from the Launchpad. But somehow the Akso doesn’t seem to be able to see what the teensy sends.
In both cases the devices (teensy and Launchpad) are being powered by the Akso usb Host port.
I’ve also tried every different possible position of the usb cable on the adaptor and on the Akso, just in case.

There is one thing that might have something to do with the problem:
I have an exact same usb C cable that I cut in half and have the cables exposed. I connect that cable to my Usb C port on my PC, and connect the multimeter to the grey and pink cables (I know, not very standardy) and I get a 5.07V
read on the multimeter.
If I do the same on the Akso I get a 0V read. But somehow when I connect the Teensy or the Launchpad to the Akso they both get power from somewhere.
These usb c cables have 5 cables inside: Grey, Pink (both thicker than the other three), Green, White and Yellow.

I’m a bit lost here, but I’m obsessive enough to not let this go, so I will let you know if I get somewhere.

@Blindsmyth that is interesting, I’m going to check it out, who knows it might be the solution.

Ok I am exploring the Akso forum on the wayback machine and it seems that the Akso was (is) a bit picky with the midi controllers it can see.

But I learned something I didn’t know, which is that in “Board - MIDI Routing” you can see the midi controller you have connected via usb.
This is great because now I can see that the Launchpad appears when I connect it, and the teensy doesn’t. So it might be something to explore.
Hell I might make the teensy appear with the same name as the Launchpad, sometimes computers are stupid like that.

Got it!!!
Or at least it seems I’m getting somewhere.
As stupid as it might sound, changing the name that the Teensy uses to present itself as a midi device seems to have done the trick.
Now I can see the Teensy on the MIDI Routing window and the Akso is receiving the usb midi the teensy is sending.

image

For anyone that might find this useful in the future, for changing this name you have to go to your arduino installation folder and find a file. In my case, on Debian and with a Teensy 4.1 it was:
~/.arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4/usb_desc.h

In that file you have all the names depending on what you choose for the usb port function. In this case I chose MIDI, so in the section:

#elif defined(USB_MIDI)

I wrote this:

#define PRODUCT_NAME		{'T','e','e','n','s','y'}
#define PRODUCT_NAME_LEN	6

Before, it said “Teensy MIDI” with 11 characters. I guess the space was messing with the akso? I don’t know.

Oh the sensation when you finally get over a thing that was making you think of abandoning…

1 Like

That’s a bit crazy but amazing that you found out!

1 Like

I know, it feels like I didn’t really find the solution but I got lucky instead. Anyway, if it is working I’m not going to complain, now I can keep working on more fun aspects of this project.
Thanks everyone! :slight_smile: