Can't get simple MIDI OUT working

Status
Not open for further replies.
Hi everyone, need you help with my simple MIDI setup.

I'm trying to send midi notes (and potentially clock) from Teensy LC to TX port using the schematics from https://www.pjrc.com/teensy/td_libs_MIDI.html but without midi in, so basically:
td_libs_MIDI_sch_t3.png

That's how it looks on the board:
board.png

But midi devices are not getting any input. Also tried with USB to midi interface (by connecting MIDI OUT from teensy to the interface and monitoring the input on the laptop), but it doesn't recognise any input as well.

Here's the program itself:
Code:
#include <MIDI.h>

int led = 13;

MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, MIDI);
const int channel = 1;

void setup() {
  pinMode(led, OUTPUT);

  MIDI.begin(MIDI_CHANNEL_OMNI);
  Serial1.setTX(1);
}

void loop() {
  int note;
  for (note=10; note <= 127; note++) {
    Serial.println(note);
    digitalWrite(led, HIGH);

    MIDI.sendNoteOn(note, 100, channel);
    delay(1000);
    MIDI.sendNoteOff(note, 0, channel);

    digitalWrite(led, LOW);
    delay(1000);
  }
  delay(2000);
}

What is also strange that my Usb to Midi interface doesn't seam to "detect" the input -- it has two leds that blinks when it receives incoming MIDI or sends outgoing, but it doesn't seam to be triggered when connected to teensy.

Is there anything wrong in my setup?

Thanks in advance.
 
Any chance you have connectors 4 and 5 switched at the DIN connector?

There is always some ambiguity in sorting out if the connector is shown from the face or connection side.
 
Your code works for me with the same circuit wired to the connector "face".
If you have a multimeter with continuity tester, check that the continuity from the T3.2 ground pin to the breadboard ground rail is good. The solder connection on the ground pin looks like it might not be making good contact. The other two pins look like they might be OK but check their continuity as well.

Pete
 
Those pins don't look like they're soldered properly!

Here are the step for successful soldering.

soldering.png

Step 2 and 3 are critically important, especially feeding the solder into the point closest to the 2 surfaces. Solder has a "flux" chemical inside which cleans the 2 metal surfaces as you feed it in. If you touch only 1 of them with the solder, or worst of all melt some solder on your iron before touching the pad and wire, you won't get any of that essential flux chemical onto both metal surfaces. The continued heating after you withdraw the solder is also really important, so all 3 metals are heated to a uniform temperature. If you withdraw the iron too quickly, they will be at different temperatures and will not cool down together to form a strong bond.

Also watch this quick video Robin & Erin made to demonstrate how to solder these sorts of pins.

 
Oh, also, check those resistors with a multimeter.

Normally the colors for a 47 ohm 1% resistor should be yellow, violet, black, gold, brown.

I can't quite tell what color that 4th stripe is, but it doesn't look like gold. If it's red or brown, those would be mugh higher resistors that would prevent enough current from turning on the LED input on whatever you're trying to whereever send the MIDI signal.
 
Thanks for replies and great soldering tutorial PaulStoffregen!

Checked my resistors with multimeter and they are actually 47 kohm. So my lame mistake.

Will try to get proper ones and also solder pins correctly.

Thanks again for your help everyone!
 
Unfortunately correct resistors didn't fix the problem -- they got me one step closer but still not completely there :)

Now my midi interface detects that MIDI IN is connected (led on the interface lights up), but still no notes are coming in.

From time to time I see couple of thousands empty messages like this sent within few seconds:
Screenshot 2019-11-09 at 09.32.40.png
but it probably due to some drops in current as they all always look the same.

I've also measured current on both 3.3v after resistor and on GPIO pin (tried 1 and 10) after the resistor, and the interesting thing is (at least to me since I don't understand why it's happening): before I connect midi cable current on 3.3v after the resistor is 3.2V (the same as on GPIO after the resistor), but as soon as I connect MIDI it drops to 0,23V while current on GPIO pin stays the same (3.2V).

Is it supposed to work like that?

Another theory I have is that perhaps I burned something on the Teensy while lame-soldering?
 
Status
Not open for further replies.
Back
Top