Go Down

Topic: UNO + Olimex Midi Shield (Resolved) (Read 6156 times) previous topic - next topic

marco_c

The current on the LED pins will depend on the LED and the resistors you have put in the circuit, so you can calculate based on theory and see if it is close.

The current on D1 should be the MIDI serial interface.
Arduino libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com

deseipel

D1 = 7.6mA   (probes on D1 and 5v power supply)

The MIDI OUT DIN pins 4,5 = 4.5mA (is as high as it goes).

This is without the led inserted into the MIDI DIN.  I guess my thought is that, according to what I've read, MIDI operates on 5mA to 0mA.  The MIDI OUT spec only shows  220ohm resistors on pins 4,5 respectively.  So where am I losing .5mA or how can I ramp up the mA?  be gentle.

marco_c

The current should drive an optocoupler (effectively a LED), so in my opinion the 0.5mA is not going to make a big difference to how the LED lights up in the coupler.

Have you checked that the opposite (ie, sending 0xff continuous) gives a current that is at least close to 0mA? That couls also be a problem as the LED would stay at lkeast partially lit.

One other thing that may be worth doing is cheking the specs on the Roland cable to see what is expected there. You may have done this already but there is not info on these posts.
Arduino libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com

deseipel

The LED isn't hooked up to the MIDI OUT.  And also, there's no octocupler on the MIDI out spec.  I have the board set to send MIDI OUT, so its coming from the board, going through my MIDI/USB cable and into my pc. 

There isn't really a lot of info on my MIDI/USB cable from Roland.  I've used a USB analyzer app that monitors incoming data and nothing registers when I send data through the cable.  The cable works fine with other MIDI devices though.  BUT, if the cable needs the 5mA to register start bits, I'd say it's not getting it.  I don't know if other midi devices absolutely need that 5mA to operate or not.


marco_c

Quote
The LED isn't hooked up to the MIDI OUT


If it follows the standard your MIDI OUT is connected to an optocoupler on the MIDI IN side. There should be something in the middle of the cable you have that is MIDI to USB converter. So it is driving that optocoupler.
Arduino libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com

marco_c

I just looked up your cable type and assume it is this one http://www.roland.com/products/en/UM-ONE/.

This cable has indicators on the cable to indicate IN and OUT traffic on the cable?
Arduino libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com

deseipel

yes, that's the cable.  I don't know what is inside the UM1 cable.  I misunderstood what you wrote earlier.  Yes, each MIDI IN should have an octocupler.

Tomorrow will be the last day I mess around with this.  I'm going to test some simple 'send midi notes' with a real synth (not my pc).  I done this before, but what the hell do I have to lose.  There's got to be something very wrong with what I'm doing or else its the hardware I have is bad.  There's plenty of examples of people doing a lot more with Arduino & MIDI. 

Thursday, I will return the two boards for a refund.  I may decide to go with a different arduino board.  The UNO's limitation on serial ports wasn't something I considered when I purchased it.  I wouldn't mind trying the Rugged Circuits MIDI shield.  If it works, it will be a huge step forward!





marco_c

Fair enough. It must be frustrating.

It is not hard to make your own if you have a soldering iron. I made one that works pretty well. If you are interested, go to the libraries in my footer, look at the midi library and in the main library header file is a reference to a site that has a good circuit that you can build as is or onto a shield.

Good luck.
Arduino libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com

deseipel

I did an interesting experiment:

I ran this app, which lets you connect a serial port on your pc to the MIDI device. 

https://code.google.com/p/oxmidi/

With a normal usb cable plugged into the UNO, I only get data to show up in the monitor when running code that uses serialwrite.   When using the MIDI library, I get nothing.  Also, even when I do get data in this monitor, the notes are really wrong.  I dunno, could be the app.

deseipel

update:

returned both the UNO & Olimex MIDI 'brick'  and ordered the Rugged Circuits Ruggeduino board and MIDI Sheild.  I'm happy to report that, so far, so good.  MIDI OX saw the incoming notes right away from my test sketch. 

deseipel

this code now works beautifully (in MIDIOX thus far, haven't tested with the hardware yet).  It reads for a couple notes, and sends program change msgs up or down; sweet.

Code: [Select]

#include <MIDI.h>
/* set NRPN to set volume to zero for part xyz
read existing program/patch number ???
send stop control
*/
byte P = 1;


void HandleNoteOn (byte channel, byte note, byte velocity){

    //if note1 or note2 is sent, send program change control to go up or down
  if (note == 60){   //need to get the actual note number that I'll assign */
      if (P == 127){P=1;
    MIDI.sendProgramChange(P,10);
      }
      else
      {
        P++;
        MIDI.sendProgramChange(P,10);
      }
     
  }
  if (note == 62){  //need to get the actual note number that I'll assign
       if (P== 1){ P=127;
    MIDI.sendProgramChange(P,10);
 
  }
  else { P--;
  MIDI.sendProgramChange(P,10);
  }
 
  }
  }
 
//if note3 is sent, send nrpn to set volume to zero


void setup() {
 
  MIDI.begin(MIDI_CHANNEL_OMNI);
  MIDI.turnThruOff();
  MIDI.setHandleNoteOn(HandleNoteOn);
  MIDI.sendProgramChange(P,10);

}

void loop () {

  MIDI.read(); //is there incoming MIDI?
 

}

deseipel

https://www.facebook.com/video/embed?video_id=479320828796254



short video demo-ing the end result of my work on the ruggeduino & MIDI

deseipel

A final note as I mark this 'resolved':  The final root cause of this was never really discovered.  The ruggeduino boards work perfectly.  Olimex never got back to me with any real results.  I have to conclude it was their shield which was the problem.

Go Up