works: MIDI-IN: code + schematics

Tep, do you mean with the arduino connected, or without the arduino connected?
BTW, do you need to declare the Rx pin as an input, to lower the internal pull up/down resistor?

Could the voltage be to low for the Arduino to notice?
In that case you'd suggest lowering the 3k3? or making it bigger?

Andreas, could you measure the Voltage over the rx pin?

You don't really need the arduino to be connected.
Since it's standart serial communication, nothing to declare concerning the arduino pin.

Let see! You're perhaps having the same problem than me...
Just measure the idle and the busy voltage of the pin!
(Btw, it's perhaps easier if you can send something continuously like MTC, MMC, etc.)

are you experiencing the same as this guy?
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1187962258/53#53
In that case, we've got the same problem.

Did you ever got it working?
I personally think it;s the arduino.

I already got it working a few times :wink:

so what did you do?
what did you replace? what other programs did you upload :O?

I used this schematic (the same than everyone I guess) with a 4N28 and a 1N4148.

I began with the simple code I posted again in the last pages.

...As you can see, nothing very special...

Hello Everyone,

What I did was the following.
Instead of linking the schematic to the RX of my Arduino, I put a LED between the incoming data and the 5V pin.

Here I received the following results:
During the idle midi-signal I received 0V.
Whilst playing only 1 note I got about 0,02V.
Whilst playing 2 notes at the same time I got 0,04V
Playing 3 notes around 0,06V and so on.

Is there an error?
What can we do :-/

Thanks in advance,.

Andreas

The voltages you're talking about are measured on the RX pin, right?

Can you please try it without the led?
I don't know where you measured, but my guess is after the voltage drop of the led ;D

Hello,

What I did next was the following:

I connected the RX line to the red side of my voltage meter.
The black side I connected to the ground.

Here I found a voltage of around 7V (7,3-7,4).
By playing several notes at the same time this amount gets less.

The more notes I play at the same time, the lower this amount becomes.

Is this of any help in our quest?

Thanks!!!!!

Yes!
But it should be about 5V... did you checked the resistors?

7V is quite impossible, given the fact that usb limits it to 5V(so does arduino).
and midi can't be 7 volts!

The "RX pin" andreas, is dat het blauwe draadje wat normaal in de arduino gaat? en zonder led naar 5V?

Tep----

That schematic is AWESOME!!!!!
:smiley:

Hello everyone,

I got it working!
At least.. my arduino receives the signal.
I've rebuilt the whole thing and suddently; arduino saw the light :wink:

Now.. next step to get all the lights to work properly.
Thanks for all the help you guys gave me!

Still.. you'll be hearing from me :wink:
Cheers,

Andreas

@sciguy: :slight_smile:

@AndreasViruly: Good, now I guess it'll be very quick, if you only want to light on LED on notes! :wink:

Haha, no that was just the first step. I want to make 36 different LED's corresponding to 3 octaves on the piano. Everytime a note is played on the master keyboard, these LED's have to light up, and go out the moment the key is released. I already saw my keyboard works with the "note on" with 0 velocity, when switching off a note..
I only have 13 pins on my Arduino so I have to start working with multi/charlieplexing.
Programming is just completely new for me so it'll take quite a while I think :wink:
But thanks anyhow!
Andreas

(pins 2-13 = 12 pins + analog pins = 6 pins. Total 18 pins ! ;))
Ok, those methods are good, but not very adapted if you plan to do other time-consuming things. I can recommend you shift registers. I got mine 5 for 1 us$ from Thailand on eBay. It's of course more assembly, but if you go this way I can give you a function to light LEDs a simple way.
Anoter thing : have a look at registers that handle PWM, you could handle the velocity!

On my MIDI controller with the MIDI IN issue I consolidated some solder and now found out that if I connect the RX pin to the RX pin of an empty Arduino Diecimila my onboard standalone Arduino receives the signal.

Do you have an idea of how to solve this?
[edit]Hm no, doesn't work anymore this way.[/edit]

Something strange: My MIDI IN circuit always work when I connect it to an Arduino. When it is a standalone Atmega, it doesn't work anymore. :frowning:

Look at this schematic :

He is using a 8-pin optocoupler, but he adds a 1.8k resistor to ground. What you think about it?
(My electronic knownledge is very small...)

Haven't seen it mentioned here, but I combined this sketch with teh serial to midi converter and it worked just taking the midi in through USB. Thanks for the sketch! I finally got my ableton clips triggering and flasing a LED at me when launched. Nice!