Pages: 1 ... 4 5 [6] 7 8 ... 11   Go Down
Author Topic: works: MIDI-IN: code + schematics  (Read 37077 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!!!!!
Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Nowhere
Offline Offline
God Member
*****
Karma: 3
Posts: 852
|-\ |\|\
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Tep----

That schematic is AWESOME!!!!!
 smiley-grin
Logged

Soundcloud page: http://soundcloud.com/beefinator-2
Youtube channel: http://www.youtube.com/user/beefinator14
Old soundcloud page (ran out o

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-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 smiley-wink
Cheers,

Andreas
Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@sciguy: smiley

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-wink
But thanks anyhow!  
Andreas
« Last Edit: August 29, 2009, 01:53:53 pm by AndreasViruly » Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

(pins 2-13 = 12 pins + analog pins = 6 pins. Total 18 pins ! smiley-wink)
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!
Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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]
« Last Edit: August 30, 2009, 10:49:52 am by tep » Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.  smiley-sad

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...)
« Last Edit: August 30, 2009, 02:15:57 pm by tep » Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey, thanks for all your information, I have an arduino receiving midi from a controller or from the computer..!

Now i have another problem!! (when will i finish!?jejeje) i bought a 9V AC/DC for go everywhere with my arduino and my midi controller. But without the USB power it doesn't works!! What happens?!

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have the circuit done and working, but here is the problem:

With this code, happens two diferent thinks with power via USB or 9V black power jack.

without usb power, never is available, the serie...

Code:
int statusLed=13;  //one
int statusLed2=12;  //ten
int statusLed3=11;  //hundred
byte incomingByte;

void setup() {
  pinMode(statusLed,OUTPUT);   // declare the LED's pin as output
  pinMode(statusLed2,OUTPUT);   // declare the LED's pin as output
  pinMode(statusLed3,OUTPUT);   // declare the LED's pin as output

  Serial.begin(31250); //9600 for USB i 31250 for MIDI i 38400 for debugging
}

void loop () {
  if (Serial.available() > 0) {
    // read the incoming byte:
    incomingByte = Serial.read();
    blink(HIGH,statusLed);
    delay(temps);
    blink(LOW,statusLed);
    delay(20);
  }
}

void blink(byte valor, int nled){
  digitalWrite(nled, valor);
}

anyone can help me?

thanks a lot!
Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!
Just to let you know where my problem is:

It is the resistance between RX and 5V.
It should be measured as about 1k to connect either MIDI or USB.
So I can't for now have a standalone solution where it is possible to connect the FTDI from time to time because the resistance is then too low or too high without the FTDI.

I can put a switch to enable a parallel resistor to the 3,3k one : enabled would be MIDI, disabled would be FTDI.
Or perhaps a transistor?
Or a FTDI in my enclosure... I made eveything to not have the need of it, but... And it would allow me also to have MIDI over Serial/USB connectivity.

So, for now I don't really know. I could try a transistor, but would it allow 9600 or 11250bps? I'm not sure with a 2N2222? (Their frequency is 250MHz or 300MHz)



Another thing: check out Ruin&Wesen library, could help some! smiley-wink http://ruinwesen.com/blog?id=582
« Last Edit: September 06, 2009, 04:42:27 am by tep » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi, i'm searching a circuit of a MIDI THRU for put in this MIDI IN circuit, anyone can help me?

thanks!
Logged

Pages: 1 ... 4 5 [6] 7 8 ... 11   Go Up
Jump to: