the opto is ok in any case. there are multiple schematics around for midi in, i.e. here for teensy:
Axoloti w/Teensy
Could I use this gpio method? Could it be easier?
Oops, this : https://sebiik.github.io/community.axoloti.com.backup/t/mongiloti-synth/1839/3
Using PA2 and PA3
"Hugo's patch example contained a great fix. Using the Midi IN objects from Hugo's patch, I connected my Teensy TX -> 220Ohm Resister -> PA3 on the Axo. Wallah, instant MIDI in without any interferance on the external socket. Niiice."
I want midi out from teensy to axo and vice versa.
"Hmm, Here's my pinout for connecting a Teensy to Axo UART
UART (Midircv) Teensy pin 0, Axo PA2 Rx
UART (Midisnd) Teensy pin 1, Axo PA3 TX"
So you powered teensy 3.6 from axos 5v pin? How did you wire it? Why did you use 5v when both of the microcontrollers are 3.3v?
Edit:
I read from teensy website that its ok to connect 5v to teensy vin exactly as you wrote. So no need to answer
Work in progress
Teensy3.2 is powered by axoloti.
For the moment 4 multiplexers with 16 channels (64 analog) + 2 analog, 8 digital inputs and LCD (other 7 digital inputs)
I got this problem: i have axoloti with 12 pots and oled connected to it. It also has teensy 3.6 with 12 pots connected to it. I have wired the teensy to get power from the axo 5v. Everything seems to power up but the pots are not working. When I unplug the teensy then the pots wired to axo work with smaller range than normally. So I assume that they don't get enough power. All the pots get power from axo. I use the micro USB for axolotis power. Any ideas?
I guess it wasn't a power problem afterall, It seems that I got about 3/12 of the pots interfering with each other. I wonder how to fix that.
Edit:
I found out that pots are not actually interfering, just two pots or axo pins are not working correctly. Need to dig in deeper. So far 10/12 axo pots working. Still got to get the 12 teensy pots to work.
I’m using 10k pots, all connected to GND and 3,3V rails. I’m using multimeter to meter pots: black meter wire on side pin of the pot and red meter wire on the middle pin of the pot. Most of the pots give metering of approximately 490 ohm when pot is turned to full. Zero when turned off. Few pots give metering of about 600 ohm. Few gives metering of 23kohm when turned to full on. What the heck is going on?
you should get readings from 0 to 10k on each pot. so either your wiring or your pots are somehow bogus
I get 0- 10k when the pots are unwired. When they are wired I get 0-490ohm when pot is turned full on. When its turned to the middle I get about 3k reading. I don't get it
ah yes i get it. if you deconnect from the axo gnd and 3.3v supply you will get the "correct" readings
this is normal, they are resistors in parallel.
1 / Req = 1 / R1 + 1 / R2 + 1 / R3 + etc.
for 24 pot of 10kohm Req = 416 ohm
you have to measure the voltage if it varies from 0 to 3.3v
I currently can't get the Axoloti to receive midi messages from the Teensy 4.1. Neither through the midi pins behind the input, nor through USB. The Axoloti does recognize the Teensy as a midi device via USB. The message from the Axoloti when plugging the Teensy in is displayed below.
Using Midi Monitor 2 for Mac displays all of the messages coming from the Teensy as working just fine. It's 12 pots and an Adafruit Trellis, pots set to controller numbers 22-33, Trellis programmed for note numbers 64-79.
If this significant, when I run the Teensy through Ableton, it receives the "note on" messages from the Trellis which can be used as intended, but treats the pots as note on messages as well, although not showing any notes on the scale. it doesn't recognize cc from the Teensy. The Axoloti does not receive any messages at all.
The script that I used is a modified version of the Mini Untztruent, just given more pots and appropriate midi CC. This was a shortcut since I'm not very skilled at coding. However, I figure that since the Midi Monitor is showing the appropriate messages, that may not be the issue.
Here is the message from the Axoloti when plugging the Teensy in via USB:
USB Device Attached
PID: 485h
VID: 16C0h
Address (#1) assigned.
cfg desc: num interfaces 2
interface: interface 0, num 0, numep 2, class 1 , sub class 3
endpoint: interface 0, ep num 0, addr 3
endpoint: interface 0, ep num 1, addr 83
interface: interface 1, num 1, numep 2, class 3 , sub class 0
endpoint: interface 1, ep num 0, addr 82
endpoint: interface 1, ep num 1, addr 2
Manufacturer : Teensyduino
Product : Teensy MIDI
Serial Number : 7912500
Enumeration done.
This device has only 1 configuration.
Default configuration set.
Switching to Interface (#0)
Class : 1h
SubClass : 3h
Protocol : 0h
USB Host Output size requests : 40
USB Host Input size requests : 40
USB Host Output connected to 0 : 3
USB Host Input connected to 0 : 83
MID class started.